public class ManagedConfig extends Object implements ManagedConfigMBean
ManagedConfigMBean interface. Each bean binds to the
current Configuration instance on creation.| Constructor and Description |
|---|
ManagedConfig()
Constructor, which binds this instance to the current TCCL.
|
| Modifier and Type | Method and Description |
|---|---|
Map<String,String> |
getConfiguration()
Accesses a configuration current a given type as Map.
|
protected org.apache.tamaya.Configuration |
getConfigurationInternal()
Evaluate the current configuration.
|
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.
|
public ManagedConfig()
public String getJsonConfigurationInfo()
ManagedConfigMBean
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:",
// ...
}
}
getJsonConfigurationInfo in interface ManagedConfigMBeanpublic String getXmlConfigurationInfo()
ManagedConfigMBean
ConfigurationContext[gqContextClassName] {
version = 2345-34334-2333-3434,
config {
key = "value",
key2 = "value2"
...
},
filters = [...],
converters{...},
property-sources{...}
}
getXmlConfigurationInfo in interface ManagedConfigMBeanpublic Map<String,String> getConfiguration()
ManagedConfigMBeangetConfiguration in interface ManagedConfigMBeanpublic Map<String,String> getSection(String area, boolean recursive)
ManagedConfigMBeangetSection in interface ManagedConfigMBeanarea - the target section key, not null.recursive - if set to false only direct child keys of the given section are returned.public Set<String> getSections()
ManagedConfigMBeangetSections in interface ManagedConfigMBeanpublic Set<String> getTransitiveSections()
ManagedConfigMBeangetTransitiveSections in interface ManagedConfigMBeanpublic boolean isAreaExisting(String area)
ManagedConfigMBeanisAreaExisting in interface ManagedConfigMBeanarea - the target section key, not null.public boolean isAreaEmpty(String area)
ManagedConfigMBeanisAreaEmpty in interface ManagedConfigMBeanarea - the target section key, not null.protected org.apache.tamaya.Configuration getConfigurationInternal()
ConfigurationProvider.getConfiguration().Copyright © 2014–2016 Apache Software Foundation. All rights reserved.