Class ResourcesMailNotifierObserver
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.plugins.workspaces.project.notification.AbstractSendNotificationObserver
-
- org.ametys.plugins.workspaces.project.notification.ResourcesMailNotifierObserver
-
- All Implemented Interfaces:
Observer,LogEnabled,PluginAware,Contextualizable,Serviceable
public class ResourcesMailNotifierObserver extends AbstractSendNotificationObserver
This observer observes event of resources to notify concerned users
-
-
Field Summary
Fields Modifier and Type Field Description protected ResourceNotifierHelper_resourceNotifierHelperresource Notify Helper-
Fields inherited from class org.ametys.plugins.workspaces.project.notification.AbstractSendNotificationObserver
_context, _i18nUtils, _jsonUtils, _notificationPrefHelper, _pluginName, _renderingContextHandler, _resolver, _rightManager, _srcResolver, _userManager
-
Fields inherited from interface org.ametys.core.observation.Observer
MAX_PRIORITY, MIN_PRIORITY
-
-
Constructor Summary
Constructors Constructor Description ResourcesMailNotifierObserver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AmetysObjectgetEventAmetysObject(Event event)Get the AmetysObject that triggered the event to compute the rightsprotected I18nizableTextgetI18nSubject(Event event, Project project)Get theI18nizableTextfor mail subjectprotected StringgetMailBodyURI(Event event, Project project)Returns the URI for HTML mail bodyprotected StringgetRightIdForNotify()Get the right to check allowed users to notify by mailvoidservice(ServiceManager smanager)booleansupports(Event event)Checks if the event is supported.-
Methods inherited from class org.ametys.plugins.workspaces.project.notification.AbstractSendNotificationObserver
_getRelativePath, contextualize, getPriority, getProject, getUsersToNotify, notifyEvent, observe, sendMail, setPluginInfo
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
_resourceNotifierHelper
protected ResourceNotifierHelper _resourceNotifierHelper
resource Notify Helper
-
-
Constructor Detail
-
ResourcesMailNotifierObserver
public ResourcesMailNotifierObserver()
-
-
Method Detail
-
service
public void service(ServiceManager smanager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classAbstractSendNotificationObserver- Throws:
ServiceException
-
supports
public boolean supports(Event event)
Description copied from interface:ObserverChecks if the event is supported. If true, the observe(Event) method will be called.- Parameters:
event- the event.- Returns:
truefor observing this event,falseotherwise.
-
getEventAmetysObject
protected AmetysObject getEventAmetysObject(Event event)
Description copied from class:AbstractSendNotificationObserverGet the AmetysObject that triggered the event to compute the rights- Specified by:
getEventAmetysObjectin classAbstractSendNotificationObserver- Parameters:
event- the event- Returns:
- the AmetysObject
-
getMailBodyURI
protected String getMailBodyURI(Event event, Project project)
Description copied from class:AbstractSendNotificationObserverReturns the URI for HTML mail body- Specified by:
getMailBodyURIin classAbstractSendNotificationObserver- Parameters:
event- the eventproject- the project- Returns:
- The URI for HTML mail body
-
getI18nSubject
protected I18nizableText getI18nSubject(Event event, Project project)
Description copied from class:AbstractSendNotificationObserverGet theI18nizableTextfor mail subject- Specified by:
getI18nSubjectin classAbstractSendNotificationObserver- Parameters:
event- the eventproject- the project- Returns:
- the
I18nizableTextfor subject
-
getRightIdForNotify
protected String getRightIdForNotify()
Description copied from class:AbstractSendNotificationObserverGet the right to check allowed users to notify by mail- Specified by:
getRightIdForNotifyin classAbstractSendNotificationObserver- Returns:
- the right id to check
-
-