Interface IUserPreferencesService

All Known Subinterfaces:
IPortalUserPreferencesService
All Known Implementing Classes:
BaseUserPreferencesServiceImpl, PortalUserPreferenceServiceImpl

public interface IUserPreferencesService
User Preferences Interface
  • Method Details

    • get

      String get(String strUserId, String strKey, String strDefault)
      Get a preference for a given user
      Parameters:
      strUserId - The user's ID
      strKey - The preference's key
      strDefault - 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 ID
      strKey - The preference's key
      nDefault - 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 ID
      strKey - The preference's key
      bDefault - 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 key
      strValue - 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 ID
      strKey - The preference's key
      strValue - The value
    • putInt

      void putInt(String strUserId, String strKey, int nValue)
      Put an integer preference for a given user
      Parameters:
      strUserId - The user's ID
      strKey - The preference's key
      nValue - The value
    • putBoolean

      void putBoolean(String strUserId, String strKey, boolean bValue)
      Put a boolean preference for a given user
      Parameters:
      strUserId - The user's ID
      strKey - The preference's key
      bValue - 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 ID
      strKey - 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 ID
      strPrefix - The keys prefix
    • existsKey

      boolean existsKey(String strUserId, String strKey)
      Cheks if a preference key exists
      Parameters:
      strUserId - The User ID
      strKey - The Pref key
      Returns:
      1 if exists otherwise false
    • existsValueForKey

      boolean existsValueForKey(String strKey, String strValue)
      Checks if a value is already used for a preference given key
      Parameters:
      strKey - The Pref key
      strValue - The Pref Value
      Returns:
      1 if exists otherwise false