com.holonplatform.core.config

## Interface ConfigPropertySet

- All Known Subinterfaces:
    BeanConfigProperties, DatastoreConfigProperties, JwtConfigProperties
  All Known Implementing Classes:
    BeanConfigProperties.BeanConfigPropertiesImpl, DatastoreConfigProperties.DatastoreConfigPropertiesImpl, com.holonplatform.core.internal.config.DefaultConfigPropertySet, JwtConfigProperties.JwtConfigPropertiesImpl

      public interface ConfigPropertySet

  A set of configuration properties, identified by a specific name, used as property definition prefix.

  For external property definitions (for example using a `.properties` file), the actual property name is composed using the property set name returned by `getName()` and the given specific `name`. For example, if the property set name is `test` and the property name is `prop`, the actual property name will be `test.prop`.

  Since:
    5.0.0
  See Also:
    `ConfigProperty`

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static interface` | `ConfigPropertySet.Builder<C extends ConfigPropertySet>` Builder to create `ConfigPropertySet`s bound to property data sources.
    `static class` | `ConfigPropertySet.ConfigurationException` Exception thrown for configuration errors.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `<T> T` | `getConfigPropertyValue(ConfigProperty<T> property, T defaultValue)` Returns the value associated to given `property`.
    `String` | `getName()` Configuration property set name, used as property definition prefix.
    `Map<String,String>` | `getSubPropertiesUsingPrefix(String prefix)` Get a key-value `Map` of all the properties at sub levels of this property set, starting from given prefix.
    `<T> boolean` | `hasConfigProperty(ConfigProperty<T> property)` Checks whether this property set contains a not `null` value associated to given `property`.

- - ### Method Detail

    - #### getName

          String getName()

      Configuration property set name, used as property definition prefix.
      Returns:
        Configuration properties set name (not null)

    - #### hasConfigProperty

          <T> boolean hasConfigProperty(ConfigProperty<T> property)

      Checks whether this property set contains a not `null` value associated to given `property`.
      Type Parameters:
        `T` - Property type
      Parameters:
        `property` - Property to check (not null)
      Returns:
        `true` if this property set contains a not `null` value associated to given `property`

    - #### getConfigPropertyValue

          <T> T getConfigPropertyValue(ConfigProperty<T> property,
                                       T defaultValue)

      Returns the value associated to given `property`.
      Type Parameters:
        `T` - Property type
      Parameters:
        `property` - Configuration property to read (not null)
        `defaultValue` - Default value to return if property was not found or has no value
      Returns:
        Property value, or `defaultValue` if not found

    - #### getSubPropertiesUsingPrefix

          Map<String,String> getSubPropertiesUsingPrefix(String prefix)

      Get a key-value `Map` of all the properties at sub levels of this property set, starting from given prefix.
      Parameters:
        `prefix` - Prefix to use (not null)
      Returns:
        Map of all the properties at sub levels of this property set, starting from given prefix. An empty map if one found.

Copyright © 2017 The Holon Platform. All rights reserved.