Class AddMemberMailNotifierObserver
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.workspaces.project.notification.AbstractMemberMailNotifierObserver
org.ametys.plugins.workspaces.project.notification.AddMemberMailNotifierObserver
- All Implemented Interfaces:
AsyncObserver
,Observer
,LogEnabled
,PluginAware
,Serviceable
Notifier to send mail to a newly added member of a workspace.
-
Field Summary
Fields inherited from class org.ametys.plugins.workspaces.project.notification.AbstractMemberMailNotifierObserver
_groupManager, _i18nUtils, _pluginName, _populationContextHelper, _projectManager, _projectMemberManager, _resolver, _siteManager, _userManager
Fields inherited from interface org.ametys.core.observation.Observer
MAX_PRIORITY, MIN_PRIORITY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected I18nizableText
getBodyI18nizableText
(Project project, JCRProjectMember member) Gets theI18nizableText
for body of the mailprotected String
Gets the i18n body keygetBodyParams
(Project project, JCRProjectMember jcrMember) Gets the i18n parameters for body keyprotected I18nizableText
getSubjectI18nizableText
(Project project, JCRProjectMember member) Gets theI18nizableText
for subject of the mailprotected String
Gets the i18n subject keygetSubjectParams
(Project project, JCRProjectMember member) Gets the i18n parameters for subject keyvoid
Observes an event.boolean
Checks if the event is supported.Methods inherited from class org.ametys.plugins.workspaces.project.notification.AbstractMemberMailNotifierObserver
getI18nParams, getPriority, getProjectsCatalogUrl, getProjectUrl, getUsersEmail, service, setPluginInfo
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.ametys.core.observation.AsyncObserver
parallelizable
-
Constructor Details
-
AddMemberMailNotifierObserver
public AddMemberMailNotifierObserver()
-
-
Method Details
-
supports
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.
-
observe
Description copied from interface:Observer
Observes an event.- Parameters:
event
- the event.transientVars
- transientVars passed from one Observer to another when processing a single Event. This may allow optimizations between observers.- Throws:
Exception
- if an error occurs. All exceptions will be logged but not propagated, as the observation mechanism should never fail.
-
getSubjectI18nizableText
Gets theI18nizableText
for subject of the mail- Parameters:
project
- the projectmember
- the member- Returns:
- the subject
-
getSubjectI18nKey
Gets the i18n subject key- Returns:
- the i18n subject key
-
getSubjectParams
Gets the i18n parameters for subject key- Parameters:
project
- the projectmember
- the member- Returns:
- the i18n parameters
-
getBodyI18nizableText
Gets theI18nizableText
for body of the mail- Parameters:
project
- the projectmember
- the member- Returns:
- the body
-
getBodyI18nKey
Gets the i18n body key- Returns:
- the i18n body key
-
getBodyParams
Gets the i18n parameters for body key- Parameters:
project
- the projectjcrMember
- the member- Returns:
- the i18n parameters
-