public class CachedConfigurationProvider
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.String,java.lang.Object> |
mConfigurationCache |
protected RuntimeAppConfigurationProvider |
mRuntimeAppConfigurationProvider |
Constructor and Description |
---|
CachedConfigurationProvider(android.content.Context context) |
CachedConfigurationProvider(android.content.Context context,
boolean useConfigurationCache) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
getBooleanValue(java.lang.String key,
boolean defaultValue) |
protected java.lang.Integer |
getColorValue(java.lang.String key)
Retrieves a cached configuration for a color resource.
|
protected int |
getIntValue(java.lang.String key,
int defaultValue) |
protected java.util.Set<java.lang.String> |
getStringSetValue(java.lang.String key,
java.util.Set<java.lang.String> defaultValue) |
protected java.lang.String |
getStringValue(java.lang.String key,
java.lang.String defaultValue) |
protected boolean |
readBooleanResourceValue(java.lang.String key,
boolean defaultValue) |
protected java.lang.Integer |
readColorResourceValue(java.lang.String key) |
protected int |
readIntegerResourceValue(java.lang.String key,
int defaultValue) |
protected java.lang.String[] |
readStringArrayResourceValue(java.lang.String key,
java.lang.String[] defaultValue)
Reads a string-array from XML.
|
protected java.lang.String |
readStringResourceValue(java.lang.String key,
java.lang.String defaultValue) |
protected final java.util.Map<java.lang.String,java.lang.Object> mConfigurationCache
protected final RuntimeAppConfigurationProvider mRuntimeAppConfigurationProvider
public CachedConfigurationProvider(android.content.Context context)
public CachedConfigurationProvider(android.content.Context context, boolean useConfigurationCache)
protected boolean getBooleanValue(java.lang.String key, boolean defaultValue)
key
- the key for the desired valuedefaultValue
- the default value to return if the key is not found in the configuration
cache or XMLprotected java.lang.String getStringValue(java.lang.String key, java.lang.String defaultValue)
key
- the key for the desired valuedefaultValue
- the default value to return if the key is not found in the configuration
cache or XMLprotected int getIntValue(java.lang.String key, int defaultValue)
key
- the key for the desired valuedefaultValue
- the default value to return if the key is not found in the configuration
cache or XMLprotected java.lang.Integer getColorValue(java.lang.String key)
key
- The key for the desired value.protected java.util.Set<java.lang.String> getStringSetValue(java.lang.String key, java.util.Set<java.lang.String> defaultValue)
key
- the key for the desired valuedefaultValue
- the default value to return if the key is not found in the configuration
cache or XMLprotected int readIntegerResourceValue(java.lang.String key, int defaultValue)
key
- the key for the desired valuedefaultValue
- the default value to return if the key is not found in XMLprotected java.lang.Integer readColorResourceValue(java.lang.String key)
key
- The key for the desired color resource value.protected boolean readBooleanResourceValue(java.lang.String key, boolean defaultValue)
key
- the key for the desired valuedefaultValue
- the default value to return if the key is not found in XMLprotected java.lang.String readStringResourceValue(java.lang.String key, java.lang.String defaultValue)
key
- the key for the desired valuedefaultValue
- the default value to return if the key is not found in XMLprotected java.lang.String[] readStringArrayResourceValue(java.lang.String key, java.lang.String[] defaultValue)
key
- the key for the desired valuedefaultValue
- the default value to return if the key is not found in XML