Class RegistryConfiguration.Composite

  • All Implemented Interfaces:
    RegistryConfiguration
    Enclosing interface:
    RegistryConfiguration

    public static class RegistryConfiguration.Composite
    extends java.lang.Object
    implements RegistryConfiguration
    A RegistryConfiguration that allows you to treat other configurations as providing important or default configuration information.
    Author:
    Matthew Pocock
    • Constructor Detail

      • Composite

        public Composite()
    • Method Detail

      • getConfiguration

        public java.util.Map getConfiguration()
        Description copied from interface: RegistryConfiguration
        getConfiguration returns a mapping of registry database names to collections of tag-value pairs.
        Specified by:
        getConfiguration in interface RegistryConfiguration
        Returns:
        a Map.
      • addTopConfig

        public void addTopConfig​(RegistryConfiguration newConfig)
                          throws RegistryException
        Add a configuration as the most authoritative place to look. During future lookups with this context, values in newConfig will take precedence over values in the previously existing configuration.
        Parameters:
        newConfig - the RegistryConfiguration to add as most important
        Throws:
        RegistryException
      • addBottomConfig

        public void addBottomConfig​(RegistryConfiguration newConfig)
                             throws RegistryException
        Add a configuration as the most default place to look. During future lookups with this context, values in newConfig will be used as default values only if the lookup would return nothing in the previously existing configuration.
        Parameters:
        newConfig - the RegistryConfiguration to add as the default
        Throws:
        RegistryException