Package io.vertigo.social.notification
Interface NotificationManager
- All Superinterfaces:
io.vertigo.core.node.component.Component,io.vertigo.core.node.component.CoreComponent,io.vertigo.core.node.component.Manager
- All Known Implementing Classes:
NotificationManagerImpl
public interface NotificationManager
extends io.vertigo.core.node.component.Manager
- Author:
- pchretien, npiedeloup, btounkara
-
Method Summary
Modifier and TypeMethodDescriptiongetCurrentNotifications(io.vertigo.datamodel.data.model.UID<io.vertigo.account.account.Account> accountURI) Retrieves all notifications for one accountvoidremove(io.vertigo.datamodel.data.model.UID<io.vertigo.account.account.Account> accountURI, UUID notificationUUID) Removes one notification.voidRemoves all notifications by type and targetUrl.voidsend(Notification notification, Set<io.vertigo.datamodel.data.model.UID<io.vertigo.account.account.Account>> accountURIs) Sends a notification to a set of usersvoidupdateUserContent(io.vertigo.datamodel.data.model.UID<io.vertigo.account.account.Account> accountURI, UUID notificationUUID, String userContent) Updates the flag of the notification
-
Method Details
-
send
void send(Notification notification, Set<io.vertigo.datamodel.data.model.UID<io.vertigo.account.account.Account>> accountURIs) Sends a notification to a set of users- Parameters:
notification- NotificationaccountURIs- Destination users
-
getCurrentNotifications
List<Notification> getCurrentNotifications(io.vertigo.datamodel.data.model.UID<io.vertigo.account.account.Account> accountURI) Retrieves all notifications for one account- Parameters:
accountURI- Account- Returns:
- List notifications
-
remove
void remove(io.vertigo.datamodel.data.model.UID<io.vertigo.account.account.Account> accountURI, UUID notificationUUID) Removes one notification.- Parameters:
accountURI- User accountnotificationUUID- Notification uid
-
removeAll
Removes all notifications by type and targetUrl. Could be use when a business module need to revoke its notifications- Parameters:
type- Notification typetargetUrl- Notification's target Url
-
updateUserContent
void updateUserContent(io.vertigo.datamodel.data.model.UID<io.vertigo.account.account.Account> accountURI, UUID notificationUUID, String userContent) Updates the flag of the notification- Parameters:
accountURI- User accountnotificationUUID- Notification uiduserContent- userContent
-