org.eclipse.emf.emfstore.server.auth
Class ESSessions

java.lang.Object
  extended by org.eclipse.emf.emfstore.server.auth.ESSessions

public class ESSessions
extends Object

Utility class for handling session management.

Since:
1.5
Author:
emueller

Constructor Summary
ESSessions()
          Default constructor.
 
Method Summary
 void add(ESAuthenticationInformation authenticationInformation)
          Add the information of the given ESAuthenticationInformation to the session map.
 ESUser getRawUser(ESSessionId sessionId)
          Returns the user associated with the given session ID.
 void isValid(ESSessionId sessionId)
          Checks whether the given session ID belongs to a known session.
 void remove(ESSessionId sessionId)
          Removes the session with the given ID from the sessions map.
 ESSessionId resolveSessionById(String sessionId)
          Resolves a given Session ID string to a valid SessionId object.
 ESOrgUnitId resolveToOrgUnitId(ESSessionId sessionId)
          Returns the user associated with the given session ID and checks if the user has an active session.
 ESUser resolveUser(ESSessionId sessionId)
          Returns the user associated with the given session ID and checks if the user has an active session.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ESSessions

public ESSessions()
Default constructor.

Method Detail

add

public void add(ESAuthenticationInformation authenticationInformation)
Add the information of the given ESAuthenticationInformation to the session map.

Parameters:
authenticationInformation - the AuthenticationInformation containing the valid session ID

isValid

public void isValid(ESSessionId sessionId)
             throws SessionTimedOutException
Checks whether the given session ID belongs to a known session.

Parameters:
sessionId - the ID of the session to be checked
Throws:
SessionTimedOutException - in case the session is unknown

resolveUser

public ESUser resolveUser(ESSessionId sessionId)
                   throws AccessControlException
Returns the user associated with the given session ID and checks if the user has an active session.

Parameters:
sessionId - the session ID of the user who should be retrieved
Returns:
the user associated with the given session ID.
Throws:
AccessControlException - in case the session active session check fails

resolveToOrgUnitId

public ESOrgUnitId resolveToOrgUnitId(ESSessionId sessionId)
                               throws AccessControlException
Returns the user associated with the given session ID and checks if the user has an active session.

Parameters:
sessionId - the session ID of the user who should be retrieved
Returns:
the user associated with the given session ID.
Throws:
AccessControlException - in case the session active session check fails

getRawUser

public ESUser getRawUser(ESSessionId sessionId)
Returns the user associated with the given session ID.

Parameters:
sessionId - the session ID of the user who should be retrieved
Returns:
the user associated with the given session ID.

remove

public void remove(ESSessionId sessionId)
Removes the session with the given ID from the sessions map.

Parameters:
sessionId - the ID of the session to be removed

resolveSessionById

public ESSessionId resolveSessionById(String sessionId)
Resolves a given Session ID string to a valid SessionId object.

Parameters:
sessionId - the session ID to be resolved
Returns:
the resolved session or null, if no session with the given session ID exists


Copyright © 2016. All Rights Reserved.