public class Configuration extends AbstractNamedChild 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
which
ConfigurationDefinition.getConfigurableType()
matches this configuration's
#getTypeURI()
. TODO: Where are the ConfigurationDefinitions found?
Constructor and Description |
---|
Configuration()
Constructs a
Configuration with a random UUID as the name. |
Configuration(String name)
Constructs a
Configuration with the specified name. |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(Visitor visitor)
Accepts a
Visitor to this WorkflowBean . |
URI |
getConfigurableType()
Returns the type of the
Configuration . |
Configurable |
getConfigures()
Returns the
Configurable workflow bean that is configured. |
Profile |
getParent()
Returns the parent of this workflow bean, or
null if it is orphan. |
PropertyResource |
getPropertyResource()
Returns the underlying
PropertyResource which contains the properties set by this
configuration. |
void |
setConfigurableType(URI type)
Sets the type of the
Configuration . |
void |
setConfigures(Configurable configurable)
Sets the
Configurable WorkflowBean that is configured. |
void |
setParent(Profile parent)
Sets the parent of this workflow bean.
|
void |
setPropertyResource(PropertyResource propertyResource)
Sets the underlying
PropertyResource which contains the properties set by this
configuration. |
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.public URI getConfigurableType()
Configuration
.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 void setConfigurableType(URI type)
Configuration
.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.propertyResource
- the underlying PropertyResource
which contains the properties set by
this configurationCopyright © 2013 myGrid. All rights reserved.