uk.org.ogsadai.activity.workflow
Interface Workflow

All Known Implementing Classes:
ActivityPipelineWorkflow, CompositeWorkflow, ParallelWorkflow, ParallelWorkflow, SequenceWorkflow, SequenceWorkflow

public interface Workflow

The common interface for elements of a workflow composition. This is an example of the Composite design pattern.

Author:
The OGSA-DAI Project Team

Method Summary
 void accept(WorkflowVisitor visitor)
          Accepts a visitor and calls the appropriate visit method for the concrete class.
 void addChild(Workflow child)
          Adds a new child to the component.
 boolean allowsChildren()
          Indicates whether or not the workflow element allows children.
 java.util.List getChildren()
          Gets a list of the children of this request component.
 java.lang.String getInstanceName()
          Gets the name string that uniquely identifies the request component within the scope of the request.
 void removeChild(Workflow child)
          Removes a child from the component.
 

Method Detail

getInstanceName

java.lang.String getInstanceName()
Gets the name string that uniquely identifies the request component within the scope of the request.

Returns:
request component instance name

addChild

void addChild(Workflow child)
Adds a new child to the component.

Parameters:
child - child request component

getChildren

java.util.List getChildren()
Gets a list of the children of this request component.

Returns:
list of children. This must be empty for leaf request components.

removeChild

void removeChild(Workflow child)
Removes a child from the component.

Parameters:
child - child request component

allowsChildren

boolean allowsChildren()
Indicates whether or not the workflow element allows children.

Returns:
true if children are allowed, false otherwise

accept

void accept(WorkflowVisitor visitor)
            throws VisitorException
Accepts a visitor and calls the appropriate visit method for the concrete class.

Parameters:
visitor - visitor to accept and all a method on.
Throws:
VisitorException - if the visitor throws an exception. The recommended pattern is that the visitor provides a method that takes the VisitorException and throws exceptions applicable to the operation being performed by the visitor.