Class MemberAddedActivityType
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.repository.activities.DefaultActivityType
org.ametys.plugins.workspaces.activities.AbstractWorkspacesActivityType
org.ametys.plugins.workspaces.activities.projects.AbstractProjectsActivityType
org.ametys.plugins.workspaces.activities.projects.MemberAddedActivityType
- All Implemented Interfaces:
ActivityType
,LogEnabled
,PluginAware
,Configurable
,Serviceable
ActivityType
implementation for the addition of a member-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
data name for the member identitystatic final String
data name for the member typeFields inherited from class org.ametys.plugins.workspaces.activities.projects.AbstractProjectsActivityType
EVENT_CATEGORY_PROJECTS
Fields inherited from class org.ametys.plugins.workspaces.activities.AbstractWorkspacesActivityType
_notificationPreferenceHelper, _projectManager, _resolver, PROJECT_ACCESS, PROJECT_CATEGORY, PROJECT_NAME, PROJECT_TITLE, PROJECT_URL
Fields inherited from class org.ametys.plugins.repository.activities.DefaultActivityType
_currentUserProvider, _userHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadditionnalDataToJSONForClient
(Activity activity) Retrieve data specific to theActivityType
that needs to be serialized but are not stored in theDataHolder
.getFilterPatternExpression
(String pattern) Get the expression to filter activity on patterngetMailBodyURI
(Activity activity) Get the URI to resolve to get the mail bodygetProjectFromEvent
(Event event) Retrieve the project concerned by the event.getTargetAmetysObject
(Activity activity) Retrieve the ametys object targeted by this activity.getUsersEmailToNotify
(Activity activity) Get the user to notify Retrieve the previous user in project by removing the new user or group from the membersmergeActivities
(List<Activity> activities) Merge activities into one activity.void
service
(ServiceManager serviceManager) void
setAdditionalActivityData
(Activity activity, Map<String, Object> parameters) Add the value specific to the activity type to the activityboolean
Check if an event with an id in the getSupportedEventType should actually leads to the creation of an activityMethods inherited from class org.ametys.plugins.workspaces.activities.AbstractWorkspacesActivityType
_addValueIfExists, getParentProject, getSubjectI18nKey, getSubjectI18nParams, isMergeable
Methods inherited from class org.ametys.plugins.repository.activities.DefaultActivityType
configure, getSupportedEventTypes, setPluginInfo
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
MEMBER_TYPE
data name for the member type- See Also:
-
MEMBER
data name for the member identity- See Also:
-
-
Constructor Details
-
MemberAddedActivityType
public MemberAddedActivityType()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractWorkspacesActivityType
- Throws:
ServiceException
-
support
Description copied from class:AbstractWorkspacesActivityType
Check if an event with an id in the getSupportedEventType should actually leads to the creation of an activity- Overrides:
support
in classAbstractWorkspacesActivityType
- Parameters:
event
- the event to test- Returns:
- true if an activity should be created
-
setAdditionalActivityData
public void setAdditionalActivityData(Activity activity, Map<String, Object> parameters) throws javax.jcr.RepositoryExceptionDescription copied from interface:ActivityType
Add the value specific to the activity type to the activity- Specified by:
setAdditionalActivityData
in interfaceActivityType
- Overrides:
setAdditionalActivityData
in classAbstractProjectsActivityType
- Parameters:
activity
- the activityparameters
- the activity parameters- Throws:
javax.jcr.RepositoryException
- if an error occurs while manipulating the repository
-
additionnalDataToJSONForClient
Description copied from interface:ActivityType
Retrieve data specific to theActivityType
that needs to be serialized but are not stored in theDataHolder
. Those data will be added to the data of the dataHolder- Specified by:
additionnalDataToJSONForClient
in interfaceActivityType
- Overrides:
additionnalDataToJSONForClient
in classAbstractWorkspacesActivityType
- Parameters:
activity
- the activity to serialize- Returns:
- a json map of the specific data
-
getFilterPatternExpression
Description copied from class:AbstractWorkspacesActivityType
Get the expression to filter activity on pattern- Specified by:
getFilterPatternExpression
in classAbstractWorkspacesActivityType
- Parameters:
pattern
- the pattern expression- Returns:
- the pattern expression
-
mergeActivities
Description copied from interface:ActivityType
Merge activities into one activity. Be careful : be sure that the activities can be merged calling isMergeable method before- Specified by:
mergeActivities
in interfaceActivityType
- Overrides:
mergeActivities
in classDefaultActivityType
- Parameters:
activities
- The activities to merge- Returns:
- Merged activities
-
getProjectFromEvent
Description copied from class:AbstractWorkspacesActivityType
Retrieve the project concerned by the event. the event must be supported by the ActivityType.- Specified by:
getProjectFromEvent
in classAbstractWorkspacesActivityType
- Parameters:
event
- an event supported by the activity type- Returns:
- the targeted project
-
getTargetAmetysObject
Description copied from class:AbstractWorkspacesActivityType
Retrieve the ametys object targeted by this activity. This method is intended for right computation purposes.- Specified by:
getTargetAmetysObject
in classAbstractWorkspacesActivityType
- Parameters:
activity
- the activity- Returns:
- the target
-
getUsersEmailToNotify
Get the user to notify Retrieve the previous user in project by removing the new user or group from the members- Overrides:
getUsersEmailToNotify
in classAbstractWorkspacesActivityType
- Parameters:
activity
- the activity- Returns:
- the email of the user to notify
-
getMailBodyURI
Description copied from class:AbstractWorkspacesActivityType
Get the URI to resolve to get the mail body- Specified by:
getMailBodyURI
in classAbstractWorkspacesActivityType
- Parameters:
activity
- the activity- Returns:
- the uri
-