public class Activity extends AbstractNamed implements Configurable, Child<Profile>, Typed, Ported
Processor
within a Workflow
.
When the Workflow is run, a particular Activity will be specified as bound to the Processor and
Configuration
information will be specified for the Activity.
AbstractCloneable.Cloning, AbstractCloneable.CopyVisitor
INVALID_NAME
Constructor and Description |
---|
Activity()
Constructs an
Activity with a random UUID as the name. |
Activity(String name)
Constructs an
Activity 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) |
NamedSet<InputActivityPort> |
getInputPorts()
Returns the
InputActivityPort s. |
NamedSet<OutputActivityPort> |
getOutputPorts()
Returns the
OutputActivityPort s. |
Profile |
getParent()
Returns the parent of this workflow bean, or
null if it is orphan. |
URI |
getType()
Returns the type of the
Activity . |
void |
setInputPorts(Set<InputActivityPort> inputPorts)
Set the
InputActivityPort s to be the contents of the specified set. |
void |
setOutputPorts(Set<OutputActivityPort> outputPorts)
Set the
OutputActivityPort s to be the contents of the specified set. |
void |
setParent(Profile parent)
Sets the parent of this workflow bean.
|
void |
setType(URI type)
Sets the type of the
Activity . |
String |
toString() |
compareTo, equals, getName, hashCode, setName
clone, cloneWorkflowBean
finalize, getClass, notify, notifyAll, wait, wait, wait
clone
public Activity()
Activity
with a random UUID as the name.public Activity(String name)
Activity
with the specified name.name
- the name of the Activity. 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 URI getType()
Activity
.public NamedSet<InputActivityPort> getInputPorts()
InputActivityPort
s.
If there are no InputActivityPort
s an empty set is returned.getInputPorts
in interface Ported
InputActivityPort
s.public NamedSet<OutputActivityPort> getOutputPorts()
OutputActivityPort
s.
If there are no OutputActivityPort
s an empty set is returned.getOutputPorts
in interface Ported
OutputActivityPort
s.public Profile getParent()
Child
null
if it is orphan.public void setType(URI type)
Activity
.public void setInputPorts(Set<InputActivityPort> inputPorts)
InputActivityPort
s to be the contents of the specified set.
InputActivityPort
s can be added by using getInputPorts()
.add(inputPort).
inputPorts
- the InputActivityPort
s. Must not be nullpublic void setOutputPorts(Set<OutputActivityPort> outputPorts)
OutputActivityPort
s to be the contents of the specified set.
OutputActivityPort
s can be added by using getOutputPorts()
.add(outputPort).
outputPorts
- the OutputActivityPort
s. Must not be nullpublic void setParent(Profile 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.
public String toString()
toString
in class AbstractNamed
protected void cloneInto(WorkflowBean clone, AbstractCloneable.Cloning cloning)
cloneInto
in class AbstractNamed
Copyright © 2014 myGrid. All rights reserved.