Package org.ametys.web.activities
Class AbstractPageActivityType
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.repository.activities.AbstractActivityType
org.ametys.web.activities.AbstractSiteAwareActivityType
org.ametys.web.activities.AbstractPageActivityType
- All Implemented Interfaces:
ActivityType
,LogEnabled
,PluginAware
,Configurable
,Serviceable
- Direct Known Subclasses:
PageDeletedActivityType
,PageResourcesUpdatedActivityType
,PageUpdatedActivityType
Class representing a generic activity type for a page
-
Nested Class Summary
Nested classes/interfaces inherited from class org.ametys.plugins.repository.activities.AbstractActivityType
AbstractActivityType.ActivityArguments
-
Field Summary
Modifier and TypeFieldDescriptionprotected AmetysObjectResolver
The Ametys object resolverstatic final String
Constant for page JSON key.static final String
Constant for page id JSON key.static final String
Constant for page tags JSON key.static final String
Constant for page title JSON key.Fields inherited from class org.ametys.web.activities.AbstractSiteAwareActivityType
_siteManager, SITE, SITE_NAME, SITE_TITLE
Fields inherited from class org.ametys.plugins.repository.activities.AbstractActivityType
_currentUserProvider, _pluginName, _userHelper
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription_getSiteAwareAOParameters
(SiteAwareAmetysObject siteAwareAO) Get the site aware ametys object parametersGet the pages from the eventprotected List<SiteAwareAmetysObject>
getSiteAwareAmetysObjects
(Event event) Get the list of site aware ametys object 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 typeMethods inherited from class org.ametys.web.activities.AbstractSiteAwareActivityType
getActivitiesArguments, getActivityArguments
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
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, support
-
Field Details
-
PAGE
Constant for page JSON key. The value is aPage
.- See Also:
-
PAGE_ID
Constant for page id JSON key. The value is aString
.- See Also:
-
PAGE_TITLE
Constant for page title JSON key. The value is aString
.- See Also:
-
PAGE_TAGS
Constant for page tags JSON key. The value is aString
.- See Also:
-
_resolver
The Ametys object resolver
-
-
Constructor Details
-
AbstractPageActivityType
public AbstractPageActivityType()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractSiteAwareActivityType
- Throws:
ServiceException
-
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 classAbstractSiteAwareActivityType
- Parameters:
activity
- the activityparameters
- the activity parameters- Throws:
javax.jcr.RepositoryException
- if an error occurs while manipulating the repository
-
isMergeable
Description copied from interface:ActivityType
Determines if two activities can be merged- Specified by:
isMergeable
in interfaceActivityType
- Overrides:
isMergeable
in classAbstractSiteAwareActivityType
- 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
- Overrides:
mergeActivities
in classAbstractActivityType
- Parameters:
activities
- The activities to merge- Returns:
- Merged activities
-
getSiteAwareAmetysObjects
Description copied from class:AbstractSiteAwareActivityType
Get the list of site aware ametys object from the event- Specified by:
getSiteAwareAmetysObjects
in classAbstractSiteAwareActivityType
- Parameters:
event
- the event- Returns:
- the list of site aware ametys object
-
_getSiteAwareAOParameters
Description copied from class:AbstractSiteAwareActivityType
Get the site aware ametys object parameters- Overrides:
_getSiteAwareAOParameters
in classAbstractSiteAwareActivityType
- Parameters:
siteAwareAO
- the site aware ametys object- Returns:
- the parameters
-
getPages
Get the pages from the event- Parameters:
event
- the event- Returns:
- the pages
-