Package org.ametys.cms.workflow
Class ContentHistoryAction
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.apache.cocoon.acting.AbstractAction
-
- org.apache.cocoon.acting.ServiceableAction
-
- org.ametys.cms.workflow.ContentHistoryAction
-
- All Implemented Interfaces:
Component,LogEnabled,Serviceable,Action
public class ContentHistoryAction extends ServiceableAction
This action returns the workflow history of a content
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classContentHistoryAction.VersionInformation
-
Field Summary
Fields Modifier and Type Field Description private static I18nizableText__MESSAGE_NO_ACTIONprivate static I18nizableText__MESSAGE_NO_STEPprivate ContentHelper_contentHelperprivate AmetysObjectResolver_resolverprivate UserHelper_userHelperprivate WorkflowProvider_workflowProvider-
Fields inherited from class org.apache.cocoon.acting.ServiceableAction
manager
-
Fields inherited from class org.apache.cocoon.acting.AbstractAction
EMPTY_MAP
-
-
Constructor Summary
Constructors Constructor Description ContentHistoryAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private List<ContentHistoryAction.VersionInformation>_computeVersionsBetween(List<ContentHistoryAction.VersionInformation> versionsInformation, Date startDate, Date finishDate)private List<Map<String,Object>>_getContentWorkflowHistory(Content content, List<ContentHistoryAction.VersionInformation> versionsInformation, Set<String> validatedVersions)private String_getDate(Date startDate, Date finishDate, Date actionFinishDate)private Map<String,Object>_getDescription2Json(com.opensymphony.workflow.loader.WorkflowDescriptor workflowDescriptor, int stepId)private long_getInitialActionId(WorkflowProvider.AmetysObjectWorkflow workflow, WorkflowAwareContent waContent)private List<Map<String,Object>>_getVersionsBetween2Json(List<ContentHistoryAction.VersionInformation> versionsInformation, Date startDate, Date finishDate)private Map<String,Object>_getWorkfowAction2Json(UserIdentity caller, Content content, com.opensymphony.workflow.loader.WorkflowDescriptor workflowDescriptor, int actionId)private boolean_isValid(com.opensymphony.workflow.spi.Step step)private List<ContentHistoryAction.VersionInformation>_resolveVersionInformations(VersionAwareAmetysObject content)private Map<String,Object>_step2Json(Content content, com.opensymphony.workflow.loader.WorkflowDescriptor workflowDescriptor, List<ContentHistoryAction.VersionInformation> versionsInformation, Set<String> validatedVersions, com.opensymphony.workflow.spi.Step step, com.opensymphony.workflow.spi.Step previousStep)Mapact(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters)voidservice(ServiceManager serviceManager)-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
-
-
-
Field Detail
-
__MESSAGE_NO_STEP
private static final I18nizableText __MESSAGE_NO_STEP
-
__MESSAGE_NO_ACTION
private static final I18nizableText __MESSAGE_NO_ACTION
-
_workflowProvider
private WorkflowProvider _workflowProvider
-
_userHelper
private UserHelper _userHelper
-
_resolver
private AmetysObjectResolver _resolver
-
_contentHelper
private ContentHelper _contentHelper
-
-
Constructor Detail
-
ContentHistoryAction
public ContentHistoryAction()
-
-
Method Detail
-
service
public void service(ServiceManager serviceManager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classServiceableAction- Throws:
ServiceException
-
act
public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) throws Exception
- Throws:
Exception
-
_getContentWorkflowHistory
private List<Map<String,Object>> _getContentWorkflowHistory(Content content, List<ContentHistoryAction.VersionInformation> versionsInformation, Set<String> validatedVersions) throws ProcessingException, RepositoryException
-
_getInitialActionId
private long _getInitialActionId(WorkflowProvider.AmetysObjectWorkflow workflow, WorkflowAwareContent waContent)
-
_step2Json
private Map<String,Object> _step2Json(Content content, com.opensymphony.workflow.loader.WorkflowDescriptor workflowDescriptor, List<ContentHistoryAction.VersionInformation> versionsInformation, Set<String> validatedVersions, com.opensymphony.workflow.spi.Step step, com.opensymphony.workflow.spi.Step previousStep) throws RepositoryException
- Throws:
RepositoryException
-
_getDescription2Json
private Map<String,Object> _getDescription2Json(com.opensymphony.workflow.loader.WorkflowDescriptor workflowDescriptor, int stepId)
-
_getWorkfowAction2Json
private Map<String,Object> _getWorkfowAction2Json(UserIdentity caller, Content content, com.opensymphony.workflow.loader.WorkflowDescriptor workflowDescriptor, int actionId)
-
_getVersionsBetween2Json
private List<Map<String,Object>> _getVersionsBetween2Json(List<ContentHistoryAction.VersionInformation> versionsInformation, Date startDate, Date finishDate) throws RepositoryException
- Throws:
RepositoryException
-
_isValid
private boolean _isValid(com.opensymphony.workflow.spi.Step step)
-
_computeVersionsBetween
private List<ContentHistoryAction.VersionInformation> _computeVersionsBetween(List<ContentHistoryAction.VersionInformation> versionsInformation, Date startDate, Date finishDate) throws RepositoryException
- Throws:
RepositoryException
-
_resolveVersionInformations
private List<ContentHistoryAction.VersionInformation> _resolveVersionInformations(VersionAwareAmetysObject content) throws RepositoryException
- Throws:
RepositoryException
-
-