Package org.gatein.pc.api.spi
Interface UserContext
-
public interface UserContextThe user context valid during the scope of a single request.- Version:
- $Revision: 5448 $
- Author:
- Julien Viet
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ObjectgetAttribute(String attrKey)Returns an attribute related to the user identity.StringgetId()Retrieves the user id or null if it is not known.Map<String,String>getInformations()The user profile information keyed by P3PConstantsLocalegetLocale()Return the user locale.List<Locale>getLocales()Retrieves the locales that the user is willing to receive information in.voidsetAttribute(String attrKey, Object attrValue)Set an attribute related to the user identity.
-
-
-
Method Detail
-
getId
String getId()
Retrieves the user id or null if it is not known.- Returns:
- the user id
-
getInformations
Map<String,String> getInformations()
The user profile information keyed by P3PConstants- Returns:
- a map containing user profile informaton
- See Also:
P3PConstants
-
getLocale
Locale getLocale()
Return the user locale.- Returns:
- the user locale.
-
getLocales
List<Locale> getLocales()
Retrieves the locales that the user is willing to receive information in.- Returns:
- the locales ordered according to user preference (preferred first).
-
setAttribute
void setAttribute(String attrKey, Object attrValue)
Set an attribute related to the user identity.- Parameters:
attrKey- the attribute keyattrValue- the attribute value
-
-