public class ConfigViewImpl extends Object implements ConfigView
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.
| Constructor and Description |
|---|
ConfigViewImpl()
Construct a new view.
|
| 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) |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitresolvepublic ConfigViewImpl withProperties(Properties properties)
properties - The properties.public ConfigViewImpl withProperty(String name, String value)
public ConfigViewImpl withEnvironment(Map<String,String> environment)
public ConfigViewImpl withDefaults(ConfigNode defaultConfig)
ConfigNode.defaultConfig - The defaults.public void register(String name, ConfigNode config)
ConfigNode.name - The name to register.config - THe node to register.public Set<String> registered()
public Object valueOf(ConfigKey key)
valueOf in interface ConfigViewkey - The possibly complex key.null.public void withFilter(ConfigurationFilter filter)
public void activate()
public Properties asProperties()
asProperties in interface ConfigViewpublic List<SimpleKey> simpleSubkeys(ConfigKey prefix)
simpleSubkeys in interface ConfigViewpublic boolean hasKeyOrSubkeys(ConfigKey subPrefix)
hasKeyOrSubkeys in interface ConfigViewpublic Resolver<String> resolve(ConfigKey key)
resolve in interface ConfigViewpublic Stream<ConfigKey> allKeysRecursively()
allKeysRecursively in interface ConfigViewCopyright © 2020 JBoss by Red Hat. All rights reserved.