public class Configuration extends AbstractNamed implements Child<Profile>, Typed
Configurable
workflow bean.
A configuration is activated by a Profile
, and provides a link to the
getPropertyResource()
containing the properties to configure the
bean, like an Activity
.
A configuration is of a certain (RDF) type, as defined by
PropertyResource.getTypeURI()
on the - which determines which
properties are required and optional. For instance, the type
http://ns.taverna.org.uk/2010/activity/wsdl/ConfigType
requires
the property
http://ns.taverna.org.uk/2010/activity/wsdl/operation
.
These requirements are described in the ConfigurationDefinition
that
matches the getConfigurableType() of the Configurable
found by
getConfigures()
. Its
ConfigurationDefinition.getPropertyResourceDefinition()
should in
PropertyResourceDefinition.getTypeURI()
should match the
getType()
of this Configuration
.
Note: getType()
(and the potentially misleading
getConfigurableType()
) return the type of this Configuration,
not the type of the Configurable
bean that it happens to configure.
For instance, a Configuration typed
http://example.com/WSDLConfiguration
might configure an activity
typed http://example.com/WSDLActivity
, but could also have
configured an activity typed
http://example.com/GlobusWSDLActivity
.
TODO: Where are the ConfigurationDefinitions found?
AbstractCloneable.Cloning, AbstractCloneable.CopyVisitor
Constructor and Description |
---|
Configuration()
Constructs a
Configuration with a random UUID as the name. |
Configuration(String name)
Construct a
Configuration 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) |
URI |
getConfigurableType()
Deprecated.
Use
getType() to avoid ambiguous code |
Configurable |
getConfigures()
Return the
Configurable workflow bean that is configured. |
Profile |
getParent()
Returns the parent of this workflow bean, or
null if it is orphan. |
PropertyResource |
getPropertyResource()
Return the underlying
PropertyResource which contains the properties set by this
configuration. |
URI |
getType()
Return the type of the
Configuration . |
void |
setConfigurableType(URI type)
Deprecated.
Use
setType(URI) to avoid ambiguous code |
void |
setConfigures(Configurable configurable)
Set the
Configurable WorkflowBean that is configured. |
void |
setParent(Profile parent)
Sets the parent of this workflow bean.
|
void |
setPropertyResource(PropertyResource propertyResource)
Set the underlying
PropertyResource which contains the properties
set by this configuration. |
void |
setType(URI type)
Set the type of the
Configuration . |
compareTo, equals, getName, hashCode, setName, toString
clone, cloneWorkflowBean
finalize, getClass, notify, notifyAll, wait, wait, wait
clone
public Configuration()
Configuration
with a random UUID as the name.public Configuration(String name)
Configuration
with the specified name.name
- the name of the Configuration
. 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.@Deprecated public URI getConfigurableType()
getType()
to avoid ambiguous codeConfiguration
.
Note that this method name (inherited from Typed
) can be
misleading, as this is the type of the Configuration
, not the
Configurable
. To avoid ambiguous code,
you may use the getType()
method instead.
getConfigurableType
in interface Typed
Configuration
public Configurable getConfigures()
Configurable
workflow bean that is configured. Typically an
Activity
or DispatchStackLayer
, but in theory also Processor
,
Workflow
and Port
can be configured.Configurable
WorkflowBean
that is configuredpublic Profile getParent()
Child
null
if it is orphan.public PropertyResource getPropertyResource()
PropertyResource
which contains the properties set by this
configuration.PropertyResource
.public URI getType()
Configuration
.
The URI will match the PropertyResource.getTypeURI()
.
Configuration
@Deprecated public void setConfigurableType(URI type)
setType(URI)
to avoid ambiguous codeConfiguration
.
Note that this method name (inherited from Typed
) can be
misleading, as this is the type of the Configuration
, not the
Configurable
. To avoid ambiguous code, you may use the
setType(URI)
method instead.
setConfigurableType
in interface Typed
type
- the type of the Configuration
.public void setConfigures(Configurable configurable)
Configurable
WorkflowBean
that is configured.configurable
- the Configurable
WorkflowBean
that is configuredpublic 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 void setPropertyResource(PropertyResource propertyResource)
PropertyResource
which contains the properties
set by this configuration.
If the provided PropertyResource is null
, a new, blank
PropertyResource will be set instead.
propertyResource
- the underlying PropertyResource
which contains
the properties set by this configuration.public void setType(URI type)
Configuration
.
This will also set PropertyResource.setTypeURI(URI)
.
type
- the type of the Configuration
.protected void cloneInto(WorkflowBean clone, AbstractCloneable.Cloning cloning)
cloneInto
in class AbstractNamed
Copyright © 2013 myGrid. All rights reserved.