Class WorkflowImpl

java.lang.Object
org.hippoecm.repository.ext.WorkflowImpl
All Implemented Interfaces:
Serializable, Remote, Workflow, WorkflowContextAware

public abstract class WorkflowImpl extends Object implements Remote, Workflow, WorkflowContextAware
Implementors of a work-flow in the repository must extend from the WorkflowImpl base type.
See Also:
  • Field Details

    • context

      protected WorkflowContext context
      Work-flow context in use, which ought to be not public accessible. Use getWorkflowContext instead.
  • Constructor Details

    • WorkflowImpl

      public WorkflowImpl() throws RemoteException
      All implementations of a work-flow must provide a single, no-argument constructor.
      Throws:
      RemoteException - mandatory exception that must be thrown by all Remote objects
  • Method Details

    • setWorkflowContext

      public final void setWorkflowContext(WorkflowContext context)
      This call is not (yet) part of the API, but under evaluation.

      Specified by:
      setWorkflowContext in interface WorkflowContextAware
      Parameters:
      context - the new context that should be used
    • setNode

      public void setNode(Node node) throws RepositoryException
      This call is not part of the public API

      Specified by:
      setNode in interface WorkflowContextAware
      Parameters:
      node - the backing Node for this workflow
      Throws:
      RepositoryException
    • hints

      public Map<String,Serializable> hints() throws WorkflowException
      The hints method is not an actual workflow call, but a method by which information can be retrieved from the workflow. All implementations must implement this call as a pure function, no modification may be made, nor no state may be maintained and and in principle no additional lookups of data is allowed. This allows for caching the result as long as the document on which the workflow operates isn't modified. By convention, keys that are names or signatures of methods implemented by the workflow provide information to the application program whether the workflow method is available this time, or will result in a WorkflowException. The value for these keys will often be a Boolean to indicate the enabled status of the method.

      Non-standard keys in this map should be prefixed with the implementation package name using dot seperations.

      Specified by:
      hints in interface Workflow
      Returns:
      a map containing hints given by the workflow, the data in this map may be considered valid until the document itself changes
      Throws:
      WorkflowException - thrown in case the implementing workflow encounters an error, this exception should normally never be thrown by implementations for the hints method.
    • getNode

      public Node getNode()
      Specified by:
      getNode in interface WorkflowContextAware
      Returns:
      the backing Node of this workflow
    • getCheckedOutNode

      protected Node getCheckedOutNode() throws RepositoryException
      Returns:
      the ensured to be checked out backing Node of this Document
      Throws:
      RepositoryException
    • getWorkflowContext

      public final WorkflowContext getWorkflowContext()
      Specified by:
      getWorkflowContext in interface WorkflowContextAware