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<String> |
getSubscribers(String notification,
String docId)
Gets the users that subscribed to a notification on a certain document.
|
List<String> |
getSubscriptionsForUserOnDocument(String username,
String docId)
Gets the notifications for which a user subscribed for a certain
document.
|
List<String> |
getUsersSubscribedToNotificationOnDocument(String notification,
String docId)
Gets all users and groups that subscribed to a notification on a document
This is used in management of subscritptions.
|
void |
removeSubscription(String username,
String notification,
String docId)
Called when a user cancels his notification.
|
void |
removeSubscriptions(String username,
List<String> notifications,
String docId) |
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
|
List<String> getSubscribers(String notification, String docId) throws ClientException
ClientException
List<String> getSubscriptionsForUserOnDocument(String username, String docId) throws ClassNotFoundException, ClientException
List<String> getUsersSubscribedToNotificationOnDocument(String notification, String docId) throws ClientException
ClientException
void addSubscription(String username, String notification, DocumentModel doc, Boolean sendConfirmationEmail, NuxeoPrincipal principal, String notificationName) throws ClientException
ClientException
void addSubscriptions(String username, DocumentModel doc, Boolean sendConfirmationEmail, NuxeoPrincipal principal) throws ClientException
ClientException
void removeSubscriptions(String username, List<String> notifications, String docId) throws ClientException
ClientException
void removeSubscription(String username, String notification, String docId) throws ClientException
ClientException
@Deprecated NotificationRegistry getNotificationRegistry()
Notification getNotificationByName(String selectedNotification)
void sendNotification(String notificationName, Map<String,Object> infoMap, String userPrincipal) throws ClientException
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 emailsClientException
void sendDocumentByMail(DocumentModel doc, String freemarkerTemplateName, String subject, String comment, NuxeoPrincipal sender, List<String> sendTo)
List<Notification> getNotificationsForSubscriptions(String parentType)
List<Notification> getNotificationsForEvents(String eventId)
Copyright © 2013 Nuxeo SA. All Rights Reserved.