org.wildfly.swarm.container.config

## Class ConfigViewImpl

- java.lang.Object
- - org.wildfly.swarm.container.config.ConfigViewImpl

- All Implemented Interfaces:
    ConfigView, StageConfig

      public class ConfigViewImpl
      extends Object
      implements ConfigView

  A view of merged/activated configurations.

  If an explicit properties object is provided (`withProperties(Properties)`, then the System properties will be completely ignored. If not, then System properties will be inspected, and any non-property based configuration will be reflect back into the live and active System properties.

  Author:
    Bob McWhirter

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ConfigViewImpl()` Construct a new view.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `activate()`
    `Stream<ConfigKey>` | `allKeysRecursively()`
    `Properties` | `asProperties()`
    `boolean` | `hasKeyOrSubkeys(ConfigKey subPrefix)`
    `void` | `register(String name, ConfigNode config)` Register a named `ConfigNode`.
    `Set<String>` | `registered()` Return the list of all registered node names.
    `Resolver<String>` | `resolve(ConfigKey key)`
    `List<SimpleKey>` | `simpleSubkeys(ConfigKey prefix)`
    `Object` | `valueOf(ConfigKey key)` Retrieve a configuration value by key.
    `ConfigViewImpl` | `withDefaults(ConfigNode defaultConfig)` Define the tail-end, default `ConfigNode`.
    `ConfigViewImpl` | `withEnvironment(Map<String,String> environment)`
    `void` | `withFilter(ConfigurationFilter filter)`
    `ConfigViewImpl` | `withProperties(Properties properties)` Supply explicit properties object for introspection and outrespection.
    `ConfigViewImpl` | `withProperty(String name, String value)`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.wildfly.swarm.spi.api.config.ConfigView

      `resolve`

- - ### Constructor Detail

    - #### ConfigViewImpl

          public ConfigViewImpl()

      Construct a new view.

  - ### Method Detail

    - #### withProperties

          public ConfigViewImpl withProperties(Properties properties)

      Supply explicit properties object for introspection and outrespection.
      Parameters:
        `properties` - The properties.
      Returns:
        This view.

    - #### withProperty

          public ConfigViewImpl withProperty(String name,
                                             String value)

    - #### withEnvironment

          public ConfigViewImpl withEnvironment(Map<String,String> environment)

    - #### withDefaults

          public ConfigViewImpl withDefaults(ConfigNode defaultConfig)

      Define the tail-end, default `ConfigNode`.
      Parameters:
        `defaultConfig` - The defaults.
      Returns:
        This view.

    - #### register

          public void register(String name,
                               ConfigNode config)

      Register a named `ConfigNode`.
      Parameters:
        `name` - The name to register.
        `config` - THe node to register.

    - #### registered

          public Set<String> registered()

      Return the list of all registered node names.
      Returns:
        The list of registered node names.

    - #### valueOf

          public Object valueOf(ConfigKey key)

      Retrieve a configuration value by key.
      Specified by:
        `valueOf` in interface `ConfigView`
      Parameters:
        `key` - The possibly complex key.
      Returns:
        The value if present, otherwise `null`.

    - #### withFilter

          public void withFilter(ConfigurationFilter filter)

    - #### activate

          public void activate()

    - #### asProperties

          public Properties asProperties()

      Specified by:
        `asProperties` in interface `ConfigView`

    - #### simpleSubkeys

          public List<SimpleKey> simpleSubkeys(ConfigKey prefix)

      Specified by:
        `simpleSubkeys` in interface `ConfigView`

    - #### hasKeyOrSubkeys

          public boolean hasKeyOrSubkeys(ConfigKey subPrefix)

      Specified by:
        `hasKeyOrSubkeys` in interface `ConfigView`

    - #### resolve

          public Resolver<String> resolve(ConfigKey key)

      Specified by:
        `resolve` in interface `ConfigView`

    - #### allKeysRecursively

          public Stream<ConfigKey> allKeysRecursively()

      Specified by:
        `allKeysRecursively` in interface `ConfigView`

Copyright © 2017 JBoss by Red Hat. All rights reserved.