public final class ConfigManager
extends java.lang.Object
| Constructor and Description |
|---|
ConfigManager() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getValue(java.lang.String key)
Returns the value of the given configuration key.
|
java.lang.String |
getValue(java.lang.String key,
java.lang.String defaultValue)
Returns the value of the given configuration key.
|
java.util.Properties |
readConfigFile(java.lang.String configFileName)
Reads a configuration file that must be accessible from the classpath.
|
public java.util.Properties readConfigFile(java.lang.String configFileName)
throws ConfigException
configFileName - Path of the configuration fileConfigException - If the given file cannot be read of if there is a miss configuration.public java.lang.String getValue(java.lang.String key)
key - Key.null if there is no such key in the configuration set.public java.lang.String getValue(java.lang.String key,
java.lang.String defaultValue)
key - Key.defaultValue - Default value if the key is not set.