|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.context.AbstractContext info.magnolia.context.UserContextImpl
public class UserContextImpl
User aware context implementation able to release and discard all kept info upon user logout. Also changes the locale from default one to the one prefered by the logged in user.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface java.util.Map |
---|
java.util.Map.Entry<K,V> |
Field Summary |
---|
Fields inherited from class info.magnolia.context.AbstractContext |
---|
locale |
Fields inherited from interface info.magnolia.context.Context |
---|
APPLICATION_SCOPE, ATTRIBUTE_COMMENT, ATTRIBUTE_EXCEPTION, ATTRIBUTE_MESSAGE, ATTRIBUTE_PATH, ATTRIBUTE_RECURSIVE, ATTRIBUTE_REPOSITORY, ATTRIBUTE_UUID, ATTRIBUTE_VERSION, ATTRIBUTE_VERSION_MAP, LOCAL_SCOPE, SESSION_SCOPE |
Constructor Summary | |
---|---|
UserContextImpl()
|
Method Summary | |
---|---|
java.util.Locale |
getLocale()
If not yet set try to get the locale of the user. |
User |
getUser()
Create the subject on demand. |
void |
login(User user)
|
void |
logout()
|
protected void |
setLocaleFor(User user)
|
Methods inherited from class info.magnolia.context.AbstractContext |
---|
clear, containsKey, containsValue, entrySet, get, getAccessManager, getAccessManager, getAttribute, getAttribute, getAttributes, getAttributes, getAttributeStrategy, getHierarchyManager, getHierarchyManager, getMessages, getMessages, getQueryManager, getQueryManager, getRepositoryStrategy, isEmpty, keySet, put, putAll, release, remove, removeAttribute, setAttribute, setAttributeStrategy, setLocale, setRepositoryStrategy, size, values |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface info.magnolia.context.Context |
---|
getAccessManager, getAccessManager, getAttribute, getAttribute, getAttributes, getAttributes, getHierarchyManager, getHierarchyManager, getMessages, getMessages, getQueryManager, getQueryManager, release, removeAttribute, setAttribute, setLocale |
Methods inherited from interface java.util.Map |
---|
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
Constructor Detail |
---|
public UserContextImpl()
Method Detail |
---|
public java.util.Locale getLocale()
AbstractContext
getLocale
in class AbstractContext
Context.getLocale()
public User getUser()
getUser
in class AbstractContext
AbstractContext.getUser()
public void login(User user)
login
in interface UserContext
public void logout()
logout
in interface UserContext
protected void setLocaleFor(User user)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |