com.hack23.cia.service.impl.common
Class UserSessionServiceImpl

Package class diagram package UserSessionServiceImpl
java.lang.Object
  extended by com.hack23.cia.service.impl.common.UserSessionServiceImpl
All Implemented Interfaces:
UserSessionService, org.springframework.security.core.userdetails.UserDetailsService

public class UserSessionServiceImpl
extends Object
implements UserSessionService

The Class UserSessionServiceImpl.


Constructor Summary
Constructor and Description
UserSessionServiceImpl(UserDAO userDAO, UserSessionDAO userSessionDAO, ApplicationModelFactoryFactory applicationModelFactoryFactory)
          Instantiates a new user session service impl.
 
Method Summary
Modifier and Type Method and Description
 UserSessionData addActionEvent(ActionEvent actionEvent, UserSessionData userSession)
          Adds the action event.
 UserSessionData createUserSession(AgencyData agency, String sessionId, String clientHost, String serverHost, String acceptLanguageKeys, String userAgent)
          Creates the user session.
 org.springframework.security.core.userdetails.UserDetails loadUserByUsername(String username)
           
 UserSessionData loadUserSessionById(Long userSessionId)
          Load user session by id.
 UserSessionData login(String name, String encodedPassword, UserSessionData userSession)
          Login.
 UserSessionData logout(UserSessionData userSession)
          Logout.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserSessionServiceImpl

public UserSessionServiceImpl(UserDAO userDAO,
                              UserSessionDAO userSessionDAO,
                              ApplicationModelFactoryFactory applicationModelFactoryFactory)
Instantiates a new user session service impl.

Parameters:
userDAO - the user dao
userSessionDAO - the user session dao
applicationModelFactoryFactory - the application model factory factory
Method Detail

addActionEvent

public final UserSessionData addActionEvent(ActionEvent actionEvent,
                                            UserSessionData userSession)
Description copied from interface: UserSessionService
Adds the action event.

Specified by:
addActionEvent in interface UserSessionService
Parameters:
actionEvent - the action event
userSession - the user session
Returns:
the user session data

createUserSession

public final UserSessionData createUserSession(AgencyData agency,
                                               String sessionId,
                                               String clientHost,
                                               String serverHost,
                                               String acceptLanguageKeys,
                                               String userAgent)
Description copied from interface: UserSessionService
Creates the user session.

Specified by:
createUserSession in interface UserSessionService
Parameters:
agency - the agency
sessionId - the session id
clientHost - the header host
serverHost - the server host
acceptLanguageKeys - the accept language keys
userAgent - the user agent
Returns:
the user session data

loadUserByUsername

public final org.springframework.security.core.userdetails.UserDetails loadUserByUsername(String username)
                                                                                   throws org.springframework.security.core.userdetails.UsernameNotFoundException,
                                                                                          org.springframework.dao.DataAccessException
Specified by:
loadUserByUsername in interface org.springframework.security.core.userdetails.UserDetailsService
Throws:
org.springframework.security.core.userdetails.UsernameNotFoundException
org.springframework.dao.DataAccessException

loadUserSessionById

public final UserSessionData loadUserSessionById(Long userSessionId)
Description copied from interface: UserSessionService
Load user session by id.

Specified by:
loadUserSessionById in interface UserSessionService
Parameters:
userSessionId - the user session id
Returns:
the user session data

login

public final UserSessionData login(String name,
                                   String encodedPassword,
                                   UserSessionData userSession)
Description copied from interface: UserSessionService
Login.

Specified by:
login in interface UserSessionService
Parameters:
name - the name
encodedPassword - the encoded password
userSession - the user session
Returns:
the user session data

logout

public final UserSessionData logout(UserSessionData userSession)
Description copied from interface: UserSessionService
Logout.

Specified by:
logout in interface UserSessionService
Parameters:
userSession - the user session
Returns:
the user session data


Copyright © 2008-2010 www.hack23.com. All Rights Reserved.