fr.paris.lutece.portal.service.prefs
Interface IUserPreferencesService

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

public interface IUserPreferencesService

User Preferences Interface


Method Summary
 void clear(String strUserId)
          Clear all preferences for a given user
 String get(String strUserId, String strKey, String strDefault)
          Get a preference for a given user
 boolean getBoolean(String strUserId, String strKey, boolean bDefault)
          Get a boolean preference for a given user
 int getInt(String strUserId, String strKey, int nDefault)
          Get an integer preference for a given user
 List<String> getUsers(String strKey, String strValue)
          Get the list of users associated with a key and a value
 List<String> keys(String strUserId)
          Get all preference keys for a given user
 void put(String strUserId, String strKey, String strValue)
          Put a preference for a given user
 void putBoolean(String strUserId, String strKey, boolean bValue)
          Put a boolean preference for a given user
 void putInt(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 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


Copyright © 2014 Mairie de Paris. All Rights Reserved.