fr.paris.lutece.portal.service.prefs
Class BaseUserPreferencesService

java.lang.Object
  extended by fr.paris.lutece.portal.service.prefs.BaseUserPreferencesService
All Implemented Interfaces:
IUserPreferencesService

public class BaseUserPreferencesService
extends Object
implements IUserPreferencesService

Abstract User Preferences Service

Since:
4.0

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> 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

get

public String get(String strUserId,
                  String strKey,
                  String strDefault)
Get a preference for a given user

Specified by:
get in interface IUserPreferencesService
Parameters:
strUserId - The user's ID
strKey - The preference's key
strDefault - The default value
Returns:
The preference's value

getInt

public int getInt(String strUserId,
                  String strKey,
                  int nDefault)
Get an integer preference for a given user

Specified by:
getInt in interface IUserPreferencesService
Parameters:
strUserId - The user's ID
strKey - The preference's key
nDefault - The default value
Returns:
The preference's value

getBoolean

public boolean getBoolean(String strUserId,
                          String strKey,
                          boolean bDefault)
Get a boolean preference for a given user

Specified by:
getBoolean in interface IUserPreferencesService
Parameters:
strUserId - The user's ID
strKey - The preference's key
bDefault - The default value
Returns:
The preference's value

put

public void put(String strUserId,
                String strKey,
                String strValue)
Put a preference for a given user

Specified by:
put in interface IUserPreferencesService
Parameters:
strUserId - The user's ID
strKey - The preference's key
strValue - The value

putInt

public void putInt(String strUserId,
                   String strKey,
                   int nValue)
Put an integer preference for a given user

Specified by:
putInt in interface IUserPreferencesService
Parameters:
strUserId - The user's ID
strKey - The preference's key
nValue - The value

putBoolean

public void putBoolean(String strUserId,
                       String strKey,
                       boolean bValue)
Put a boolean preference for a given user

Specified by:
putBoolean in interface IUserPreferencesService
Parameters:
strUserId - The user's ID
strKey - The preference's key
bValue - The value

keys

public List<String> keys(String strUserId)
Get all preference keys for a given user

Specified by:
keys in interface IUserPreferencesService
Parameters:
strUserId - The user's ID
Returns:
The keys

clear

public void clear(String strUserId)
Clear all preferences for a given user

Specified by:
clear in interface IUserPreferencesService
Parameters:
strUserId - The user's ID


Copyright © 2013 Mairie de Paris. All Rights Reserved.