Class ConfigurationProvider
java.lang.Object
is.galia.config.ConfigurationProvider
- All Implemented Interfaces:
Configuration
Configuration whose accessors access an ordered list of other configurations,
which enables "falling back" from one configuration source to another.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears any key-value pairs from the instance (but not its persistent store, if available).voidclearProperty(String key) Removes a single key-value pair from the instance (but not its persistent store, if available).booleangetBoolean(String key) booleangetBoolean(String key, boolean defaultValue) doubledoublegetFile()floatfloatintintgetKeys()longlonggetProperty(String key) voidreload()Reloads the configuration from its persistent store.voidsetProperty(String key, Object value) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface is.galia.config.Configuration
clearProperty, getBoolean, getBoolean, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getLong, getLong, getLongBytes, getLongBytes, getLongBytes, getLongBytes, getProperty, getString, getString, setProperty, toMap
-
Method Details
-
clear
public void clear()Description copied from interface:ConfigurationClears any key-value pairs from the instance (but not its persistent store, if available).- Specified by:
clearin interfaceConfiguration
-
clearProperty
Description copied from interface:ConfigurationRemoves a single key-value pair from the instance (but not its persistent store, if available).- Specified by:
clearPropertyin interfaceConfiguration- Parameters:
key- Key to remove.
-
getBoolean
- Specified by:
getBooleanin interfaceConfiguration
-
getBoolean
- Specified by:
getBooleanin interfaceConfiguration- Returns:
- Boolean value corresponding to the given key, or the given default value if the target value is null or cannot be coerced to a boolean.
-
getDouble
- Specified by:
getDoublein interfaceConfiguration
-
getDouble
- Specified by:
getDoublein interfaceConfiguration- Returns:
- Double value corresponding to the given key, or the given default value if the target value is null or cannot be coerced to a double.
-
getFile
- Specified by:
getFilein interfaceConfiguration- Returns:
- The file backing the instance, if any.
-
getFloat
- Specified by:
getFloatin interfaceConfiguration
-
getFloat
- Specified by:
getFloatin interfaceConfiguration- Returns:
- Float value corresponding to the given key, or the given default value if the target value is null or cannot be coerced to a float.
-
getInt
- Specified by:
getIntin interfaceConfiguration
-
getInt
- Specified by:
getIntin interfaceConfiguration- Returns:
- Int value corresponding to the given key, or the given default value if the target value is null or cannot be coerced to an int.
-
getKeys
- Specified by:
getKeysin interfaceConfiguration- Returns:
- All keys contained in the configuration.
-
getLong
- Specified by:
getLongin interfaceConfiguration
-
getLong
- Specified by:
getLongin interfaceConfiguration- Returns:
- Long value corresponding to the given key, or the given default value if the target value is null or cannot be coerced to a long.
-
getProperty
- Specified by:
getPropertyin interfaceConfiguration- Returns:
- Object value corresponding to the given key, or
nullif not set.
-
getString
- Specified by:
getStringin interfaceConfiguration- Returns:
- String value corresponding to the given key, or
nullif not set.
-
getString
- Specified by:
getStringin interfaceConfiguration- Returns:
- String value corresponding to the given key, or the given default value if the target value is null.
-
getWrappedConfigurations
- Returns:
- Unmodifiable instance.
-
reload
public void reload()Description copied from interface:ConfigurationReloads the configuration from its persistent store.- Specified by:
reloadin interfaceConfiguration
-
setProperty
- Specified by:
setPropertyin interfaceConfiguration
-