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. AnInvalidExecutorThreadExceptionwill be thrown if the method is not called by the main thread of the corresponding component.This data context may be
read-onlyin 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 booleanignoredValue(String parameterName)Returns whether the value of the designated output parameter is not or has not been set (ignored) by the application.voidignoreValue(String parameterName)Ignores the value of the designated parameter that is the value has not been written.booleanisReadOnly()Returns whether this data container is read only and therefore does not allow to store values (and throws anUnsupportedOperationExceptionat the corresponding methods).voidstoreBooleanParameterValue(String parameterName, boolean value)Writes an output parameter of the type boolean to the data container of the process management system.voidstoreDateParameterValue(String parameterName, Date value)Writes an output parameter of the type date to the data context of the process management system.booleanstoredBooleanParameterValue(String parameterName)Reads the boolean value of the designated output parameter.DatestoredDateParameterValue(String parameterName)Reads the date value of the designated output parameter.doublestoredFloatParameterValue(String parameterName)Reads the double value of the designated output parameter.longstoredIntegerParameterValue(String parameterName)Reads the long value of the designated output parameter.StringstoredStringParameterValue(String parameterName)Reads the string value of the designated output parameter.UDTValuestoredUDTParameterValue(String parameterName)Reads the value of the designated output parameter of user-defined type.URIstoredURIParameterValue(String parameterName)Reads the URI value of the designated output parameter.voidstoreFloatParameterValue(String parameterName, double value)Writes an output parameter of the type float to the data container of the process management system.voidstoreIntegerParameterValue(String parameterName, long value)Writes an output parameter of the type integer (in java: long) to the data context of the process management system.voidstoreStringParameterValue(String parameterName, String value)Writes an output parameter of type String to the data container of the process management system.voidstoreUDTParameterValue(String parameterName, UDTValue value)Writes an output parameter of an user defined type to the data container of the process management system.voidstoreURIParameterValue(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 anUnsupportedOperationExceptionat 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.
AnInvalidExecutorThreadExceptionwill 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, aNoSuchParameterExceptionwill be thrown.UnsupportedOperationException- If this data context is only fordisplaying purpose, anUnsupportedOperationExceptionwill 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.
AnInvalidExecutorThreadExceptionwill 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:
trueif 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, aNoSuchParameterExceptionwill 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.
AnInvalidExecutorThreadExceptionwill 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, aNoSuchParameterExceptionwill be thrown.InvalidDataTypeException- If the designated parameter is not of type INTEGER, anInvalidDataTypeExceptionwill be raised.UnsupportedOperationException- If this data context is only fordisplaying purpose, anUnsupportedOperationExceptionwill be thrown.- See Also:
DataContainer
-
storedIntegerParameterValue
long storedIntegerParameterValue(String parameterName) throws NoSuchParameterException, InvalidDataTypeException
Reads the long value of the designated output parameter.
AnInvalidExecutorThreadExceptionwill 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 anIllegalStateExceptionis 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, aNoSuchParameterExceptionwill be thrown.InvalidDataTypeException- If the designated output parameter is not of type INTEGER, anInvalidDataTypeExceptionwill be raised.IllegalStateException- If the value of the designated parameter is null anIllegalStateExceptionwill 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.
AnInvalidExecutorThreadExceptionwill 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, aNoSuchParameterExceptionwill be thrown.InvalidDataTypeException- If the designated parameter is not of type FLOAT, anInvalidDataTypeExceptionwill be raised.UnsupportedOperationException- If this data context is only fordisplaying purpose, anUnsupportedOperationExceptionwill be thrown.- See Also:
DataContainer
-
storedFloatParameterValue
double storedFloatParameterValue(String parameterName) throws NoSuchParameterException, InvalidDataTypeException
Reads the double value of the designated output parameter.
AnInvalidExecutorThreadExceptionwill 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 anIllegalStateExceptionis 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, aNoSuchParameterExceptionwill be thrown.InvalidDataTypeException- If the designated output parameter is not of type FLOAT, anInvalidDataTypeExceptionwill be raised.IllegalStateException- If the value of the designated parameter is null anIllegalStateExceptionwill 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.
AnInvalidExecutorThreadExceptionwill 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, aNoSuchParameterExceptionwill be thrown.InvalidDataTypeException- If the designated parameter is not of type BOOLEAN, anInvalidDataTypeExceptionwill be raised.UnsupportedOperationException- If this data context is only fordisplaying purpose, anUnsupportedOperationExceptionwill be thrown.- See Also:
DataContainer
-
storedBooleanParameterValue
boolean storedBooleanParameterValue(String parameterName) throws NoSuchParameterException, InvalidDataTypeException
Reads the boolean value of the designated output parameter.
AnInvalidExecutorThreadExceptionwill 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 anIllegalStateExceptionis 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, aNoSuchParameterExceptionwill be thrown.InvalidDataTypeException- If the designated output parameter is not of type BOOLEAN, anInvalidDataTypeExceptionwill be raised.IllegalStateException- If the value of the designated parameter is null anIllegalStateExceptionwill 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.
AnInvalidExecutorThreadExceptionwill 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, aNoSuchParameterExceptionwill be thrown.InvalidDataTypeException- If the designated parameter is not of type STRING, anInvalidDataTypeExceptionwill be raised.UnsupportedOperationException- If this data context is only fordisplaying purpose, anUnsupportedOperationExceptionwill be thrown.- See Also:
DataContainer
-
storedStringParameterValue
String storedStringParameterValue(String parameterName) throws NoSuchParameterException, InvalidDataTypeException
Reads the string value of the designated output parameter.
AnInvalidExecutorThreadExceptionwill 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 anIllegalStateExceptionis 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, aNoSuchParameterExceptionwill be thrown.InvalidDataTypeException- If the designated output parameter is not of type STRING, anInvalidDataTypeExceptionwill be raised.IllegalStateException- If the value of the designated parameter is null anIllegalStateExceptionwill 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.
AnInvalidExecutorThreadExceptionwill 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, aNoSuchParameterExceptionwill be thrown.InvalidDataTypeException- If the designated parameter is not of type DATE, anInvalidDataTypeExceptionwill be raised.UnsupportedOperationException- If this data context is only fordisplaying purpose, anUnsupportedOperationExceptionwill be thrown.- See Also:
DataContainer
-
storedDateParameterValue
Date storedDateParameterValue(String parameterName) throws NoSuchParameterException, InvalidDataTypeException
Reads the date value of the designated output parameter.
AnInvalidExecutorThreadExceptionwill 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 anIllegalStateExceptionis 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, aNoSuchParameterExceptionwill be thrown.InvalidDataTypeException- If the designated output parameter is not of type DATE, anInvalidDataTypeExceptionwill be raised.IllegalStateException- If the value of the designated parameter is null anIllegalStateExceptionwill 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.
AnInvalidExecutorThreadExceptionwill 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, aNoSuchParameterExceptionwill be thrown.InvalidDataTypeException- If the designated parameter is not of type URI, anInvalidDataTypeExceptionwill be raised.UnsupportedOperationException- If this data context is only fordisplaying purpose, anUnsupportedOperationExceptionwill be thrown.- See Also:
DataContainer
-
storedURIParameterValue
URI storedURIParameterValue(String parameterName) throws NoSuchParameterException, InvalidDataTypeException
Reads the URI value of the designated output parameter.
AnInvalidExecutorThreadExceptionwill 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 anIllegalStateExceptionis 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, aNoSuchParameterExceptionwill be thrown.InvalidDataTypeException- If the output designated parameter is not of type URI, anInvalidDataTypeExceptionwill be raised.IllegalStateException- If the value of the designated parameter is null anIllegalStateExceptionwill 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.
AnInvalidExecutorThreadExceptionwill 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, aNoSuchParameterExceptionwill be thrown.InvalidDataTypeException- If the designated parameter is not of type UDT, anInvalidDataTypeExceptionwill be raised.UnsupportedOperationException- If this data context is only fordisplaying purpose, anUnsupportedOperationExceptionwill 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.
AnInvalidExecutorThreadExceptionwill 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 anIllegalStateExceptionis 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, aNoSuchParameterExceptionwill be thrown.InvalidDataTypeException- If the designated output parameter is not of type USERDEFINED, anInvalidDataTypeExceptionwill be raised.IllegalStateException- If the value of the designated parameter is null anIllegalStateExceptionwill be thrown.- See Also:
ProcessConstants.AdeptDataType.USERDEFINED
-
-