Class NotificationManagerImpl
- java.lang.Object
-
- io.vertigo.social.impl.notification.NotificationManagerImpl
-
- All Implemented Interfaces:
io.vertigo.core.node.component.Component
,io.vertigo.core.node.component.CoreComponent
,NotificationManager
public final class NotificationManagerImpl extends Object implements NotificationManager
- Author:
- pchretien, npiedeloup, btounkara
-
-
Constructor Summary
Constructors Constructor Description NotificationManagerImpl(NotificationPlugin notificationsPlugin)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Notification>
getCurrentNotifications(UID<Account> userProfileURI)
Retrieves all notifications for one accountvoid
remove(UID<Account> accountURI, UUID notificationUUID)
Removes one notification.void
removeAll(String type, String targetUrl)
Removes all notifications by type and targetUrl.void
send(Notification notification, Set<UID<Account>> accountURIs)
Sends a notification to a set of usersvoid
updateUserContent(UID<Account> accountURI, UUID notificationUUID, String userContent)
Updates the flag of the notification
-
-
-
Constructor Detail
-
NotificationManagerImpl
@Inject public NotificationManagerImpl(NotificationPlugin notificationsPlugin)
- Parameters:
notificationsPlugin
- Notifications plugin
-
-
Method Detail
-
send
public void send(Notification notification, Set<UID<Account>> accountURIs)
Sends a notification to a set of users- Specified by:
send
in interfaceNotificationManager
- Parameters:
notification
- NotificationaccountURIs
- Destination users
-
getCurrentNotifications
public List<Notification> getCurrentNotifications(UID<Account> userProfileURI)
Retrieves all notifications for one account- Specified by:
getCurrentNotifications
in interfaceNotificationManager
- Parameters:
userProfileURI
- Account- Returns:
- List notifications
-
remove
public void remove(UID<Account> accountURI, UUID notificationUUID)
Removes one notification.- Specified by:
remove
in interfaceNotificationManager
- Parameters:
accountURI
- User accountnotificationUUID
- Notification uid
-
removeAll
public void removeAll(String type, String targetUrl)
Removes all notifications by type and targetUrl. Could be use when a business module need to revoke its notifications- Specified by:
removeAll
in interfaceNotificationManager
- Parameters:
type
- Notification typetargetUrl
- Notification's target Url
-
updateUserContent
public void updateUserContent(UID<Account> accountURI, UUID notificationUUID, String userContent)
Description copied from interface:NotificationManager
Updates the flag of the notification- Specified by:
updateUserContent
in interfaceNotificationManager
- Parameters:
accountURI
- User accountnotificationUUID
- Notification uiduserContent
- userContent
-
-