public class TaskMailNotifierObserver extends AbstractSendNotificationObserver
Observer
observes events on task to notify concerned users_context, _i18nUtils, _moduleManagerEP, _pluginName, _projectManager, _renderingContextHandler, _resolver, _rightManager, _userManager
MAX_PRIORITY, MIN_PRIORITY
Constructor and Description |
---|
TaskMailNotifierObserver() |
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
|
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 List<UserIdentity> |
getUsersToNotify(String eventId,
AmetysObject object)
Get the users allowed to be notified
|
protected void |
notifyEvent(Project project,
String eventId,
Map<String,Object> eventParams,
User issuer)
Notify email by mail
|
boolean |
supports(Event event)
Checks if the event is supported.
|
_getPath, contextualize, getDefaultLanguage, getMailCommonParams, getModulePage, getModuleUrl, getPriority, getProject, getProjectUrl, observe, sendMail, service, setPluginInfo
getLogger, setLogger
public TaskMailNotifierObserver()
public boolean supports(Event event)
Observer
event
- the event.true
for observing this event, false
otherwise.protected void notifyEvent(Project project, String eventId, Map<String,Object> eventParams, User issuer)
AbstractSendNotificationObserver
notifyEvent
in class AbstractSendNotificationObserver
project
- The projecteventId
- The id of eventeventParams
- The event's argumentsissuer
- The issuerprotected String getUrl(Project project, String objectId)
AbstractSendNotificationObserver
getUrl
in class AbstractSendNotificationObserver
project
- The projectobjectId
- The id of concerned objectprotected String getRightIdForNotify()
AbstractSendNotificationObserver
getRightIdForNotify
in class AbstractSendNotificationObserver
protected List<UserIdentity> getUsersToNotify(String eventId, AmetysObject object)
AbstractSendNotificationObserver
getUsersToNotify
in class AbstractSendNotificationObserver
eventId
- The id of eventobject
- The object on which to test rightsprotected 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 parameters