net.sf.jguard.jee.authorization.http
Class HttpAccessControllerUtils

java.lang.Object
  extended by net.sf.jguard.jee.authorization.http.HttpAccessControllerUtils

public class HttpAccessControllerUtils
extends Object

grab the AccessControllerWrapperImpl tied with the current HttpSession.

Author:
Charles Gay

Field Summary
static org.slf4j.Logger logger
           
 
Constructor Summary
HttpAccessControllerUtils(AccessControllerWrapperImpl accessControlWrapper)
           
 
Method Summary
 void checkPermission(javax.servlet.http.HttpSession session, Permission p)
          checks if the Subject bound to the HttpSession has got the Permission.
 boolean hasPermission(javax.servlet.http.HttpServletRequest request, Permission p)
          check if the user has got the permission and return the result as a boolean.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

public static final org.slf4j.Logger logger
Constructor Detail

HttpAccessControllerUtils

@Inject
public HttpAccessControllerUtils(AccessControllerWrapperImpl accessControlWrapper)
Method Detail

checkPermission

public void checkPermission(javax.servlet.http.HttpSession session,
                            Permission p)
                     throws AccessControlException,
                            PrivilegedActionException
checks if the Subject bound to the HttpSession has got the Permission.

Parameters:
session -
p -
Throws:
AccessControlException
PrivilegedActionException

hasPermission

public boolean hasPermission(javax.servlet.http.HttpServletRequest request,
                             Permission p)
check if the user has got the permission and return the result as a boolean. it does not throw any PrivilegedActionException or AccessControlException.

Parameters:
request -
p -
Returns:


Copyright © 2004-2011. All Rights Reserved.