Class RemoveMemberMailNotifierObserver
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.plugins.workspaces.project.notification.AbstractMemberMailNotifierObserver
-
- org.ametys.plugins.workspaces.project.notification.AbstractRemoveMemberMailNotifierObserver
-
- org.ametys.plugins.workspaces.project.notification.RemoveMemberMailNotifierObserver
-
- All Implemented Interfaces:
AsyncObserver
,Observer
,LogEnabled
,PluginAware
,Serviceable
public class RemoveMemberMailNotifierObserver extends AbstractRemoveMemberMailNotifierObserver
Observer to send mail notifications on workspace member removal
-
-
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
Constructors Constructor Description RemoveMemberMailNotifierObserver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected I18nizableText
getBodyI18nizableText(Project project)
Gets theI18nizableText
for body of the mailprotected String
getBodyI18nKey()
Gets the i18n body keyprotected List<String>
getBodyParams(Project project)
Gets the i18n parameters for body keyprotected String
getProjectManagersNames(Project project)
Get the list of names of the project managersprotected I18nizableText
getSubjectI18nizableText(Project project)
Gets theI18nizableText
for subject of the mailprotected String
getSubjectI18nKey()
Gets the i18n subject keyprotected List<String>
getSubjectParams(Project project)
Gets the i18n parameters for subject keyvoid
observe(Event event, Map<String,Object> transientVars)
Observes an event.protected void
sendMail(Project project, List<User> removedUsers)
Send mail about removed users from project-
Methods inherited from class org.ametys.plugins.workspaces.project.notification.AbstractRemoveMemberMailNotifierObserver
supports
-
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 Detail
-
RemoveMemberMailNotifierObserver
public RemoveMemberMailNotifierObserver()
-
-
Method Detail
-
observe
public void observe(Event event, Map<String,Object> transientVars) throws Exception
Description copied from interface:Observer
Observes an event.- Specified by:
observe
in interfaceObserver
- Overrides:
observe
in classAbstractRemoveMemberMailNotifierObserver
- 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.
-
sendMail
protected void sendMail(Project project, List<User> removedUsers)
Description copied from class:AbstractRemoveMemberMailNotifierObserver
Send mail about removed users from project- Specified by:
sendMail
in classAbstractRemoveMemberMailNotifierObserver
- Parameters:
project
- The projectremovedUsers
- The removed users
-
getSubjectI18nizableText
protected I18nizableText getSubjectI18nizableText(Project project)
Gets theI18nizableText
for subject of the mail- Parameters:
project
- the project- Returns:
- the subject
-
getSubjectI18nKey
protected String getSubjectI18nKey()
Gets the i18n subject key- Returns:
- the i18n subject key
-
getSubjectParams
protected List<String> getSubjectParams(Project project)
Gets the i18n parameters for subject key- Parameters:
project
- the project- Returns:
- the i18n parameters
-
getBodyI18nizableText
protected I18nizableText getBodyI18nizableText(Project project)
Gets theI18nizableText
for body of the mail- Parameters:
project
- the project- Returns:
- the body
-
getBodyI18nKey
protected String getBodyI18nKey()
Gets the i18n body key- Returns:
- the i18n body key
-
getBodyParams
protected List<String> getBodyParams(Project project)
Gets the i18n parameters for body key- Parameters:
project
- the project- Returns:
- the i18n parameters
-
getProjectManagersNames
protected String getProjectManagersNames(Project project)
Get the list of names of the project managers- Parameters:
project
- The project- Returns:
- The list of names, as a single string, comma separated
-
-