Class RedisNotificationPlugin
- java.lang.Object
-
- io.vertigo.social.plugins.notification.redis.RedisNotificationPlugin
-
- All Implemented Interfaces:
io.vertigo.core.node.component.CoreComponent,io.vertigo.core.node.component.Plugin,NotificationPlugin
public final class RedisNotificationPlugin extends Object implements NotificationPlugin
- Author:
- pchretien
-
-
Constructor Summary
Constructors Constructor Description RedisNotificationPlugin(Optional<String> connectorNameOpt, List<io.vertigo.connectors.redis.RedisConnector> redisConnectors)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcleanTooOldNotifications()Scan all notifs every minutes to removed old ones.List<Notification>getCurrentNotifications(UID<Account> accountURI)voidremove(UID<Account> accountURI, UUID notificationUUID)voidremoveAll(String type, String targetUrl)voidsend(NotificationEvent notificationEvent)voidupdateUserContent(UID<Account> accountURI, UUID notificationUUID, String userContent)
-
-
-
Method Detail
-
send
public void send(NotificationEvent notificationEvent)
- Specified by:
sendin interfaceNotificationPlugin- Parameters:
notificationEvent- Notification to send
-
getCurrentNotifications
public List<Notification> getCurrentNotifications(UID<Account> accountURI)
- Specified by:
getCurrentNotificationsin interfaceNotificationPlugin- Parameters:
accountURI- Accout uri- Returns:
- All notifications for this account
-
updateUserContent
public void updateUserContent(UID<Account> accountURI, UUID notificationUUID, String userContent)
- Specified by:
updateUserContentin interfaceNotificationPlugin- Parameters:
accountURI- Account urinotificationUUID- Notification uuiduserContent- User Content
-
remove
public void remove(UID<Account> accountURI, UUID notificationUUID)
- Specified by:
removein interfaceNotificationPlugin- Parameters:
accountURI- Account urinotificationUUID- Notification uuid
-
removeAll
public void removeAll(String type, String targetUrl)
- Specified by:
removeAllin interfaceNotificationPlugin- Parameters:
type- Notification's typetargetUrl- Target URL, use to filter all notifications to remove
-
cleanTooOldNotifications
public void cleanTooOldNotifications()
Scan all notifs every minutes to removed old ones.
-
-