public class ContentWorkflowAction extends WorkflowAction
The following parameters are supported:
Modifier and Type | Field and Description |
---|---|
protected CurrentUserProvider |
_userProvider
Component to get the current user
|
_workflowProvider
manager
EMPTY_MAP
Constructor and Description |
---|
ContentWorkflowAction() |
Modifier and Type | Method and Description |
---|---|
protected Map |
_act(Redirector redirector,
Map objectModel,
String source,
Parameters parameters,
int actionId,
Map inputs)
Initialize or act on a workflow instance.
|
protected WorkflowAwareContent |
_getContent(Map objectModel)
Retrieve the content to use.
|
protected long |
_getCurrentStep(Map objectModel)
Get the content current step
|
protected String |
_getExceptionContext(Map objectModel,
String source,
Parameters parameters)
Provides the exception context for a more friendly error message.
|
protected Map<String,Object> |
_getInputs(Redirector redirector,
Map objectModel,
String source,
Parameters parameters)
Provide the inputs to use.
|
protected UserIdentity |
_getUser(Map objectModel)
Retrieve the user responsible of the call.
|
protected long |
_getWorkflowId(Map objectModel,
String source,
Parameters parameters)
Provide the workflow id.
|
protected Map |
_processWorkflowException(Redirector redirector,
Map objectModel,
String source,
Parameters parameters,
long actionId,
com.opensymphony.workflow.WorkflowException e)
Called when the current action has thrown a
WorkflowException . |
void |
initialize() |
_getActionResult
_getActionId, _getFailConditions, _getWorkflowErrors, _getWorkflowWarns, _processInvalidActionException, act
service
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
protected CurrentUserProvider _userProvider
public ContentWorkflowAction()
public void initialize() throws Exception
initialize
in interface Initializable
initialize
in class AbstractWorkflowAction
Exception
protected Map _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 WorkflowAction
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 long _getWorkflowId(Map objectModel, String source, Parameters parameters)
WorkflowAction
Default implementation uses parameter workflowId
.
_getWorkflowId
in class WorkflowAction
objectModel
- the current object model.source
- the current source.parameters
- the current parameters.protected Map<String,Object> _getInputs(Redirector redirector, Map objectModel, String source, Parameters parameters) throws Exception
AbstractWorkflowAction
Default implementation provide the redirector.
_getInputs
in class AbstractWorkflowAction
redirector
- the redirector.objectModel
- the current object model.source
- the current source.parameters
- the current parameters.Exception
- if an error occurs.protected WorkflowAwareContent _getContent(Map objectModel)
objectModel
- the object model.protected UserIdentity _getUser(Map objectModel)
objectModel
- the object model.protected Map _processWorkflowException(Redirector redirector, Map objectModel, String source, Parameters parameters, long actionId, com.opensymphony.workflow.WorkflowException e) throws Exception
AbstractWorkflowAction
WorkflowException
.Default implementation throw an exception.
_processWorkflowException
in class AbstractWorkflowAction
redirector
- the redirector.objectModel
- the current object model.source
- the current source.parameters
- the current parameters.actionId
- the invalid action id.e
- the workflow exception.Exception
- in order to stop the current pipeline.protected String _getExceptionContext(Map objectModel, String source, Parameters parameters)
AbstractWorkflowAction
_getExceptionContext
in class WorkflowAction
objectModel
- the current object model.source
- the current source.parameters
- the current parameters.protected long _getCurrentStep(Map objectModel)
objectModel
- The object model