com.holonplatform.core.config

## Interface ConfigPropertySet.Builder<C extends ConfigPropertySet>

- Type Parameters:
    `C` - Concrete ConfigPropertySet type to build
  Enclosing interface:
    ConfigPropertySet

      public static interface ConfigPropertySet.Builder<C extends ConfigPropertySet>

  Builder to create `ConfigPropertySet`s bound to property data sources.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `C` | `build()` Build the `ConfigPropertySet` instance
    `ConfigPropertySet.Builder<C>` | `withDefaultPropertySources()` Add default configuration property sources using `DefaultConfig.defaultConfigPropertyProviders()`
    `ConfigPropertySet.Builder<C>` | `withDefaultPropertySources(ClassLoader classLoader)` Add default configuration property sources using `DefaultConfig.defaultConfigPropertyProviders()` and given ClassLoader
    `ConfigPropertySet.Builder<C>` | `withPropertySource(ConfigPropertyProvider provider)` Add given `ConfigPropertyProvider` property source to ConfigPropertySet
    `ConfigPropertySet.Builder<C>` | `withPropertySource(InputStream propertiesInputStream)` Add given `InputStream` property source to ConfigPropertySet
    `ConfigPropertySet.Builder<C>` | `withPropertySource(Map<String,Object> propertyMap)` Add given `Map` property source to ConfigPropertySet
    `ConfigPropertySet.Builder<C>` | `withPropertySource(Properties properties)` Add given `Properties` property source to ConfigPropertySet
    `ConfigPropertySet.Builder<C>` | `withPropertySource(String sourceFileName)` Add given `sourceFileName` as property source to ConfigPropertySet, using default ClassLoader
    `ConfigPropertySet.Builder<C>` | `withPropertySource(String sourceFileName, ClassLoader classLoader, boolean lenient)` Add given `sourceFileName` as property source to ConfigPropertySet
    `ConfigPropertySet.Builder<C>` | `withSystemPropertySource()` Add a property source using `System` properties to ConfigPropertySet

- - ### Method Detail

    - #### withDefaultPropertySources

          ConfigPropertySet.Builder<C> withDefaultPropertySources()

      Add default configuration property sources using `DefaultConfig.defaultConfigPropertyProviders()`
      Returns:
        this

    - #### withDefaultPropertySources

          ConfigPropertySet.Builder<C> withDefaultPropertySources(ClassLoader classLoader)

      Add default configuration property sources using `DefaultConfig.defaultConfigPropertyProviders()` and given ClassLoader
      Parameters:
        `classLoader` - ClassLoader to use
      Returns:
        this

    - #### withPropertySource

          ConfigPropertySet.Builder<C> withPropertySource(ConfigPropertyProvider provider)

      Add given `ConfigPropertyProvider` property source to ConfigPropertySet
      Parameters:
        `provider` - ConfigPropertyProvider to add
      Returns:
        this

    - #### withPropertySource

          ConfigPropertySet.Builder<C> withPropertySource(Map<String,Object> propertyMap)

      Add given `Map` property source to ConfigPropertySet
      Parameters:
        `propertyMap` - Property key-value source
      Returns:
        this

    - #### withPropertySource

          ConfigPropertySet.Builder<C> withPropertySource(Properties properties)

      Add given `Properties` property source to ConfigPropertySet
      Parameters:
        `properties` - Properties instance
      Returns:
        this

    - #### withPropertySource

          ConfigPropertySet.Builder<C> withPropertySource(InputStream propertiesInputStream)
                                                   throws ConfigPropertySet.ConfigurationException

      Add given `InputStream` property source to ConfigPropertySet
      Parameters:
        `propertiesInputStream` - Properties input stream
      Returns:
        this
      Throws:
        `ConfigPropertySet.ConfigurationException` - Error reading property source

    - #### withPropertySource

          ConfigPropertySet.Builder<C> withPropertySource(String sourceFileName)
                                                   throws ConfigPropertySet.ConfigurationException

      Add given `sourceFileName` as property source to ConfigPropertySet, using default ClassLoader
      Parameters:
        `sourceFileName` - Properties file name
      Returns:
        this
      Throws:
        `ConfigPropertySet.ConfigurationException` - Error reading property source

    - #### withPropertySource

          ConfigPropertySet.Builder<C> withPropertySource(String sourceFileName,
                                                          ClassLoader classLoader,
                                                          boolean lenient)
                                                   throws ConfigPropertySet.ConfigurationException

      Add given `sourceFileName` as property source to ConfigPropertySet
      Parameters:
        `sourceFileName` - Properties file name
        `classLoader` - ClassLoader to use. If `null`, the default current classloader is used
        `lenient` - `true` to ignore source loading errors and return a provider with an empty set of properties
      Returns:
        this
      Throws:
        `ConfigPropertySet.ConfigurationException` - Error reading property source

    - #### withSystemPropertySource

          ConfigPropertySet.Builder<C> withSystemPropertySource()

      Add a property source using `System` properties to ConfigPropertySet
      Returns:
        this

    - #### build

          C build()

      Build the `ConfigPropertySet` instance
      Returns:
        ConfigPropertySet instance

Copyright © 2017 The Holon Platform. All rights reserved.