Class AbstractMemberMailNotifierObserver
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.workspaces.project.notification.AbstractMemberMailNotifierObserver
- All Implemented Interfaces:
AsyncObserver
,Observer
,LogEnabled
,PluginAware
,Serviceable
- Direct Known Subclasses:
AbstractRemoveMemberMailNotifierObserver
,AddMemberMailNotifierObserver
public abstract class AbstractMemberMailNotifierObserver
extends AbstractLogEnabled
implements AsyncObserver, PluginAware, Serviceable
Abstract observer for sending mail to members
-
Field Summary
Modifier and TypeFieldDescriptionprotected GroupManager
Group managerprotected I18nUtils
The i18n utilsprotected String
The name of current pluginprotected PopulationContextHelper
Population context helperprotected ProjectManager
Project managerprotected ProjectMemberManager
The project member managerprotected AmetysObjectResolver
The Ametys Object resolverprotected SiteManager
Site managerprotected UserManager
User managerFields inherited from interface org.ametys.core.observation.Observer
MAX_PRIORITY, MIN_PRIORITY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetI18nParams
(String... params) Helper method to get the list of parameters for a I18nizableTextint
getPriority
(Event event) Retrieves the priority to observe this event.
This can be used to process a supported event before others observers.protected String
Get the projects catalog URLprotected String
getProjectUrl
(Project project) Gets the URL of the projectgetUsersEmail
(List<User> users) Get the list of emails from users, filtering out users with no emailsvoid
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.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
-
Field Details
-
_pluginName
The name of current plugin -
_resolver
The Ametys Object resolver -
_i18nUtils
The i18n utils -
_projectMemberManager
The project member manager -
_projectManager
Project manager -
_siteManager
Site manager -
_populationContextHelper
Population context helper -
_userManager
User manager -
_groupManager
Group manager
-
-
Constructor Details
-
AbstractMemberMailNotifierObserver
public AbstractMemberMailNotifierObserver()
-
-
Method Details
-
setPluginInfo
Description copied from interface:PluginAware
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.- Specified by:
setPluginInfo
in interfacePluginAware
- Parameters:
pluginName
- Unique identifier for the plugin hosting the extensionfeatureName
- Unique feature identifier (unique for a given pluginName)id
- Unique identifier of this component
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
getPriority
Description copied from interface:Observer
Retrieves the priority to observe this event.
This can be used to process a supported event before others observers.- Specified by:
getPriority
in interfaceObserver
- Parameters:
event
- the event.- Returns:
- the priority where 0 the max priority and Integer.MAX_VALUE the min priority.
-
getProjectUrl
Gets the URL of the project- Parameters:
project
- The project- Returns:
- the URL of the project
-
getProjectsCatalogUrl
Get the projects catalog URL- Returns:
- The projects catalog URL
-
getUsersEmail
Get the list of emails from users, filtering out users with no emails- Parameters:
users
- The list of users- Returns:
- The list of emails
-
getI18nParams
Helper method to get the list of parameters for a I18nizableText- Parameters:
params
- The parameters array- Returns:
- The list of parameters without null values
-