Interface InputDataContext
-
- All Superinterfaces:
PluginDataContainer
,UserAttributeContainer
- All Known Subinterfaces:
DataContext
,ParameterDataContext
,SerialisableDataContext
- All Known Implementing Classes:
SettableDataContext
public interface InputDataContext extends UserAttributeContainer, PluginDataContainer
This interface provides read access to all parameters of an application or a node. Access is based on the name of a parameter. It may be retrieved whether a parameter is null and the corresponding values.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
isNull(String parameterName)
Returns whether the value of the designated parameter is NULL which means the data element has not been written or has been consumed yet or has been explicitly set to NULL by a previous application.boolean
retrieveBooleanParameterValue(String parameterName)
Reads from an input parameter.Date
retrieveDateParameterValue(String parameterName)
Reads from an input parameter.double
retrieveFloatParameterValue(String parameterName)
Reads from an input parameter.long
retrieveIntegerParameterValue(String parameterName)
Reads from an input parameter.String
retrieveStringParameterValue(String parameterName)
Reads from an input parameter.UDTValue
retrieveUDTParameterValue(String parameterName)
Reads from an input parameter.URI
retrieveURIParameterValue(String parameterName)
Reads from an input parameter.-
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
-
isNull
boolean isNull(String parameterName) throws NoSuchParameterException
Returns whether the value of the designated parameter is NULL which means the data element has not been written or has been consumed yet or has been explicitly set to NULL by a previous application. This method has to be called before retrieving a value.- Parameters:
parameterName
- The name of the parameter to check on NULL.- Returns:
true
if the value of the designated parameter is NULL and therefore has not been written or has been consumed yet.- Throws:
NoSuchParameterException
- If the parameter of the designated name does not exist, aNoSuchParameterException
will be thrown.
-
retrieveIntegerParameterValue
long retrieveIntegerParameterValue(String parameterName) throws NoSuchParameterException, InvalidDataTypeException
Reads from an input parameter. The associated value must be of type long.
Callers should first check whether the value is NULL by callingisNull(String)
. Otherwise in case of NULL anIllegalStateException
will be thrown.- Parameters:
parameterName
- the name of the input parameter to be read- Returns:
- The value for the designated input 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.IllegalStateException
- If the value of the designated parameter is NULL, anIllegalStateException
will be thrown.
-
retrieveFloatParameterValue
double retrieveFloatParameterValue(String parameterName) throws NoSuchParameterException, InvalidDataTypeException
Reads from an input parameter. The associated value must be of type double.
Callers should first check whether the value is NULL by callingisNull(String)
. Otherwise in case of NULL anIllegalStateException
will be thrown.- Parameters:
parameterName
- the name of the input parameter to be read- Returns:
- The value for the designated input 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.IllegalStateException
- If the value of the designated parameter is NULL, anIllegalStateException
will be thrown.
-
retrieveBooleanParameterValue
boolean retrieveBooleanParameterValue(String parameterName) throws NoSuchParameterException, InvalidDataTypeException
Reads from an input parameter. The associated value must be of type boolean.
Callers should first check whether the value is NULL by callingisNull(String)
. Otherwise in case of NULL anIllegalStateException
will be thrown.- Parameters:
parameterName
- the name of the input parameter to be read- Returns:
- The value for the designated input 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.IllegalStateException
- If the value of the designated parameter is NULL, anIllegalStateException
will be thrown.
-
retrieveStringParameterValue
String retrieveStringParameterValue(String parameterName) throws NoSuchParameterException, InvalidDataTypeException
Reads from an input parameter. The associated value must be of type String.
Callers should first check whether the value is NULL by callingisNull(String)
. Otherwise in case of NULL anIllegalStateException
will be thrown.- Parameters:
parameterName
- the name of the input parameter to be read- Returns:
- The value for the designated input 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.IllegalStateException
- If the value of the designated parameter is NULL, anIllegalStateException
will be thrown.
-
retrieveDateParameterValue
Date retrieveDateParameterValue(String parameterName) throws NoSuchParameterException, InvalidDataTypeException
Reads from an input parameter. The associated value must be of typejava.util.Date
.
Callers should first check whether the value is NULL by callingisNull(String)
. Otherwise in case of NULL anIllegalStateException
will be thrown.- Parameters:
parameterName
- the name of the input parameter to be read- Returns:
- The value for the designated input 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.IllegalStateException
- If the value of the designated parameter is NULL, anIllegalStateException
will be thrown.
-
retrieveURIParameterValue
URI retrieveURIParameterValue(String parameterName) throws NoSuchParameterException, InvalidDataTypeException
Reads from an input parameter. The associated value must be of type URI.
Callers should first check whether the value is NULL by callingisNull(String)
. Otherwise in case of NULL anIllegalStateException
will be thrown.- Parameters:
parameterName
- the name of the input parameter to be read- Returns:
- The value for the designated input parameter.
- Throws:
InvalidDataTypeException
- If the designated parameter is not of type URI, anInvalidDataTypeException
will be raised.NoSuchParameterException
- If the parameter of the designated name does not exist, aNoSuchParameterException
will be thrown.IllegalStateException
- If the value of the designated parameter is NULL, anIllegalStateException
will be thrown.
-
retrieveUDTParameterValue
UDTValue retrieveUDTParameterValue(String parameterName) throws NoSuchParameterException, InvalidDataTypeException
Reads from an input parameter. The associated value must be of an user-defined type.
Callers should first check whether the value is NULL by callingisNull(String)
. Otherwise in case of NULL anIllegalStateException
will be thrown.- Parameters:
parameterName
- the name of the input parameter to be read- Returns:
- The value for the designated input parameter. The UDTValue will be coupled
to this
InputDataContext
, so do not close it; clone it if required longer than thisInputDataContext
. - Throws:
InvalidDataTypeException
- If the designated parameter is not of type UDT, anInvalidDataTypeException
will be raised.NoSuchParameterException
- If the parameter of the designated name does not exist, aNoSuchParameterException
will be thrown.IllegalStateException
- If the value of the designated parameter is NULL, anIllegalStateException
will be thrown.
-
-