Class DocumentsActivityType
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.repository.activities.AbstractActivityType
org.ametys.plugins.workspaces.activities.AbstractWorkspacesActivityType
org.ametys.plugins.workspaces.activities.documents.DocumentsActivityType
- All Implemented Interfaces:
ActivityType
,LogEnabled
,PluginAware
,Configurable
,Contextualizable
,Serviceable
- Direct Known Subclasses:
ResourceCreatedOrUpdatedActivityType
,ResourceRenamedActivityType
ActivityType
implementation for documents-related activities-
Nested Class Summary
Nested classes/interfaces inherited from class org.ametys.plugins.repository.activities.AbstractActivityType
AbstractActivityType.ActivityArguments
-
Field Summary
Modifier and TypeFieldDescriptionprotected AmetysObjectResolver
Resolver for Ametys objectsstatic final String
Constant for event's categorystatic final String
data name for the activity filestatic final String
data name for the activity filesstatic final String
data name for the document parent folder namestatic final String
data name for the document parent folder idstatic final String
data name for the parent folder path in explorerFields inherited from class org.ametys.plugins.workspaces.activities.AbstractWorkspacesActivityType
_context, _i18nUtils, _projectManager, _projectMemberManager, _resolver, _userManager, ACTIVITY_CONTEXT_PARAM, PROJECT_ACCESS, PROJECT_CATEGORY, PROJECT_NAME, PROJECT_TITLE, PROJECT_URL
Fields inherited from class org.ametys.plugins.repository.activities.AbstractActivityType
_currentUserProvider, _pluginName, _userHelper
-
Constructor Summary
-
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 patterngetProjectFromEvent
(Event event) Get the project from the eventboolean
isMergeable
(Activity activity1, Activity activity2) Determines if two activities can be mergedmergeActivities
(List<Activity> activities) Merge activities into one activity.void
service
(ServiceManager serviceManager) void
setAdditionalActivityData
(Activity activity, Map<String, Object> parameters) Add the specific values to store in activity for this activity typeboolean
true
if the activity type support the eventMethods inherited from class org.ametys.plugins.workspaces.activities.AbstractWorkspacesActivityType
_addValueIfExists, _getProjectParameters, contextualize, getActivitiesArguments, getParentProject
Methods inherited from class org.ametys.plugins.repository.activities.AbstractActivityType
configure, getId, getSupportedEventTypes, handleEvent, setPluginInfo
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
PARENT_FOLDER_PATH
data name for the parent folder path in explorer- See Also:
-
PARENT_FOLDER_ID
data name for the document parent folder id- See Also:
-
PARENT_FOLDER
data name for the document parent folder name- See Also:
-
FILE_DATA_NAME
data name for the activity file- See Also:
-
FILES_DATA_NAME
data name for the activity files- See Also:
-
EVENT_CATEGORY_DOCUMENTS
Constant for event's category- See Also:
-
_ametysObjectResolver
Resolver for Ametys objects
-
-
Constructor Details
-
DocumentsActivityType
public DocumentsActivityType()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractWorkspacesActivityType
- Throws:
ServiceException
-
support
Description copied from interface:ActivityType
true
if the activity type support the event- Parameters:
event
- the event- Returns:
true
if the activity type support the event
-
setAdditionalActivityData
public void setAdditionalActivityData(Activity activity, Map<String, Object> parameters) throws javax.jcr.RepositoryExceptionDescription copied from interface:ActivityType
Add the specific values to store in activity for this activity type- Specified by:
setAdditionalActivityData
in interfaceActivityType
- Overrides:
setAdditionalActivityData
in classAbstractWorkspacesActivityType
- 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
-
isMergeable
Description copied from interface:ActivityType
Determines if two activities can be merged- Specified by:
isMergeable
in interfaceActivityType
- Overrides:
isMergeable
in classAbstractWorkspacesActivityType
- Parameters:
activity1
- The first activityactivity2
- The second activity- Returns:
- true if the events can be merged
-
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 classAbstractActivityType
- Parameters:
activities
- The activities to merge- Returns:
- Merged activities
-
getProjectFromEvent
Description copied from class:AbstractWorkspacesActivityType
Get the project from the event- Specified by:
getProjectFromEvent
in classAbstractWorkspacesActivityType
- Parameters:
event
- the event- Returns:
- the project
-