Interface MergingConfiguration
- All Superinterfaces:
Configuration,Serializable
- All Known Subinterfaces:
MergingActivityConfiguration
This class merges several configurations to one configuration. All
configurations are managed in a list. When retrieving a configuration value,
the list is iterated and the first non-null value is returned.
String values may contain variables that are replaced appropriately.
String values may contain variables that are replaced appropriately.
- Author:
- Ulrich Kreher
-
Nested Class Summary
Nested classes/interfaces inherited from interface de.aristaflow.adept2.model.common.Configuration
Configuration.ConfigurationIDs -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longGenerated ID for serialisation. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFirst(Configuration configuration) Adds the designated configuration as the first configuration that overrides the other configurations.voidaddLast(Configuration configuration) Adds the designated configuration as the last configuration that is overridden by all other configurations.List<? extends Configuration>Gets a copy of the list of all configurations that are merged by thisMergingConfiguration.Gets one configuration containing the merged values, that is the list of configurations is merged to a single configuration.Methods inherited from interface de.aristaflow.adept2.model.common.Configuration
getAllEntries, getBoolean, getConfigurationID, getDate, getFloat, getInteger, getString, getUDT, getURI, isFixed
-
Field Details
-
serialVersionUID
static final long serialVersionUIDGenerated ID for serialisation.- See Also:
-
-
Method Details
-
getConfigurations
List<? extends Configuration> getConfigurations()Gets a copy of the list of all configurations that are merged by thisMergingConfiguration. Prior configurations override later ones.- Returns:
- A list of all configurations that are merged by this
MergingConfiguration.
-
addFirst
Adds the designated configuration as the first configuration that overrides the other configurations.- Parameters:
configuration- The configuration to override the other configurations in thisMergingConfiguration. This must not be null.
-
addLast
Adds the designated configuration as the last configuration that is overridden by all other configurations.- Parameters:
configuration- The configuration that is overridden by all other configurations in thisMergingConfiguration. This must not be null.
-
getMergedConfiguration
Configuration getMergedConfiguration()Gets one configuration containing the merged values, that is the list of configurations is merged to a single configuration. This allows for better performance than thisMergingConfiguration.
Variables in strings are replaced in the merged configuration.- Returns:
- One configuration containing the merged values of all
configurations of this
MergingConfiguration.
-