Interface IUserPreferencesService
-
- All Known Subinterfaces:
IPortalUserPreferencesService
- All Known Implementing Classes:
BaseUserPreferencesServiceImpl,PortalUserPreferenceServiceImpl
public interface IUserPreferencesServiceUser Preferences Interface
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclear(String strUserId)Clear all preferences for a given uservoidclearKey(String strUserId, String strKey)Clear a preference for a given uservoidclearKeyPrefix(String strUserId, String strPrefix)Clear all preferences with a given prefix for a given userbooleanexistsKey(String strUserId, String strKey)Cheks if a preference key existsbooleanexistsValueForKey(String strKey, String strValue)Checks if a value is already used for a preference given keyStringget(String strUserId, String strKey, String strDefault)Get a preference for a given userbooleangetBoolean(String strUserId, String strKey, boolean bDefault)Get a boolean preference for a given userintgetInt(String strUserId, String strKey, int nDefault)Get an integer preference for a given userList<String>getUsers(String strKey, String strValue)Get the list of users associated with a key and a valueList<String>keys(String strUserId)Get all preference keys for a given uservoidput(String strUserId, String strKey, String strValue)Put a preference for a given uservoidputBoolean(String strUserId, String strKey, boolean bValue)Put a boolean preference for a given uservoidputInt(String strUserId, String strKey, int nValue)Put an integer preference for a given user
-
-
-
Method Detail
-
get
String get(String strUserId, String strKey, String strDefault)
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
int getInt(String strUserId, String strKey, int nDefault)
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
boolean getBoolean(String strUserId, String strKey, boolean bDefault)
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
List<String> getUsers(String strKey, String strValue)
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
void put(String strUserId, String strKey, String strValue)
Put a preference for a given user- Parameters:
strUserId- The user's IDstrKey- The preference's keystrValue- The value
-
putInt
void putInt(String strUserId, String strKey, int nValue)
Put an integer preference for a given user- Parameters:
strUserId- The user's IDstrKey- The preference's keynValue- The value
-
putBoolean
void putBoolean(String strUserId, String strKey, boolean bValue)
Put a boolean preference for a given user- Parameters:
strUserId- The user's IDstrKey- The preference's keybValue- The value
-
keys
List<String> keys(String strUserId)
Get all preference keys for a given user- Parameters:
strUserId- The user's ID- Returns:
- The keys
-
clear
void clear(String strUserId)
Clear all preferences for a given user- Parameters:
strUserId- The user's ID
-
clearKey
void clearKey(String strUserId, String strKey)
Clear a preference for a given user- Parameters:
strUserId- The user's IDstrKey- The preference's key
-
clearKeyPrefix
void clearKeyPrefix(String strUserId, String strPrefix)
Clear all preferences with a given prefix for a given user- Parameters:
strUserId- The user's IDstrPrefix- The keys prefix
-
existsKey
boolean existsKey(String strUserId, String strKey)
Cheks if a preference key exists- Parameters:
strUserId- The User IDstrKey- The Pref key- Returns:
- 1 if exists otherwise false
-
-