Interface IUserPreferencesService
- All Known Subinterfaces:
IPortalUserPreferencesService
- All Known Implementing Classes:
BaseUserPreferencesServiceImpl,PortalUserPreferenceServiceImpl
public interface IUserPreferencesService
User Preferences Interface
-
Method Summary
Modifier and TypeMethodDescriptionvoidClear all preferences for a given uservoidClear a preference for a given uservoidclearKeyPrefix(String strUserId, String strPrefix) Clear all preferences with a given prefix for a given userbooleanCheks if a preference key existsbooleanexistsValueForKey(String strKey, String strValue) Checks if a value is already used for a preference given keyGet a preference for a given userbooleangetBoolean(String strUserId, String strKey, boolean bDefault) Get a boolean preference for a given userintGet an integer preference for a given userGet the list of users associated with a key and a valueGet all preference keys for a given uservoidPut a preference for a given uservoidputBoolean(String strUserId, String strKey, boolean bValue) Put a boolean preference for a given uservoidPut an integer preference for a given user
-
Method Details
-
get
Get a preference for a given user- Parameters:
strUserId- The user's IDstrKey- The preference's keystrDefault- The default value- Returns:
- The preference's value
-
getInt
Get an integer preference for a given user- Parameters:
strUserId- The user's IDstrKey- The preference's keynDefault- The default value- Returns:
- The preference's value
-
getBoolean
Get a boolean preference for a given user- Parameters:
strUserId- The user's IDstrKey- The preference's keybDefault- The default value- Returns:
- The preference's value
-
getUsers
Get the list of users associated with a key and a value- Parameters:
strKey- The preference's keystrValue- The preference's value- Returns:
- The list of user id associated with a key and a value, or an empty list if no user id is associated with the given parameters.
-
put
Put a preference for a given user- Parameters:
strUserId- The user's IDstrKey- The preference's keystrValue- The value
-
putInt
Put an integer preference for a given user- Parameters:
strUserId- The user's IDstrKey- The preference's keynValue- The value
-
putBoolean
Put a boolean preference for a given user- Parameters:
strUserId- The user's IDstrKey- The preference's keybValue- The value
-
keys
Get all preference keys for a given user- Parameters:
strUserId- The user's ID- Returns:
- The keys
-
clear
Clear all preferences for a given user- Parameters:
strUserId- The user's ID
-
clearKey
Clear a preference for a given user- Parameters:
strUserId- The user's IDstrKey- The preference's key
-
clearKeyPrefix
Clear all preferences with a given prefix for a given user- Parameters:
strUserId- The user's IDstrPrefix- The keys prefix
-
existsKey
Cheks if a preference key exists- Parameters:
strUserId- The User IDstrKey- The Pref key- Returns:
- 1 if exists otherwise false
-
existsValueForKey
Checks if a value is already used for a preference given key- Parameters:
strKey- The Pref keystrValue- The Pref Value- Returns:
- 1 if exists otherwise false
-