public interface Configuration
extends java.io.Serializable
ProcessConstants.AdeptDataTypes.
Each configuration belongs to a ConfigurationDescription, that
provides more information on a configuration value. This includes the type,
restrictions and a description. The configuration description can be
retrieved from the entity that provided this configuration.
Since a text-based file is a common representation of a configuration, all
values may be retrieved as string. However, this
interface allows type-safe access and thus encapsulates parsing. If the
parsing fails, null will be returned (except for getString(String)).
Besides an invalid value type, null will also be returned if no appropriate
configuration value is present. This also excludes getString(String)
which may return the empty string or null instead.
A string value may either be empty or null. Null corresponds to a non-present
configuration entry (similar to a map not having a specific key). The empty
string represents a present configuration entry having no defined value
(similar to a map having a key without value).
| Modifier and Type | Interface and Description |
|---|---|
static class |
Configuration.ConfigurationIDs
The IDs for configurations, see
getConfigurationID(String). |
| Modifier and Type | Field and Description |
|---|---|
static long |
serialVersionUID
Generated ID for serialisation.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Set<java.lang.String> |
getAllEntries()
Gets all entry names that have a value different from null in this
configuration.
|
java.lang.Boolean |
getBoolean(java.lang.String entryName)
Gets the boolean configuration value provided under the designated entry
name or null if the value is not present or cannot be parsed to a boolean
value.
|
java.lang.String |
getConfigurationID(java.lang.String entryName)
Gets the ID of the configuration object, the designated entry name stems
from.
|
java.util.Date |
getDate(java.lang.String entryName)
Gets the
Date configuration value provided under the
designated entry name or null if the value is not present or cannot be
parsed to a Date value. |
java.lang.Double |
getFloat(java.lang.String entryName)
Gets the float configuration value provided under the designated entry name
or null if the value is not present or cannot be parsed to a double value.
|
java.lang.Long |
getInteger(java.lang.String entryName)
Gets the integer configuration value provided under the designated entry
name or null if the value is not present or cannot be parsed to a long
value.
|
java.lang.String |
getString(java.lang.String entryName)
Gets the configuration value provided under the designated entry name as
string which will always work even if the designated entry has another
type.
|
byte[] |
getUDT(java.lang.String entryName)
Gets the
UDTValue configuration value provided under the
designated entry name or null if the value is not present or cannot be
parsed to a byte[] value. |
java.net.URI |
getURI(java.lang.String entryName)
Gets the URI configuration value provided under the designated entry name
or null if the value is not present or cannot be parsed to a URI value.
|
boolean |
isFixed(java.lang.String entryName)
Gets whether the configuration value provided under the designated entry
name can not be changed either be explicitly setting the value or
overriding it.
|
static final long serialVersionUID
java.lang.Boolean getBoolean(java.lang.String entryName)
entryName - The name of the entry for which to retrieve the boolean
value of.java.lang.Long getInteger(java.lang.String entryName)
entryName - The name of the entry for which to retrieve the long value
of.java.lang.Double getFloat(java.lang.String entryName)
entryName - The name of the entry for which to retrieve the double
value of.java.lang.String getString(java.lang.String entryName)
entryName - The name of the entry for which to retrieve the string
representation of the configuration value of.java.net.URI getURI(java.lang.String entryName)
entryName - The name of the entry for which to retrieve the URI value
of.java.util.Date getDate(java.lang.String entryName)
Date configuration value provided under the
designated entry name or null if the value is not present or cannot be
parsed to a Date value.entryName - The name of the entry for which to retrieve the
Date value of.Date configuration value for the designated entry
or null in case the value is not present or cannot be parsed to a
Date value.byte[] getUDT(java.lang.String entryName)
UDTValue configuration value provided under the
designated entry name or null if the value is not present or cannot be
parsed to a byte[] value.entryName - The name for the entry for which to retrieve the
byte[] value of.byte[] configuration value for the designated entry
or null in case the value is not present or cannot be parsed to a
byte[] value.boolean isFixed(java.lang.String entryName)
entryName - The name for the entry for which to retrieve whether the
configuration value must not be changed.java.util.Set<java.lang.String> getAllEntries()
java.lang.String getConfigurationID(java.lang.String entryName)
ActivityTemplateDefinition containing an invalid value.entryName - The name of the entry of which to retrieve the ID of its
configuration.Configuration.ConfigurationIDs