Class AbstractNotificationPlugin
- java.lang.Object
-
- org.exoplatform.container.component.BaseComponentPlugin
-
- org.exoplatform.commons.api.notification.plugin.BaseNotificationPlugin
-
- org.exoplatform.commons.api.notification.plugin.AbstractNotificationPlugin
-
- All Implemented Interfaces:
org.exoplatform.container.component.ComponentPlugin
public abstract class AbstractNotificationPlugin extends BaseNotificationPlugin
-
-
Constructor Summary
Constructors Constructor Description AbstractNotificationPlugin(org.exoplatform.container.xml.InitParams initParams)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanbuildDigest(NotificationContext ctx, Writer writer)Makes digest messageMessageInfobuildMessage(NotificationContext ctx)Makes massagePluginKeygetKey()Creates the key for NotificationPluginprotected StringgetLanguage(NotificationInfo message)protected org.exoplatform.services.organization.OrganizationServicegetOrganizationService()groovy.text.TemplategetTemplateEngine()Get TemplateEngine of pluginprotected abstract booleanmakeDigest(NotificationContext ctx, Writer writer)Makes the Digest message from given NotificationMessage what keep inside NotificationContextprotected abstract MessageInfomakeMessage(NotificationContext ctx)Makes the MessageInfor from given NotificationMessage what keep inside NotificationContextvoidsetTemplateEngine(groovy.text.Template engine)Set TemplateEngine for plugin-
Methods inherited from class org.exoplatform.commons.api.notification.plugin.BaseNotificationPlugin
buildNotification, end, getId, getPluginConfigs, isOldPlugin, isValid, makeNotification, setOldPlugin, start
-
-
-
-
Method Detail
-
makeMessage
protected abstract MessageInfo makeMessage(NotificationContext ctx)
Makes the MessageInfor from given NotificationMessage what keep inside NotificationContext- Parameters:
ctx-- Returns:
-
makeDigest
protected abstract boolean makeDigest(NotificationContext ctx, Writer writer)
Makes the Digest message from given NotificationMessage what keep inside NotificationContext- Parameters:
ctx-writer-- Returns:
-
buildMessage
public MessageInfo buildMessage(NotificationContext ctx)
Makes massage- Parameters:
ctx-- Returns:
-
buildDigest
public boolean buildDigest(NotificationContext ctx, Writer writer)
Makes digest message- Parameters:
ctx-writer-- Returns:
-
getKey
public PluginKey getKey()
Creates the key for NotificationPlugin- Overrides:
getKeyin classBaseNotificationPlugin- Returns:
-
getLanguage
protected String getLanguage(NotificationInfo message)
- Parameters:
message-- Returns:
-
getOrganizationService
protected org.exoplatform.services.organization.OrganizationService getOrganizationService()
- Overrides:
getOrganizationServicein classBaseNotificationPlugin
-
getTemplateEngine
public groovy.text.Template getTemplateEngine()
Get TemplateEngine of plugin- Returns:
- the TemplateEngine
-
setTemplateEngine
public void setTemplateEngine(groovy.text.Template engine)
Set TemplateEngine for plugin- Parameters:
engine- the TemplateEngine to set
-
-