public class ArchiveContentAction extends ContentWorkflowAction
Modifier and Type | Field and Description |
---|---|
protected CloneComponent |
_cloneComponent
The clone component.
|
protected ObservationManager |
_observationManager
Observation manager available to subclasses.
|
protected Repository |
_repository
The repository.
|
protected AmetysObjectResolver |
_resolver
The ametys object resolver.
|
_userProvider
_workflowProvider
manager
EMPTY_MAP
Constructor and Description |
---|
ArchiveContentAction() |
Modifier and Type | Method and 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 observers
|
protected Event |
_prepareDeletingEvent(UserIdentity issuer,
Content content)
Prepare event to notify observers
|
protected void |
archiveContent(WorkflowAwareContent content,
Map objectModel,
Map<String,Object> result)
Archive a content.
|
protected Session |
getArchiveSession()
Get a repository session on the archive workspace.
|
void |
service(ServiceManager serviceManager) |
_getContent, _getCurrentStep, _getExceptionContext, _getInputs, _getUser, _getWorkflowId, _processWorkflowException, initialize
_getActionResult
_getActionId, _getFailConditions, _getWorkflowErrors, _getWorkflowWarns, _processInvalidActionException, act
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
protected Repository _repository
protected AmetysObjectResolver _resolver
protected CloneComponent _cloneComponent
protected ObservationManager _observationManager
public ArchiveContentAction()
public void service(ServiceManager serviceManager) throws ServiceException
service
in interface Serviceable
service
in class ServiceableAction
ServiceException
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
AbstractWorkflowAction
_act
in class ContentWorkflowAction
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 usecom.opensymphony.workflow.InvalidInputException
- if the action id is not valid.com.opensymphony.workflow.WorkflowException
- if the action failed.protected Event _prepareDeletingEvent(UserIdentity issuer, Content content)
issuer
- the responsible for the actioncontent
- the archived contentprotected Event _prepareDeletedEvent(UserIdentity issuer, Content content)
issuer
- the responsible for the actioncontent
- the archived contentprotected void archiveContent(WorkflowAwareContent content, Map objectModel, Map<String,Object> result) throws RepositoryException
content
- the content to archive.objectModel
- the current object model.result
- the result mapRepositoryException
- The repository exceptionprotected Session getArchiveSession() throws RepositoryException
RepositoryException
- The repository exception