lumis.portal.authentication
Class AuthenticationDaoJdbc

Package class diagram package AuthenticationDaoJdbc
java.lang.Object
  extended by lumis.portal.authentication.AuthenticationDaoJdbc
All Implemented Interfaces:
IAuthenticationDao

public class AuthenticationDaoJdbc
extends Object
implements IAuthenticationDao

Authentication dao implementation.

Since:
4.0.0

Constructor Summary
AuthenticationDaoJdbc()
           
 
Method Summary
 void addUserSessionId(String userSessionId, String userId)
          Add the User Session Id.
 Collection<SessionConfig> clearInactiveSessions(int minutes, ITransaction transaction)
          Remove sessions inactive for the specified amount of minutes.
 void deleteUserSessionByUserId(String userId)
          Delete the User Session Id from the user id.
 void deleteUserSessionId(String userSessionId)
          Delete the User Session Id.
 Collection<SessionConfig> getSessionsByUserId(String userId, ITransaction transaction)
          Returns a collection of active session objects for the given user.
 String getUserId(String userSessionId, ITransaction transaction)
          Get the user id.
 void keepSessionAlive(String sessionId)
          Update the last access date for the given session.
 boolean validateUserLogin(String login, String password, ITransaction transaction)
          Validade the user login.
 String validateUserSession(String userSessionId, ITransaction transaction)
          Validate the session of the user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuthenticationDaoJdbc

public AuthenticationDaoJdbc()
Method Detail

addUserSessionId

public void addUserSessionId(String userSessionId,
                             String userId)
                      throws DaoException,
                             PortalException
Description copied from interface: IAuthenticationDao
Add the User Session Id.

Specified by:
addUserSessionId in interface IAuthenticationDao
Throws:
DaoException
PortalException

deleteUserSessionId

public void deleteUserSessionId(String userSessionId)
                         throws DaoException,
                                PortalException
Description copied from interface: IAuthenticationDao
Delete the User Session Id.

Specified by:
deleteUserSessionId in interface IAuthenticationDao
Throws:
DaoException
PortalException

deleteUserSessionByUserId

public void deleteUserSessionByUserId(String userId)
                               throws DaoException,
                                      PortalException
Description copied from interface: IAuthenticationDao
Delete the User Session Id from the user id.

Specified by:
deleteUserSessionByUserId in interface IAuthenticationDao
Throws:
DaoException
PortalException

validateUserSession

public String validateUserSession(String userSessionId,
                                  ITransaction transaction)
                           throws DaoException,
                                  PortalException
Description copied from interface: IAuthenticationDao
Validate the session of the user.

Specified by:
validateUserSession in interface IAuthenticationDao
Parameters:
userSessionId - the user session id.
transaction - the transaction for persistence access.
Returns:
the userId if the user's session is valid, or null if it is not valid.
Throws:
DaoException
PortalException

getUserId

public String getUserId(String userSessionId,
                        ITransaction transaction)
                 throws DaoException,
                        PortalException
Description copied from interface: IAuthenticationDao
Get the user id.

Specified by:
getUserId in interface IAuthenticationDao
Returns:
a String.
Throws:
DaoException
PortalException

validateUserLogin

public boolean validateUserLogin(String login,
                                 String password,
                                 ITransaction transaction)
                          throws DaoException,
                                 PortalException
Description copied from interface: IAuthenticationDao
Validade the user login.

Specified by:
validateUserLogin in interface IAuthenticationDao
Returns:
true if the User's login is valid and false otherwise.
Throws:
DaoException
PortalException

keepSessionAlive

public void keepSessionAlive(String sessionId)
                      throws PortalException
Description copied from interface: IAuthenticationDao
Update the last access date for the given session.

Specified by:
keepSessionAlive in interface IAuthenticationDao
Throws:
DaoException
PortalException

clearInactiveSessions

public Collection<SessionConfig> clearInactiveSessions(int minutes,
                                                       ITransaction transaction)
                                                throws DaoException,
                                                       PortalException
Description copied from interface: IAuthenticationDao
Remove sessions inactive for the specified amount of minutes.

Specified by:
clearInactiveSessions in interface IAuthenticationDao
Parameters:
minutes - amount of minutes.
transaction - transaction for persistence access.
Returns:
the sessions cleared.
Throws:
DaoException
PortalException

getSessionsByUserId

public Collection<SessionConfig> getSessionsByUserId(String userId,
                                                     ITransaction transaction)
                                              throws PortalException
Description copied from interface: IAuthenticationDao
Returns a collection of active session objects for the given user.

Specified by:
getSessionsByUserId in interface IAuthenticationDao
Returns:
Throws:
PortalException


Lumisportal  5.5.0.091130 - Copyright © 2001-2007, Lumis. All Rights Reserved.