|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbe.ehealth.technicalconnector.config.impl.ConfigurationImpl
public final class ConfigurationImpl
Implementation of Configuration
Field Summary | |
---|---|
static String |
SYSPROP_MODULE_LOADING
Property to (des)activate the module loading of the configuration factory. |
Method Summary | |
---|---|
boolean |
containsKey(String key)
Property contains key. |
Boolean |
getBooleanProperty(String key,
Boolean defaultValue)
Gets the boolean property. |
Configuration |
getCurrentConfig()
|
Duration |
getDurationProperty(String key,
Long defaultValue,
TimeUnit defaultTimeUnit)
|
static Configuration |
getInstance()
|
Integer |
getIntegerProperty(String key,
Integer defaultValue)
Gets the integer property. |
Long |
getLongProperty(String key,
Long defaultValue)
Gets the long property. |
List<String> |
getMatchingProperties(String rootKey)
Gets the properties that match a root key. |
Properties |
getProperties()
|
String |
getProperty(String key)
Gets the property by Key from the DEFAULT_CONFIG. |
String |
getProperty(String key,
String defaultValue)
Gets the property by Key. |
String |
getPropertySubstitution(String key,
String substitionKey,
String value)
Get the value of the key and the replace the substitution key with the value. |
URL |
getURLProperty(String key)
Gets the uRL property. |
boolean |
hasDurationProperty(String key)
|
boolean |
hasMatchingProperty(String rootKey)
|
boolean |
hasProperty(String key)
Checks for property. |
void |
invalidate()
Method to invalidate all the cached configuration. |
void |
reload()
reloads the instance, and reloads the config modules. |
static void |
reset()
|
void |
setConfigLocation(String location)
Deprecated. |
void |
setProperty(String key,
String value)
Method to override a property at runtime. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String SYSPROP_MODULE_LOADING
Default value: true
Method Detail |
---|
public String getProperty(String key, String defaultValue)
Configuration
getProperty
in interface Configuration
key
- the keydefaultValue
- the default value
public Long getLongProperty(String key, Long defaultValue)
Configuration
getLongProperty
in interface Configuration
key
- the keydefaultValue
- the default value
public Integer getIntegerProperty(String key, Integer defaultValue)
Configuration
getIntegerProperty
in interface Configuration
key
- the keydefaultValue
- the default value
public Boolean getBooleanProperty(String key, Boolean defaultValue)
Configuration
getBooleanProperty
in interface Configuration
key
- the keydefaultValue
- the default value
public Duration getDurationProperty(String key, Long defaultValue, TimeUnit defaultTimeUnit)
getDurationProperty
in interface Configuration
public boolean hasDurationProperty(String key)
hasDurationProperty
in interface Configuration
public URL getURLProperty(String key)
Configuration
getURLProperty
in interface Configuration
key
- the string
public String getProperty(String key)
Configuration
getProperty
in interface Configuration
key
- the key
public static void reset()
public void reload() throws TechnicalConnectorException
reload
in interface Configuration
TechnicalConnectorException
public boolean containsKey(String key)
Configuration
containsKey
in interface Configuration
key
- the key
public void setProperty(String key, String value)
Configuration
setProperty
in interface Configuration
key
- the keyvalue
- the valuepublic boolean hasProperty(String key)
Configuration
hasProperty
in interface Configuration
key
- the key
public boolean hasMatchingProperty(String rootKey)
hasMatchingProperty
in interface Configuration
public List<String> getMatchingProperties(String rootKey)
Configuration
getMatchingProperties
in interface Configuration
rootKey
- the root key
public String getPropertySubstitution(String key, String substitionKey, String value)
key
- - the key in the properties filesubstitionKey
- - the substitution key.value
- - value to replace the substitution key in the value.
@Deprecated public void setConfigLocation(String location) throws TechnicalConnectorException
Configuration
setConfigLocation
in interface Configuration
TechnicalConnectorException
public Configuration getCurrentConfig() throws TechnicalConnectorException
getCurrentConfig
in interface Configuration
TechnicalConnectorException
public static Configuration getInstance() throws TechnicalConnectorException
TechnicalConnectorException
public Properties getProperties()
public void invalidate()
Configuration
invalidate
in interface Configuration
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |