Package org.ametys.cms.workflow
Class ArchiveContentAction
- 
- All Implemented Interfaces:
 Initializable,Component,LogEnabled,Serviceable,Action
- Direct Known Subclasses:
 ArchiveWebContentAction
public class ArchiveContentAction extends ContentWorkflowAction
Action for archiving a content. 
- 
- 
Field Summary
Fields Modifier and Type Field Description protected CloneComponent_cloneComponentThe clone component.protected ObservationManager_observationManagerObservation manager available to subclasses.protected Repository_repositoryThe repository.protected AmetysObjectResolver_resolverThe ametys object resolver.- 
Fields inherited from class org.ametys.cms.workflow.ContentWorkflowAction
_userProvider 
- 
Fields inherited from class org.ametys.plugins.workflow.cocoon.AbstractWorkflowAction
_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 ArchiveContentAction() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Map<String,String>_act(Redirector redirector, Map objectModel, String source, Parameters parameters, int actionId, Map inputs)Initialize or act on a workflow instance.protected Event_prepareDeletedEvent(UserIdentity issuer, Content content)Prepare event to notify observersprotected Event_prepareDeletingEvent(UserIdentity issuer, Content content)Prepare event to notify observersprotected voidarchiveContent(WorkflowAwareContent content, Map objectModel, Map<String,Object> result)Archive a content.protected SessiongetArchiveSession()Get a repository session on the archive workspace.voidservice(ServiceManager serviceManager)- 
Methods inherited from class org.ametys.cms.workflow.ContentWorkflowAction
_getContent, _getCurrentStep, _getExceptionContext, _getInputs, _getUser, _getWorkflowId, _processWorkflowException, initialize 
- 
Methods inherited from class org.ametys.plugins.workflow.cocoon.WorkflowAction
_getActionResult 
- 
Methods inherited from class org.ametys.plugins.workflow.cocoon.AbstractWorkflowAction
_getActionId, _getFailConditions, _getWorkflowErrors, _getWorkflowWarns, _processInvalidActionException, act 
- 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger 
 - 
 
 - 
 
- 
- 
Field Detail
- 
_repository
protected Repository _repository
The repository. 
- 
_resolver
protected AmetysObjectResolver _resolver
The ametys object resolver. 
- 
_cloneComponent
protected CloneComponent _cloneComponent
The clone component. 
- 
_observationManager
protected ObservationManager _observationManager
Observation manager available to subclasses. 
 - 
 
- 
Constructor Detail
- 
ArchiveContentAction
public ArchiveContentAction()
 
 - 
 
- 
Method Detail
- 
service
public void service(ServiceManager serviceManager) throws ServiceException
- Specified by:
 servicein interfaceServiceable- Overrides:
 servicein classServiceableAction- Throws:
 ServiceException
 
- 
_act
protected Map<String,String> _act(Redirector redirector, Map objectModel, String source, Parameters parameters, int actionId, Map inputs) throws com.opensymphony.workflow.InvalidInputException, com.opensymphony.workflow.WorkflowException
Description copied from class:AbstractWorkflowActionInitialize or act on a workflow instance.- Overrides:
 _actin classContentWorkflowAction- Parameters:
 redirector- the redirector.objectModel- the current object model.source- the current source.parameters- the current parameters.actionId- the action id to use.inputs- the inputs to use- Returns:
 - the action result.
 - Throws:
 com.opensymphony.workflow.InvalidInputException- if the action id is not valid.com.opensymphony.workflow.WorkflowException- if the action failed.
 
- 
_prepareDeletingEvent
protected Event _prepareDeletingEvent(UserIdentity issuer, Content content)
Prepare event to notify observers- Parameters:
 issuer- the responsible for the actioncontent- the archived content- Returns:
 - the event
 
 
- 
_prepareDeletedEvent
protected Event _prepareDeletedEvent(UserIdentity issuer, Content content)
Prepare event to notify observers- Parameters:
 issuer- the responsible for the actioncontent- the archived content- Returns:
 - the event
 
 
- 
archiveContent
protected void archiveContent(WorkflowAwareContent content, Map objectModel, Map<String,Object> result) throws RepositoryException
Archive a content.- Parameters:
 content- the content to archive.objectModel- the current object model.result- the result map- Throws:
 RepositoryException- The repository exception
 
- 
getArchiveSession
protected Session getArchiveSession() throws RepositoryException
Get a repository session on the archive workspace.- Returns:
 - the archive session.
 - Throws:
 RepositoryException- The repository exception
 
 - 
 
 -