public class ContentHistoryAction extends ServiceableAction
| Modifier and Type | Class and Description |
|---|---|
private static class |
ContentHistoryAction.VersionInformation |
| Modifier and Type | Field and Description |
|---|---|
private static I18nizableText |
__MESSAGE_NO_ACTION |
private static I18nizableText |
__MESSAGE_NO_STEP |
private ContentHelper |
_contentHelper |
private AmetysObjectResolver |
_resolver |
private UserHelper |
_userHelper |
private WorkflowProvider |
_workflowProvider |
managerEMPTY_MAP| Constructor and Description |
|---|
ContentHistoryAction() |
| Modifier and Type | Method and 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) |
Map |
act(Redirector redirector,
SourceResolver resolver,
Map objectModel,
String source,
Parameters parameters) |
void |
service(ServiceManager serviceManager) |
enableLogging, getLogger, setupLogger, setupLogger, setupLoggerprivate static final I18nizableText __MESSAGE_NO_STEP
private static final I18nizableText __MESSAGE_NO_ACTION
private WorkflowProvider _workflowProvider
private UserHelper _userHelper
private AmetysObjectResolver _resolver
private ContentHelper _contentHelper
public ContentHistoryAction()
public void service(ServiceManager serviceManager) throws ServiceException
service in interface Serviceableservice in class ServiceableActionServiceExceptionpublic Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) throws Exception
Exceptionprivate List<Map<String,Object>> _getContentWorkflowHistory(Content content, List<ContentHistoryAction.VersionInformation> versionsInformation, Set<String> validatedVersions) throws ProcessingException, RepositoryException
private long _getInitialActionId(WorkflowProvider.AmetysObjectWorkflow workflow, WorkflowAwareContent waContent)
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
RepositoryExceptionprivate Map<String,Object> _getDescription2Json(com.opensymphony.workflow.loader.WorkflowDescriptor workflowDescriptor, int stepId)
private Map<String,Object> _getWorkfowAction2Json(UserIdentity caller, Content content, com.opensymphony.workflow.loader.WorkflowDescriptor workflowDescriptor, int actionId)
private List<Map<String,Object>> _getVersionsBetween2Json(List<ContentHistoryAction.VersionInformation> versionsInformation, Date startDate, Date finishDate) throws RepositoryException
RepositoryExceptionprivate boolean _isValid(com.opensymphony.workflow.spi.Step step)
private List<ContentHistoryAction.VersionInformation> _computeVersionsBetween(List<ContentHistoryAction.VersionInformation> versionsInformation, Date startDate, Date finishDate) throws RepositoryException
RepositoryExceptionprivate List<ContentHistoryAction.VersionInformation> _resolveVersionInformations(VersionAwareAmetysObject content) throws RepositoryException
RepositoryException