Class CombinedConfigurationBuilder.ConfigurationSourceData

  • Enclosing class:
    CombinedConfigurationBuilder

    private final class CombinedConfigurationBuilder.ConfigurationSourceData
    extends java.lang.Object
    A data class for storing information about all configuration sources defined for a combined builder.
    • Constructor Detail

      • ConfigurationSourceData

        public ConfigurationSourceData()
        Creates a new instance of ConfigurationSourceData.
    • Method Detail

      • builderNames

        public java.util.Set<java.lang.String> builderNames()
        Returns a set with the names of all known named builders.
        Returns:
        the names of the available sub builders
      • cleanUp

        public void cleanUp()
        Frees resources used by this object and performs clean up. This method is called when the owning builder is reset.
      • createAndAddConfigurations

        public java.util.List<ConfigurationBuilder<? extends Configuration>> createAndAddConfigurations​(CombinedConfiguration ccResult,
                                                                                                        java.util.List<ConfigurationDeclaration> srcDecl,
                                                                                                        java.util.List<ConfigurationBuilder<? extends Configuration>> builders)
                                                                                                 throws ConfigurationException
        Processes the declaration of configuration builder providers, creates the corresponding builder if necessary, obtains configurations, and adds them to the specified result configuration.
        Parameters:
        ccResult - the result configuration.
        srcDecl - the collection with the declarations of configuration sources to process.
        builders - List of configuration builders.
        Returns:
        a list with configuration builders.
        Throws:
        ConfigurationException - if an error occurs.
      • createBuilderChangeListener

        private EventListener<ConfigurationBuilderEvent> createBuilderChangeListener()
        Creates a listener for builder change events. This listener is registered at all builders for child configurations.
      • fetchTopLevelOverrideConfigs

        private java.util.List<? extends HierarchicalConfiguration<?>> fetchTopLevelOverrideConfigs​(HierarchicalConfiguration<?> config)
        Finds the override configurations that are defined as top level elements in the configuration definition file. This method fetches the child elements of the root node and removes the nodes that represent other configuration sections. The remaining nodes are treated as definitions for override configurations.
        Parameters:
        config - the definition configuration
        Returns:
        a list with sub configurations for the top level override configurations
      • getChildBuilders

        public java.util.Collection<ConfigurationBuilder<? extends Configuration>> getChildBuilders()
        Gets a collection containing the builders for all child configuration sources.
        Returns:
        the child configuration builders
      • getNamedBuilder

        public ConfigurationBuilder<? extends Configuration> getNamedBuilder​(java.lang.String name)
        Gets the ConfigurationBuilder with the given name. If no such builder is defined in the definition configuration, result is null.
        Parameters:
        name - the name of the builder in question
        Returns:
        the builder with this name or null
      • getOverrideSources

        public java.util.List<ConfigurationDeclaration> getOverrideSources()
        Gets a collection with all configuration source declarations defined in the override section.
        Returns:
        the override configuration builders
      • getUnionSources

        public java.util.List<ConfigurationDeclaration> getUnionSources()
        Gets a collection with all configuration source declarations defined in the union section.
        Returns:
        the union configuration builders