public class ActivityData
extends java.lang.Object
ActivityData provides convenience methods for retrieval of
input and output parameter types and values as well as writing the output
parameter values. User-defined data types can be lists or other POJOs.
Besides the parameters, there are also methods for accessing the
configuration values. Mandatory parameters can be checked for existence. If
problems occur when accessing a parameter or configuration value, an
appropriate ApplicationEnvironmentException will be thrown. This
applies for instance in case a mandatory value is not set or a required value
has the wrong type.
Besides the specific methods, most convenience methods can be classified into the following groups:
readInput*: Gets the value of the corresponding input
parameter or null in case the value has not been set. No
conversion takes place, if the parameter is of the wrong type or does not
exist, an exception will be thrown.requireInput*: The same as the corresponding
readInput*-method but this time an exception will be thrown, if
the value is not present.*ToNativeTypedValue: These methods are called when you
request a value with conversion (@see
getInputValue(ProcessModelParameter, boolean, boolean),
getStoredValue(String) and getStoredValue(ProcessModelParameter, boolean)).
Override this methods to change the type conversion.readOutput*: Gets the value of the corresponding output
parameter if it has already been written, either by the current execution or
by a previous suspended execution. null will be returned if no
value has been written. No conversion takes place, if the parameter is of the
wrong type or does not exist, an exception will be thrown.writeOutput*: Writes the designated value to the
corresponding output parameter. No conversion takes place, if the parameter
is of the wrong type or does not exist, an exception will be thrown.objectTo*: These methods are called when you write a value
with conversion (@see
writeOutputValue(ProcessModelParameter, boolean, Object)). Override
this methods to change the type conversion.getConf*: Gets the value of the corresponding activity
configuration value. If the configuration value does not exist, or is of
another type, the designated default value will be returned.requireConf*:: The same as the corresponding
getConf*-method but this time an exception will be thrown, if
the value is not present or the configuration entry has the wrong type.getParamConf*: The same as the getConf* but this time for
values of the configuration of the corresponding parameter.requireParamConf*: The same as the requireConf* but this
time for values of the configuration of the corresponding parameter.| Modifier and Type | Field and Description |
|---|---|
protected ActivityInstance |
activityInstance
The activity (instance) which is encapsulated by the execution environment.
|
protected DataContext |
dataContext
The data context for the execution environment.
|
protected java.util.logging.Logger |
logger
The logger for execution environment.
|
| Constructor and Description |
|---|
ActivityData(ActivityInstance activityInstance,
DataContext dataContext,
java.util.logging.Logger logger)
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
booleanToNativeTypedValue(java.lang.Boolean value,
ProcessModelParameter parameter,
boolean output)
Converts an instance of
Boolean to an instance of the
corresponding native type. |
java.lang.Object |
dateToNativeTypedValue(java.util.Date value,
ProcessModelParameter parameter,
boolean output)
Converts an instance of
Date to an instance of the
corresponding native type. |
java.lang.Object |
floatToNativeTypedValue(java.lang.Double value,
ProcessModelParameter parameter,
boolean output)
Converts an instance of
Double to an instance of the
corresponding native type. |
protected java.lang.Object |
getActInstConfValue(java.lang.String entryName,
ProcessConstants.AdeptDataType expDt,
boolean required,
java.lang.Object defValue)
Gets the designated activity instance configuration value and logs messages
or throws exceptions if it is not present.
|
java.util.Collection<java.lang.String> |
getAllConfEntries()
Returns all configuration entry names.
|
java.lang.Boolean |
getConfBoolean(java.lang.String entryName)
Returns the configuration value of the specified entry or
null if
it is not set. |
java.lang.Boolean |
getConfBoolean(java.lang.String entryName,
java.lang.Boolean defaultValue)
Returns the configuration value of the specified entry or the given default
value if it is not set or could not be parsed as BOOLEAN.
|
java.util.Date |
getConfDate(java.lang.String entryName)
Returns the configuration value of the specified entry or
null if
it is not set. |
java.util.Date |
getConfDate(java.lang.String entryName,
java.util.Date defaultValue)
Returns the configuration value of the specified entry or the given default
value if it is not set or could not be parsed as DATE.
|
java.lang.Double |
getConfFloat(java.lang.String entryName)
Returns the configuration value of the specified entry or the given
value if it is not set or could not be parsed as FLOAT.
|
java.lang.Double |
getConfFloat(java.lang.String entryName,
java.lang.Double defaultValue)
Returns the configuration value of the specified entry or the given value
if it is not set or could not be parsed as FLOAT.
|
java.lang.Long |
getConfInteger(java.lang.String entryName)
Returns the configuration value of the specified entry or
null if
it is not set. |
java.lang.Long |
getConfInteger(java.lang.String entryName,
java.lang.Long defaultValue)
Returns the configuration value of the specified entry or the given default
value if it is not set or could not be parsed as INTEGER.
|
java.lang.String |
getConfString(java.lang.String entryName)
Returns the configuration value of the specified entry or
null if
it is not set. |
java.lang.String |
getConfString(java.lang.String entryName,
java.lang.String defaultValue)
Returns the configuration value of the specified entry or the given default
value if it is not set.
|
byte[] |
getConfUDT(java.lang.String entryName)
Returns the configuration value of the specified entry or the given default
value if it is not set or could not be parsed as USERDEFINED.
|
byte[] |
getConfUDT(java.lang.String entryName,
byte[] defaultValue)
Returns the configuration value of the specified entry or the given default
value if it is not set or could not be parsed as USERDEFINED.
|
java.net.URI |
getConfURI(java.lang.String entryName)
Returns the configuration value of the specified entry or
null if
it is not set. |
java.net.URI |
getConfURI(java.lang.String entryName,
java.net.URI defaultValue)
Returns the configuration value of the specified entry or the given default
value if it is not set or could not be parsed as URI.
|
protected java.lang.Object |
getConfValue(Configuration conf,
java.lang.String entryName,
ProcessConstants.AdeptDataType expDt,
boolean required,
java.lang.Object defValue,
java.lang.String paramText)
Gets the designated configuration value and logs messages or throws
exceptions if it is not present.
|
java.lang.Class<?> |
getCorrespondingJavaClass(Parameter parameter,
boolean output)
Gets the class object corresponding to the type of the designated
parameter.
|
<T> T |
getDualInputValue(java.lang.String name,
ProcessConstants.AdeptDataType type,
java.lang.Class<T> valueType)
A "dual input parameter" is a parameter whose value can either be
provided by an input parameter or by an activity configuration field with
the same name or a combination of both.
|
ProcessModelParameter |
getInputParam(java.lang.String parameterName)
Returns the input parameter with the given name or
null if no such
parameter exists. |
java.util.Collection<ProcessModelParameter> |
getInputParams()
Returns all input parameters in a list.
|
java.lang.Class<?>[] |
getInputTypes()
Gets the input parameter types in an array of the corresponding classes
ordered by their position.
|
java.lang.Object |
getInputValue(ProcessModelParameter param,
boolean convert,
boolean required)
Retrieves the value of the specified input parameter as an object of the
closest related java type or the appropriate converted type.
|
java.lang.Object |
getInputValue(java.lang.String parameterName)
Retrieves the value of the specified input parameter as an object
of the closest related java type.
|
java.lang.Object |
getInputValue(java.lang.String parameterName,
boolean required)
Retrieves the value of the specified input parameter as an object
of the closest related java type.
|
protected java.lang.Object |
getInputValue(java.lang.String parameterName,
ProcessConstants.AdeptDataType expDt,
boolean convert,
boolean required)
Retrieves the value of the specified input parameter as an object of the
closest related java type.
|
java.lang.Object[] |
getInputValues()
Gets the values of the input parameter in an array of object ordered by
their position.
|
ProcessModelParameter |
getOutputParam(java.lang.String parameterName)
Returns the output parameter with the given name or
null if no such
parameter exists. |
java.util.Collection<ProcessModelParameter> |
getOutputParams()
Returns all output parameters in a list.
|
java.lang.Boolean |
getParamConfBoolean(ActivityConstants.AccessType accessType,
java.lang.String parameterName,
java.lang.String entryName,
java.lang.Boolean defaultValue)
Returns the configuration value of the specified entry or the given default
value if it is not set or could not be parsed as BOOLEAN.
|
java.util.Date |
getParamConfDate(ActivityConstants.AccessType accessType,
java.lang.String parameterName,
java.lang.String entryName,
java.util.Date defaultValue)
Returns the configuration value of the specified entry or the given default
value if it is not set or could not be parsed as DATE.
|
java.lang.Double |
getParamConfFloat(ActivityConstants.AccessType accessType,
java.lang.String parameterName,
java.lang.String entryName,
java.lang.Double defaultValue)
Returns the configuration value of the specified entry or the given
value if it is not set or could not be parsed as FLOAT.
|
java.lang.Long |
getParamConfInteger(ActivityConstants.AccessType accessType,
java.lang.String parameterName,
java.lang.String entryName,
java.lang.Long defaultValue)
Returns the configuration value of the specified entry or the given default
value if it is not set or could not be parsed as INTEGER.
|
java.lang.String |
getParamConfString(ActivityConstants.AccessType accessType,
java.lang.String parameterName,
java.lang.String entryName,
java.lang.String defaultValue)
Returns the configuration value of the specified entry or
null if
it is not set. |
byte[] |
getParamConfUDT(ActivityConstants.AccessType accessType,
java.lang.String parameterName,
java.lang.String entryName,
byte[] defaultValue)
Returns the configuration value of the specified entry or the given default
value if it is not set or could not be parsed as USERDEFINED.
|
java.net.URI |
getParamConfURI(ActivityConstants.AccessType accessType,
java.lang.String parameterName,
java.lang.String entryName,
java.net.URI defaultValue)
Returns the configuration value of the specified entry or the given default
value if it is not set or could not be parsed as URI.
|
protected java.lang.Object |
getParamConfValue(ActivityConstants.AccessType accessType,
java.lang.String parameterName,
java.lang.String entryName,
ProcessConstants.AdeptDataType expDt,
boolean required,
java.lang.Object defValue)
Gets the designated parameter configuration value and logs messages or throws
exceptions if it is not present.
|
static java.util.Deque<ProcessModelParameter> |
getParametersSortedByPosition(java.util.Collection<? extends ProcessModelParameter> params)
Gets the designated parameters sorted by the configured
position.
|
java.lang.Object |
getStoredValue(ProcessModelParameter param,
boolean convert)
Retrieves the stored value of the specified output parameter as an object
of the closest related java type or the appropriate converted type.
|
java.lang.Object |
getStoredValue(java.lang.String parameterName)
Retrieves the stored value of the specified output parameter as an object
of the closest related java type.
|
protected java.lang.Object |
getStoredValue(java.lang.String parameterName,
ProcessConstants.AdeptDataType expDt,
boolean convert)
Retrieves the stored value of the specified output parameter as an object
of the closest related java type.
|
java.lang.Object[] |
getStoredValues()
Gets the stored values of the output parameter in an array of object
ordered by their position.
|
boolean |
hasConf(java.lang.String entryName)
Returns whether the specified configuration entry is set.
|
boolean |
hasInputListParam(java.lang.String parameterName,
ProcessConstants.AdeptDataType elementDataType)
Returns whether the input parameter with the specified name exists and is a
list with the specified element type.
|
boolean |
hasInputParam(java.lang.String parameterName)
Returns whether the input parameter with the specified name exists.
|
boolean |
hasInputValue(java.lang.String paramName)
Checks whether the value of the specified input parameter is set, i.e. is
not null.
|
boolean |
hasOutputParam(java.lang.String parameterName)
Returns whether the output parameter with the specified name exists.
|
boolean |
hasParam(java.lang.String parameterName,
ActivityConstants.AccessType accessType)
Returns whether the parameter with the specified name and access type
exists.
|
boolean |
hasParamConf(ActivityConstants.AccessType accessType,
java.lang.String parameterName,
java.lang.String entryName)
Returns whether the specified configuration entry is set.
|
java.lang.Object |
integerToNativeTypedValue(java.lang.Long value,
ProcessModelParameter parameter,
boolean output)
Converts an instance of
Long to an instance of the
corresponding native type. |
java.lang.Boolean |
objectToBoolean(java.lang.Object value,
ProcessModelParameter parameter,
boolean output)
Converts an object (of native type) to an instance of
Boolean. |
java.util.Date |
objectToDate(java.lang.Object value,
ProcessModelParameter parameter,
boolean output)
Converts an object (of native type) to an instance of
Date. |
java.lang.Double |
objectToFloat(java.lang.Object value,
ProcessModelParameter parameter,
boolean output)
Converts an object (of native type) to an instance of
Double. |
java.lang.Long |
objectToInteger(java.lang.Object value,
ProcessModelParameter parameter,
boolean output)
Converts an object (of native type) to an instance of
Long. |
java.lang.String |
objectToString(java.lang.Object value,
ProcessModelParameter parameter,
boolean output)
Converts an object (of native type) to an instance of
String. |
java.net.URI |
objectToUri(java.lang.Object value,
ProcessModelParameter parameter,
boolean output)
Converts an object (of native type) to an instance of
URI. |
UDTValue |
objectToUserdefined(java.lang.Object value,
ProcessModelParameter parameter,
boolean output)
Converts an object to an instance of
UDTValue by serialising
the object and encapsulating the corresponding stream in the returned
instance of UDTValue. |
java.lang.Boolean |
readInputBoolean(java.lang.String parameterName)
Returns the value of the specified BOOLEAN input parameter or
null
if no value is set or the parameter does not exist. |
java.util.Date |
readInputDate(java.lang.String parameterName)
Returns the value of the specified DATE input parameter or
null if
no value is set or the parameter does not exist. |
java.lang.Double |
readInputFloat(java.lang.String parameterName)
Returns the value of the specified FLOAT input parameter or
null if
no value is set or the parameter does not exist. |
java.lang.Long |
readInputInteger(java.lang.String parameterName)
Returns the value of the specified INTEGER input parameter or
null
if no value is set or the parameter does not exist. |
<T extends java.io.Serializable> |
readInputList(java.lang.String parameterName)
Returns the list of the specified USERDEFINED input parameter or
null if no value is set. |
java.lang.String |
readInputString(java.lang.String parameterName)
Returns the value of the specified STRING input parameter or
null
if no value is set or the parameter does not exist. |
UDTValue |
readInputUDT(java.lang.String parameterName)
Returns the value of the specified USERDEFINED input parameter or
null if no value is set or the parameter does not exist. |
java.net.URI |
readInputURI(java.lang.String parameterName)
Returns the value of the specified URI input parameter or
null if
no value is set or the parameter does not exist. |
java.lang.Boolean |
readOutputBoolean(java.lang.String parameterName)
Returns the value stored for the specified BOOLEAN output parameter or
null if no value is set or the parameter does not exist. |
java.util.Date |
readOutputDate(java.lang.String parameterName)
Returns the value stored for the specified DATE output parameter or
null if no value is set or the parameter does not exist. |
java.lang.Double |
readOutputFloat(java.lang.String parameterName)
Returns the value stored for the specified FLOAT output parameter or
null if no value is set or the parameter does not exist. |
java.lang.Long |
readOutputInteger(java.lang.String parameterName)
Returns the value stored for the specified INTEGER output parameter or
null if no value is set or the parameter does not exist. |
java.lang.String |
readOutputString(java.lang.String parameterName)
Returns the value stored for the specified STRING output parameter or
null if no value is set or the parameter does not exist. |
UDTValue |
readOutputUDT(java.lang.String parameterName)
Returns the value stored for the specified USERDEFINED output parameter or
null if no value is set or the parameter does not exist. |
java.net.URI |
readOutputURI(java.lang.String parameterName)
Returns the value stored for the specified URI output parameter or
null if no value is set or the parameter does not exist. |
boolean |
requireConfBoolean(java.lang.String entryName)
Returns the configuration value of the specified entry or throws an
exception if it is not available.
|
java.util.Date |
requireConfDate(java.lang.String entryName)
Returns the configuration value of the specified entry or throws an
exception if it is not available.
|
double |
requireConfFloat(java.lang.String entryName)
Returns the configuration value of the specified entry or throws an
exception if it is not available.
|
long |
requireConfInteger(java.lang.String entryName)
Returns the configuration value of the specified entry or throws an
exception if it is not available.
|
java.lang.String |
requireConfString(java.lang.String entryName)
Returns the configuration value of the specified entry or throws an
exception if it is not available.
|
byte[] |
requireConfUDT(java.lang.String entryName)
Returns the configuration value of the specified entry or throws an
exception if it is not available.
|
java.net.URI |
requireConfURI(java.lang.String entryName)
Returns the configuration value of the specified entry or throws an
exception if it is not available.
|
boolean |
requireInputBoolean(java.lang.String parameterName)
Returns the value of the specified BOOLEAN input parameter or throws an
exception if the value is not available.
|
java.util.Date |
requireInputDate(java.lang.String parameterName)
Returns the value of the specified DATE input parameter or throws an
exception if the value is not available.
|
double |
requireInputFloat(java.lang.String parameterName)
Returns the value of the specified FLOAT input parameter or throws an
exception if the value is not available.
|
long |
requireInputInteger(java.lang.String parameterName)
Returns the value of the specified INTEGER input parameter or throws an
exception if the value is not available.
|
ProcessModelParameter |
requireInputParam(java.lang.String parameterName)
Returns the input parameter with the given name, or throws an exception if
the parameter does not exist.
|
java.lang.String |
requireInputString(java.lang.String parameterName)
Returns the value of the specified STRING input parameter or throws an
exception if the value is not available.
|
UDTValue |
requireInputUDT(java.lang.String parameterName)
Returns the value of the specified USERDEFINED input parameter or throws an
exception if the value is not available.
|
java.net.URI |
requireInputURI(java.lang.String parameterName)
Returns the value of the specified URI input parameter or throws an
exception if the value is not available.
|
ProcessModelParameter |
requireOutputParam(java.lang.String parameterName)
Returns the output parameter with the given name, or throws an exception
if the parameter does not exist.
|
boolean |
requireParamConfBoolean(ActivityConstants.AccessType accessType,
java.lang.String parameterName,
java.lang.String entryName)
Returns the configuration value of the specified entry or throws an
exception if it is not available.
|
java.util.Date |
requireParamConfDate(ActivityConstants.AccessType accessType,
java.lang.String parameterName,
java.lang.String entryName)
Returns the configuration value of the specified entry or throws an
exception if it is not available.
|
double |
requireParamConfFloat(ActivityConstants.AccessType accessType,
java.lang.String parameterName,
java.lang.String entryName)
Returns the configuration value of the specified entry or throws an
exception if it is not available.
|
long |
requireParamConfInteger(ActivityConstants.AccessType accessType,
java.lang.String parameterName,
java.lang.String entryName)
Returns the configuration value of the specified entry or throws an
exception if it is not available.
|
java.lang.String |
requireParamConfString(ActivityConstants.AccessType accessType,
java.lang.String parameterName,
java.lang.String entryName)
Returns the configuration value of the specified entry or throws an
exception if it is not available.
|
byte[] |
requireParamConfUDT(ActivityConstants.AccessType accessType,
java.lang.String parameterName,
java.lang.String entryName)
Returns the configuration value of the specified entry or throws an
exception if it is not available.
|
java.net.URI |
requireParamConfURI(ActivityConstants.AccessType accessType,
java.lang.String parameterName,
java.lang.String entryName)
Returns the configuration value of the specified entry or throws an
exception if it is not available.
|
java.lang.Object |
stringToNativeTypedValue(java.lang.String value,
ProcessModelParameter parameter,
boolean output)
Converts an instance of
String to an instance of the
corresponding native type. |
void |
unwriteOutputValue(java.lang.String parameterName)
Removes any previously written value for the specified output parameter.
|
java.lang.Object |
uriToNativeTypedValue(java.net.URI value,
ProcessModelParameter parameter,
boolean output)
Converts an instance of
URI to an instance of the
corresponding native type. |
java.lang.Object |
userdefinedToNativeTypedValue(UDTValue value,
ProcessModelParameter parameter,
boolean output)
Converts an instance of
UDTValue to an instance of the
corresponding native type. |
void |
writeOutputBoolean(java.lang.String parameterName,
boolean value)
Stores the value for the specified BOOLEAN output parameter.
|
void |
writeOutputDate(java.lang.String parameterName,
java.util.Date value)
Stores the value for the specified DATE output parameter.
|
void |
writeOutputFloat(java.lang.String parameterName,
double value)
Stores the value for the specified FLOAT output parameter.
|
void |
writeOutputInteger(java.lang.String parameterName,
long value)
Stores the value for the specified INTEGER output parameter.
|
void |
writeOutputList(java.lang.String parameterName,
java.util.List<?> value)
Stores the list value for the specified USERDEFINED output parameter.
|
void |
writeOutputList(java.lang.String parameterName,
ListUdt value)
Stores the list value for the specified USERDEFINED output parameter.
|
void |
writeOutputObject(java.lang.String parameterName,
java.io.Serializable value)
Stores the designated serialisable object for the specified USERDEFINED
output parameter.
|
void |
writeOutputString(java.lang.String parameterName,
java.lang.String value)
Stores the value for the specified STRING output parameter.
|
void |
writeOutputUDT(java.lang.String parameterName,
byte[] value)
Stores the value for the specified USERDEFINED output parameter.
|
void |
writeOutputUDT(java.lang.String parameterName,
UDTValue value)
Stores the value for the specified USERDEFINED output parameter.
|
void |
writeOutputURI(java.lang.String parameterName,
java.net.URI value)
Stores the value for the specified URI output parameter.
|
protected void |
writeOutputValue(ProcessModelParameter param,
boolean convert,
java.lang.Object value)
Stores the value for the specified output parameter.
|
void |
writeOutputValue(java.lang.String parameterName,
java.lang.Object value)
Stores the value for the specified output parameter.
|
protected void |
writeOutputValue(java.lang.String parameterName,
ProcessConstants.AdeptDataType expDt,
boolean convert,
java.lang.Object value)
Stores the value for the specified output parameter.
|
void |
writeOutputValues(java.lang.Object returnValue,
java.lang.Object[] values)
Writes the values of the output parameters and the return value into the
data context.
|
protected final java.util.logging.Logger logger
protected final ActivityInstance activityInstance
protected final DataContext dataContext
public ActivityData(ActivityInstance activityInstance, DataContext dataContext, java.util.logging.Logger logger)
activityInstance - The activity (instance) which is encapsulated by
the execution environment.dataContext - The data context for the execution environment.logger - The logger for the execution environment.public java.lang.Class<?> getCorrespondingJavaClass(Parameter parameter, boolean output)
boolean, long,
double, String, Object or
URI).parameter - The parameter for which the corresponding java class is to
be retrieved.output - Whether the designated parameter is an output parameter (or
an input parameter otherwise).public java.util.Collection<ProcessModelParameter> getInputParams()
public ProcessModelParameter getInputParam(java.lang.String parameterName)
null if no such
parameter exists.parameterName - name of the input parameternullpublic ProcessModelParameter requireInputParam(java.lang.String parameterName)
parameterName - name of the input parameterApplicationEnvironmentException - if the parameter does not existpublic boolean hasParam(java.lang.String parameterName,
ActivityConstants.AccessType accessType)
parameterName - The name of the parameter.accessType - The access type of the parameter.public boolean hasInputParam(java.lang.String parameterName)
parameterName - name of the input parameterpublic boolean hasInputListParam(java.lang.String parameterName,
ProcessConstants.AdeptDataType elementDataType)
parameterName - name of the input parameterelementDataType - the expected element type of the list; null if this
does not matterpublic java.lang.Class<?>[] getInputTypes()
public boolean hasInputValue(java.lang.String paramName)
paramName - The identifier of the parameterfalse if the
parameter is null.public java.lang.Object getInputValue(java.lang.String parameterName)
throws ApplicationEnvironmentException
parameterName - The identifier of the parameternull if the parameter is not
set.ApplicationEnvironmentException - If the parameter does not exist,
the data type is invalid or no value is provided an
ApplicationEnvironmentException will be thrown.booleanToNativeTypedValue(Boolean, ProcessModelParameter, boolean),
integerToNativeTypedValue(Long, ProcessModelParameter, boolean),
floatToNativeTypedValue(Double, ProcessModelParameter, boolean),
stringToNativeTypedValue(String, ProcessModelParameter, boolean),
userdefinedToNativeTypedValue(UDTValue, ProcessModelParameter,
boolean),
uriToNativeTypedValue(URI, ProcessModelParameter, boolean)public java.lang.Object getInputValue(java.lang.String parameterName,
boolean required)
throws ApplicationEnvironmentException
parameterName - The identifier of the parameterrequired - Whether the input parameter is required (mandatory) and
therefore an ApplicationEnvironmentException is to be
thrown in case it is null.null if the parameter is not
set.ApplicationEnvironmentException - If the parameter does not exist,
the data type is invalid or no value is provided an
ApplicationEnvironmentException will be thrown.booleanToNativeTypedValue(Boolean, ProcessModelParameter, boolean),
integerToNativeTypedValue(Long, ProcessModelParameter, boolean),
floatToNativeTypedValue(Double, ProcessModelParameter, boolean),
stringToNativeTypedValue(String, ProcessModelParameter, boolean),
userdefinedToNativeTypedValue(UDTValue, ProcessModelParameter,
boolean),
uriToNativeTypedValue(URI, ProcessModelParameter, boolean)protected java.lang.Object getInputValue(java.lang.String parameterName,
ProcessConstants.AdeptDataType expDt,
boolean convert,
boolean required)
throws ApplicationEnvironmentException
ApplicationEnvironmentException will be thrown.parameterName - The name of the parameter for which to retrieve the
value.expDt - The data type which is expected. If this is null,
the data type of the parameter will not be checked.convert - Whether to convert the retrieved values with the appropriate
methods.required - Whether the input parameter is required (mandatory) and
therefore an ApplicationEnvironmentException is to be
thrown in case it is null.null if the parameter is not
set.ApplicationEnvironmentException - If the parameter does not exist,
the data type is invalid or no value is provided for a required
parameter an ApplicationEnvironmentException will be
thrown.booleanToNativeTypedValue(Boolean, ProcessModelParameter, boolean),
integerToNativeTypedValue(Long, ProcessModelParameter, boolean),
floatToNativeTypedValue(Double, ProcessModelParameter, boolean),
stringToNativeTypedValue(String, ProcessModelParameter, boolean),
userdefinedToNativeTypedValue(UDTValue, ProcessModelParameter,
boolean),
uriToNativeTypedValue(URI, ProcessModelParameter, boolean)public java.lang.Object getInputValue(ProcessModelParameter param, boolean convert, boolean required) throws ApplicationEnvironmentException
param - The parameter for which to retrieve the value.convert - Whether to convert the retrieved values with the appropriate
methods.required - Whether the input parameter is required (mandatory) and
therefore an ApplicationEnvironmentException is to be
thrown in case it is null.null if the parameter is not
set.ApplicationEnvironmentException - If the parameter does not exist,
the data type is invalid or no value is provided for a required
parameter an ApplicationEnvironmentException will be
thrown.booleanToNativeTypedValue(Boolean, ProcessModelParameter, boolean),
integerToNativeTypedValue(Long, ProcessModelParameter, boolean),
floatToNativeTypedValue(Double, ProcessModelParameter, boolean),
stringToNativeTypedValue(String, ProcessModelParameter, boolean),
userdefinedToNativeTypedValue(UDTValue, ProcessModelParameter,
boolean),
uriToNativeTypedValue(URI, ProcessModelParameter, boolean)public java.lang.Object[] getInputValues()
ApplicationEnvironmentExceptions.ApplicationEnvironmentException - If a parameter does not exist,
the data type is invalid or no value is provided for a required
parameter an ApplicationEnvironmentException will be
thrown.getInputValue(String)public <T> T getDualInputValue(java.lang.String name,
ProcessConstants.AdeptDataType type,
java.lang.Class<T> valueType)
ProcessConstants.AdeptDataType.DATE and
ProcessConstants.AdeptDataType.USERDEFINED the special access method of the
configuration will be used. It's basically an input parameter with a
default value provided in the ATC.
The following are the possible constellations:
T - The type which the requested value is expected to be of.name - The name of the dual input parameter (i.e. input parameter +
ATC field).type - The data type of the parameter or configuration entry.valueType - The (object) type of which the requested value is expected
to be.public java.lang.Boolean readInputBoolean(java.lang.String parameterName)
null
if no value is set or the parameter does not exist. Use this method for
optional input parameters.parameterName - name of the input parameternullrequireInputBoolean(String),
InputDataContext.retrieveBooleanParameterValue(String)public java.lang.Long readInputInteger(java.lang.String parameterName)
null
if no value is set or the parameter does not exist. Use this method for
optional input parameters.parameterName - name of the input parameternullrequireInputInteger(String),
InputDataContext.retrieveIntegerParameterValue(String)public java.lang.Double readInputFloat(java.lang.String parameterName)
null if
no value is set or the parameter does not exist. Use this method for
optional input parameters.parameterName - name of the input parameternullrequireInputFloat(String),
InputDataContext.retrieveFloatParameterValue(String)public java.lang.String readInputString(java.lang.String parameterName)
null
if no value is set or the parameter does not exist. Use this method for
optional input parameters.parameterName - name of the input parameternullrequireInputString(String),
InputDataContext.retrieveStringParameterValue(String)public java.util.Date readInputDate(java.lang.String parameterName)
null if
no value is set or the parameter does not exist. Use this method for
optional input parameters.parameterName - name of the input parameternullrequireInputDate(String),
InputDataContext.retrieveDateParameterValue(String)public java.net.URI readInputURI(java.lang.String parameterName)
null if
no value is set or the parameter does not exist. Use this method for
optional input parameters.parameterName - name of the input parameternullrequireInputURI(String),
InputDataContext.retrieveURIParameterValue(String)public UDTValue readInputUDT(java.lang.String parameterName)
null if no value is set or the parameter does not exist. Use this
method for optional input
parameters.parameterName - name of the input parameternullrequireInputUDT(String),
InputDataContext.retrieveUDTParameterValue(String)public <T extends java.io.Serializable> java.util.List<T> readInputList(java.lang.String parameterName)
null if no value is set. Use this method for
optional input parameters.T - the element type of the listparameterName - name of the input parameternullrequireInputList(String)public boolean requireInputBoolean(java.lang.String parameterName)
throws ApplicationEnvironmentException
mandatory input parameters.parameterName - name of the input parameterApplicationEnvironmentException - if the input value could not be
retrieved (parameter does not exist; wrong data type) or if
the value is not availablereadInputBoolean(String),
InputDataContext.retrieveBooleanParameterValue(String)public long requireInputInteger(java.lang.String parameterName)
throws ApplicationEnvironmentException
mandatory input parameters.parameterName - name of the input parameterApplicationEnvironmentException - if the input value could not be
retrieved (parameter does not exist; wrong data type) or if
the value is not availablereadInputInteger(String),
InputDataContext.retrieveIntegerParameterValue(String)public double requireInputFloat(java.lang.String parameterName)
throws ApplicationEnvironmentException
mandatory input parameters.parameterName - name of the input parameterApplicationEnvironmentException - if the input value could not be
retrieved (parameter does not exist; wrong data type) or if
the value is not availablereadInputFloat(String),
InputDataContext.retrieveFloatParameterValue(String)public java.lang.String requireInputString(java.lang.String parameterName)
throws ApplicationEnvironmentException
mandatory input parameters.parameterName - name of the input parameternullApplicationEnvironmentException - if the input value could not be
retrieved (parameter does not exist; wrong data type) or if
the value is not availablereadInputString(String),
InputDataContext.retrieveStringParameterValue(String)public java.util.Date requireInputDate(java.lang.String parameterName)
throws ApplicationEnvironmentException
mandatory input parameters.parameterName - name of the input parameternullApplicationEnvironmentException - if the input value could not be
retrieved (parameter does not exist; wrong data type) or if
the value is not availablereadInputDate(String),
InputDataContext.retrieveDateParameterValue(String)public java.net.URI requireInputURI(java.lang.String parameterName)
throws ApplicationEnvironmentException
mandatory input parameters.parameterName - name of the input parameternullApplicationEnvironmentException - if the input value could not be
retrieved (parameter does not exist; wrong data type) or if
the value is not availablereadInputURI(String),
InputDataContext.retrieveURIParameterValue(String)public UDTValue requireInputUDT(java.lang.String parameterName) throws ApplicationEnvironmentException
mandatory input parameters.parameterName - name of the input parameternullApplicationEnvironmentException - if the input value could not be
retrieved (parameter does not exist; wrong data type) or if
the value is not availablereadInputUDT(String),
InputDataContext.retrieveUDTParameterValue(String)public java.lang.Object booleanToNativeTypedValue(java.lang.Boolean value,
ProcessModelParameter parameter,
boolean output)
Boolean to an instance of the
corresponding native type. This method should be overridden to return a
correctly typed value. value - An instance of Boolean to be converted to
native type.parameter - The corresponding parameter for further information.output - Whether the designated parameter is an output parameter (or
an input parameter otherwise).public java.lang.Object integerToNativeTypedValue(java.lang.Long value,
ProcessModelParameter parameter,
boolean output)
Long to an instance of the
corresponding native type. This method should be overridden to return a
correctly typed value. value - An instance of Long to be converted to native
type.parameter - The corresponding parameter for further information.output - Whether the designated parameter is an output parameter (or
an input parameter otherwise).public java.lang.Object floatToNativeTypedValue(java.lang.Double value,
ProcessModelParameter parameter,
boolean output)
Double to an instance of the
corresponding native type. This method should be overridden to return a
correctly typed value. value - An instance of Double to be converted to native
type.parameter - The corresponding parameter for further information.output - Whether the designated parameter is an output parameter (or
an input parameter otherwise).public java.lang.Object stringToNativeTypedValue(java.lang.String value,
ProcessModelParameter parameter,
boolean output)
String to an instance of the
corresponding native type. This method should be overridden to return a
correctly typed value. value - An instance of String to be converted to native
type.parameter - The corresponding parameter for further information.output - Whether the designated parameter is an output parameter (or
an input parameter otherwise).public java.lang.Object dateToNativeTypedValue(java.util.Date value,
ProcessModelParameter parameter,
boolean output)
Date to an instance of the
corresponding native type. This method should be overridden to return a
correctly typed value. value - An instance of Date to be converted to native
type.parameter - The corresponding parameter for further information.output - Whether the designated parameter is an output parameter (or
an input parameter otherwise).public java.lang.Object userdefinedToNativeTypedValue(UDTValue value, ProcessModelParameter parameter, boolean output)
UDTValue to an instance of the
corresponding native type. This method should be overridden to return a
correctly typed value. Object by
interpreting the UDT as an object stream and de-serialising the appropriate
object. In case of a ListUdt it will be unmarshalled appropriately
and the corresponding list will be returned. value - The UDTValue containing a serialised object to be converted to
native type.parameter - The corresponding parameter for further information.output - Whether the designated parameter is an output parameter (or
an input parameter otherwise).Object read from the designated
UDTValue or null in case the object can not be read.public java.lang.Object uriToNativeTypedValue(java.net.URI value,
ProcessModelParameter parameter,
boolean output)
URI to an instance of the
corresponding native type. This method should be overridden to return a
correctly typed value. value - An instance of URI to be converted to native
type.parameter - The corresponding parameter for further information.output - Whether the designated parameter is an output parameter (or
an input parameter otherwise).public java.lang.Object getStoredValue(java.lang.String parameterName)
throws ApplicationEnvironmentException
parameterName - The identifier of the parameternull if the parameter has not
been written yet.ApplicationEnvironmentException - If the parameter does not exist or
the data type is invalid an
ApplicationEnvironmentException will be thrown.booleanToNativeTypedValue(Boolean, ProcessModelParameter, boolean),
integerToNativeTypedValue(Long, ProcessModelParameter, boolean),
floatToNativeTypedValue(Double, ProcessModelParameter, boolean),
stringToNativeTypedValue(String, ProcessModelParameter, boolean),
userdefinedToNativeTypedValue(UDTValue, ProcessModelParameter,
boolean),
uriToNativeTypedValue(URI, ProcessModelParameter, boolean),
getInputValue(String)protected java.lang.Object getStoredValue(java.lang.String parameterName,
ProcessConstants.AdeptDataType expDt,
boolean convert)
throws ApplicationEnvironmentException
ApplicationEnvironmentException will be thrown.parameterName - The name of the parameter for which to retrieve the
value.expDt - The data type which is expected. If this is null,
the data type of the parameter will not be checked.convert - Whether to convert the retrieved values with the appropriate
methods.null if the parameter is not
set.ApplicationEnvironmentException - If the parameter does not exist or
the data type is invalid an
ApplicationEnvironmentException will be thrown.booleanToNativeTypedValue(Boolean, ProcessModelParameter, boolean),
integerToNativeTypedValue(Long, ProcessModelParameter, boolean),
floatToNativeTypedValue(Double, ProcessModelParameter, boolean),
stringToNativeTypedValue(String, ProcessModelParameter, boolean),
userdefinedToNativeTypedValue(UDTValue, ProcessModelParameter,
boolean),
uriToNativeTypedValue(URI, ProcessModelParameter, boolean)public java.lang.Object getStoredValue(ProcessModelParameter param, boolean convert) throws ApplicationEnvironmentException
param - The parameter for which to retrieve the value.convert - Whether to convert the retrieved values with the appropriate
methods.null if the parameter is not
set.ApplicationEnvironmentException - If the parameter does not exist or
the data type is invalid an
ApplicationEnvironmentException will be thrown.booleanToNativeTypedValue(Boolean, ProcessModelParameter, boolean),
integerToNativeTypedValue(Long, ProcessModelParameter, boolean),
floatToNativeTypedValue(Double, ProcessModelParameter, boolean),
stringToNativeTypedValue(String, ProcessModelParameter, boolean),
userdefinedToNativeTypedValue(UDTValue, ProcessModelParameter,
boolean),
uriToNativeTypedValue(URI, ProcessModelParameter, boolean)public java.lang.Object[] getStoredValues()
throws ApplicationEnvironmentException
ApplicationEnvironmentException - If the parameter does not exist or
the data type is invalid an
ApplicationEnvironmentException will be thrown.getStoredValue(String)public java.lang.Boolean readOutputBoolean(java.lang.String parameterName)
null if no value is set or the parameter does not exist.parameterName - The name of the output parameter.null.writeOutputBoolean(String, boolean),
DataContext.storedBooleanParameterValue(String)public java.lang.Long readOutputInteger(java.lang.String parameterName)
null if no value is set or the parameter does not exist.parameterName - The name of the output parameter.null.writeOutputInteger(String, long),
DataContext.storedIntegerParameterValue(String)public java.lang.Double readOutputFloat(java.lang.String parameterName)
null if no value is set or the parameter does not exist.parameterName - The name of the output parameter.null.writeOutputFloat(String, double),
DataContext.storedFloatParameterValue(String)public java.lang.String readOutputString(java.lang.String parameterName)
null if no value is set or the parameter does not exist.parameterName - The name of the output parameter.null.writeOutputString(String, String),
DataContext.storedStringParameterValue(String)public java.util.Date readOutputDate(java.lang.String parameterName)
null if no value is set or the parameter does not exist.parameterName - The name of the output parameter.null.writeOutputDate(String, Date),
DataContext.storedDateParameterValue(String)public java.net.URI readOutputURI(java.lang.String parameterName)
null if no value is set or the parameter does not exist.parameterName - The name of the output parameter.null.writeOutputURI(String, URI),
DataContext.storedURIParameterValue(String)public UDTValue readOutputUDT(java.lang.String parameterName)
null if no value is set or the parameter does not exist.parameterName - The name of the output parameter.null.writeOutputUDT(String, UDTValue),
writeOutputUDT(String, byte[]),
DataContext.storedUDTParameterValue(String)public java.util.Collection<ProcessModelParameter> getOutputParams()
public ProcessModelParameter getOutputParam(java.lang.String parameterName)
null if no such
parameter exists.parameterName - name of the output parameternullpublic ProcessModelParameter requireOutputParam(java.lang.String parameterName)
parameterName - name of the output parameterApplicationEnvironmentException - if the parameter does not existpublic boolean hasOutputParam(java.lang.String parameterName)
parameterName - the output parameter namepublic void writeOutputValue(java.lang.String parameterName,
java.lang.Object value)
The conversion methods are used for this. Per default they expect the
object types to be the same as the matching type-specific setOutput
methods. If the value is a List it will be serialised accordingly
to a UDT value.
parameterName - The name of the output parameter.value - The value to be stored.objectToBoolean(Object, ProcessModelParameter, boolean),
objectToInteger(Object, ProcessModelParameter, boolean),
objectToFloat(Object, ProcessModelParameter, boolean),
objectToString(Object, ProcessModelParameter, boolean),
objectToUserdefined(Object, ProcessModelParameter, boolean),
objectToUri(Object, ProcessModelParameter, boolean)protected void writeOutputValue(java.lang.String parameterName,
ProcessConstants.AdeptDataType expDt,
boolean convert,
java.lang.Object value)
ApplicationEnvironmentException will be thrown.
The conversion methods are used for this. Per default they expect the
object types to be the same as the matching type-specific setOutput
methods. If the value is a List it will be serialised accordingly
to a UDT value.
parameterName - The name of the output parameter.expDt - The data type which is expected. If this is null,
the data type of the parameter will not be checked.convert - Whether to convert the designated value with the appropriate
methods before storing it.value - The value to be stored.objectToBoolean(Object, ProcessModelParameter, boolean),
objectToInteger(Object, ProcessModelParameter, boolean),
objectToFloat(Object, ProcessModelParameter, boolean),
objectToString(Object, ProcessModelParameter, boolean),
objectToUserdefined(Object, ProcessModelParameter, boolean),
objectToUri(Object, ProcessModelParameter, boolean),
uriToNativeTypedValue(URI, ProcessModelParameter, boolean)protected void writeOutputValue(ProcessModelParameter param, boolean convert, java.lang.Object value)
param - The output parameter.convert - Whether to convert the designated value with the appropriate
methods before storing it.value - The value to be stored.objectToBoolean(Object, ProcessModelParameter, boolean),
objectToInteger(Object, ProcessModelParameter, boolean),
objectToFloat(Object, ProcessModelParameter, boolean),
objectToString(Object, ProcessModelParameter, boolean),
objectToUserdefined(Object, ProcessModelParameter, boolean),
objectToUri(Object, ProcessModelParameter, boolean)public void writeOutputValues(java.lang.Object returnValue,
java.lang.Object[] values)
returnValue - The return value of the application which is stored for
the output parameter with position 0.values - The output parameter values as array of
object. The positions need to correspond to the parameter
positions defined for the executed activity while the parameter
with position 1 is stored at index 0 in the array.public void unwriteOutputValue(java.lang.String parameterName)
parameterName - name of the output parameterpublic void writeOutputBoolean(java.lang.String parameterName,
boolean value)
parameterName - name of the output parametervalue - the value to be storedDataContext.storeBooleanParameterValue(String, boolean)public void writeOutputInteger(java.lang.String parameterName,
long value)
parameterName - name of the output parametervalue - the value to be storedDataContext.storeIntegerParameterValue(String, long)public void writeOutputFloat(java.lang.String parameterName,
double value)
parameterName - name of the output parametervalue - the value to be storedDataContext.storeFloatParameterValue(String, double)public void writeOutputString(java.lang.String parameterName,
java.lang.String value)
parameterName - name of the output parametervalue - the value to be storedDataContext.storeStringParameterValue(String, String)public void writeOutputDate(java.lang.String parameterName,
java.util.Date value)
parameterName - name of the output parametervalue - the value to be storedDataContext.storeDateParameterValue(String, Date)public void writeOutputURI(java.lang.String parameterName,
java.net.URI value)
parameterName - name of the output parametervalue - the value to be storedDataContext.storeURIParameterValue(String, URI)public void writeOutputUDT(java.lang.String parameterName,
UDTValue value)
parameterName - name of the output parametervalue - the value to be storedDataContext.storeUDTParameterValue(String, UDTValue)public void writeOutputUDT(java.lang.String parameterName,
byte[] value)
parameterName - name of the output parametervalue - the value to be storedDataContext.storeUDTParameterValue(String, UDTValue)public void writeOutputList(java.lang.String parameterName,
java.util.List<?> value)
parameterName - name of the output parametervalue - the list to be storedDataContext.storeUDTParameterValue(String, UDTValue)public void writeOutputList(java.lang.String parameterName,
ListUdt value)
parameterName - name of the output parametervalue - the ListUdt to be storedDataContext.storeUDTParameterValue(String, UDTValue)public void writeOutputObject(java.lang.String parameterName,
java.io.Serializable value)
parameterName - name of the output parametervalue - The serialisable object to store.DataContext.storeUDTParameterValue(String, UDTValue)public java.lang.Boolean objectToBoolean(java.lang.Object value,
ProcessModelParameter parameter,
boolean output)
Boolean.
This method should be overridden to convert from the correct native type. value - An instance of Object (native data type) to be
converted to Boolean. This may be null.parameter - The corresponding parameter for further information.output - Whether the designated parameter is an output parameter (or
an input parameter otherwise).public java.lang.Long objectToInteger(java.lang.Object value,
ProcessModelParameter parameter,
boolean output)
Long.
This method should be overridden to convert from the correct native type. value - An instance of Object (native data type) to be
converted to Long. This may be null.parameter - The corresponding parameter for further information.output - Whether the designated parameter is an output parameter (or
an input parameter otherwise).public java.lang.Double objectToFloat(java.lang.Object value,
ProcessModelParameter parameter,
boolean output)
Double.
This method should be overridden to convert from the correct native type. value - An instance of Object (native data type) to be
converted to Double. This may be null.parameter - The corresponding parameter for further information.output - Whether the designated parameter is an output parameter (or
an input parameter otherwise).public java.lang.String objectToString(java.lang.Object value,
ProcessModelParameter parameter,
boolean output)
String.
This method should be overridden to convert from the correct native type. value - An instance of Object (native data type) to be
converted to String. This may be null.parameter - The corresponding parameter for further information.output - Whether the designated parameter is an output parameter (or
an input parameter otherwise).public java.util.Date objectToDate(java.lang.Object value,
ProcessModelParameter parameter,
boolean output)
Date.
This method should be overridden to convert from the correct native type. value - An instance of Object (native data type) to be
converted to Date. This may be null.parameter - The corresponding parameter for further information.output - Whether the designated parameter is an output parameter (or
an input parameter otherwise).public UDTValue objectToUserdefined(java.lang.Object value, ProcessModelParameter parameter, boolean output)
UDTValue by serialising
the object and encapsulating the corresponding stream in the returned
instance of UDTValue. UDTValue, it
will be used directly. If the object is not serialisable or serialisation
fails, an ApplicationFailedException will be thrown.value - The object to store in an instance of UDTValue.
This must not be null.parameter - The output parameter that needs a conversion from
Object to UDTValue.output - Whether the designated parameter is an output parameter (or
an input parameter otherwise).public java.net.URI objectToUri(java.lang.Object value,
ProcessModelParameter parameter,
boolean output)
URI.
This method should be overridden to convert from the correct native type. value - An instance of Object (native data type) to be
converted to URI. This may be null.parameter - The corresponding parameter for further information.output - Whether the designated parameter is an output parameter (or
an input parameter otherwise).public java.util.Collection<java.lang.String> getAllConfEntries()
public boolean hasConf(java.lang.String entryName)
entryName - name of the configuration entrypublic java.lang.Boolean getConfBoolean(java.lang.String entryName)
null if
it is not set.entryName - name of the configuration entrypublic java.lang.Boolean getConfBoolean(java.lang.String entryName,
java.lang.Boolean defaultValue)
entryName - name of the configuration entrydefaultValue - the default value that will be returned if the
configuration value is missing; may be nullpublic java.lang.Long getConfInteger(java.lang.String entryName)
null if
it is not set.entryName - name of the configuration entrypublic java.lang.Long getConfInteger(java.lang.String entryName,
java.lang.Long defaultValue)
entryName - name of the configuration entrydefaultValue - the default value that will be returned if the
configuration value is missing; may be nullpublic java.lang.Double getConfFloat(java.lang.String entryName)
entryName - name of the configuration entrypublic java.lang.Double getConfFloat(java.lang.String entryName,
java.lang.Double defaultValue)
entryName - name of the configuration entrydefaultValue - the default value that will be returned if the
configuration value is missing; may be nullpublic java.lang.String getConfString(java.lang.String entryName)
null if
it is not set.entryName - name of the configuration entrypublic java.lang.String getConfString(java.lang.String entryName,
java.lang.String defaultValue)
entryName - name of the configuration entrydefaultValue - the default value that will be returned if the
configuration value is missing; may be nullpublic java.util.Date getConfDate(java.lang.String entryName)
null if
it is not set.entryName - name of the configuration entrypublic java.util.Date getConfDate(java.lang.String entryName,
java.util.Date defaultValue)
entryName - name of the configuration entrydefaultValue - the default value that will be returned if the
configuration value is missing; may be nullpublic java.net.URI getConfURI(java.lang.String entryName)
null if
it is not set.entryName - name of the configuration entrypublic java.net.URI getConfURI(java.lang.String entryName,
java.net.URI defaultValue)
entryName - name of the configuration entrydefaultValue - the default value that will be returned if the
configuration value is missing; may be nullpublic byte[] getConfUDT(java.lang.String entryName)
entryName - name of the configuration entrypublic byte[] getConfUDT(java.lang.String entryName,
byte[] defaultValue)
entryName - name of the configuration entrydefaultValue - the default value that will be returned if the
configuration value is missing; may be nullpublic boolean requireConfBoolean(java.lang.String entryName)
entryName - name of the configuration entryApplicationEnvironmentException - if the value is missing or cannot
be parsed as BOOLEANpublic long requireConfInteger(java.lang.String entryName)
entryName - name of the configuration entryApplicationEnvironmentException - if the value is missing or cannot
be parsed as INTEGERpublic double requireConfFloat(java.lang.String entryName)
entryName - name of the configuration entryApplicationEnvironmentException - if the value is missing or cannot
be parsed as FLOATpublic java.lang.String requireConfString(java.lang.String entryName)
entryName - name of the configuration entrynullApplicationEnvironmentException - if the value is missingpublic java.util.Date requireConfDate(java.lang.String entryName)
entryName - name of the configuration entrynullApplicationEnvironmentException - if the value is missing or cannot
be parsed as DATEpublic java.net.URI requireConfURI(java.lang.String entryName)
entryName - name of the configuration entrynullApplicationEnvironmentException - if the value is missing or cannot
be parsed as URIpublic byte[] requireConfUDT(java.lang.String entryName)
entryName - name of the configuration entrynullApplicationEnvironmentException - if the value is missing or cannot
be parsed as USERDEFINEDpublic boolean hasParamConf(ActivityConstants.AccessType accessType, java.lang.String parameterName, java.lang.String entryName)
accessType - the access type of the parameterparameterName - the name of the parameterentryName - name of the configuration entrypublic java.lang.Boolean getParamConfBoolean(ActivityConstants.AccessType accessType, java.lang.String parameterName, java.lang.String entryName, java.lang.Boolean defaultValue)
accessType - the access type of the parameterparameterName - the name of the parameterentryName - name of the configuration entrydefaultValue - the default value that will be returned if the
configuration value is missing; may be nullpublic java.lang.Long getParamConfInteger(ActivityConstants.AccessType accessType, java.lang.String parameterName, java.lang.String entryName, java.lang.Long defaultValue)
accessType - the access type of the parameterparameterName - the name of the parameterentryName - name of the configuration entrydefaultValue - the default value that will be returned if the
configuration value is missing; may be nullpublic java.lang.Double getParamConfFloat(ActivityConstants.AccessType accessType, java.lang.String parameterName, java.lang.String entryName, java.lang.Double defaultValue)
accessType - the access type of the parameterparameterName - the name of the parameterentryName - name of the configuration entrydefaultValue - the default value that will be returned if the
configuration value is missing; may be nullpublic java.lang.String getParamConfString(ActivityConstants.AccessType accessType, java.lang.String parameterName, java.lang.String entryName, java.lang.String defaultValue)
null if
it is not set.accessType - the access type of the parameterparameterName - the name of the parameterentryName - name of the configuration entrydefaultValue - the default value that will be returned if the
configuration value is missing; may be nullpublic java.util.Date getParamConfDate(ActivityConstants.AccessType accessType, java.lang.String parameterName, java.lang.String entryName, java.util.Date defaultValue)
accessType - the access type of the parameterparameterName - the name of the parameterentryName - name of the configuration entrydefaultValue - the default value that will be returned if the
configuration value is missing; may be nullpublic java.net.URI getParamConfURI(ActivityConstants.AccessType accessType, java.lang.String parameterName, java.lang.String entryName, java.net.URI defaultValue)
accessType - the access type of the parameterparameterName - the name of the parameterentryName - name of the configuration entrydefaultValue - the default value that will be returned if the
configuration value is missing; may be nullpublic byte[] getParamConfUDT(ActivityConstants.AccessType accessType, java.lang.String parameterName, java.lang.String entryName, byte[] defaultValue)
accessType - the access type of the parameterparameterName - the name of the parameterentryName - name of the configuration entrydefaultValue - the default value that will be returned if the
configuration value is missing; may be nullpublic boolean requireParamConfBoolean(ActivityConstants.AccessType accessType, java.lang.String parameterName, java.lang.String entryName)
accessType - the access type of the parameterparameterName - the name of the parameterentryName - name of the configuration entryApplicationEnvironmentException - if the value is missing or cannot
be parsed as BOOLEANpublic long requireParamConfInteger(ActivityConstants.AccessType accessType, java.lang.String parameterName, java.lang.String entryName)
accessType - the access type of the parameterparameterName - the name of the parameterentryName - name of the configuration entryApplicationEnvironmentException - if the value is missing or cannot
be parsed as INTEGERpublic double requireParamConfFloat(ActivityConstants.AccessType accessType, java.lang.String parameterName, java.lang.String entryName)
accessType - the access type of the parameterparameterName - the name of the parameterentryName - name of the configuration entryApplicationEnvironmentException - if the value is missing or cannot
be parsed as FLOATpublic java.lang.String requireParamConfString(ActivityConstants.AccessType accessType, java.lang.String parameterName, java.lang.String entryName)
accessType - the access type of the parameterparameterName - the name of the parameterentryName - name of the configuration entrynullApplicationEnvironmentException - if the value is missingpublic java.util.Date requireParamConfDate(ActivityConstants.AccessType accessType, java.lang.String parameterName, java.lang.String entryName)
accessType - the access type of the parameterparameterName - the name of the parameterentryName - name of the configuration entrynullApplicationEnvironmentException - if the value is missing or cannot
be parsed as DATEpublic java.net.URI requireParamConfURI(ActivityConstants.AccessType accessType, java.lang.String parameterName, java.lang.String entryName)
accessType - the access type of the parameterparameterName - the name of the parameterentryName - name of the configuration entrynullApplicationEnvironmentException - if the value is missing or cannot
be parsed as URIpublic byte[] requireParamConfUDT(ActivityConstants.AccessType accessType, java.lang.String parameterName, java.lang.String entryName)
accessType - the access type of the parameterparameterName - the name of the parameterentryName - name of the configuration entrynullApplicationEnvironmentException - if the value is missing or cannot
be parsed as USERDEFINEDprotected java.lang.Object getActInstConfValue(java.lang.String entryName,
ProcessConstants.AdeptDataType expDt,
boolean required,
java.lang.Object defValue)
entryName - the name of the configuration entry for which to retrieve
the value.expDt - The expected data type of the configuration value.required - Whether the configuration value is required and an
ApplicationEnvironmentException is to be thrown in
case it is not present.defValue - The default value to be used in case the configuration
value is optional and not set.protected java.lang.Object getParamConfValue(ActivityConstants.AccessType accessType, java.lang.String parameterName, java.lang.String entryName, ProcessConstants.AdeptDataType expDt, boolean required, java.lang.Object defValue)
accessType - The access type of the parameter.parameterName - The name of the parameter.entryName - the name of the configuration entry for which to retrieve
the value.expDt - The expected data type of the configuration value.required - Whether the configuration value is required and an
ApplicationEnvironmentException is to be thrown in
case it is not present.defValue - The default value to be used in case the configuration
value is optional and not set.protected java.lang.Object getConfValue(Configuration conf, java.lang.String entryName, ProcessConstants.AdeptDataType expDt, boolean required, java.lang.Object defValue, java.lang.String paramText)
conf - The configuration to retrieve the value from.entryName - the name of the configuration entry for which to retrieve
the value.expDt - The expected data type of the configuration value.required - Whether the configuration value is required and an
ApplicationEnvironmentException is to be thrown in
case it is not present.defValue - The default value to be used in case the configuration
value is optional and not set.paramText - The additional text used for logging or the exceptions in
case of a parameter configuration. This provides the name and the
direction of the parameter. In case of the configuration of the
activity instance this should be the empty string.public static java.util.Deque<ProcessModelParameter> getParametersSortedByPosition(java.util.Collection<? extends ProcessModelParameter> params)
params - The parameters which to sort by their configured position.