U
- as User
public class ServletUserSessionAdapter<S extends javax.servlet.http.HttpSession,U extends User> extends Object implements UserSessionAdapter<javax.servlet.http.HttpServletRequest,S,U>
UserSessionAdapter
Modifier and Type | Field and Description |
---|---|
static String |
SESSION_ATTRIB_USER
User object in Session |
Constructor and Description |
---|
ServletUserSessionAdapter() |
Modifier and Type | Method and Description |
---|---|
Object |
getObjectFromSession(S session,
String sessionPropertyName)
Get an Object from the Session
|
String |
getOrigin(S session,
javax.servlet.http.HttpServletRequest request)
Source the request/session
|
String |
getSessionId(S session)
Get the web session id for the Session object
|
U |
getUser(S session)
Get User for Session
|
String |
getUserId(S session)
Get the userid for the given Session
|
void |
setObjectToSession(S session,
String sessionPropertyName,
Object o)
Set Object into the Session
|
public static final String SESSION_ATTRIB_USER
User
object in Sessionpublic final String getSessionId(S session)
UserSessionAdapter
getSessionId
in interface UserSessionAdapter<javax.servlet.http.HttpServletRequest,S extends javax.servlet.http.HttpSession,U extends User>
public final String getUserId(S session)
UserSessionAdapter
getUserId
in interface UserSessionAdapter<javax.servlet.http.HttpServletRequest,S extends javax.servlet.http.HttpSession,U extends User>
public String getOrigin(S session, javax.servlet.http.HttpServletRequest request)
UserSessionAdapter
getOrigin
in interface UserSessionAdapter<javax.servlet.http.HttpServletRequest,S extends javax.servlet.http.HttpSession,U extends User>
public void setObjectToSession(S session, String sessionPropertyName, Object o)
UserSessionAdapter
setObjectToSession
in interface UserSessionAdapter<javax.servlet.http.HttpServletRequest,S extends javax.servlet.http.HttpSession,U extends User>
public Object getObjectFromSession(S session, String sessionPropertyName)
UserSessionAdapter
getObjectFromSession
in interface UserSessionAdapter<javax.servlet.http.HttpServletRequest,S extends javax.servlet.http.HttpSession,U extends User>
public U getUser(S session)
UserSessionAdapter
getUser
in interface UserSessionAdapter<javax.servlet.http.HttpServletRequest,S extends javax.servlet.http.HttpSession,U extends User>
Copyright © 2018. All rights reserved.