|
WIMM Labs |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.wimm.framework.provider.SyncPreference
public final class SyncPreference
Interface for accessing and modifying web preference data.
Refer to WIMM Developer's Guide on Sync Preference settings for more information about developing Sync Preference supported MicroApp.
SyncService
Constructor Summary | |
---|---|
SyncPreference()
|
Method Summary | |
---|---|
static boolean |
getBoolean(Context context,
String name,
boolean defaultValue)
Returns a boolean value of the preference stored for the given name, or the default value provided if the preference could not be found or parsed. |
static double |
getDouble(Context context,
String name,
double defaultValue)
Returns a double value of the preference stored for the given name, or the default value provided if the preference could not be found or parsed. |
static int |
getInt(Context context,
String name,
int defaultValue)
Returns an integer value of the preference stored for the given name, or the default value provided if the preference could not be found or parsed. |
static JSONArray |
getJSONArray(Context context,
String name,
JSONArray defaultValue)
Returns the JSONArray value of the preference stored for the given name, or
the default value provided if the preference could not be found or parsed. |
static JSONObject |
getJSONObject(Context context,
String name,
JSONObject defaultValue)
Returns the JSONObject value of the preference stored for the given name, or
the default value provided if the preference could not be found or parsed. |
static String |
getString(Context context,
String name,
String defaultValue)
Returns a string value of the preference stored for the given name, or the default value provided if the preference could not be found or parsed. |
static boolean |
putBoolean(Context context,
String name,
boolean content)
Stores a boolean value that will be persisted and synced with the service. |
static boolean |
putDouble(Context context,
String name,
double content)
Stores a double precision float value that will be persisted and synced with the service. |
static boolean |
putInt(Context context,
String name,
int content)
Stores an integer value that will be persisted and synced with the service. |
static boolean |
putJSONArray(Context context,
String name,
JSONArray content)
Stores a JSONArray that will be persisted and synced with the service. |
static boolean |
putJSONObject(Context context,
String name,
JSONObject content)
Stores a JSONObject value that will be persisted and synced with the service. |
static boolean |
putString(Context context,
String name,
String content)
Stores a string value that will be persisted and synced with the service. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SyncPreference()
Method Detail |
---|
public static final JSONObject getJSONObject(Context context, String name, JSONObject defaultValue)
JSONObject
value of the preference stored for the given name, or
the default value provided if the preference could not be found or parsed.
context
- The Context
.name
- The name (key) for identifying the preference.defaultValue
- The default value to return if the preference is not found.public static final JSONArray getJSONArray(Context context, String name, JSONArray defaultValue)
JSONArray
value of the preference stored for the given name, or
the default value provided if the preference could not be found or parsed.
context
- The Context
.name
- The name (key) for identifying the preference.defaultValue
- The default value to return if the preference is not found.public static final boolean getBoolean(Context context, String name, boolean defaultValue)
context
- The Context
.name
- The name (key) for identifying the preference.defaultValue
- The default value to return if the preference is not found.public static final String getString(Context context, String name, String defaultValue)
context
- The Context
.name
- The name (key) for identifying the preference.defaultValue
- The default value to return if the preference is not found.public static final double getDouble(Context context, String name, double defaultValue)
context
- The Context
.name
- The name (key) for identifying the preference.defaultValue
- The default value to return if the preference is not found.public static final int getInt(Context context, String name, int defaultValue)
context
- The Context
.name
- The name (key) for identifying the preference.defaultValue
- The default value to return if the preference is not found.public static final boolean putJSONArray(Context context, String name, JSONArray content)
JSONArray
that will be persisted and synced with the service.
Used for persisting arrays of data. The elements should be simple types.
context
- The Context
.name
- The name (key) for identifying the preference.content
- The value to store.public static final boolean putJSONObject(Context context, String name, JSONObject content)
JSONObject
value that will be persisted and synced with the service.
Used for persisting complex types.
context
- The Context
.name
- The name (key) for identifying the preference.content
- The value to store.public static final boolean putBoolean(Context context, String name, boolean content)
context
- The Context
.name
- The name (key) for identifying the preference.content
- The value to store.public static final boolean putDouble(Context context, String name, double content)
context
- The Context
.name
- The name (key) for identifying the preference.content
- The value to store.public static final boolean putString(Context context, String name, String content)
context
- The Context
.name
- The name (key) for identifying the preference.content
- The value to store.public static final boolean putInt(Context context, String name, int content)
context
- The Context
.name
- The name (key) for identifying the preference.content
- The value to store.
|
WIMM Labs |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |