com.acsinet_solutions.cetia4.controller.security
Class DefaultSecurityContext

java.lang.Object
  extended by com.acsinet_solutions.cetia4.controller.security.DefaultSecurityContext
All Implemented Interfaces:
SecurityContext

public class DefaultSecurityContext
extends java.lang.Object
implements SecurityContext

Abstract definition of a security context.

Author:
Santiago Arriaga - santiago.arriaga@acsinet-solutions.com

Constructor Summary
DefaultSecurityContext(RequestContext context)
          Public constructor
 
Method Summary
 UserSession getLoggedSession()
          Get the service session
protected  RequestContext getRequestContext()
          Get the internal request manager reference.
 boolean isLoggedIn()
          Check if the current user is logged in
 void setLoggedIn(UserSession userSession)
          Check the given user as logged in
 void setLoggedOut()
          Check the current user as logged out.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultSecurityContext

public DefaultSecurityContext(RequestContext context)
Public constructor

Method Detail

getRequestContext

protected final RequestContext getRequestContext()
Get the internal request manager reference.


getLoggedSession

public final UserSession getLoggedSession()
Description copied from interface: SecurityContext
Get the service session

Specified by:
getLoggedSession in interface SecurityContext
Returns:
A not-null UserSession instance

isLoggedIn

public final boolean isLoggedIn()
Description copied from interface: SecurityContext
Check if the current user is logged in

Specified by:
isLoggedIn in interface SecurityContext

setLoggedIn

public final void setLoggedIn(UserSession userSession)
Description copied from interface: SecurityContext
Check the given user as logged in

Specified by:
setLoggedIn in interface SecurityContext

setLoggedOut

public final void setLoggedOut()
Description copied from interface: SecurityContext
Check the current user as logged out. This method invalidates the user session.

Specified by:
setLoggedOut in interface SecurityContext