public class Workflow extends AbstractNamedChild implements Child<WorkflowBundle>, Ported
Workflow
is a set of Processor
s and DataLink
s between the
Processor
s. Workflow
s may also have input and output ports.Modifier and Type | Field and Description |
---|---|
static URI |
WORKFLOW_ROOT |
Constructor and Description |
---|
Workflow()
Constructs a
Workflow with a name based on a random UUID. |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(Visitor visitor)
Accepts a
Visitor to this WorkflowBean . |
static URI |
generateIdentifier() |
Set<ControlLink> |
getControlLinks()
Returns the
ControlLink s. |
Set<DataLink> |
getDataLinks()
Returns the
DataLink s. |
NamedSet<InputWorkflowPort> |
getInputPorts()
Returns the
InputWorkflowPort s. |
NamedSet<OutputWorkflowPort> |
getOutputPorts()
Returns the
OutputWorkflowPort s. |
WorkflowBundle |
getParent()
Returns the parent of this workflow bean, or
null if it is orphan. |
NamedSet<Processor> |
getProcessors()
Returns the
Processor s. |
URI |
getWorkflowIdentifier()
Returns the workflow identifier.
|
void |
setControlLinks(Set<ControlLink> controlLinks)
Set the
ControlLink s to be the contents of the specified set. |
void |
setDataLinks(Set<DataLink> dataLinks)
Set the
DataLink s to be the contents of the specified set. |
void |
setInputPorts(Set<InputWorkflowPort> inputPorts)
Set the
InputWorkflowPort s to be the contents of the specified set. |
void |
setOutputPorts(Set<OutputWorkflowPort> outputPorts)
Set the
OutputWorkflowPort s to be the contents of the specified set. |
void |
setParent(WorkflowBundle parent)
Sets the parent of this workflow bean.
|
void |
setProcessors(Set<Processor> processors)
Set the
Processor s to be the contents of the specified set. |
void |
setWorkflowIdentifier(URI workflowIdentifier)
Sets the workflow identifier.
|
String |
toString() |
public static final URI WORKFLOW_ROOT
public Workflow()
Workflow
with a name based on a random UUID.public static URI generateIdentifier()
public boolean accept(Visitor visitor)
WorkflowBean
Visitor
to this WorkflowBean
.accept
in interface WorkflowBean
visitor
- the Visitor
to accepttrue
if this WorkflowBeans
children should be visited.public Set<ControlLink> getControlLinks()
ControlLink
s.
If there are no ControlLink
s an empty set is returned.ControlLink
spublic Set<DataLink> getDataLinks()
DataLink
s.
If there are no DataLink
s an empty set is returned.DataLink
s.public NamedSet<InputWorkflowPort> getInputPorts()
InputWorkflowPort
s.
If there are no InputWorkflowPort
s an empty set is returned.getInputPorts
in interface Ported
InputWorkflowPort
s.public NamedSet<OutputWorkflowPort> getOutputPorts()
OutputWorkflowPort
s.
If there are no OutputWorkflowPort
s an empty set is returned.getOutputPorts
in interface Ported
OutputWorkflowPort
s.public WorkflowBundle getParent()
Child
null
if it is orphan.getParent
in interface Child<WorkflowBundle>
null
if it is orphanpublic NamedSet<Processor> getProcessors()
Processor
s.
If there are no Processor
s an empty set is returned.Processor
s.public URI getWorkflowIdentifier()
The the default identifier is plus a random UUID.
#setWorkflowIdentifier(URI)}
public void setControlLinks(Set<ControlLink> controlLinks)
ControlLink
s to be the contents of the specified set.
ControlLink
s can be added by using getControlLinks()
.add(controlLink).
controlLinks
- the ControlLink
s. Must not be nullpublic void setDataLinks(Set<DataLink> dataLinks)
DataLink
s to be the contents of the specified set.
DataLink
s can be added by using getDataLinks()
.add(dataLink).
dataLinks
- the DataLink
s. Must not be nullpublic void setInputPorts(Set<InputWorkflowPort> inputPorts)
InputWorkflowPort
s to be the contents of the specified set.
InputWorkflowPort
s can be added by using #getInputWorkflowPorts()
.add(inputPort).
inputPorts
- the InputWorkflowPort
s. Must not be nullpublic void setOutputPorts(Set<OutputWorkflowPort> outputPorts)
OutputWorkflowPort
s to be the contents of the specified set.
OutputWorkflowPort
s can be added by using #getOutputWorkflowPorts()
.add(outputPort).
outputPorts
- the OutputWorkflowPort
s. Must not be nullpublic void setParent(WorkflowBundle parent)
Child
Setting the parent would normally also add the object to the relevant collection in the parent if it does not already exist there.
If the child has an existing, object-identity different parent, the child will first be removed from the parent collection if it exists there.
Note:If the child is Named
the parent collection will be a
NamedSet
. This implicit insertion would overwrite any conflicting sibling with the
same Named.getName()
- to avoid this, add the child to the parent collection by using
NamedSet.addWithUniqueName(Named)
before setting the parent.
setParent
in interface Child<WorkflowBundle>
parent
- the parent of this workflow beanpublic void setProcessors(Set<Processor> processors)
Processor
s to be the contents of the specified set.
Processor
s can be added by using getProcessors()
.add(processor).
processors
- the Processor
s. Must not be nullpublic void setWorkflowIdentifier(URI workflowIdentifier)
workflowIdentifier
- the workflow identifierpublic String toString()
toString
in class AbstractNamed
Copyright © 2013 myGrid. All rights reserved.