Class DefaultActivityType
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.repository.activities.DefaultActivityType
- All Implemented Interfaces:
ActivityType
,LogEnabled
,PluginAware
,Configurable
,Serviceable
- Direct Known Subclasses:
AbstractWorkspacesActivityType
public class DefaultActivityType
extends AbstractLogEnabled
implements Configurable, ActivityType, Serviceable, PluginAware
Default implementation for
ActivityType
storing activity in JCR-
Field Summary
Modifier and TypeFieldDescriptionprotected CurrentUserProvider
The current user providerprotected UserHelper
Helper to get users -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
configure
(Configuration configuration) Get the ids of the supported event typesboolean
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
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.plugins.repository.activities.ActivityType
additionnalDataToJSONForClient, setAdditionalActivityData
-
Field Details
-
_currentUserProvider
The current user provider -
_userHelper
Helper to get users
-
-
Constructor Details
-
DefaultActivityType
public DefaultActivityType()
-
-
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
-
configure
- Specified by:
configure
in interfaceConfigurable
- Throws:
ConfigurationException
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
getSupportedEventTypes
Description copied from interface:ActivityType
Get the ids of the supported event types- Specified by:
getSupportedEventTypes
in interfaceActivityType
- Returns:
- the ids of the supported event types
-
isMergeable
Description copied from interface:ActivityType
Determines if two activities can be merged- Specified by:
isMergeable
in interfaceActivityType
- Parameters:
activity1
- The first activityactivity2
- The second activity- Returns:
- true if the events can be merged
-
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
- Parameters:
activities
- The activities to merge- Returns:
- Merged activities
-