Interface Operation
-
- All Superinterfaces:
AbstractOperation
,PluginDataContainer
,UserAttributeContainer
public interface Operation extends AbstractOperation
TheOperation
represents a callable part of anExecutableComponent
. 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
ExectuableComponentDescription
s 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 instanceAbstractOperation.isIconIDInherited()
) before retrieving the value from this operation (for instanceAbstractOperation.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 (exceptgetOwnClassPath()
).- Author:
- Ulrich Kreher
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<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 theExecutableComponentDescription
this operation belongs to.List<String>
getOwnClassPath()
Gets the part of the classpath that is added by this operation to the one of the parent attribute.InheritedCollection<String,ActivityModelParameter>
getParameters(ActivityConstants.AccessType accessType)
Gets the parameters of the designated access type of this operation.InheritedCollection<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 thisOperation
.InheritedActivityConfiguration
getTestConfiguration()
Gets the test configuration of this operation that corresponds to the configuration description of this operation.void
setClassPath(List<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<String,ActivityModelParameter> parameters)
Sets all the parameters of the designated access type of this operation.void
setParameterTemplates(InheritedCollection<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.-
Methods inherited from interface de.aristaflow.adept2.model.activitymodel.AbstractOperation
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, supportsViewOnly
-
Methods inherited from interface de.aristaflow.adept2.model.common.PluginDataContainer
getPluginData, getPluginDatas, getSupportedPlugins
-
Methods inherited from interface de.aristaflow.adept2.model.common.UserAttributeContainer
getUserAttributes, getUserAttributeValue, removeUserAttributeValue, setUserAttributeValue
-
-
-
-
Method Detail
-
getExecutableComponentDescription
ExecutableComponentDescription getExecutableComponentDescription()
Gets theExecutableComponentDescription
this operation belongs to.- Returns:
- The
ExecutableComponentDescription
this operation belongs to.
-
getClassPath
List<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.This attribute supplements the parent attribute, that is the classpath of this entity prepends the classpath of the parent entity.
- Returns:
- 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 prepends the classpath of the parent entity.
-
getOwnClassPath
List<String> getOwnClassPath()
Gets the part of the classpath that is added by this operation to the one of the parent attribute. In case this operation does not supplement the classpath this will be an empty list.- Returns:
- The part of the classpath that is contributed by this operation. This is appended to the classpath of the parent entity and thus forms the complete classpath.
-
getConfigurationDescription
InheritedConfigurationDescription getConfigurationDescription()
Gets the configuration description for this operation. This may change the configuration description of the corresponding executable component description or add new entries. Note that removal of an inherited entry is not possible and has to be simulated by providing a null value as configuration value.This configuration description is merged with the configuration description of the designated executable component description.
- Returns:
- The description for all configuration values of this operation, that is, the name of the configuration entries, their type and whether they are mandatory.
-
getConfiguration
InheritedActivityConfiguration getConfiguration()
Gets the configuration of this operation that corresponds to the configuration description of this operation. These configuration values are provided as defaults for this operation. They may be overridden in child entities (unless fixed) and not all configuration values need to be provided yet. Configuration values may also be provided via an input parameter (which has to exist for this operation then) or from a process configuration (which is needed when modelling).- Returns:
- 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.
-
getTestConfiguration
InheritedActivityConfiguration getTestConfiguration()
Gets the test configuration of this operation that corresponds to the configuration description of this operation. These configuration values only apply when the operation is executed in test mode, that is the operation is provided this configuration instead of the normal configuration. This test configuration is merged with the normal configuration. Note that the test configuration allows to override fixed values of the normal configuration.- Returns:
- The merged configuration values set for the test mode of this operation based on the configuration description.
-
getParameters
InheritedCollection<String,ActivityModelParameter> getParameters(ActivityConstants.AccessType accessType)
Gets the parameters of the designated access type of this operation. These make up the interface of the operation. Depending on the parameter change policy of this operation, its collection of parameters may be fix, parameters may be changed and/or parameters may be added to the collection by child entities. Apparently this requires the underlying implementation of this operation to check for the defined parameters at runtime and react appropriately.
Parameters are identified by the access type, for instance input or output parameter, and their name.The parameters need not be based on parameter templates of this operation or the corresponding executable component description.
- Parameters:
accessType
- The access type of the parameters to be retrieved (only values inActivityConstants.AccessType.activityRelatedValues()
are allowed).- Returns:
- The parameters of this operation for the designated access type (mapped from parameter name to the corresponding parameter). If this operation does not have parameters of the designated type or they are not defined yet (since they may be added later), an empty collection will be returned.
-
getParameterTemplates
InheritedCollection<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.This collection of parameter templates is merged with the collection of parameter templates of the corresponding executable component.
- Returns:
- Templates for parameters (mapped from parameter template name to the corresponding parameter template) that may be added to child entities of this operation.
-
getStorageOperation
StorageOperation getStorageOperation()
Gets the object that allows to easily store the data of thisOperation
. 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.
- Returns:
- The object for storing this
Operation
by just providing the differences with respect to the parent entity. That is no attribute value is merged with the corresponding parent attribute.
-
setClassPath
void setClassPath(List<String> classPath)
Sets the classpath to be used when instantiating and executing the implementation class for the executable component of this operation.
The classpath is ordered, prior entries are searched before subsequent entries. The usual classpaths (directories, jar-files, URLs) as well as references to the code manager are supported.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.
- Parameters:
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.
-
setConfigurationDescription
void setConfigurationDescription(InheritedConfigurationDescription description)
Sets the configuration description for this operation. This may change the configuration description of the corresponding executable component description or add new entries. Note that removal of an inherited entry is not possible and has to be simulated by providing a null value as configuration value.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.
- Parameters:
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. Usenull
to remove the configuration description from this operation, that is, it will be inherited from the parent entity again.
-
setConfiguration
void setConfiguration(InheritedActivityConfiguration configuration)
Sets the configuration of this operation to the designated one. The provided configuration has to correspond to the (merged)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.- Parameters:
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. Usenull
to remove the configuration from this operation, that is, it will be inherited from the parent entity again.
-
setTestConfiguration
void setTestConfiguration(InheritedActivityConfiguration testConfiguration)
Sets the test configuration of this operation to the designated one. The provided configuration has to correspond to the (merged)configuration description
of this operation, that is the values have to have appropriate configuration entries.
These configuration values only apply when the operation is executed in test mode, that is the operation is provided this configuration instead of the normal configuration. This test configuration is merged with the normal configuration. Note that the test configuration allows to override fixed values of the normal configuration. 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 test configuration from this operation, that is, it will be inherited from the parent entity again.- Parameters:
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. Usenull
to remove the test configuration from this operation, that is, it will be inherited from the parent entity again.
-
setParameters
void setParameters(ActivityConstants.AccessType accessType, InheritedCollection<String,ActivityModelParameter> parameters)
Sets all the parameters of the designated access type of this operation. These make up the interface of the operation. Depending on the parameter change policy of this operation, its collection of parameters may be fix, parameters may be changed and/or parameters may be added to the collection. However, the parameter change policy of this operation does not apply to this operation but to its child entities.
Parameters are identified by the access type, for instance input or output parameter, and their name.The parameters need not be based on parameter templates of this operation or the corresponding executable component description.
- Parameters:
accessType
- The access type of the parameters to be retrieved (only values inActivityConstants.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 providenull
.
-
setParameterTemplates
void setParameterTemplates(InheritedCollection<String,ParameterTemplate> parameterTemplates)
Sets parameter templates that are defined for this operation and its child entities. This may change the parameter templates of the corresponding executable component description or add new parameter templates; removal is not allowed. If you need removal, add a new template and override the description of the one to be removed stating that it should not be used.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
orParameterChangePolicy.FIXED
); onlynull
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.
- Parameters:
parameterTemplates
- A collection containing all parameter templates that are defined for this operation.
-
-