JSecurity

org.jsecurity.authz.aop
Class AnnotationsAuthorizingMethodInterceptor

java.lang.Object
  extended by org.jsecurity.aop.MethodInterceptorSupport
      extended by org.jsecurity.authz.aop.AuthorizingMethodInterceptor
          extended by org.jsecurity.authz.aop.AnnotationsAuthorizingMethodInterceptor
All Implemented Interfaces:
MethodInterceptor
Direct Known Subclasses:
AopAllianceAnnotationsAuthorizingMethodInterceptor

public abstract class AnnotationsAuthorizingMethodInterceptor
extends AuthorizingMethodInterceptor

An AnnotationsAuthorizingMethodInterceptor is a MethodInterceptor that asserts a given method is authorized to execute based on one or more configured AuthorizingAnnotationMethodInterceptors.

This allows multiple annotations on a method to be processed before the method executes, and if any of the AuthorizingAnnotationMethodInterceptors indicate that the method should not be executed, an AuthorizationException will be thrown, otherwise the method will be invoked as expected.

It is essentially a convenience mechanism to allow multiple annotations to be processed in a single method interceptor.

Since:
0.2
Author:
Les Hazlewood

Field Summary
protected  Collection<AuthorizingAnnotationMethodInterceptor> methodInterceptors
           
 
Constructor Summary
AnnotationsAuthorizingMethodInterceptor()
           
 
Method Summary
protected  void assertAuthorized(MethodInvocation methodInvocation)
           
 Collection<AuthorizingAnnotationMethodInterceptor> getMethodInterceptors()
           
 void setMethodInterceptors(Collection<AuthorizingAnnotationMethodInterceptor> methodInterceptors)
           
 
Methods inherited from class org.jsecurity.authz.aop.AuthorizingMethodInterceptor
invoke
 
Methods inherited from class org.jsecurity.aop.MethodInterceptorSupport
getSubject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

methodInterceptors

protected Collection<AuthorizingAnnotationMethodInterceptor> methodInterceptors
Constructor Detail

AnnotationsAuthorizingMethodInterceptor

public AnnotationsAuthorizingMethodInterceptor()
Method Detail

getMethodInterceptors

public Collection<AuthorizingAnnotationMethodInterceptor> getMethodInterceptors()

setMethodInterceptors

public void setMethodInterceptors(Collection<AuthorizingAnnotationMethodInterceptor> methodInterceptors)

assertAuthorized

protected void assertAuthorized(MethodInvocation methodInvocation)
                         throws AuthorizationException
Specified by:
assertAuthorized in class AuthorizingMethodInterceptor
Throws:
AuthorizationException

JSecurity

Copyright © 2004-2008 JSecurity.