public interface Operation extends AbstractOperation
Operation represents a callable part of an
ExecutableComponent.
This allows for generic components like a file transfer component that has
two operations: one upload and one download operation. These operations have
different interfaces (input/output parameters) and may have different
configuration entries - but also common configuration entries.
Unlike executable component descriptions, the parent entities of operations, operations have a name, a configuration and input and output parameters. Additionally, they allow to specify further information like a test mode or view only (the operation is re-executed with the same parameter values as before but does not do anything except displaying the values to the user which allows for traceability). Operations may also be provided with a staff assignment rule that should be respected in the corresponding process templates.
Operations may have a fixed interface, a generic interface without any
restrictions and intermediate stages. This allows to add, change and/or
remove parameters to this operations. However, the underlying executable
component needs to support this since it has to determine the parameters at
runtime. The more generic an operation is, the more reusable it is but also
more complex to use. See ParameterChangePolicy for the supported
kinds of genericness.
Since operations are located directly below
ExectuableComponentDescriptions they may override most of the
corresponding attributes. To allow for overriding with null values, it is
crucial to check whether a value is inherited (for instance
AbstractOperation.isIconIDInherited()) before retrieving the value from this operation
(for instance AbstractOperation.getIconID()). If a value is inherited, the value
returned from this operation will be undefined and must not be used.
All methods for retrieving an overridden attribute return a merged value,
that is the value resulting after overriding (except
getOwnClassPath()).
| Modifier and Type | Method and Description |
|---|---|
java.util.List<java.lang.String> |
getClassPath()
Gets the classpath to be used when instantiating the
implementation class for this
operation as well as all classes needed to execute all of its methods.
|
InheritedActivityConfiguration |
getConfiguration()
Gets the configuration of this operation that corresponds to the
configuration description of
this operation.
|
InheritedConfigurationDescription |
getConfigurationDescription()
Gets the configuration description for this operation.
|
ExecutableComponentDescription |
getExecutableComponentDescription()
Gets the
ExecutableComponentDescription this operation belongs
to. |
java.util.List<java.lang.String> |
getOwnClassPath()
Gets the part of the classpath that is added
by this operation to the one of the
parent attribute.
|
InheritedCollection<java.lang.String,ActivityModelParameter> |
getParameters(ActivityConstants.AccessType accessType)
Gets the parameters of the designated access type of this operation.
|
InheritedCollection<java.lang.String,ParameterTemplate> |
getParameterTemplates()
Gets parameter templates that are defined for this operation and its child
entities or that are removed from the ones of the parent entity.
|
StorageOperation |
getStorageOperation()
Gets the object that allows to easily store the data of this
Operation. |
InheritedActivityConfiguration |
getTestConfiguration()
Gets the test configuration of this operation that corresponds to the
configuration description of
this operation.
|
void |
setClassPath(java.util.List<java.lang.String> classPath)
Sets the classpath to be used when instantiating and executing the
implementation class for the
executable component of this operation.
|
void |
setConfiguration(InheritedActivityConfiguration configuration)
Sets the configuration of this operation to the designated one.
|
void |
setConfigurationDescription(InheritedConfigurationDescription description)
Sets the configuration description for this operation.
|
void |
setParameters(ActivityConstants.AccessType accessType,
InheritedCollection<java.lang.String,ActivityModelParameter> parameters)
Sets all the parameters of the designated access type of this operation.
|
void |
setParameterTemplates(InheritedCollection<java.lang.String,ParameterTemplate> parameterTemplates)
Sets parameter templates that are defined for this operation and its child
entities.
|
void |
setTestConfiguration(InheritedActivityConfiguration testConfiguration)
Sets the test configuration of this operation to the designated one.
|
areExecutionControlPropertiesInterhited, getClassLoaderUsage, getDescription, getDeveloperDescription, getExecutionControlProperties, getGUIContextID, getIconID, getImplementationClass, getLicenceInformation, getName, getParameterChangePolicy, getRevision, getStaffAssignmentRule, getState, getSystemComponent, isClassLoaderUsageInherited, isDeveloperDescriptionInherited, isGUIContextIDInherited, isIconIDInherited, isImplementationClassInherited, isLicenceInformationInherited, isSystemComponentInherited, removeOwnClassLoaderUsage, removeOwnDeveloperDescription, removeOwnExecutionControlProperties, removeOwnGUIContextID, removeOwnIconID, removeOwnImplementationClass, removeOwnLicenceInformation, removeOwnSystemComponent, setClassLoaderUsage, setDescription, setDeveloperDescription, setExecutionControlProperties, setGUIContextID, setIconID, setImplementationClass, setLicenceInformation, setName, setParameterChangePolicy, setStaffAssignmentRule, setSupportsTestExecutionOnly, setSupportsViewOnly, setSystemComponent, supportsTestExecution, supportsViewOnlygetUserAttributes, getUserAttributeValue, removeUserAttributeValue, setUserAttributeValuegetPluginData, getPluginDatas, getSupportedPluginsExecutableComponentDescription getExecutableComponentDescription()
ExecutableComponentDescription this operation belongs
to.ExecutableComponentDescription this operation
belongs to.java.util.List<java.lang.String> getClassPath()
This attribute supplements the parent attribute, that is the classpath of this entity prepends the classpath of the parent entity.
java.util.List<java.lang.String> getOwnClassPath()
InheritedConfigurationDescription getConfigurationDescription()
This configuration description is merged with the configuration description of the designated executable component description.
InheritedActivityConfiguration getConfiguration()
InheritedActivityConfiguration getTestConfiguration()
InheritedCollection<java.lang.String,ActivityModelParameter> getParameters(ActivityConstants.AccessType accessType)
The parameters need not be based on parameter templates of this operation or the corresponding executable component description.
accessType - The access type of the parameters to be retrieved (only
values in ActivityConstants.AccessType.activityRelatedValues() are allowed).InheritedCollection<java.lang.String,ParameterTemplate> getParameterTemplates()
This collection of parameter templates is merged with the collection of parameter templates of the corresponding executable component.
StorageOperation getStorageOperation()
Operation. This provides the data without merging it before,
that is, these are only the differences with respect to the parent entity.
The returned object is for storing only! You should not rely on it to retrieve unmerged attribute values! If you need these, you will have to use appropriate tool methods or "unmerge" them yourself.
Operation by just
providing the differences with respect to the parent entity. That
is no attribute value is merged with the corresponding parent
attribute.void setClassPath(java.util.List<java.lang.String> classPath)
This attribute supplements the parent attribute, that is the classpath of this entity prepends the classpath of the parent entity. The designated classpath may already be merged, implementations have to separate the inherited part if necessary.
classPath - A list of entries for the classpath to search for classes
used at runtime. The order is important: Prior entries are used
first. This classpath (the first part that differs from the
inherited classpath) prepends the classpath of the parent entity.void setConfigurationDescription(InheritedConfigurationDescription description)
The configuration description has to be set as a whole; to add or modify
single entries, retrieve the complete description from this operation, add
or modify the entry and provide the complete description again to this
method. Use null to remove the configuration description from
this operation and inherit the configuration description of the parent
entity without any changes.
When changing the configuration description one has to check for conflicts that may occur in the configuration description of the configuration sets this operation is part of.
The designated configuration description is merged with the configuration description of the corresponding executable component description.
description - The description for all configuration values of this
operation, that is, the name of the configuration entries, their
type and whether they are mandatory. Use null to
remove the configuration description from this operation, that is,
it will be inherited from the parent entity again.void setConfiguration(InheritedActivityConfiguration configuration)
configuration description of this
operation and its executable component description, that is the values
have to have appropriate configuration entries. Not all configuration
entries need to have a value yet except the
fixed ones. The values may also be retrieved from process parameters or
the process configuration (determined when modelling).
The configuration has to be set as a whole; to add or modify single values,
retrieve the complete configuration, add or modify the value and provide
the complete configuration again to this method. Use null to
remove the configuration from this operation, that is, it will be inherited
from the parent entity again.
configuration - The configuration values set for this operation based
on the configuration description. This does not necessarily
contain all values since they can still be set when modelling. Use
null to remove the configuration from this operation,
that is, it will be inherited from the parent entity again.void setTestConfiguration(InheritedActivityConfiguration testConfiguration)
configuration description of this
operation, that is the values have to have appropriate configuration
entries.
The configuration has to be set as a whole; to add or modify single values,
retrieve the complete configuration, add or modify the value and provide
the complete configuration again to this method. Use null to
remove the test configuration from this operation, that is, it will be
inherited from the parent entity again.
testConfiguration - The configuration values set for the test mode of
this operation based on the configuration description. This does
not necessarily contain all values since they can still be set
when modelling or taken from the normal configuration. Use
null to remove the test configuration from this
operation, that is, it will be inherited from the parent entity
again.void setParameters(ActivityConstants.AccessType accessType, InheritedCollection<java.lang.String,ActivityModelParameter> parameters)
The parameters need not be based on parameter templates of this operation or the corresponding executable component description.
accessType - The access type of the parameters to be retrieved (only
values in ActivityConstants.AccessType.activityRelatedValues() are allowed).parameters - The parameters of this operation for the designated
access type. If this operation does not have parameters of the
designated access type provide null.void setParameterTemplates(InheritedCollection<java.lang.String,ParameterTemplate> parameterTemplates)
When setting the parameter templates the whole collection has to be set; to
add or modify single parameter templates retrieve the complete templates
from this operation, add or modify the template and provide the collection
of templates again to this method. Use null for removing all
parameter templates of this operation, that is, the parameter templates
will be inherited from the parent entity again.
It will not be allowed to set parameter templates for this operation if the
parameter change policy of this operation does not allow to add or change
real parameters (ParameterChangePolicy.ADD_VIRTUAL or
ParameterChangePolicy.FIXED); only null will be
accepted. It will not make sense to set parameter templates if the child
entities are not allowed to add or change parameters.
The designated collection of parameter templates is merged with the collection of parameter templates of the corresponding executable component.
parameterTemplates - A collection containing all parameter templates
that are defined for this operation.