|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.vodafone360.people.SettingsManager
public final class SettingsManager
Handles default application settings. Stores default values for: - Server URLS (Direct API and RPG) - Upgrade URL - Feature flags for enabling/disabling functionality These values are overwritten by during the build configuration files to allow different lifecycles to enable specific features, and to target specific back end environments. Property defaults are set in the Settings.java file.
Field Summary | |
---|---|
private static java.lang.String |
COMMA
Comma string. |
private static java.util.Hashtable<java.lang.String,java.lang.Object> |
sSettings
Static settings HashTable. |
Constructor Summary | |
---|---|
private |
SettingsManager()
Private constructor to prevent instantiation. |
Method Summary | |
---|---|
static boolean |
getBooleanProperty(java.lang.String key)
Get boolean property value for key. |
static java.lang.String |
getProperty(java.lang.String key)
Get property value for a specific key. |
private static java.lang.String[] |
getStringArray(java.lang.String value)
Get a String array out of the given comma separated values. |
static java.lang.String[] |
getStringArrayProperty(java.lang.String key)
Gets an array of strings for a specific key. |
static void |
loadProperties(Context context)
Load properties from build configuration files. |
static void |
setProperty(java.lang.String key,
java.lang.String value)
Sets a property made of a key and its associated value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final java.lang.String COMMA
private static java.util.Hashtable<java.lang.String,java.lang.Object> sSettings
Constructor Detail |
---|
private SettingsManager()
Method Detail |
---|
public static void loadProperties(Context context)
context
- Android Context.
java.lang.NullPointerException
- Configuration file not found.
java.lang.NullPointerException
- context is NULL.public static java.lang.String getProperty(java.lang.String key)
key
- Key for required property.
public static boolean getBooleanProperty(java.lang.String key)
key
- Key for required property.
public static java.lang.String[] getStringArrayProperty(java.lang.String key)
key
- Key for required property.
private static java.lang.String[] getStringArray(java.lang.String value)
value
- Comma separated values
public static void setProperty(java.lang.String key, java.lang.String value)
key
- the keyvalue
- the value associated with the key
java.lang.NullPointerException
- loadProperties() has not yet been called.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
JavaDoc