Interface MergingConfiguration
-
- All Superinterfaces:
Configuration
,Serializable
- All Known Subinterfaces:
MergingActivityConfiguration
public interface MergingConfiguration extends Configuration
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.- Author:
- Ulrich Kreher
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface de.aristaflow.adept2.model.common.Configuration
Configuration.ConfigurationIDs
-
-
Field Summary
Fields Modifier and Type Field Description static long
serialVersionUID
Generated ID for serialisation.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addFirst(Configuration configuration)
Adds the designated configuration as the first configuration that overrides the other configurations.void
addLast(Configuration configuration)
Adds the designated configuration as the last configuration that is overridden by all other configurations.List<? extends Configuration>
getConfigurations()
Gets a copy of the list of all configurations that are merged by thisMergingConfiguration
.Configuration
getMergedConfiguration()
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 Detail
-
serialVersionUID
static final long serialVersionUID
Generated ID for serialisation.- See Also:
- Constant Field Values
-
-
Method Detail
-
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
void addFirst(Configuration configuration)
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
void addLast(Configuration configuration)
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
.
-
-