public class UserSessionProviderDefaultImpl extends UserSessionAccess.AbstractUserSessionProvider implements MutableUserSession
UserSessionProvider. It simply delegates to according classes provided
by the springframework.| Constructor and Description |
|---|
UserSessionProviderDefaultImpl()
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
UserSession |
getCurrentSession()
Gets the current
UserSession according to the current environment and client or server context. |
Locale |
getLocale() |
String |
getLogin() |
org.springframework.security.core.Authentication |
getUser() |
boolean |
isFallback()
This method determines if this
UserSession was received or is
currently called outside the scope of a current user session. |
void |
setLocale(Locale locale) |
void |
setUser(Principal user)
Sets the
current user. |
doInitializedcreateLogger, doInitialize, getLoggergetInitializationState, initializepublic UserSessionProviderDefaultImpl()
public UserSession getCurrentSession()
UserSessionProviderUserSession according to the current environment and client or server context.getCurrentSession in interface UserSessionProviderUserSession.public org.springframework.security.core.Authentication getUser()
getUser in interface UserSessionnull as fallback.public void setUser(Principal user)
MutableUserSessioncurrent user. UserSession will give you abstracted access on it
throughout the application. Setting the user after successful login is to be done in a single place of the
application and should directly happen via the underlying technology.setUser in interface MutableUserSessionuser - is the new value of UserSession.getUser()public String getLogin()
getLogin in interface UserSessionnull as fallback.public Locale getLocale()
getLocale in interface UserSessionLocale of the current user, or the system default locale as
fallback.public void setLocale(Locale locale)
setLocale in interface MutableUserSessionlocale - is the new value of UserSession.getLocale().public boolean isFallback()
UserSessionUserSession was received or is
currently called outside the scope of a current user session. On the server side a UserSession typically
exists in the context of a servlet container or JEE application server. If the context is not available this method
will return true. This may be because the user is currently not logged in (anonymous access) or the context
is not available for technical reasons (e.g. misconfiguration).isFallback in interface UserSessiontrue if received or called outside the scope of a current
user session, false otherwise.Copyright © 2001–2016 mmm-Team. All rights reserved.