public class Profile extends AbstractRevisioned implements Child<WorkflowBundle>, Revisioned
Profile
specifies a set of compatible ProcessorBinding
s.
For example, one Profile
could contain ways of enacting a set of
Processor
s on a grid whilst another contained
ways of enacting the Processor
s on a laptop.
AbstractCloneable.Cloning, AbstractCloneable.CopyVisitor
Modifier and Type | Field and Description |
---|---|
static URI |
PROFILE_ROOT |
Constructor and Description |
---|
Profile()
Constructs a
Profile with a random UUID as the name. |
Profile(String name)
Constructs a
Profile 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<Activity> |
getActivities()
Returns the
Activity s that this Profile contains. |
NamedSet<Configuration> |
getConfigurations()
Returns the
Configuration s that this Profile contains. |
protected URI |
getIdentifierRoot() |
WorkflowBundle |
getParent()
Returns the parent of this workflow bean, or
null if it is orphan. |
NamedSet<ProcessorBinding> |
getProcessorBindings()
Return the set of bindings for individual
Processor s. |
Integer |
getProfilePosition()
Return the suggested position of this profile within the
WorkflowBundle . |
void |
setActivities(Set<Activity> activities)
Sets the
Activity s that this Profile contains. |
void |
setConfigurations(Set<Configuration> configurations)
Sets the
Configuration s that this Profile contains. |
void |
setParent(WorkflowBundle parent)
Sets the parent of this workflow bean.
|
void |
setProcessorBindings(Set<ProcessorBinding> processorBindings)
Sets the bindings for individual
Processor s. |
void |
setProfilePosition(Integer profilePosition)
Sets the position of this profile within the
WorkflowBundle . |
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 PROFILE_ROOT
public Profile()
Profile
with a random UUID as the name.public Profile(String name)
Profile
with the specified name.name
- the name of the Profile
. 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 NamedSet<Activity> getActivities()
Activity
s that this Profile
contains.
The Activity
s may be bound to Processor
s in the
ProcessorBinding
s.
Activity
s that this Profile
containspublic NamedSet<Configuration> getConfigurations()
Configuration
s that this Profile
contains.Configuration
s that this Profile
containspublic WorkflowBundle getParent()
Child
null
if it is orphan.getParent
in interface Child<WorkflowBundle>
null
if it is orphanpublic NamedSet<ProcessorBinding> getProcessorBindings()
Processor
s.Processor
spublic final Integer getProfilePosition()
WorkflowBundle
.
If ordering profiles (for instance for displaying them to the user), they
might be sorted by increasing profilePosition. If two profiles
have the same position, their internal order is undetermined. Profiles with
profile position null
should be sorted last in such a list.
WorkflowBundle
public void setActivities(Set<Activity> activities)
Activity
s that this Profile
contains.activities
- the Activity
s that this Profile
containspublic void setConfigurations(Set<Configuration> configurations)
Configuration
s that this Profile
contains.configurations
- the Configuration
s that this Profile
containspublic 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 setProcessorBindings(Set<ProcessorBinding> processorBindings)
Processor
s.processorBindings
- the bindings for individual Processor
spublic final void setProfilePosition(Integer profilePosition)
WorkflowBundle
.
When ordering profiles, they can be sorted by decreasing profilePosition. If two profiles have the same position, their internal order is undetermined.
profilePosition
- the position of this profile within the WorkflowBundle
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.