|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.nuxeo.ecm.platform.ec.notification.ejb.bean.NotificationServiceBean
public class NotificationServiceBean
Constructor Summary | |
---|---|
NotificationServiceBean()
|
Method Summary | |
---|---|
void |
addSubscription(java.lang.String username,
java.lang.String notification,
DocumentModel doc,
java.lang.Boolean sendConfirmationEmail,
NuxeoPrincipal principal,
java.lang.String notificationName)
Called when a user subscribes to a notification. |
Notification |
getNotificationByName(java.lang.String selectedNotification)
Returns a notification with all data loaded (label, etc). |
NotificationRegistry |
getNotificationRegistry()
Deprecated. should not have to use the registry |
java.util.List<Notification> |
getNotificationsForEvents(java.lang.String eventId)
|
java.util.List<Notification> |
getNotificationsForSubscriptions(java.lang.String parentType)
|
java.util.List<java.lang.String> |
getSubscribers(java.lang.String notification,
java.lang.String docId)
Gets the users that subscribed to a notification on a certain document. |
java.util.List<java.lang.String> |
getSubscriptionsForUserOnDocument(java.lang.String username,
java.lang.String docId)
Gets the notifications for which a user subscribed for a certain document. |
java.util.List<java.lang.String> |
getUsersSubscribedToNotificationOnDocument(java.lang.String notification,
java.lang.String docId)
Gets all users and groups that subscribed to a notification on a document This is used in management of subscritptions. |
void |
initialize()
|
void |
removeSubscription(java.lang.String username,
java.lang.String notification,
java.lang.String docId)
Called when a user cancels his notification. |
void |
sendDocumentByMail(DocumentModel doc,
java.lang.String freemarkerTemplateName,
java.lang.String subject,
java.lang.String comment,
NuxeoPrincipal sender,
java.util.List<java.lang.String> sendTo)
Sends an e-mail directly. |
void |
sendNotification(java.lang.String notificationName,
java.util.Map<java.lang.String,java.lang.Object> infoMap,
java.lang.String userPrincipal)
Directly sends a notification to the principal, using the data provided in the map The map should contain at least the userName of the user calling the method stored under the key "author". |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NotificationServiceBean()
Method Detail |
---|
@PostConstruct public void initialize()
public void addSubscription(java.lang.String username, java.lang.String notification, DocumentModel doc, java.lang.Boolean sendConfirmationEmail, NuxeoPrincipal principal, java.lang.String notificationName) throws ClientException
NotificationManager
addSubscription
in interface NotificationManager
ClientException
public java.util.List<java.lang.String> getSubscribers(java.lang.String notification, java.lang.String docId) throws ClientException
NotificationManager
getSubscribers
in interface NotificationManager
ClientException
public java.util.List<java.lang.String> getSubscriptionsForUserOnDocument(java.lang.String username, java.lang.String docId) throws java.lang.ClassNotFoundException, ClientException
NotificationManager
getSubscriptionsForUserOnDocument
in interface NotificationManager
java.lang.ClassNotFoundException
ClientException
public java.util.List<java.lang.String> getUsersSubscribedToNotificationOnDocument(java.lang.String notification, java.lang.String docId) throws ClientException
NotificationManager
getUsersSubscribedToNotificationOnDocument
in interface NotificationManager
ClientException
public void removeSubscription(java.lang.String username, java.lang.String notification, java.lang.String docId) throws ClientException
NotificationManager
removeSubscription
in interface NotificationManager
ClientException
@Deprecated public NotificationRegistry getNotificationRegistry()
NotificationManager
getNotificationRegistry
in interface NotificationManager
public Notification getNotificationByName(java.lang.String selectedNotification)
NotificationManager
getNotificationByName
in interface NotificationManager
public java.util.List<Notification> getNotificationsForSubscriptions(java.lang.String parentType)
getNotificationsForSubscriptions
in interface NotificationManager
public void sendDocumentByMail(DocumentModel doc, java.lang.String freemarkerTemplateName, java.lang.String subject, java.lang.String comment, NuxeoPrincipal sender, java.util.List<java.lang.String> sendTo)
NotificationManager
sendDocumentByMail
in interface NotificationManager
public void sendNotification(java.lang.String notificationName, java.util.Map<java.lang.String,java.lang.Object> infoMap, java.lang.String userPrincipal) throws ClientException
NotificationManager
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.
sendNotification
in interface NotificationManager
notificationName
- name of notificationinfoMap
- data used to compose the notification bodyuserPrincipal
- recipient used to get the adress(es) to send emails
ClientException
public java.util.List<Notification> getNotificationsForEvents(java.lang.String eventId)
getNotificationsForEvents
in interface NotificationManager
|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |