org.apache.tamaya.management

## Interface ManagedConfigMBean

- All Known Implementing Classes:
    ManagedConfig

      public interface ManagedConfigMBean

  Managed bean interface for accessing environment data.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Map<String,String>` | `getConfiguration()` Accesses a configuration current a given type as Map.
    `String` | `getJsonConfigurationInfo()` Get a general description of the configuration (context) in place, in JSON format: Configuration: { "class": "org.apache.tamaya.core.internal.DefaultConfiguration", "timestamp": 1440426409388, "data": { "ALLUSERSPROFILE": "C:\ProgramData", "APPDATA": "C:\Users\Anatole\AppData\Roaming", "COMPUTERNAME": "DEVBOX-WIN", "ComSpec": "C:\Windows\system32\cmd.exe", "CommonProgramFiles": "C:\Program Files\Common Files", "CommonProgramFiles(x86)": "C:\Program Files (x86)\Common Files", "CommonProgramW6432": "C:\Program Files\Common Files", "FP_NO_HOST_CHECK": "NO", "HOMEDRIVE": "C:", // ... } }
    `Map<String,String>` | `getSection(String area, boolean recursive)` Accesses a configuration values for current a given config section as Map.
    `Set<String>` | `getSections()` Access the defined sections for a given configuration.
    `Set<String>` | `getTransitiveSections()` Access the transitive sections for the current configuration.
    `String` | `getXmlConfigurationInfo()` Get a general description of the configuration (context) in place, in JSON format: ConfigurationContext[gqContextClassName] { version = 2345-34334-2333-3434, config { key = "value", key2 = "value2" ... }, filters = [...], converters{...}, property-sources{...} }
    `boolean` | `isAreaEmpty(String area)` Allows to determine if an section is empty.
    `boolean` | `isAreaExisting(String area)` Allows to determine if an section is existing.

- - ### Method Detail

    - #### getJsonConfigurationInfo

          String getJsonConfigurationInfo()

      Get a general description of the configuration (context) in place, in JSON format:

           Configuration: {
             "class": "org.apache.tamaya.core.internal.DefaultConfiguration",
             "timestamp": 1440426409388,
             "data": {
               "ALLUSERSPROFILE": "C:\ProgramData",
               "APPDATA": "C:\Users\Anatole\AppData\Roaming",
               "COMPUTERNAME": "DEVBOX-WIN",
               "ComSpec": "C:\Windows\system32\cmd.exe",
               "CommonProgramFiles": "C:\Program Files\Common Files",
               "CommonProgramFiles(x86)": "C:\Program Files (x86)\Common Files",
               "CommonProgramW6432": "C:\Program Files\Common Files",
               "FP_NO_HOST_CHECK": "NO",
               "HOMEDRIVE": "C:",
               // ...
             }
           }

      Returns:
        a JSON formatted meta-information.

    - #### getXmlConfigurationInfo

          String getXmlConfigurationInfo()

      Get a general description of the configuration (context) in place, in JSON format:

               ConfigurationContext[gqContextClassName] {
                   version = 2345-34334-2333-3434,
                   config {
                       key = "value",
                       key2 = "value2"
                       ...
                   },
                   filters = [...],
                   converters{...},
                   property-sources{...}
               }

      Returns:
        a JSON formatted meta-information.

    - #### getConfiguration

          Map<String,String> getConfiguration()

      Accesses a configuration current a given type as Map.
      Returns:
        the current configuration map.
      Throws:
        `org.apache.tamaya.ConfigException` - If the configuration is not available.

    - #### getSection

          Map<String,String> getSection(String area,
                                      boolean recursive)

      Accesses a configuration values for current a given config section as Map.
      Parameters:
        `area` - the target section key, not null.
        `recursive` - if set to false only direct child keys of the given section are returned.
      Returns:
        the key/values found, including the recursive child values.
      Throws:
        `org.apache.tamaya.ConfigException` - If the configuration is not yet loaded.

    - #### getSections

          Set<String> getSections()

      Access the defined sections for a given configuration.
      Returns:
        the sections defined (only returning the sections that contain properties).
      Throws:
        `org.apache.tamaya.ConfigException` - If the configuration is not yet loaded

    - #### getTransitiveSections

          Set<String> getTransitiveSections()

      Access the transitive sections for the current configuration.
      Returns:
        the transitive sections defined.
      Throws:
        `org.apache.tamaya.ConfigException` - If the configuration is not yet loaded

    - #### isAreaExisting

          boolean isAreaExisting(String area)

      Allows to determine if an section is existing.
      Parameters:
        `area` - the target section key, not null.
      Returns:
        true, if such an section exists (the section may be empty).

    - #### isAreaEmpty

          boolean isAreaEmpty(String area)

      Allows to determine if an section is empty.
      Parameters:
        `area` - the target section key, not null.
      Returns:
        true, if such an section exists and is not empty.

Copyright © 2014–2016 Apache Software Foundation. All rights reserved.