public class AddMemberMailNotifierObserver extends AbstractLogEnabled implements AsyncObserver, PluginAware, Serviceable
Modifier and Type | Field and Description |
---|---|
protected GroupManager |
_groupManager
The group manager
|
protected I18nUtils |
_i18nUtils
The i18n utils
|
protected String |
_pluginName
The name of current plugin
|
protected PopulationContextHelper |
_populationContextHelper
The population context helper
|
protected ProjectMemberManager |
_projectMemberManager
The project member manager
|
protected AmetysObjectResolver |
_resolver
The Ametys Object resolver
|
protected UserManager |
_userManager
The user manager
|
MAX_PRIORITY, MIN_PRIORITY
Constructor and Description |
---|
AddMemberMailNotifierObserver() |
Modifier and Type | Method and Description |
---|---|
protected I18nizableText |
_getBodyI18nizableText(Project project,
JCRProjectMember member)
Gets the
I18nizableText for body of the mail |
protected String |
_getBodyI18nKey()
Gets the i18n body key
|
protected List<String> |
_getBodyParams(Project project,
JCRProjectMember jcrMember)
Gets the i18n parameters for body key
|
private JCRProjectMember |
_getMember(String memberId) |
protected I18nizableText |
_getSubjectI18nizableText(Project project,
JCRProjectMember member)
Gets the
I18nizableText for subject of the mail |
protected String |
_getSubjectI18nKey()
Gets the i18n subject key
|
protected List<String> |
_getSubjectParams(Project project,
JCRProjectMember member)
Gets the i18n parameters for subject key
|
protected String |
_getUrl(Project project)
Gets the URL of the project
|
int |
getPriority(Event event)
Retrieves the priority to observe this event.
This can be used to process a supported event before others observers. |
void |
observe(Event event,
Map<String,Object> transientVars)
Observes an event.
|
void |
service(ServiceManager manager) |
void |
setPluginInfo(String pluginName,
String featureName,
String id)
Sets the plugin info relative to the current component.
Note : The feature name may be null if the targeted component in declared at plugin level. |
boolean |
supports(Event event)
Checks if the event is supported.
|
getLogger, setLogger
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
parallelizable
protected String _pluginName
protected AmetysObjectResolver _resolver
protected I18nUtils _i18nUtils
protected UserManager _userManager
protected GroupManager _groupManager
protected PopulationContextHelper _populationContextHelper
protected ProjectMemberManager _projectMemberManager
public AddMemberMailNotifierObserver()
public void setPluginInfo(String pluginName, String featureName, String id)
PluginAware
setPluginInfo
in interface PluginAware
pluginName
- Unique identifier for the plugin hosting the extensionfeatureName
- Unique feature identifier (unique for a given pluginName)id
- Unique identifier of this componentpublic void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
public boolean supports(Event event)
Observer
public int getPriority(Event event)
Observer
getPriority
in interface Observer
event
- the event.public void observe(Event event, Map<String,Object> transientVars) throws Exception
Observer
observe
in interface Observer
event
- the event.transientVars
- transientVars passed from one Observer to another when processing a single Event.
This may allow optimizations between observers.Exception
- if an error occurs.
All exceptions will be logged but not propagated, as the observation mechanism should never fail.private JCRProjectMember _getMember(String memberId)
protected I18nizableText _getSubjectI18nizableText(Project project, JCRProjectMember member)
I18nizableText
for subject of the mailproject
- the projectmember
- the memberprotected String _getSubjectI18nKey()
protected List<String> _getSubjectParams(Project project, JCRProjectMember member)
project
- the projectmember
- the memberprotected I18nizableText _getBodyI18nizableText(Project project, JCRProjectMember member)
I18nizableText
for body of the mailproject
- the projectmember
- the memberprotected String _getBodyI18nKey()
protected List<String> _getBodyParams(Project project, JCRProjectMember jcrMember)
project
- the projectjcrMember
- the member