pt.digitalis.dif.controller.security.managers
Interface ISessionManager

All Known Implementing Classes:
SessionManagerImpl

public interface ISessionManager

Defines the behavior for a session manager.

Author:
Pedro Viegas pviegas@digitalis.pt
, Rodrigo Gonçalves rgoncalves@digitalis.pt
Created on:
Dec 11, 2007

Method Summary
 IDIFSession createSession(String sessionID)
          Creates a new session.
 IDIFSession getSession(String sessionID)
          Gets a managed session
 boolean isSessionPresent(String sessionID)
          Checks if a given session is registered on the framework.
 IDIFSession logIn(String sessionID, String userID, String password)
          Performs the log in of a user with a given id on the framework.
 IDIFSession logOut(String sessionID)
          Performs the log out of a user with a given id on the framework.
 boolean update(IDIFSession session)
          Updates an existent session
 

Method Detail

isSessionPresent

boolean isSessionPresent(String sessionID)
Checks if a given session is registered on the framework.

Parameters:
sessionID - the session id
Returns:
T if a session with this ID is present and active.

getSession

IDIFSession getSession(String sessionID)
Gets a managed session

Parameters:
sessionID -
Returns:
the session object or null if non-existent

createSession

IDIFSession createSession(String sessionID)
Creates a new session. If existent returns the matching identifier existing session

Parameters:
sessionID - the session id to create
Returns:
the created session

update

boolean update(IDIFSession session)
Updates an existent session

Parameters:
session - the session to update
Returns:
T if the session existed and was updated

logIn

IDIFSession logIn(String sessionID,
                  String userID,
                  String password)
                  throws AuthenticationManagerException
Performs the log in of a user with a given id on the framework.

Parameters:
sessionID - the session identifier
userID - the id of the user to log in
password - the password for the user
Returns:
the updated session object
Throws:
AuthenticationManagerException - if the authentication manager can't be accessed to validate the user's credentials

logOut

IDIFSession logOut(String sessionID)
Performs the log out of a user with a given id on the framework.

Parameters:
sessionID - the session id to log out
Returns:
the updated session object


Copyright © 2014 Digitalis Informática Lda. All Rights Reserved.