public class Workflow extends AbstractRevisioned implements Child<WorkflowBundle>, Ported, Revisioned
Workflow
is a set of Processor
s and DataLink
s
between the Processor
s. Workflow
s may also have
input and output ports.AbstractCloneable.Cloning, AbstractCloneable.CopyVisitor
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. |
Workflow(String name)
Constructs a
Workflow with the specified name. |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(Visitor visitor)
Accepts a
Visitor to this WorkflowBean . |
protected void |
cloneInto(WorkflowBean clone,
AbstractCloneable.Cloning cloning) |
Set<ControlLink> |
getControlLinks()
Returns the
ControlLink s. |
Set<DataLink> |
getDataLinks()
Returns the
DataLink s. |
protected URI |
getIdentifierRoot() |
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. |
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 |
updateWorkflowIdentifier()
Updates the workflow identifier.
|
generateNewIdentifier, getCurrentRevision, getIdentifier, newRevision, newRevision, setCurrentRevision, setIdentifier
compareTo, equals, getName, hashCode, setName, toString
clone, cloneWorkflowBean
finalize, getClass, notify, notifyAll, wait, wait, wait
getCurrentRevision, getIdentifier, newRevision, newRevision, setCurrentRevision, setIdentifier
clone
public static final URI WORKFLOW_ROOT
public Workflow()
Workflow
with a name based on a random UUID.public Workflow(String name)
Workflow
with the specified name.name
- The name of the Workflow
. Must
not be null
or an empty String.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 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 updateWorkflowIdentifier()
The AbstractRevisioned.getCurrentRevision()
will be replaced using using
AbstractRevisioned.newRevision()
.
protected URI getIdentifierRoot()
getIdentifierRoot
in class AbstractRevisioned
protected void cloneInto(WorkflowBean clone, AbstractCloneable.Cloning cloning)
cloneInto
in class AbstractNamed
Copyright © 2014 myGrid. All rights reserved.