|
Nuxeo Enterprise Platform 5.4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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 NotificationManagerClientException
public java.util.List<java.lang.String> getSubscribers(java.lang.String notification,
java.lang.String docId)
throws ClientException
NotificationManager
getSubscribers in interface NotificationManagerClientException
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 NotificationManagerjava.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 NotificationManagerClientException
public void removeSubscription(java.lang.String username,
java.lang.String notification,
java.lang.String docId)
throws ClientException
NotificationManager
removeSubscription in interface NotificationManagerClientException@Deprecated public NotificationRegistry getNotificationRegistry()
NotificationManager
getNotificationRegistry in interface NotificationManagerpublic Notification getNotificationByName(java.lang.String selectedNotification)
NotificationManager
getNotificationByName in interface NotificationManagerpublic 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
NotificationManagerThe 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 NotificationManagernotificationName - name of notificationinfoMap - data used to compose the notification bodyuserPrincipal - recipient used to get the adress(es) to send emails
ClientExceptionpublic 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 | |||||||||