public interface InheritedConfiguration
ChangeableConfiguration by the means
for inheritance. This allows to build hierarchies of configurations that
inherit and override parent configurations. The inheritance of configurations
is based on the inheritance of the corresponding entities of the activity
model, for instance ActivityTemplateDefinitions and
Operations. Since an InheritedConfiguration has a
slightly different semantic due to the inheritance and is only used in the
activity model, it is separated from the
Configuration-class-hierarchy. hasOwnValue(String) for this.
If the conversion for type-safe accesses fails due to an invalid string
representation and the parent configuration provides a value this will be
used. This excludes getString(String) which returns the string
representation of which failed to be parsed.
Configurations are coupled to configuration descriptions, therefore hierarchical configurations are coupled to the hierarchical configuration descriptions. However not every configuration entry declared as mandatory in a configuration descriptions need to have a value on the same hierarchy level. Such a value may be provided by some child configuration.
| 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 |
hasOwnValue(java.lang.String entryName)
Gets whether the value for the entry with the designated name has an own value within this
configuration, that is, the value is not being inherited from the parent configuration.
|
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.
|
boolean |
isFixedForChildren(java.lang.String entryName)
Gets whether the designated entry is fixed for child configurations.
|
boolean |
isFixedForChildrenInherited(java.lang.String entryName)
Gets whether the
fixed-property for the
entry with the designated name is inherited from the parent configuration. |
boolean |
isOverriding(java.lang.String entryName)
Gets whether the value for the entry with the designated name is actually
overriding the value from a parent configuration.
|
void |
remove(java.lang.String entryName)
Removes the value for the entry with the designated name from this
configuration that overrides a configuration value from a parent entity.
|
void |
removeFixedForChildren(java.lang.String entryName)
Removes the
fixed-property for the entry with the
designated name from this configuration that overrides the property from
the parent configuration. |
void |
removeInheritedValue(java.lang.String entryName)
Removes the value with the designated name for the child entities, that is,
the value of the entry is overridden and set to
null. |
void |
setBoolean(java.lang.String entryName,
boolean value)
Sets the boolean configuration value provided under the designated entry
name.
|
void |
setDate(java.lang.String entryName,
java.util.Date value)
Sets the
Date configuration value provided under the
designated entry name. |
void |
setFixedForChildren(java.lang.String entryName)
Sets the configuration value provided under the designated entry name to
fixed, that is it must not be overridden in child configurations.
|
void |
setFloat(java.lang.String entryName,
double value)
Sets the float configuration value provided under the designated entry
name.
|
void |
setInteger(java.lang.String entryName,
long value)
Sets the integer configuration value provided under the designated entry
name.
|
void |
setString(java.lang.String entryName,
java.lang.String value)
Sets the configuration value provided under the designated entry name as
string which will always work even if the designated entry is of another
type.
|
void |
setUDT(java.lang.String entryName,
byte[] value)
Sets the
UDTValue configuration value provided under the
designated entry name. |
void |
setURI(java.lang.String entryName,
java.net.URI value)
Sets the URI configuration value provided under the designated entry name.
|
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.ConfigurationIDsvoid setBoolean(java.lang.String entryName,
boolean value)
entryName - The name of the entry for which to set the boolean value
of.value - A boolean configuration value for the designated entry name.void setInteger(java.lang.String entryName,
long value)
entryName - The name of the entry for which to set the integer value
of.value - An integer configuration value for the designated entry name.void setFloat(java.lang.String entryName,
double value)
entryName - The name of the entry for which to set the float value of.value - A float configuration value for the designated entry name.void setString(java.lang.String entryName,
java.lang.String value)
null. Note that the empty string is not
a valid typed value and therefore it will be interpreted as
null when accessing it with a type-safe method. entryName - The name of the entry for which to set the (string
representation of the) configuration value of.value - A (string representation of the) configuration value for the
designated entry name.void setURI(java.lang.String entryName,
java.net.URI value)
entryName - The name of the entry for which to set the URI value of.value - A URI configuration value for the designated entry name or
null in case the value is unset.void setDate(java.lang.String entryName,
java.util.Date value)
Date configuration value provided under the
designated entry name. This must not be null. Please check in
advance whether this entry refers to a Date configuration
value. entryName - The name of the entry for which to set the
Date value of.value - A Date configuration value for the designated
entry name. This must not be null.void setUDT(java.lang.String entryName,
byte[] value)
UDTValue configuration value provided under the
designated entry name. This must not be null. Please check in
advance whether this entry refers to a UDTValue configuration
value. entryName - The name of the entry for which to set the
UDTValue value of.value - A UDTValue configuration value for the designated
entry name. This must not be null.void remove(java.lang.String entryName)
entryName - The name of the configuration entry to remove from this
configuration and to inherit from a parent entity again. This must
neither be null nor the empty string.boolean isFixedForChildren(java.lang.String entryName)
isFixed(String) returns whether an entry is fixed for this
configuration, this method returns whether the entry is fixed for child
configurations. If no (own) value is provided by this configuration, the
inherited value of the parent configuration will be returned (which
equals isFixed(String)).entryName - The name of the configuration entry for which to retrieve
the fixed-property that applies to child
configurations of this configuration.boolean isFixedForChildrenInherited(java.lang.String entryName)
fixed-property for the
entry with the designated name is inherited from the parent configuration.entryName - The name of the configuration entry which to retrieve
whether is fixed-property is inherited from the parent
configuration.fixed-property for the entry
with the designated name is inherited from the parent
configuration.void setFixedForChildren(java.lang.String entryName)
ConfigurationSet
and ActivityTemplate).
Before setting a non-optional configuration value to fixed, it has to be ensured that the value is either provided by this or a parent configuration or at runtime from an input parameter or the process configuration. It must be prevented to set a mandatory parameter to fixed without having a value (at runtime)!
When setting a configuration value to fixed be sure to remove all overriding values (especially retrieval from a parameter or the process configuration) in child configurations.
entryName - The name of the entry for which to prevent changing of
the value in child configurations.void removeFixedForChildren(java.lang.String entryName)
fixed-property for the entry with the
designated name from this configuration that overrides the property from
the parent configuration. Afterwards the property is inherited again. entryName - The name of the configuration entry to remove the
fixed-property from this configuration
and to inherit from a parent entity again. This must neither be
null nor the empty string.boolean hasOwnValue(java.lang.String entryName)
entryName - The name of the configuration entry to check whether it has an own value. This
must neither be null nor the empty string.boolean isOverriding(java.lang.String entryName)
hasOwnValue(String).entryName - The name of the configuration entry to check whether it is
overridden by this configuration. This must neither be null nor
the empty string.void removeInheritedValue(java.lang.String entryName)
null. The
corresponding entry has to exist in the parent configuration description
and it must not be fixed.entryName - The name of the configuration entry to remove for the
child entities. The entry must exist in a parent configuration
description and it must not be fixed.