Interface DataContext
-
- All Superinterfaces:
InputDataContext
,PluginDataContainer
,UserAttributeContainer
- All Known Subinterfaces:
SerialisableDataContext
- All Known Implementing Classes:
SettableDataContext
public interface DataContext extends InputDataContext
This interface provides reading access to all input and output parameters of an application as well as write access to output parameters. Access is based on the name of a parameter. An application may retrieve whether a parameter (input or output) is null and the corresponding values.
The DataContext is provided by the runtime manager for the actual application. AnInvalidExecutorThreadException
will be thrown if the method is not called by the main thread of the corresponding component.This data context may be
read-only
in which case all store-methods throw anUnsupportedOperationException
. A read-only context is used fordisplaying purpose
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
ignoredValue(String parameterName)
Returns whether the value of the designated output parameter is not or has not been set (ignored) by the application.void
ignoreValue(String parameterName)
Ignores the value of the designated parameter that is the value has not been written.boolean
isReadOnly()
Returns whether this data container is read only and therefore does not allow to store values (and throws anUnsupportedOperationException
at the corresponding methods).void
storeBooleanParameterValue(String parameterName, boolean value)
Writes an output parameter of the type boolean to the data container of the process management system.void
storeDateParameterValue(String parameterName, Date value)
Writes an output parameter of the type date to the data context of the process management system.boolean
storedBooleanParameterValue(String parameterName)
Reads the boolean value of the designated output parameter.Date
storedDateParameterValue(String parameterName)
Reads the date value of the designated output parameter.double
storedFloatParameterValue(String parameterName)
Reads the double value of the designated output parameter.long
storedIntegerParameterValue(String parameterName)
Reads the long value of the designated output parameter.String
storedStringParameterValue(String parameterName)
Reads the string value of the designated output parameter.UDTValue
storedUDTParameterValue(String parameterName)
Reads the value of the designated output parameter of user-defined type.URI
storedURIParameterValue(String parameterName)
Reads the URI value of the designated output parameter.void
storeFloatParameterValue(String parameterName, double value)
Writes an output parameter of the type float to the data container of the process management system.void
storeIntegerParameterValue(String parameterName, long value)
Writes an output parameter of the type integer (in java: long) to the data context of the process management system.void
storeStringParameterValue(String parameterName, String value)
Writes an output parameter of type String to the data container of the process management system.void
storeUDTParameterValue(String parameterName, UDTValue value)
Writes an output parameter of an user defined type to the data container of the process management system.void
storeURIParameterValue(String parameterName, URI value)
Writes an output parameter of type URI to the data container of the process management system.-
Methods inherited from interface de.aristaflow.adept2.model.execution.InputDataContext
isNull, retrieveBooleanParameterValue, retrieveDateParameterValue, retrieveFloatParameterValue, retrieveIntegerParameterValue, retrieveStringParameterValue, retrieveUDTParameterValue, retrieveURIParameterValue
-
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
-
isReadOnly
boolean isReadOnly()
Returns whether this data container is read only and therefore does not allow to store values (and throws anUnsupportedOperationException
at the corresponding methods).- Returns:
- Whether this data container is read only and therefore does not allow to store values.
-
ignoreValue
void ignoreValue(String parameterName) throws NoSuchParameterException
Ignores the value of the designated parameter that is the value has not been written.
AnInvalidExecutorThreadException
will be thrown if the method is not called by the main thread of the corresponding component.- Parameters:
parameterName
- The name of the parameter to be ignored.- Throws:
NoSuchParameterException
- If the parameter of the designated name does not exist, aNoSuchParameterException
will be thrown.UnsupportedOperationException
- If this data context is only fordisplaying purpose
, anUnsupportedOperationException
will be thrown.
-
ignoredValue
boolean ignoredValue(String parameterName) throws NoSuchParameterException
Returns whether the value of the designated output parameter is not or has not been set (ignored) by the application.
AnInvalidExecutorThreadException
will be thrown if the method is not called by the main thread of the corresponding component.- Parameters:
parameterName
- The name of the output parameter to check for being unset.- Returns:
true
if the value of the designated output parameter is or has not been written.- Throws:
NoSuchParameterException
- If the output parameter of the designated name does not exist, aNoSuchParameterException
will be thrown.
-
storeIntegerParameterValue
void storeIntegerParameterValue(String parameterName, long value) throws NoSuchParameterException, InvalidDataTypeException
Writes an output parameter of the type integer (in java: long) to the data context of the process management system. The RuntimeEnvironment executes some management routines, e. g. access control, and delegates the function call to the DataContainer object.
AnInvalidExecutorThreadException
will be thrown if the method is not called by the main thread of the corresponding component.- Parameters:
parameterName
- The name of the output parameter to be written.value
- The value that is written for the designated output parameter.- Throws:
NoSuchParameterException
- If the parameter of the designated name does not exist, aNoSuchParameterException
will be thrown.InvalidDataTypeException
- If the designated parameter is not of type INTEGER, anInvalidDataTypeException
will be raised.UnsupportedOperationException
- If this data context is only fordisplaying purpose
, anUnsupportedOperationException
will be thrown.- See Also:
DataContainer
-
storedIntegerParameterValue
long storedIntegerParameterValue(String parameterName) throws NoSuchParameterException, InvalidDataTypeException
Reads the long value of the designated output parameter.
AnInvalidExecutorThreadException
will be thrown if the method is not called by the main thread of the corresponding component.
Callers should first check whether the value is null by callingignoredValue(String)
. Otherwise in case of NULL anIllegalStateException
is thrown.- Parameters:
parameterName
- The name of the output parameter to be read.- Returns:
- The value of the parameter of ADEPT2-type INTEGER and of Java-type
long
. - Throws:
NoSuchParameterException
- If the output parameter of the designated name does not exist, aNoSuchParameterException
will be thrown.InvalidDataTypeException
- If the designated output parameter is not of type INTEGER, anInvalidDataTypeException
will be raised.IllegalStateException
- If the value of the designated parameter is null anIllegalStateException
will be thrown.- See Also:
ProcessConstants.AdeptDataType.INTEGER
-
storeFloatParameterValue
void storeFloatParameterValue(String parameterName, double value) throws NoSuchParameterException, InvalidDataTypeException
Writes an output parameter of the type float to the data container of the process management system. The RuntimeEnvironment executes some management routines, e. g. access control, and delegates the function call to the DataContainer object.
AnInvalidExecutorThreadException
will be thrown if the method is not called by the main thread of the corresponding component.- Parameters:
parameterName
- The name of the output parameter to be written.value
- The value that is written for the designated output parameter.- Throws:
NoSuchParameterException
- If the parameter of the designated name does not exist, aNoSuchParameterException
will be thrown.InvalidDataTypeException
- If the designated parameter is not of type FLOAT, anInvalidDataTypeException
will be raised.UnsupportedOperationException
- If this data context is only fordisplaying purpose
, anUnsupportedOperationException
will be thrown.- See Also:
DataContainer
-
storedFloatParameterValue
double storedFloatParameterValue(String parameterName) throws NoSuchParameterException, InvalidDataTypeException
Reads the double value of the designated output parameter.
AnInvalidExecutorThreadException
will be thrown if the method is not called by the main thread of the corresponding component.
Callers should first check whether the value is null by callingignoredValue(String)
. Otherwise in case of NULL anIllegalStateException
is thrown.- Parameters:
parameterName
- The name of the output parameter to be read.- Returns:
- The value of the output parameter of ADEPT2-type FLOAT and of Java-type
double
. - Throws:
NoSuchParameterException
- If the output parameter of the designated name does not exist, aNoSuchParameterException
will be thrown.InvalidDataTypeException
- If the designated output parameter is not of type FLOAT, anInvalidDataTypeException
will be raised.IllegalStateException
- If the value of the designated parameter is null anIllegalStateException
will be thrown.- See Also:
ProcessConstants.AdeptDataType.FLOAT
-
storeBooleanParameterValue
void storeBooleanParameterValue(String parameterName, boolean value) throws NoSuchParameterException, InvalidDataTypeException
Writes an output parameter of the type boolean to the data container of the process management system. The RuntimeEnvironment executes some management routines, e. g. access control, and delegates the function call to the DataContainer object.
AnInvalidExecutorThreadException
will be thrown if the method is not called by the main thread of the corresponding component.- Parameters:
parameterName
- The name of the output parameter to be written.value
- The value that is written for the designated output parameter.- Throws:
NoSuchParameterException
- If the parameter of the designated name does not exist, aNoSuchParameterException
will be thrown.InvalidDataTypeException
- If the designated parameter is not of type BOOLEAN, anInvalidDataTypeException
will be raised.UnsupportedOperationException
- If this data context is only fordisplaying purpose
, anUnsupportedOperationException
will be thrown.- See Also:
DataContainer
-
storedBooleanParameterValue
boolean storedBooleanParameterValue(String parameterName) throws NoSuchParameterException, InvalidDataTypeException
Reads the boolean value of the designated output parameter.
AnInvalidExecutorThreadException
will be thrown if the method is not called by the main thread of the corresponding component.
Callers should first check whether the value is null by callingignoredValue(String)
. Otherwise in case of NULL anIllegalStateException
is thrown.- Parameters:
parameterName
- The name of the output parameter to be read.- Returns:
- The value of the output parameter of ADEPT2-type BOOLEAN and of Java-type
boolean
. - Throws:
NoSuchParameterException
- If the output parameter of the designated name does not exist, aNoSuchParameterException
will be thrown.InvalidDataTypeException
- If the designated output parameter is not of type BOOLEAN, anInvalidDataTypeException
will be raised.IllegalStateException
- If the value of the designated parameter is null anIllegalStateException
will be thrown.- See Also:
ProcessConstants.AdeptDataType.BOOLEAN
-
storeStringParameterValue
void storeStringParameterValue(String parameterName, String value) throws NoSuchParameterException, InvalidDataTypeException
Writes an output parameter of type String to the data container of the process management system. The RuntimeEnvironment executes some management routines, e. g. access control, and delegates the function call to the DataContainer object.
AnInvalidExecutorThreadException
will be thrown if the method is not called by the main thread of the corresponding component.- Parameters:
parameterName
- The name of the output parameter to be written.value
- The value that is written for the designated output parameter.- Throws:
NoSuchParameterException
- If the parameter of the designated name does not exist, aNoSuchParameterException
will be thrown.InvalidDataTypeException
- If the designated parameter is not of type STRING, anInvalidDataTypeException
will be raised.UnsupportedOperationException
- If this data context is only fordisplaying purpose
, anUnsupportedOperationException
will be thrown.- See Also:
DataContainer
-
storedStringParameterValue
String storedStringParameterValue(String parameterName) throws NoSuchParameterException, InvalidDataTypeException
Reads the string value of the designated output parameter.
AnInvalidExecutorThreadException
will be thrown if the method is not called by the main thread of the corresponding component.
Callers should first check whether the value is null by callingignoredValue(String)
. Otherwise in case of NULL anIllegalStateException
is thrown.- Parameters:
parameterName
- The name of the output parameter to be read.- Returns:
- The value of the output parameter of ADEPT2-type STRING and of Java-type
String
. - Throws:
NoSuchParameterException
- If the output parameter of the designated name does not exist, aNoSuchParameterException
will be thrown.InvalidDataTypeException
- If the designated output parameter is not of type STRING, anInvalidDataTypeException
will be raised.IllegalStateException
- If the value of the designated parameter is null anIllegalStateException
will be thrown.- See Also:
ProcessConstants.AdeptDataType.STRING
-
storeDateParameterValue
void storeDateParameterValue(String parameterName, Date value) throws NoSuchParameterException, InvalidDataTypeException
Writes an output parameter of the type date to the data context of the process management system. The RuntimeEnvironment executes some management routines, e. g. access control, and delegates the function call to the DataContainer object.
AnInvalidExecutorThreadException
will be thrown if the method is not called by the main thread of the corresponding component.- Parameters:
parameterName
- The name of the output parameter to be written.value
- The value that is written for the designated output parameter.- Throws:
NoSuchParameterException
- If the parameter of the designated name does not exist, aNoSuchParameterException
will be thrown.InvalidDataTypeException
- If the designated parameter is not of type DATE, anInvalidDataTypeException
will be raised.UnsupportedOperationException
- If this data context is only fordisplaying purpose
, anUnsupportedOperationException
will be thrown.- See Also:
DataContainer
-
storedDateParameterValue
Date storedDateParameterValue(String parameterName) throws NoSuchParameterException, InvalidDataTypeException
Reads the date value of the designated output parameter.
AnInvalidExecutorThreadException
will be thrown if the method is not called by the main thread of the corresponding component.
Callers should first check whether the value is null by callingignoredValue(String)
. Otherwise in case of NULL anIllegalStateException
is thrown.- Parameters:
parameterName
- The name of the output parameter to be read.- Returns:
- The value of the parameter of ADEPT2-type DATE and of Java-type
java.util.Date
. - Throws:
NoSuchParameterException
- If the output parameter of the designated name does not exist, aNoSuchParameterException
will be thrown.InvalidDataTypeException
- If the designated output parameter is not of type DATE, anInvalidDataTypeException
will be raised.IllegalStateException
- If the value of the designated parameter is null anIllegalStateException
will be thrown.- See Also:
ProcessConstants.AdeptDataType.DATE
-
storeURIParameterValue
void storeURIParameterValue(String parameterName, URI value) throws NoSuchParameterException, InvalidDataTypeException
Writes an output parameter of type URI to the data container of the process management system. The RuntimeEnvironment executes some management routines, e. g. access control, and delegates the function call to the DataContainer object.
AnInvalidExecutorThreadException
will be thrown if the method is not called by the main thread of the corresponding component.- Parameters:
parameterName
- The name of the output parameter to be written.value
- The value that is written for the designated output parameter.- Throws:
NoSuchParameterException
- If the parameter of the designated name does not exist, aNoSuchParameterException
will be thrown.InvalidDataTypeException
- If the designated parameter is not of type URI, anInvalidDataTypeException
will be raised.UnsupportedOperationException
- If this data context is only fordisplaying purpose
, anUnsupportedOperationException
will be thrown.- See Also:
DataContainer
-
storedURIParameterValue
URI storedURIParameterValue(String parameterName) throws NoSuchParameterException, InvalidDataTypeException
Reads the URI value of the designated output parameter.
AnInvalidExecutorThreadException
will be thrown if the method is not called by the main thread of the corresponding component.
Callers should first check whether the value is null by callingignoredValue(String)
. Otherwise in case of NULL anIllegalStateException
is thrown.- Parameters:
parameterName
- The name of the output parameter to be read.- Returns:
- The value of the parameter of ADEPT2-type URI and of Java-type
java.net.URI
. - Throws:
NoSuchParameterException
- If the output parameter of the designated name does not exist, aNoSuchParameterException
will be thrown.InvalidDataTypeException
- If the output designated parameter is not of type URI, anInvalidDataTypeException
will be raised.IllegalStateException
- If the value of the designated parameter is null anIllegalStateException
will be thrown.- See Also:
ProcessConstants.AdeptDataType.URI
-
storeUDTParameterValue
void storeUDTParameterValue(String parameterName, UDTValue value) throws NoSuchParameterException, InvalidDataTypeException
Writes an output parameter of an user defined type to the data container of the process management system. The RuntimeEnvironment executes some management routines, e. g. access control, and delegates the function call to the DataContainer object.
AnInvalidExecutorThreadException
will be thrown if the method is not called by the main thread of the corresponding component.- Parameters:
parameterName
- The name of the output parameter to be written.value
- The value that is written for the designated output parameter. The caller is responsible for closing.- Throws:
NoSuchParameterException
- If the parameter of the designated name does not exist, aNoSuchParameterException
will be thrown.InvalidDataTypeException
- If the designated parameter is not of type UDT, anInvalidDataTypeException
will be raised.UnsupportedOperationException
- If this data context is only fordisplaying purpose
, anUnsupportedOperationException
will be thrown.- See Also:
DataContainer
-
storedUDTParameterValue
UDTValue storedUDTParameterValue(String parameterName) throws NoSuchParameterException, InvalidDataTypeException
Reads the value of the designated output parameter of user-defined type.
AnInvalidExecutorThreadException
will be thrown if the method is not called by the main thread of the corresponding component.
Callers should first check whether the value is null by callingignoredValue(String)
. Otherwise in case of NULL anIllegalStateException
is thrown.- Parameters:
parameterName
- The name of the output parameter to be read.- Returns:
- The value of the output parameter of ADEPT2-type USERDEFINED and of Java-type
UDTValue
. The UDTValue will be coupled to thisDataContext
, so do not close it; clone it if required longer than thisDataContext
. - Throws:
NoSuchParameterException
- If the output parameter of the designated name does not exist, aNoSuchParameterException
will be thrown.InvalidDataTypeException
- If the designated output parameter is not of type USERDEFINED, anInvalidDataTypeException
will be raised.IllegalStateException
- If the value of the designated parameter is null anIllegalStateException
will be thrown.- See Also:
ProcessConstants.AdeptDataType.USERDEFINED
-
-