Package org.hippoecm.repository.ext
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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected WorkflowContext
context
Work-flow context in use, which ought to be not public accessible.
-
Constructor Summary
Constructors Constructor Description WorkflowImpl()
All implementations of a work-flow must provide a single, no-argument constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected javax.jcr.Node
getCheckedOutNode()
javax.jcr.Node
getNode()
WorkflowContext
getWorkflowContext()
Map<String,Serializable>
hints()
The hints method is not an actual workflow call, but a method by which information can be retrieved from the workflow.void
setNode(javax.jcr.Node node)
This call is not part of the public APIvoid
setWorkflowContext(WorkflowContext context)
This call is not (yet) part of the API, but under evaluation.
-
-
-
Field Detail
-
context
protected WorkflowContext context
Work-flow context in use, which ought to be not public accessible. Use getWorkflowContext instead.
-
-
Constructor Detail
-
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 Detail
-
setWorkflowContext
public final void setWorkflowContext(WorkflowContext context)
This call is not (yet) part of the API, but under evaluation.- Specified by:
setWorkflowContext
in interfaceWorkflowContextAware
- Parameters:
context
- the new context that should be used
-
setNode
public void setNode(javax.jcr.Node node) throws javax.jcr.RepositoryException
This call is not part of the public API- Specified by:
setNode
in interfaceWorkflowContextAware
- Parameters:
node
- the backing Node for this workflow- Throws:
javax.jcr.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 aBoolean
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 interfaceWorkflow
- 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 javax.jcr.Node getNode()
- Specified by:
getNode
in interfaceWorkflowContextAware
- Returns:
- the backing Node of this workflow
-
getCheckedOutNode
protected javax.jcr.Node getCheckedOutNode() throws javax.jcr.RepositoryException
- Returns:
- the ensured to be checked out backing Node of this Document
- Throws:
javax.jcr.RepositoryException
-
getWorkflowContext
public final WorkflowContext getWorkflowContext()
- Specified by:
getWorkflowContext
in interfaceWorkflowContextAware
-
-