Class AbstractChannel
java.lang.Object
org.exoplatform.container.component.BaseComponentPlugin
org.exoplatform.commons.api.notification.channel.AbstractChannel
- All Implemented Interfaces:
org.exoplatform.container.component.ComponentPlugin
public abstract class AbstractChannel
extends org.exoplatform.container.component.BaseComponentPlugin
Created by The eXo Platform SAS
Author : eXoPlatform
thanhvc@exoplatform.com
Dec 12, 2014
-
Field Summary
Fields inherited from class org.exoplatform.container.component.BaseComponentPlugin
desc, name -
Constructor Summary
ConstructorsConstructorDescriptionUsing the default life-cycleAbstractChannel(AbstractNotificationLifecycle lifecycle) -
Method Summary
Modifier and TypeMethodDescriptionvoiddispatch(NotificationInfo notifInfo) Process the notification infoabstract voiddispatch(NotificationContext ctx, String userId) Process the notification information for the specified user.voidend()abstract StringgetId()Gets ChannelIdabstract ChannelKeygetKey()Gets Channel KeyGets the lifecycle what assigned to the channelGets the template builder by the specified PluginKeyprotected abstract AbstractTemplateBuilderGets the template by the specified pluginIdbooleanHas the template builder of the plugin and the channelbooleanabstract voidregisterTemplateProvider(TemplateProvider provider) Register the template provider to the channel.voidstart()Initialize something when starts to work the channelMethods inherited from class org.exoplatform.container.component.BaseComponentPlugin
getDescription, getName, setDescription, setName
-
Constructor Details
-
AbstractChannel
-
AbstractChannel
public AbstractChannel()Using the default life-cycle
-
-
Method Details
-
start
public void start()Initialize something when starts to work the channel -
end
public void end() -
getId
Gets ChannelId- Returns:
-
getKey
Gets Channel Key- Returns:
-
getLifecycle
Gets the lifecycle what assigned to the channel- Returns:
-
dispatch
Process the notification information for the specified user.- Parameters:
ctx- The NotificationContextuserId- the user will be received the message.
-
dispatch
Process the notification info- Parameters:
notifInfo- the notification information
-
registerTemplateProvider
Register the template provider to the channel.- Parameters:
provider-
-
getTemplateFilePath
Gets the template by the specified pluginId- Parameters:
key- the plugin key
-
hasTemplateBuilder
Has the template builder of the plugin and the channel- Parameters:
key- the plugin key
-
getTemplateBuilder
Gets the template builder by the specified PluginKey- Parameters:
key- the PluginKey
-
isDefaultChannel
public boolean isDefaultChannel() -
getTemplateBuilderInChannel
-