Class AbstractNotificationLifecycle
- java.lang.Object
-
- org.exoplatform.commons.api.notification.lifecycle.AbstractNotificationLifecycle
-
- Direct Known Subclasses:
BaseNotificationLifecycle,DefaultLifecycle
public abstract class AbstractNotificationLifecycle extends Object
Created by The eXo Platform SAS Author : eXoPlatform thanhvc@exoplatform.com Dec 12, 2014
-
-
Constructor Summary
Constructors Constructor Description AbstractNotificationLifecycle()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description AbstractChannelgetChannel()Gets the channelabstract voidprocess(NotificationContext ctx, String userId)Process the notification for the userabstract voidprocess(NotificationContext ctx, String... userIds)Process the notification for multi-usersvoidsend(NotificationContext ctx)Sends the message by Mail, UI or any the configured channelvoidsetChannel(AbstractChannel channel)Sets the channel to the lifecyclevoidstore(NotificationInfo notifInfo)Storage the notification into the dbvoidupdate(NotificationInfo notifInfo)Update an existing notification
-
-
-
Method Detail
-
getChannel
public AbstractChannel getChannel()
Gets the channel- Returns:
-
setChannel
public void setChannel(AbstractChannel channel)
Sets the channel to the lifecycle- Parameters:
channel-
-
process
public abstract void process(NotificationContext ctx, String... userIds)
Process the notification for multi-users- Parameters:
ctx-userIds-
-
process
public abstract void process(NotificationContext ctx, String userId)
Process the notification for the user- Parameters:
ctx-userId-
-
store
public void store(NotificationInfo notifInfo)
Storage the notification into the db- Parameters:
notifInfo-
-
update
public void update(NotificationInfo notifInfo)
Update an existing notification- Parameters:
notifInfo-
-
send
public void send(NotificationContext ctx)
Sends the message by Mail, UI or any the configured channel- Parameters:
ctx-
-
-