Nuxeo Enterprise Platform 5.1

org.nuxeo.ecm.platform.ec.notification.service
Class NotificationService

java.lang.Object
  extended by org.nuxeo.runtime.model.DefaultComponent
      extended by org.nuxeo.ecm.platform.ec.notification.service.NotificationService
All Implemented Interfaces:
Adaptable, Component, Extensible

public class NotificationService
extends DefaultComponent

Author:
Narcis Paslaru

Field Summary
static ComponentName NAME
           
 
Constructor Summary
NotificationService()
           
 
Method Summary
 void activate(ComponentContext context)
          Activates the component.
 void addSubscription(String username, String notification, DocumentModel doc, Boolean sendConfirmationEmail, NuxeoPrincipal principal, String notificationName)
           
 void deactivate(ComponentContext context)
          Deactivates the component.
 String getEMailSubjectPrefix()
           
 String getMailSessionJndiName()
           
protected  DocumentMessageProducer getMessageProducer()
           
 Notification getNotificationByName(String selectedNotification)
           
 NotificationRegistry getNotificationRegistry()
           
 String getServerUrlPrefix()
           
 List<String> getSubscribers(String notification, String docId)
           
 List<String> getSubscriptionsForUserOnDocument(String username, String docId)
           
 URL getTemplateURL(String name)
           
 List<String> getUsersSubscribedToNotificationOnDocument(String notification, String docId)
           
 void registerExtension(Extension extension)
          Registers the given extension.
 void removeSubscription(String username, String notification, String docId)
           
 void unregisterExtension(Extension extension)
          Unregisters the given extension.
 
Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
getAdapter, registerContribution, unregisterContribution
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

public static final ComponentName NAME
Constructor Detail

NotificationService

public NotificationService()
Method Detail

activate

public void activate(ComponentContext context)
              throws Exception
Description copied from interface: Component
Activates the component.

This method will be called by the runtime when a component is activated.

Specified by:
activate in interface Component
Overrides:
activate in class DefaultComponent
Parameters:
context - the runtime context
Throws:
Exception - if an error occurs during activation

deactivate

public void deactivate(ComponentContext context)
                throws Exception
Description copied from interface: Component
Deactivates the component.

This method will be called by the runtime when a component is deactivated.

Specified by:
deactivate in interface Component
Overrides:
deactivate in class DefaultComponent
Parameters:
context - the runtime context
Throws:
Exception - if an error occurs during activation

registerExtension

public void registerExtension(Extension extension)
                       throws Exception
Description copied from interface: Extensible
Registers the given extension.

Specified by:
registerExtension in interface Extensible
Overrides:
registerExtension in class DefaultComponent
Parameters:
extension - the extension to register
Throws:
Exception - if any error occurs

unregisterExtension

public void unregisterExtension(Extension extension)
                         throws Exception
Description copied from interface: Extensible
Unregisters the given extension.

Specified by:
unregisterExtension in interface Extensible
Overrides:
unregisterExtension in class DefaultComponent
Parameters:
extension - the extension to unregister
Throws:
Exception - if any error occurs

getNotificationRegistry

public NotificationRegistry getNotificationRegistry()
Returns:
the notificationRegistry.

getSubscribers

public List<String> getSubscribers(String notification,
                                   String docId)
                            throws ClientException
Throws:
ClientException

getSubscriptionsForUserOnDocument

public List<String> getSubscriptionsForUserOnDocument(String username,
                                                      String docId)
                                               throws ClassNotFoundException,
                                                      ClientException
Throws:
ClassNotFoundException
ClientException

addSubscription

public void addSubscription(String username,
                            String notification,
                            DocumentModel doc,
                            Boolean sendConfirmationEmail,
                            NuxeoPrincipal principal,
                            String notificationName)
                     throws ClientException
Throws:
ClientException

getMessageProducer

protected DocumentMessageProducer getMessageProducer()
                                              throws Exception
Throws:
Exception

removeSubscription

public void removeSubscription(String username,
                               String notification,
                               String docId)
                        throws ClientException
Throws:
ClientException

getUsersSubscribedToNotificationOnDocument

public List<String> getUsersSubscribedToNotificationOnDocument(String notification,
                                                               String docId)
                                                        throws ClientException
Throws:
ClientException

getTemplateURL

public URL getTemplateURL(String name)

getServerUrlPrefix

public String getServerUrlPrefix()

getEMailSubjectPrefix

public String getEMailSubjectPrefix()

getMailSessionJndiName

public String getMailSessionJndiName()

getNotificationByName

public Notification getNotificationByName(String selectedNotification)

Nuxeo Enterprise Platform 5.1

Copyright ? 2007 Nuxeo SAS. All Rights Reserved.