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

Quick Search    Search Deep

org.acegisecurity.intercept.method
Class MethodDefinitionAttributes  view MethodDefinitionAttributes download MethodDefinitionAttributes.java

java.lang.Object
  extended byorg.acegisecurity.intercept.method.AbstractMethodDefinitionSource
      extended byorg.acegisecurity.intercept.method.MethodDefinitionAttributes
All Implemented Interfaces:
MethodDefinitionSource, org.acegisecurity.intercept.ObjectDefinitionSource

public class MethodDefinitionAttributes
extends AbstractMethodDefinitionSource

Stores a ConfigAttributeDefinition for each method signature defined by Commons Attributes.

This class will only detect those attributes which are defined for:

Note that attributes defined against parent classes (either for their methods or interfaces) are not detected. The attributes must be defined against an explicit method or interface on the intercepted class.

Attributes detected that do not implement ConfigAttribute will be ignored.

Version:
$Id: MethodDefinitionAttributes.java,v 1.5 2005/11/17 00:56:09 benalex Exp $

Field Summary
private  org.springframework.metadata.Attributes attributes
           
 
Fields inherited from class org.acegisecurity.intercept.method.AbstractMethodDefinitionSource
 
Constructor Summary
MethodDefinitionAttributes()
           
 
Method Summary
private  void add(ConfigAttributeDefinition definition, java.util.Collection attribs)
           
private  void addClassAttributes(ConfigAttributeDefinition definition, java.lang.Class clazz)
           
private  void addClassAttributes(ConfigAttributeDefinition definition, java.lang.Class[] clazz)
           
private  void addInterfaceMethodAttributes(ConfigAttributeDefinition definition, java.lang.reflect.Method method)
           
private  void addMethodAttributes(ConfigAttributeDefinition definition, java.lang.reflect.Method method)
           
 java.util.Iterator getConfigAttributeDefinitions()
          If available, all of the ConfigAttributeDefinitions defined by the implementing class.
protected  ConfigAttributeDefinition lookupAttributes(java.lang.reflect.Method method)
          Performs the actual lookup of the relevant ConfigAttributeDefinition for the specified Method which is subject of the method invocation.
 void setAttributes(org.springframework.metadata.Attributes attributes)
           
 
Methods inherited from class org.acegisecurity.intercept.method.AbstractMethodDefinitionSource
getAttributes, supports
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

attributes

private org.springframework.metadata.Attributes attributes
Constructor Detail

MethodDefinitionAttributes

public MethodDefinitionAttributes()
Method Detail

setAttributes

public void setAttributes(org.springframework.metadata.Attributes attributes)

getConfigAttributeDefinitions

public java.util.Iterator getConfigAttributeDefinitions()
Description copied from interface: org.acegisecurity.intercept.ObjectDefinitionSource
If available, all of the ConfigAttributeDefinitions defined by the implementing class.

This is used by the org.acegisecurity.intercept.AbstractSecurityInterceptor to perform startup time validation of each ConfigAttribute configured against it.


lookupAttributes

protected ConfigAttributeDefinition lookupAttributes(java.lang.reflect.Method method)
Description copied from class: AbstractMethodDefinitionSource
Performs the actual lookup of the relevant ConfigAttributeDefinition for the specified Method which is subject of the method invocation.

Provided so subclasses need only to provide one basic method to properly interface with the MethodDefinitionSource.

Returns null if there are no matching attributes for the method.

Specified by:
lookupAttributes in class AbstractMethodDefinitionSource

add

private void add(ConfigAttributeDefinition definition,
                 java.util.Collection attribs)

addClassAttributes

private void addClassAttributes(ConfigAttributeDefinition definition,
                                java.lang.Class clazz)

addClassAttributes

private void addClassAttributes(ConfigAttributeDefinition definition,
                                java.lang.Class[] clazz)

addInterfaceMethodAttributes

private void addInterfaceMethodAttributes(ConfigAttributeDefinition definition,
                                          java.lang.reflect.Method method)

addMethodAttributes

private void addMethodAttributes(ConfigAttributeDefinition definition,
                                 java.lang.reflect.Method method)