Class ContentWorkflowAction

All Implemented Interfaces:
Initializable, Component, LogEnabled, Serviceable, Action
Direct Known Subclasses:
ArchiveContentAction, UnarchiveContentAction

Action for firing a transition on a content's workflow.

The following parameters are supported:

actionId
the id of the action to fire
  • Field Details

  • Constructor Details

  • Method Details

    • initialize

      public void initialize() throws Exception
      Specified by:
      initialize in interface Initializable
      Overrides:
      initialize in class AbstractWorkflowAction
      Throws:
      Exception
    • _act

      protected Map _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 class WorkflowAction
      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.
    • _getWorkflowId

      protected long _getWorkflowId(Map objectModel, String source, Parameters parameters)
      Description copied from class: WorkflowAction
      Provide the workflow id.

      Default implementation uses parameter workflowId.

      Overrides:
      _getWorkflowId in class WorkflowAction
      Parameters:
      objectModel - the current object model.
      source - the current source.
      parameters - the current parameters.
      Returns:
      the workflow id.
    • _getInputs

      protected Map<String,Object> _getInputs(Redirector redirector, Map objectModel, String source, Parameters parameters) throws Exception
      Description copied from class: AbstractWorkflowAction
      Provide the inputs to use. Default implementation provide the redirector.
      Overrides:
      _getInputs in class AbstractWorkflowAction
      Parameters:
      redirector - the redirector.
      objectModel - the current object model.
      source - the current source.
      parameters - the current parameters.
      Returns:
      the inputs to use.
      Throws:
      Exception - if an error occurs.
    • _getContent

      protected WorkflowAwareContent _getContent(Map objectModel)
      Retrieve the content to use.
      Parameters:
      objectModel - the object model.
      Returns:
      the content found.
    • _getUser

      protected UserIdentity _getUser(Map objectModel)
      Retrieve the user responsible of the call.
      Parameters:
      objectModel - the object model.
      Returns:
      the user responsible of the call.
    • _processWorkflowException

      protected Map _processWorkflowException(Redirector redirector, Map objectModel, String source, Parameters parameters, long actionId, com.opensymphony.workflow.WorkflowException e) throws Exception
      Description copied from class: AbstractWorkflowAction
      Called when the current action has thrown a WorkflowException. Default implementation throw an exception.
      Overrides:
      _processWorkflowException in class AbstractWorkflowAction
      Parameters:
      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.
      Returns:
      the action result.
      Throws:
      Exception - in order to stop the current pipeline.
    • _getExceptionContext

      protected String _getExceptionContext(Map objectModel, String source, Parameters parameters)
      Description copied from class: AbstractWorkflowAction
      Provides the exception context for a more friendly error message.
      Overrides:
      _getExceptionContext in class WorkflowAction
      Parameters:
      objectModel - the current object model.
      source - the current source.
      parameters - the current parameters.
      Returns:
      the message describing the exception context.
    • _getCurrentStep

      protected long _getCurrentStep(Map objectModel)
      Get the content current step
      Parameters:
      objectModel - The object model
      Returns:
      The content current step as