Package org.gatein.pc.portlet.impl.spi
Class AbstractUserContext
- java.lang.Object
-
- org.gatein.pc.portlet.impl.spi.AbstractUserContext
-
- All Implemented Interfaces:
org.gatein.pc.api.spi.UserContext
public class AbstractUserContext extends Object implements org.gatein.pc.api.spi.UserContext
- Version:
- $Revision: 1.1 $
- Author:
- Julien Viet
-
-
Constructor Summary
Constructors Constructor Description AbstractUserContext()AbstractUserContext(String id)AbstractUserContext(javax.servlet.http.HttpServletRequest clientRequest)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectgetAttribute(String attrKey)StringgetId()Returns the user id or null if none was provided.Map<String,String>getInformations()Returns an immutable empty map.LocalegetLocale()Returns the client request locale orLocale.ENGLISHif no request was provided.List<Locale>getLocales()Returns the client request locales or an empty list if no request was provided.voidsetAttribute(String attrKey, Object attrValue)
-
-
-
Constructor Detail
-
AbstractUserContext
public AbstractUserContext(javax.servlet.http.HttpServletRequest clientRequest) throws IllegalArgumentException- Throws:
IllegalArgumentException
-
AbstractUserContext
public AbstractUserContext(String id) throws IllegalArgumentException
- Throws:
IllegalArgumentException
-
AbstractUserContext
public AbstractUserContext()
-
-
Method Detail
-
getId
public String getId()
Returns the user id or null if none was provided.- Specified by:
getIdin interfaceorg.gatein.pc.api.spi.UserContext
-
getInformations
public Map<String,String> getInformations()
Returns an immutable empty map.- Specified by:
getInformationsin interfaceorg.gatein.pc.api.spi.UserContext
-
getLocale
public Locale getLocale()
Returns the client request locale orLocale.ENGLISHif no request was provided.- Specified by:
getLocalein interfaceorg.gatein.pc.api.spi.UserContext
-
getLocales
public List<Locale> getLocales()
Returns the client request locales or an empty list if no request was provided.- Specified by:
getLocalesin interfaceorg.gatein.pc.api.spi.UserContext
-
setAttribute
public void setAttribute(String attrKey, Object attrValue)
- Specified by:
setAttributein interfaceorg.gatein.pc.api.spi.UserContext
-
-