com.acsinet_solutions.cetia4.controller.security
Class MethodSecurityChecker

java.lang.Object
  extended by com.acsinet_solutions.cetia4.controller.security.MethodSecurityChecker
All Implemented Interfaces:
SecurityChecker

public final class MethodSecurityChecker
extends java.lang.Object
implements SecurityChecker

This class checks security needs of a method, based on it's security annotations and those of it's class.

Author:
Santiago Arriaga

Constructor Summary
MethodSecurityChecker(java.lang.Class<? extends RestModule> c, java.lang.reflect.Method method)
          Public constructor, builds this class from the configured annotations at class and method level.
 
Method Summary
 void checkAccess(RequestContext context)
          Check if access to the current method on the given request can be performed; thrown an exception if not.
 boolean needsLogIn()
          Say if this method or the methods on this class need log in.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodSecurityChecker

public MethodSecurityChecker(java.lang.Class<? extends RestModule> c,
                             java.lang.reflect.Method method)
Public constructor, builds this class from the configured annotations at class and method level.

Method Detail

needsLogIn

public final boolean needsLogIn()
Description copied from interface: SecurityChecker
Say if this method or the methods on this class need log in.

Specified by:
needsLogIn in interface SecurityChecker

checkAccess

public final void checkAccess(RequestContext context)
                       throws AccessException
Description copied from interface: SecurityChecker
Check if access to the current method on the given request can be performed; thrown an exception if not.

Specified by:
checkAccess in interface SecurityChecker
Throws:
AccessException