Package org.ametys.cms.workflow
Class UnarchiveContentAction
- All Implemented Interfaces:
Initializable
,Component
,LogEnabled
,Serviceable
,Action
Unarchive a content.
-
Field Summary
Modifier and TypeFieldDescriptionprotected CloneComponent
The clone component.protected ObservationManager
Observation manager available to subclasses.protected javax.jcr.Repository
The repository.protected AmetysObjectResolver
The 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
-
Method Summary
Modifier and TypeMethodDescription_act
(Redirector redirector, Map objectModel, String source, Parameters parameters, int actionId, Map inputs) Initialize or act on a workflow instance.protected Event
_prepareArchivedEvent
(UserIdentity issuer, Content content) Prepare event to notify observersprotected boolean
isActionValid
(WorkflowAwareContent content, int actionId, Map inputs) Test if the action can be executed.void
service
(ServiceManager serviceManager) protected void
unarchiveContent
(WorkflowAwareContent content) Unarchive a content.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 Details
-
_repository
The repository. -
_resolver
The ametys object resolver. -
_cloneComponent
The clone component. -
_observationManager
Observation manager available to subclasses.
-
-
Constructor Details
-
UnarchiveContentAction
public UnarchiveContentAction()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in 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:AbstractWorkflowAction
Initialize or act on a workflow instance.- Overrides:
_act
in 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.
-
_prepareArchivedEvent
protected Event _prepareArchivedEvent(UserIdentity issuer, Content content) throws javax.jcr.RepositoryException Prepare event to notify observers- Parameters:
issuer
- the responsible for the actioncontent
- the content after being archived- Returns:
- the event
- Throws:
javax.jcr.RepositoryException
- if an error occurred
-
isActionValid
Test if the action can be executed.- Parameters:
content
- the contentactionId
- the action ID.inputs
- the workflow inputs.- Returns:
- true if the action is valid in the current environment, false otherwise.
-
unarchiveContent
Unarchive a content.- Parameters:
content
- the content (in the archives workspace).- Throws:
javax.jcr.RepositoryException
- If an error occurred
-