public interface ConfigurationHolder
| Modifier and Type | Field and Description |
|---|---|
static org.slf4j.Logger |
LOG
Logger.
|
| Modifier and Type | Method and Description |
|---|---|
ConfigurationHolder |
getConfiguration(ConfigurationPath path)
Get the configuration for the given path.
|
default ConfigurationHolder |
getConfiguration(String path)
Syntactic sugar for
getConfiguration(ConfigurationPath). |
String |
getValue(String name)
Get the value from the current configuration node accessed by the given name.
|
Map<String,String> |
getValues()
Get all the values from current configuration node.
|
default boolean |
hasConfiguration(ConfigurationPath path)
Helper method to check if provided path exists in the configuration.
|
default boolean |
hasConfiguration(String path)
Syntactic sugar for
hasConfiguration(ConfigurationPath). |
default boolean hasConfiguration(String path)
hasConfiguration(ConfigurationPath).path - The given pathdefault boolean hasConfiguration(ConfigurationPath path)
path - The given pathdefault ConfigurationHolder getConfiguration(String path) throws ConfigurationException
getConfiguration(ConfigurationPath).path - The string representation of configuration path.null if not found.ConfigurationException - in case of configuration problemConfigurationHolder getConfiguration(ConfigurationPath path) throws ConfigurationException
Get the configuration for the given path. Take into account that sometimes a given path could lead to a list of configurations of the same type grouped inside a parent configuration. By using this method, in case of the path lead to a list of configurations of the same type it will return the first configuration of the list. In the case the path lead to a single configuration, such configuration would be retrieved.
path - The given path.null if not found.ConfigurationException - In case of configuration problemString getValue(String name) throws ConfigurationException
name - The given name to access the configuration valueConfigurationException - in case of configuration problemMap<String,String> getValues() throws ConfigurationException
ConfigurationException - in case of configuration problemCopyright © 2017 SDL Group. All rights reserved.