public class AbstractUserContext extends Object implements UserContext
| Constructor and Description |
|---|
AbstractUserContext() |
AbstractUserContext(javax.servlet.http.HttpServletRequest clientRequest) |
AbstractUserContext(String id) |
| Modifier and Type | Method and Description |
|---|---|
Object |
getAttribute(String attrKey) |
String |
getId()
Returns the user id or null if none was provided.
|
Map<String,String> |
getInformations()
Returns an immutable empty map.
|
Locale |
getLocale()
Returns the client request locale or
Locale.ENGLISH if no request was provided. |
List<Locale> |
getLocales()
Returns the client request locales or an empty list if no request was provided.
|
void |
setAttribute(String attrKey,
Object attrValue) |
public AbstractUserContext(javax.servlet.http.HttpServletRequest clientRequest)
throws IllegalArgumentException
IllegalArgumentExceptionpublic AbstractUserContext(String id) throws IllegalArgumentException
IllegalArgumentExceptionpublic AbstractUserContext()
public String getId()
getId in interface UserContextpublic Map<String,String> getInformations()
getInformations in interface UserContextpublic Locale getLocale()
Locale.ENGLISH if no request was provided.getLocale in interface UserContextpublic List<Locale> getLocales()
getLocales in interface UserContextpublic void setAttribute(String attrKey, Object attrValue)
setAttribute in interface UserContextpublic Object getAttribute(String attrKey)
getAttribute in interface UserContextCopyright © 2003-2020 GateIn. All Rights Reserved.