public interface NotificationManager
Modifier and Type | Method and Description |
---|---|
void |
addSubscription(String username,
String notification,
DocumentModel doc,
Boolean sendConfirmationEmail,
NuxeoPrincipal principal,
String notificationName)
Called when a user subscribes to a notification.
|
void |
addSubscriptions(String username,
DocumentModel doc,
Boolean sendConfirmationEmail,
NuxeoPrincipal principal) |
Notification |
getNotificationByName(String selectedNotification)
Returns a notification with all data loaded (label, etc).
|
Set<String> |
getNotificationEventNames()
Gets the list of event names used by notifications.
|
NotificationRegistry |
getNotificationRegistry()
Deprecated.
should never have to return the registry : use delegation
|
List<Notification> |
getNotificationsForEvents(String eventId) |
List<Notification> |
getNotificationsForSubscriptions(String parentType) |
List<DocumentModel> |
getSubscribedDocuments(String prefixedPrincipalName)
Returns the list of live docs the user is subscribed to.
|
List<String> |
getSubscribers(String notification,
DocumentModel doc)
Gets the users that subscribed to a notification on a certain document.
|
List<String> |
getSubscribers(String notification,
String docId)
Deprecated.
since 7.3 use
getSubscribers(String, DocumentModel) |
List<String> |
getSubscriptionsForUserOnDocument(String username,
DocumentModel doc)
Gets the notifications for which a user subscribed for a certain document.
|
List<String> |
getSubscriptionsForUserOnDocument(String username,
String docId)
Deprecated.
since 7.3 use
getSubscriptionsForUserOnDocument(String, DocumentModel) |
List<String> |
getUsersSubscribedToNotificationOnDocument(String notification,
DocumentModel doc)
Gets all users and groups that subscribed to a notification on a document This is used in management of
subscritptions.
|
List<String> |
getUsersSubscribedToNotificationOnDocument(String notification,
String docId)
Deprecated.
|
void |
removeSubscription(String username,
String notification,
DocumentModel doc)
Called when a user cancels his notification.
|
void |
removeSubscription(String username,
String notification,
String docId)
Deprecated.
since 7.3 use
removeSubscription(String, String, DocumentModel) |
void |
removeSubscriptions(String username,
List<String> notifications,
DocumentModel doc) |
void |
removeSubscriptions(String username,
List<String> notifications,
String docId)
Deprecated.
since 7.3 use
removeSubscriptions(String, List, DocumentModel) |
void |
sendDocumentByMail(DocumentModel doc,
String freemarkerTemplateName,
String subject,
String comment,
NuxeoPrincipal sender,
List<String> sendTo)
Sends an e-mail directly.
|
void |
sendNotification(String notificationName,
Map<String,Object> infoMap,
String userPrincipal)
Directly sends a notification to the principal, using the data provided in the map
|
@Deprecated List<String> getSubscribers(String notification, String docId)
getSubscribers(String, DocumentModel)
List<String> getSubscribers(String notification, DocumentModel doc)
@Deprecated List<String> getSubscriptionsForUserOnDocument(String username, String docId)
getSubscriptionsForUserOnDocument(String, DocumentModel)
List<String> getSubscriptionsForUserOnDocument(String username, DocumentModel doc)
@Deprecated List<String> getUsersSubscribedToNotificationOnDocument(String notification, String docId)
getUsersSubscribedToNotificationOnDocument(String, DocumentModel)
List<String> getUsersSubscribedToNotificationOnDocument(String notification, DocumentModel doc)
void addSubscription(String username, String notification, DocumentModel doc, Boolean sendConfirmationEmail, NuxeoPrincipal principal, String notificationName)
void addSubscriptions(String username, DocumentModel doc, Boolean sendConfirmationEmail, NuxeoPrincipal principal)
void removeSubscriptions(String username, List<String> notifications, String docId)
removeSubscriptions(String, List, DocumentModel)
void removeSubscriptions(String username, List<String> notifications, DocumentModel doc)
void removeSubscription(String username, String notification, String docId)
removeSubscription(String, String, DocumentModel)
void removeSubscription(String username, String notification, DocumentModel doc)
@Deprecated NotificationRegistry getNotificationRegistry()
Notification getNotificationByName(String selectedNotification)
void sendNotification(String notificationName, Map<String,Object> infoMap, String userPrincipal)
The map should contain at least the userName of the user calling the method stored under the key "author".
infoMap should also contain all the variables that should be used to make-up the body of the notifications message.
notificationName
- name of notificationinfoMap
- data used to compose the notification bodyuserPrincipal
- recipient used to get the adress(es) to send emailsvoid sendDocumentByMail(DocumentModel doc, String freemarkerTemplateName, String subject, String comment, NuxeoPrincipal sender, List<String> sendTo)
List<Notification> getNotificationsForSubscriptions(String parentType)
List<Notification> getNotificationsForEvents(String eventId)
Set<String> getNotificationEventNames()
List<DocumentModel> getSubscribedDocuments(String prefixedPrincipalName)
prefixedPrincipalName
- Copyright © 2015 Nuxeo SA. All rights reserved.