Class AbstractWorkspacesActivityNotifier
java.lang.Object
org.ametys.plugins.workspaces.activities.AbstractWorkspacesActivityNotifier
- All Implemented Interfaces:
PluginAware
,ActivityNotifier
,Contextualizable
,Serviceable
- Direct Known Subclasses:
CalendarEventActivityNotifier
,DocumentsActivityNotifier
,MemberAddedActivityNotifier
,MinisiteActivityNotifier
,TasksActivityNotifier
,ThreadsActivityNotifier
,WebContentActivityNotifier
public abstract class AbstractWorkspacesActivityNotifier
extends Object
implements ActivityNotifier, Serviceable, PluginAware, Contextualizable
Abstract class representing a activity notifier for workspaces
-
Field Summary
Modifier and TypeFieldDescriptionprotected Context
The contextprotected I18nUtils
The i18n utilsprotected NotificationPreferencesHelper
The notification preference helperprotected String
The plugin nameprotected ProjectManager
The project managerprotected RenderingContextHandler
The rendering context handlerprotected AmetysObjectResolver
The Ametys Object resolverprotected RightManager
The right managerprotected SourceResolver
The source resolverprotected UserManager
The user manager -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
_getSubjectI18nKey
(Activity activity) Get the subject i18n keyvoid
contextualize
(Context context) abstract String
getMailBodyURI
(Activity activity) Get the URI to resolve to get the mail bodygetMailHtmlBody
(Activity activity) Get the mail body as html from the activitygetMailSubject
(Activity activity) Get the mail subject from the activitygetMailTextBody
(Activity activity) Get the mail body to text format from the activitygetSubjectI18nParams
(Activity activity) Get the subject i18n parametersabstract AmetysObject
getTargetAmetysObject
(Activity activity) Retrieve the ametys object targeted by this activity.getUsersEmailToNotify
(Activity activity) Get the list of user email to notify for a given activityvoid
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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.ametys.web.activities.notify.ActivityNotifier
isAsync, support
-
Field Details
-
_rightManager
The right manager -
_notificationPreferenceHelper
The notification preference helper -
_userManager
The user manager -
_projectManager
The project manager -
_i18nUtils
The i18n utils -
_renderingContextHandler
The rendering context handler -
_srcResolver
The source resolver -
_resolver
The Ametys Object resolver -
_pluginName
The plugin name -
_context
The context
-
-
Constructor Details
-
AbstractWorkspacesActivityNotifier
public AbstractWorkspacesActivityNotifier()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
contextualize
- Specified by:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
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
-
getUsersEmailToNotify
Description copied from interface:ActivityNotifier
Get the list of user email to notify for a given activity- Specified by:
getUsersEmailToNotify
in interfaceActivityNotifier
- Parameters:
activity
- the activity- Returns:
- the list of user email to notify
-
getTargetAmetysObject
Retrieve the ametys object targeted by this activity. This method is intended for right computation purposes.- Parameters:
activity
- the activity- Returns:
- the target
-
getMailSubject
Description copied from interface:ActivityNotifier
Get the mail subject from the activity- Specified by:
getMailSubject
in interfaceActivityNotifier
- Parameters:
activity
- the activity- Returns:
- the mail subject
-
_getSubjectI18nKey
Get the subject i18n key- Parameters:
activity
- the activity- Returns:
- the subject i18n key
-
getSubjectI18nParams
Get the subject i18n parameters- Parameters:
activity
- the activity- Returns:
- the subject i18n parameters
-
getMailTextBody
Description copied from interface:ActivityNotifier
Get the mail body to text format from the activity- Specified by:
getMailTextBody
in interfaceActivityNotifier
- Parameters:
activity
- the activity- Returns:
- the mail body to text format. Can be null.
-
getMailHtmlBody
Description copied from interface:ActivityNotifier
Get the mail body as html from the activity- Specified by:
getMailHtmlBody
in interfaceActivityNotifier
- Parameters:
activity
- the activity- Returns:
- the mail body as html. Can be null.
-
getMailBodyURI
Get the URI to resolve to get the mail body- Parameters:
activity
- the activity- Returns:
- the uri
-