Class BaseNotificationPlugin
- java.lang.Object
-
- org.exoplatform.container.component.BaseComponentPlugin
-
- org.exoplatform.commons.api.notification.plugin.BaseNotificationPlugin
-
- All Implemented Interfaces:
org.exoplatform.container.component.ComponentPlugin
- Direct Known Subclasses:
AbstractNotificationChildPlugin,AbstractNotificationPlugin
public abstract class BaseNotificationPlugin extends org.exoplatform.container.component.BaseComponentPlugin
-
-
Constructor Summary
Constructors Constructor Description BaseNotificationPlugin(org.exoplatform.container.xml.InitParams initParams)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description NotificationInfobuildNotification(NotificationContext ctx)Makes notificationvoidend(NotificationContext ctx)End the plug inabstract StringgetId()Gets Notification Plug in keyPluginKeygetKey()Creates the key for NotificationPluginprotected org.exoplatform.services.organization.OrganizationServicegetOrganizationService()List<PluginConfig>getPluginConfigs()booleanisOldPlugin()Determines the plugin is old or new mechanism The target adapts the old plugin from PLF 4.1 to work well new mechanismabstract booleanisValid(NotificationContext ctx)Check, for each plugin, if we will send notificationprotected abstract NotificationInfomakeNotification(NotificationContext ctx)Makes MessageInfo from given information what keep inside NotificationContextvoidsetOldPlugin(boolean isOldPlugin)Sets the flag value TRUE/FALSE The target adapts the old plugin on PLF 4.1 to work well new mechanismvoidstart(NotificationContext ctx)Start the plug in
-
-
-
Method Detail
-
getPluginConfigs
public List<PluginConfig> getPluginConfigs()
-
start
public void start(NotificationContext ctx)
Start the plug in- Parameters:
ctx-
-
end
public void end(NotificationContext ctx)
End the plug in- Parameters:
ctx-
-
isOldPlugin
public boolean isOldPlugin()
Determines the plugin is old or new mechanism The target adapts the old plugin from PLF 4.1 to work well new mechanism- Returns:
-
setOldPlugin
public void setOldPlugin(boolean isOldPlugin)
Sets the flag value TRUE/FALSE The target adapts the old plugin on PLF 4.1 to work well new mechanism- Parameters:
isOldPlugin-
-
getId
public abstract String getId()
Gets Notification Plug in key- Returns:
-
isValid
public abstract boolean isValid(NotificationContext ctx)
Check, for each plugin, if we will send notification- Returns:
-
makeNotification
protected abstract NotificationInfo makeNotification(NotificationContext ctx)
Makes MessageInfo from given information what keep inside NotificationContext- Parameters:
ctx-- Returns:
-
buildNotification
public NotificationInfo buildNotification(NotificationContext ctx)
Makes notification- Parameters:
ctx-- Returns:
-
getKey
public PluginKey getKey()
Creates the key for NotificationPlugin- Returns:
-
getOrganizationService
protected org.exoplatform.services.organization.OrganizationService getOrganizationService()
-
-