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
  • Field Details

    • serialVersionUID

      static final long serialVersionUID
      Generated 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 this MergingConfiguration. 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 this MergingConfiguration. 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 this MergingConfiguration. 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 this MergingConfiguration.
      Variables in strings are replaced in the merged configuration.
      Returns:
      One configuration containing the merged values of all configurations of this MergingConfiguration.