Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.acegisecurity.intercept.method.aopalliance
Class MethodDefinitionSourceAdvisor  view MethodDefinitionSourceAdvisor download MethodDefinitionSourceAdvisor.java

java.lang.Object
  extended byorg.springframework.aop.support.StaticMethodMatcher
      extended byorg.springframework.aop.support.StaticMethodMatcherPointcut
          extended byorg.springframework.aop.support.StaticMethodMatcherPointcutAdvisor
              extended byorg.acegisecurity.intercept.method.aopalliance.MethodDefinitionSourceAdvisor
All Implemented Interfaces:
org.springframework.aop.Advisor, org.springframework.aop.MethodMatcher, org.springframework.core.Ordered, org.springframework.aop.Pointcut, org.springframework.aop.PointcutAdvisor, java.io.Serializable

public class MethodDefinitionSourceAdvisor
extends org.springframework.aop.support.StaticMethodMatcherPointcutAdvisor

Advisor driven by a org.acegisecurity.intercept.method.MethodDefinitionSource, used to exclude a MethodSecurityInterceptor from public (ie non-secure) methods.

Because the AOP framework caches advice calculations, this is normally faster than just letting the MethodSecurityInterceptor run and find out itself that it has no work to do.

This class also allows the use of Spring's DefaultAdvisorAutoProxyCreator, which makes configuration easier than setup a ProxyFactoryBean for each object requiring security. Note that autoproxying is not supported for BeanFactory implementations, as post-processing is automatic only for application contexts.

Based on Spring's TransactionAttributeSourceAdvisor.

Version:
$Id: MethodDefinitionSourceAdvisor.java,v 1.3 2005/11/17 00:55:49 benalex Exp $

Nested Class Summary
(package private)  class MethodDefinitionSourceAdvisor.InternalMethodInvocation
          Represents a MethodInvocation.
 
Field Summary
private  org.acegisecurity.intercept.method.MethodDefinitionSource transactionAttributeSource
           
 
Fields inherited from class org.springframework.aop.support.StaticMethodMatcherPointcutAdvisor
 
Fields inherited from class org.springframework.aop.support.StaticMethodMatcherPointcut
 
Fields inherited from interface org.springframework.aop.Pointcut
TRUE
 
Fields inherited from interface org.springframework.aop.MethodMatcher
TRUE
 
Constructor Summary
MethodDefinitionSourceAdvisor(MethodSecurityInterceptor advice)
           
 
Method Summary
 boolean matches(java.lang.reflect.Method m, java.lang.Class targetClass)
          Perform static checking.
 
Methods inherited from class org.springframework.aop.support.StaticMethodMatcherPointcutAdvisor
getAdvice, getOrder, getPointcut, isPerInstance, setAdvice, setOrder
 
Methods inherited from class org.springframework.aop.support.StaticMethodMatcherPointcut
getClassFilter, getMethodMatcher, setClassFilter
 
Methods inherited from class org.springframework.aop.support.StaticMethodMatcher
isRuntime, matches
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

transactionAttributeSource

private org.acegisecurity.intercept.method.MethodDefinitionSource transactionAttributeSource
Constructor Detail

MethodDefinitionSourceAdvisor

public MethodDefinitionSourceAdvisor(MethodSecurityInterceptor advice)
Method Detail

matches

public boolean matches(java.lang.reflect.Method m,
                       java.lang.Class targetClass)
Description copied from interface: org.springframework.aop.MethodMatcher
Perform static checking. If this returns false, or if the isRuntime() method returns false, no runtime check will be made.