public class ResourcesMailNotifierObserver extends AbstractSendNotificationObserver
| Modifier and Type | Field and Description | 
|---|---|
private static int | 
__MAX_RESOURCE_LINK  | 
private DocumentWorkspaceModule | 
_documentModule  | 
protected ResourceNotifierHelper | 
_webdavNotifyHelper
Webdav Notify Helper 
 | 
_context, _i18nUtils, _moduleManagerEP, _pluginName, _projectManager, _renderingContextHandler, _resolver, _rightManager, _userManagerMAX_PRIORITY, MIN_PRIORITY| Constructor and Description | 
|---|
ResourcesMailNotifierObserver()  | 
| Modifier and Type | Method and Description | 
|---|---|
protected String | 
_getBodyI18nKey(String eventType,
               Map<String,Object> eventParams)
Get the i18n subject key 
 | 
protected List<String> | 
_getBodyParams(String eventType,
              Project project,
              User issuer,
              Map<String,Object> eventParams)
Get the i18n parameters for body key 
 | 
private String | 
_getDownloadURL(Project project,
               Map<String,Resource> resources)  | 
protected String | 
_getDownloadURL(Project project,
               String id)
Get the url to download file 
 | 
protected String | 
_getSubjectI18nKey(String eventType,
                  Map<String,Object> eventParams)
Get the i18n subject key 
 | 
protected List<String> | 
_getSubjectParams(String eventType,
                 Project project,
                 User issuer,
                 Map<String,Object> eventParams)
Get the i18n parameters for subject key 
 | 
protected String | 
getRightIdForNotify()
Get the right to check allowed users to notify by mail 
 | 
protected String | 
getUrl(Project project,
      String objectId)
Get the URL of project to insert in email body 
 | 
protected void | 
notifyEvent(Project project,
           String eventId,
           Map<String,Object> eventParams,
           User issuer)
Notify email by mail 
 | 
void | 
service(ServiceManager smanager)  | 
boolean | 
supports(Event event)
Checks if the event is supported. 
 | 
_getPath, contextualize, getDefaultLanguage, getMailCommonParams, getModulePage, getModuleUrl, getPriority, getProject, getProjectUrl, getUsersToNotify, observe, sendMail, setPluginInfogetLogger, setLoggerprivate static final int __MAX_RESOURCE_LINK
protected ResourceNotifierHelper _webdavNotifyHelper
private DocumentWorkspaceModule _documentModule
public ResourcesMailNotifierObserver()
public void service(ServiceManager smanager) throws ServiceException
service in interface Serviceableservice in class AbstractSendNotificationObserverServiceExceptionpublic boolean supports(Event event)
Observerevent - the event.true for observing this event, false otherwise.protected void notifyEvent(Project project, String eventId, Map<String,Object> eventParams, User issuer)
AbstractSendNotificationObservernotifyEvent in class AbstractSendNotificationObserverproject - The projecteventId - The id of eventeventParams - The event's argumentsissuer - The issuerprotected String _getSubjectI18nKey(String eventType, Map<String,Object> eventParams)
eventType - The type of eventeventParams - The optional event parametersprotected List<String> _getSubjectParams(String eventType, Project project, User issuer, Map<String,Object> eventParams)
eventType - The event typeproject - The parent projectissuer - The user responsible of the actioneventParams - The optional event parametersprotected String _getBodyI18nKey(String eventType, Map<String,Object> eventParams)
eventType - The type of eventeventParams - The optional event parametersprotected List<String> _getBodyParams(String eventType, Project project, User issuer, Map<String,Object> eventParams)
eventType - The event typeproject - The parent projectissuer - The user responsible of the actioneventParams - The optional event parametersprotected String getUrl(Project project, String objectId)
AbstractSendNotificationObservergetUrl in class AbstractSendNotificationObserverproject - The projectobjectId - The id of concerned objectprotected String getRightIdForNotify()
AbstractSendNotificationObservergetRightIdForNotify in class AbstractSendNotificationObserverprotected String _getDownloadURL(Project project, String id)
project - The projectid - The id of resource