public class WatchDocumentServiceImpl extends Object implements WatchDocumentService, org.picocontainer.Startable
| Modifier and Type | Field and Description |
|---|---|
static String |
EMAIL_WATCHERS_PROP |
static String |
EXO_WATCHABLE_MIXIN |
static String |
RSS_WATCHERS_PROP |
FULL_NOTIFICATION, NOTIFICATION_BY_EMAIL, NOTIFICATION_BY_RSS| Constructor and Description |
|---|
WatchDocumentServiceImpl(org.exoplatform.container.xml.InitParams params,
org.exoplatform.services.jcr.RepositoryService repoService,
TemplateService templateService)
Constructor Method
|
| Modifier and Type | Method and Description |
|---|---|
protected MessageConfig |
getMessageConfig()
This method will get message configuration when a node is observing and there is some changes
with it's properties.
|
int |
getNotificationType(javax.jcr.Node documentNode,
String userName)
This method will gets the type of notification for the specify document
|
void |
initializeMessageConfig(MessageConfigPlugin msgConfigPlugin)
Initialize the notification email contents of watching document when the
notification type is by email.
|
void |
start()
using for re-observer
|
void |
stop() |
void |
unwatchDocument(javax.jcr.Node documentNode,
String userName,
int notificationType)
UnWatching the document that is specified by the node by giving a userName, notifyType
|
void |
watchDocument(javax.jcr.Node documentNode,
String userName,
int notifyType)
Watching the document that is specified by the node by giving a userName, notifyType
|
public static final String EXO_WATCHABLE_MIXIN
public static final String EMAIL_WATCHERS_PROP
public static final String RSS_WATCHERS_PROP
public WatchDocumentServiceImpl(org.exoplatform.container.xml.InitParams params,
org.exoplatform.services.jcr.RepositoryService repoService,
TemplateService templateService)
params - repoService - templateService - public void initializeMessageConfig(MessageConfigPlugin msgConfigPlugin)
initializeMessageConfig in interface WatchDocumentServicemsgConfigPlugin - The message configuration plug-inpublic int getNotificationType(javax.jcr.Node documentNode,
String userName)
throws Exception
If that document is not a exo:watchable document, the value return is -1 If notification is notified by email, the value return is 1 If notification is notified by rss, the value return is 2 If notification is notified by rss and email, the value return is 0
getNotificationType in interface WatchDocumentServicedocumentNode - Specify the document for watchinguserName - The username of current user is votting. It can't be nullExceptionNodepublic void watchDocument(javax.jcr.Node documentNode,
String userName,
int notifyType)
throws Exception
If the document is watching, all thing that changes to it's property will be notified to user specified by the userName
watchDocument in interface WatchDocumentServicedocumentNode - Specify the document for watchinguserName - he username of current user is votting. It can't be nullnotifyType - Type of notification. Its can be 0, 1 or 2
0 : Notification by email
1 : Notification by rss
2 : Full notificationExceptionNodepublic void unwatchDocument(javax.jcr.Node documentNode,
String userName,
int notificationType)
throws Exception
If the document is unwatching, all thing that changes to it's property will not be notified to user specified by the userName
unwatchDocument in interface WatchDocumentServicedocumentNode - Specify the document for watchinguserName - The username of current user is votting. It can't be nullnotificationType - Type of notification. Its can be 0, 1 or 2
0 : Notification by email
1 : Notification by rss
2 : Full notificationExceptionNodeprotected MessageConfig getMessageConfig()
public void start()
start in interface org.picocontainer.Startablepublic void stop()
stop in interface org.picocontainer.StartableCopyright © 2003–2019 eXo Platform SAS. All rights reserved.