Class ThreadsMailNotifierObserver
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.plugins.workspaces.project.notification.AbstractSendNotificationObserver
-
- org.ametys.plugins.workspaces.project.notification.ThreadsMailNotifierObserver
-
- All Implemented Interfaces:
Observer
,LogEnabled
,PluginAware
,Contextualizable
,Serviceable
public class ThreadsMailNotifierObserver extends AbstractSendNotificationObserver
This component is used to send mail notification
-
-
Field Summary
-
Fields inherited from class org.ametys.plugins.workspaces.project.notification.AbstractSendNotificationObserver
_context, _i18nUtils, _moduleManagerEP, _pluginName, _projectManager, _renderingContextHandler, _resolver, _rightManager, _userManager
-
Fields inherited from interface org.ametys.core.observation.Observer
MAX_PRIORITY, MIN_PRIORITY
-
-
Constructor Summary
Constructors Constructor Description ThreadsMailNotifierObserver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
getRightIdForNotify()
Get the right to check allowed users to notify by mailprotected String
getUrl(Project project, String objectId)
Get the URL of project to insert in email bodyprotected void
notifyEvent(Project project, String eventId, Map<String,Object> eventParams, User issuer)
Notify email by mailboolean
supports(Event event)
Checks if the event is supported.-
Methods inherited from class org.ametys.plugins.workspaces.project.notification.AbstractSendNotificationObserver
_getPath, contextualize, getDefaultLanguage, getMailCommonParams, getModulePage, getModuleUrl, getPriority, getProject, getProjectUrl, getUsersToNotify, observe, sendMail, service, setPluginInfo
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Constructor Detail
-
ThreadsMailNotifierObserver
public ThreadsMailNotifierObserver()
-
-
Method Detail
-
supports
public boolean supports(Event event)
Description copied from interface:Observer
Checks if the event is supported. If true, the observe(Event) method will be called.- Parameters:
event
- the event.- Returns:
true
for observing this event,false
otherwise.
-
getUrl
protected String getUrl(Project project, String objectId)
Description copied from class:AbstractSendNotificationObserver
Get the URL of project to insert in email body- Specified by:
getUrl
in classAbstractSendNotificationObserver
- Parameters:
project
- The projectobjectId
- The id of concerned object- Returns:
- The full URL
-
getRightIdForNotify
protected String getRightIdForNotify()
Description copied from class:AbstractSendNotificationObserver
Get the right to check allowed users to notify by mail- Specified by:
getRightIdForNotify
in classAbstractSendNotificationObserver
- Returns:
- the right id to check
-
notifyEvent
protected void notifyEvent(Project project, String eventId, Map<String,Object> eventParams, User issuer)
Description copied from class:AbstractSendNotificationObserver
Notify email by mail- Specified by:
notifyEvent
in classAbstractSendNotificationObserver
- Parameters:
project
- The projecteventId
- The id of eventeventParams
- The event's argumentsissuer
- The issuer
-
-