Class SubscriptionAdapter
java.lang.Object
org.nuxeo.ecm.platform.ec.notification.SubscriptionAdapter
Encapsulates all notification storage logic in the Notifiable facet.
- Since:
- 7.3
-
Field Summary
Modifier and TypeFieldDescriptionprotected DocumentModel
protected static final String
protected static final String
protected static final String
static final String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addSubscription
(String username, String notification) Add a subscription to a notification for a given user.void
addSubscriptionsToAll
(String username) Add a subscription to all notification for a given userprotected void
Clears the notification in the document's property.void
copySubscriptionsTo
(DocumentModel targetDoc) Copy the subscriptions of the current doc to the targetted document.Take the document storage propery and put it in a map.getNotificationSubscribers
(String notification) Return the list of subscribers name for a given notification.getUserSubscriptions
(String username) Return the list of of subscriptions for a given uservoid
removeUserNotificationSubscription
(String username, String notification) Remove a subscription to a notification for a given user.protected void
setNotificationMap
(Map<String, Set<String>> map) Take a map and store it in the document's notification property.
-
Field Details
-
NOTIFIABLE_FACET
- See Also:
-
NOTIF_PROPERTY
- See Also:
-
NOTIF_SUBSCRIBERSKEY
- See Also:
-
NOTIF_NAMEKEY
- See Also:
-
doc
-
-
Constructor Details
-
SubscriptionAdapter
-
-
Method Details
-
getNotificationMap
Take the document storage propery and put it in a map.- key
- notificationName
- value
- list of subscribers
setNotificationMap(Map)
-
setNotificationMap
Take a map and store it in the document's notification property. To get the original map, usegetNotificationMap()
-
clearNotification
protected void clearNotification()Clears the notification in the document's property.- Since:
- 10.2
-
getNotificationSubscribers
Return the list of subscribers name for a given notification. -
getUserSubscriptions
Return the list of of subscriptions for a given user -
addSubscription
Add a subscription to a notification for a given user. -
addSubscriptionsToAll
Add a subscription to all notification for a given user -
removeUserNotificationSubscription
Remove a subscription to a notification for a given user. -
copySubscriptionsTo
Copy the subscriptions of the current doc to the targetted document.
-