|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.silverpeas.web.mock.SessionManagerMock
@Named(value="sessionManagement") public class SessionManagerMock
A mock of a session manager for testing purpose.
| Constructor Summary | |
|---|---|
SessionManagerMock()
|
|
| Method Summary | |
|---|---|
void |
closeSession(String sessionKey)
Closes the specified user session. |
Collection<SessionInfo> |
getConnectedUsersList()
Gets the session information about all the connected users in the Silverpeas platform, whatever their domain and the applied domain isolation policy. |
Collection<SessionInfo> |
getDistinctConnectedUsersList(UserDetail user)
Gets the session information about all the connected users that are accessible to the specified user. |
int |
getNbConnectedUsersList(UserDetail user)
Gets the count of users that are connected to Silverpeas. |
long |
getNextSessionTimeOut(String sessionKey)
Gets the next timeout of the specified user session. |
SessionInfo |
getSessionInfo(String sessionKey)
Gets information about the specified user session. |
boolean |
isNoSession()
|
boolean |
isUserConnected(UserDetail user)
Is the specified user currently connected to Silverpeas? |
SessionInfo |
openAnonymousSession(javax.servlet.http.HttpServletRequest request)
Opens a new anonymous session with the specified HTTP request at the origin of the session ask. |
SessionInfo |
openSession(UserDetail user)
Opens a new session for the specified user. |
SessionInfo |
openSession(UserDetail user,
javax.servlet.http.HttpServletRequest request)
Opens a new session for the specified user with the specified HTTP request at the origin of the session ask. |
void |
setNoSession(boolean noSession)
|
SessionInfo |
validateSession(SessionValidationContext context)
Validates the session identified uniquely by the specified key. |
SessionInfo |
validateSession(String sessionKey)
Calls SessionManagement.validateSession(SessionValidationContext) method by specifying to it a
context that contains only the specified session key. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SessionManagerMock()
| Method Detail |
|---|
public Collection<SessionInfo> getConnectedUsersList()
SessionManagement
getConnectedUsersList in interface SessionManagementpublic Collection<SessionInfo> getDistinctConnectedUsersList(UserDetail user)
SessionManagement
getDistinctConnectedUsersList in interface SessionManagementuser - a user from whom all the distinct connected users are visible.
public int getNbConnectedUsersList(UserDetail user)
SessionManagement
getNbConnectedUsersList in interface SessionManagementuser - the user from whom all the users to count are visible.
public SessionInfo getSessionInfo(String sessionKey)
SessionManagement
getSessionInfo in interface SessionManagementsessionKey - the key of the user session.
public SessionInfo openSession(UserDetail user)
SessionManagement
openSession in interface SessionManagementuser - the user for which a session with Silverpeas has to be opened.
public SessionInfo openSession(UserDetail user,
javax.servlet.http.HttpServletRequest request)
SessionManagement
openSession in interface SessionManagementuser - the user for which an HTTP session with Silverpeas has to be opened.request - the HTTP request at the origin of the session opening ask.
public SessionInfo openAnonymousSession(javax.servlet.http.HttpServletRequest request)
SessionManagement
openAnonymousSession in interface SessionManagementrequest - the HTTP request at the origin of the session opening ask.
public void closeSession(String sessionKey)
SessionManagement
closeSession in interface SessionManagementsessionKey - the key of the session to close.public boolean isUserConnected(UserDetail user)
SessionManagement
isUserConnected in interface SessionManagementuser - the user for which the connection is checked.
public boolean isNoSession()
public void setNoSession(boolean noSession)
noSession - the noSession to setpublic SessionInfo validateSession(String sessionKey)
SessionManagementSessionManagement.validateSession(SessionValidationContext) method by specifying to it a
context that contains only the specified session key.
validateSession in interface SessionManagementsessionKey - the key of the user session.
SessionManagement.validateSession(SessionValidationContext) execution.public SessionInfo validateSession(SessionValidationContext context)
SessionManagement
validateSession in interface SessionManagementcontext - the context of the validation that contains at least the session key
public long getNextSessionTimeOut(String sessionKey)
SessionManagement
getNextSessionTimeOut in interface SessionManagementsessionKey - the keu of the user session.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||