public class UserPreferencesDao
extends java.lang.Object
| Constructor and Description |
|---|
UserPreferencesDao(OsmConnection osm) |
| Modifier and Type | Method and Description |
|---|---|
void |
delete(java.lang.String key)
Deletes the given preference key from the user preferences
|
java.lang.String |
get(java.lang.String key) |
java.util.Map<java.lang.String,java.lang.String> |
getAll() |
void |
set(java.lang.String key,
java.lang.String value)
Sets the given preference key to the given preference value.
|
void |
setAll(java.util.Map<java.lang.String,java.lang.String> preferences)
Sets all the given preference keys to the given preference values.
|
public UserPreferencesDao(OsmConnection osm)
public java.util.Map<java.lang.String,java.lang.String> getAll()
OsmAuthorizationException - if the application is not authenticated to read the
user's preferences. (Permission.READ_PREFERENCES_AND_USER_DETAILS)public java.lang.String get(java.lang.String key)
key - the preference to queryOsmAuthorizationException - if the application is not authenticated to read the
user's preferences. (Permission.READ_PREFERENCES_AND_USER_DETAILS)public void setAll(java.util.Map<java.lang.String,java.lang.String> preferences)
preferences - preferences to set. Each key and each value must be less than 256
characters.OsmAuthorizationException - if this application is not authorized to change the
user's preferences. (Permission.CHANGE_PREFERENCES)public void set(java.lang.String key,
java.lang.String value)
key - preference to set. Must be less than 256 characters.value - preference to set. Must be less than 256 characters.OsmAuthorizationException - if this application is not authorized to change the
user's preferences. (Permission.CHANGE_PREFERENCES)public void delete(java.lang.String key)
key - preference to delete. Must be less than 256 characters.OsmAuthorizationException - if this application is not authorized to change the
user's preferences. (Permission.CHANGE_PREFERENCES)