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 void
cleanTooOldNotifications()
Scan all notifs every minutes to removed old ones.List<Notification>
getCurrentNotifications(UID<Account> accountURI)
void
remove(UID<Account> accountURI, UUID notificationUUID)
void
removeAll(String type, String targetUrl)
void
send(NotificationEvent notificationEvent)
void
updateUserContent(UID<Account> accountURI, UUID notificationUUID, String userContent)
-
-
-
Method Detail
-
send
public void send(NotificationEvent notificationEvent)
- Specified by:
send
in interfaceNotificationPlugin
- Parameters:
notificationEvent
- Notification to send
-
getCurrentNotifications
public List<Notification> getCurrentNotifications(UID<Account> accountURI)
- Specified by:
getCurrentNotifications
in interfaceNotificationPlugin
- Parameters:
accountURI
- Accout uri- Returns:
- All notifications for this account
-
updateUserContent
public void updateUserContent(UID<Account> accountURI, UUID notificationUUID, String userContent)
- Specified by:
updateUserContent
in interfaceNotificationPlugin
- Parameters:
accountURI
- Account urinotificationUUID
- Notification uuiduserContent
- User Content
-
remove
public void remove(UID<Account> accountURI, UUID notificationUUID)
- Specified by:
remove
in interfaceNotificationPlugin
- Parameters:
accountURI
- Account urinotificationUUID
- Notification uuid
-
removeAll
public void removeAll(String type, String targetUrl)
- Specified by:
removeAll
in 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.
-
-