public class EmptyUserPreferencesStorage extends Object implements DefaultUserPreferencesStorage, ThreadSafe
DefaultUserPreferencesStorage
.ROLE
Constructor and Description |
---|
EmptyUserPreferencesStorage() |
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.
|
public EmptyUserPreferencesStorage()
public Map<String,String> getUnTypedUserPrefs(UserIdentity user, String storageContext, Map<String,String> contextVars) throws UserPreferencesException
UserPreferencesStorage
getUnTypedUserPrefs
in interface UserPreferencesStorage
user
- the user.storageContext
- the preferences storage context.contextVars
- The context variables including environment elementsUserPreferencesException
- if an error occurs getting the preferences.public void removeUserPreferences(UserIdentity user, String storageContext, Map<String,String> contextVars) throws UserPreferencesException
UserPreferencesStorage
removeUserPreferences
in interface UserPreferencesStorage
user
- the user.storageContext
- the preferences storage context.contextVars
- the context variables.UserPreferencesException
- if an error occurredpublic void setUserPreferences(UserIdentity user, String storageContext, Map<String,String> contextVars, Map<String,String> preferences) throws UserPreferencesException
UserPreferencesStorage
setUserPreferences
in interface UserPreferencesStorage
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 occurredpublic String getUserPreferenceAsString(UserIdentity user, String storageContext, Map<String,String> contextVars, String id) throws UserPreferencesException
UserPreferencesStorage
getUserPreferenceAsString
in interface UserPreferencesStorage
user
- the user.storageContext
- the preferences storage context.contextVars
- The context variables including environment elementsid
- the preference ID.UserPreferencesException
- if an error occurredpublic Long getUserPreferenceAsLong(UserIdentity user, String storageContext, Map<String,String> contextVars, String id) throws UserPreferencesException
UserPreferencesStorage
getUserPreferenceAsLong
in interface UserPreferencesStorage
user
- the user.storageContext
- the preferences storage context.contextVars
- The context variables including environment elementsid
- the preference ID.UserPreferencesException
- if an error occurredpublic Date getUserPreferenceAsDate(UserIdentity user, String storageContext, Map<String,String> contextVars, String id) throws UserPreferencesException
UserPreferencesStorage
getUserPreferenceAsDate
in interface UserPreferencesStorage
user
- the user.storageContext
- the preferences storage context.contextVars
- The context variables including environment elementsid
- the preference ID.UserPreferencesException
- if an error occurredpublic Boolean getUserPreferenceAsBoolean(UserIdentity user, String storageContext, Map<String,String> contextVars, String id) throws UserPreferencesException
UserPreferencesStorage
getUserPreferenceAsBoolean
in interface UserPreferencesStorage
user
- the user.storageContext
- the preferences storage context.contextVars
- The context variables including environment elementsid
- the preference ID.UserPreferencesException
- if an error occurredpublic Double getUserPreferenceAsDouble(UserIdentity user, String storageContext, Map<String,String> contextVars, String id) throws UserPreferencesException
UserPreferencesStorage
getUserPreferenceAsDouble
in interface UserPreferencesStorage
user
- the user.storageContext
- the preferences storage context.contextVars
- The context variables including environment elementsid
- the preference ID.UserPreferencesException
- if an error occurred