public interface UserPreferencesStorage
Modifier and Type | Method and Description |
---|---|
Map<String,String> |
getUnTypedUserPrefs(UserIdentity user,
String storageContext,
Map<String,String> contextVars)
Get a user's preference values (as String) for a given context.
|
Boolean |
getUserPreferenceAsBoolean(UserIdentity user,
String storageContext,
Map<String,String> contextVars,
String id)
Get a single boolean user preference value for a given context.
|
Date |
getUserPreferenceAsDate(UserIdentity user,
String storageContext,
Map<String,String> contextVars,
String id)
Get a single date user preference value for a given context.
|
Double |
getUserPreferenceAsDouble(UserIdentity user,
String storageContext,
Map<String,String> contextVars,
String id)
Get a single double user preference value for a given context.
|
Long |
getUserPreferenceAsLong(UserIdentity user,
String storageContext,
Map<String,String> contextVars,
String id)
Get a single long user preference value for a given context.
|
String |
getUserPreferenceAsString(UserIdentity user,
String storageContext,
Map<String,String> contextVars,
String id)
Get a single string user preference value for a given context.
|
void |
removeUserPreferences(UserIdentity user,
String storageContext,
Map<String,String> contextVars)
Remove the stored user preferences for a login in a given context.
|
void |
setUserPreferences(UserIdentity user,
String storageContext,
Map<String,String> contextVars,
Map<String,String> preferences)
Set a user's preferences for a given context.
|
Map<String,String> getUnTypedUserPrefs(UserIdentity user, String storageContext, Map<String,String> contextVars) throws UserPreferencesException
user
- the user.storageContext
- the preferences storage context.contextVars
- The context variables including environment elementsUserPreferencesException
- if an error occurs getting the preferences.void removeUserPreferences(UserIdentity user, String storageContext, Map<String,String> contextVars) throws UserPreferencesException
user
- the user.storageContext
- the preferences storage context.contextVars
- the context variables.UserPreferencesException
- if an error occurredvoid setUserPreferences(UserIdentity user, String storageContext, Map<String,String> contextVars, Map<String,String> preferences) throws UserPreferencesException
user
- the user.storageContext
- the preferences storage context.contextVars
- The context variables including environment elementspreferences
- a Map of the preference values indexed by ID.UserPreferencesException
- if an error occurredString getUserPreferenceAsString(UserIdentity user, String storageContext, Map<String,String> contextVars, String id) throws UserPreferencesException
user
- the user.storageContext
- the preferences storage context.contextVars
- The context variables including environment elementsid
- the preference ID.UserPreferencesException
- if an error occurredLong getUserPreferenceAsLong(UserIdentity user, String storageContext, Map<String,String> contextVars, String id) throws UserPreferencesException
user
- the user.storageContext
- the preferences storage context.contextVars
- The context variables including environment elementsid
- the preference ID.UserPreferencesException
- if an error occurredDate getUserPreferenceAsDate(UserIdentity user, String storageContext, Map<String,String> contextVars, String id) throws UserPreferencesException
user
- the user.storageContext
- the preferences storage context.contextVars
- The context variables including environment elementsid
- the preference ID.UserPreferencesException
- if an error occurredBoolean getUserPreferenceAsBoolean(UserIdentity user, String storageContext, Map<String,String> contextVars, String id) throws UserPreferencesException
user
- the user.storageContext
- the preferences storage context.contextVars
- The context variables including environment elementsid
- the preference ID.UserPreferencesException
- if an error occurredDouble getUserPreferenceAsDouble(UserIdentity user, String storageContext, Map<String,String> contextVars, String id) throws UserPreferencesException
user
- the user.storageContext
- the preferences storage context.contextVars
- The context variables including environment elementsid
- the preference ID.UserPreferencesException
- if an error occurred