Spring Security Framework

org.springframework.security.intercept.method
Class AbstractMethodDefinitionSource

java.lang.Object
  extended by org.springframework.security.intercept.method.AbstractMethodDefinitionSource
All Implemented Interfaces:
MethodDefinitionSource, ObjectDefinitionSource

public abstract class AbstractMethodDefinitionSource
extends Object
implements MethodDefinitionSource

Abstract implementation of MethodDefinitionSource.

Version:
$Id$
Author:
Ben Alex

Constructor Summary
AbstractMethodDefinitionSource()
           
 
Method Summary
 ConfigAttributeDefinition getAttributes(Object object)
          Accesses the ConfigAttributeDefinition that applies to a given secure object.
protected abstract  ConfigAttributeDefinition lookupAttributes(Method method)
          Performs the actual lookup of the relevant ConfigAttributeDefinition for the specified Method which is subject of the method invocation.
 boolean supports(Class clazz)
          Indicates whether the ObjectDefinitionSource implementation is able to provide ConfigAttributeDefinitions for the indicated secure object type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.springframework.security.intercept.method.MethodDefinitionSource
getAttributes
 
Methods inherited from interface org.springframework.security.intercept.ObjectDefinitionSource
getConfigAttributeDefinitions
 

Constructor Detail

AbstractMethodDefinitionSource

public AbstractMethodDefinitionSource()
Method Detail

getAttributes

public ConfigAttributeDefinition getAttributes(Object object)
                                        throws IllegalArgumentException
Description copied from interface: ObjectDefinitionSource
Accesses the ConfigAttributeDefinition that applies to a given secure object.

Returns null if no ConfigAttribiteDefinition applies.

Specified by:
getAttributes in interface ObjectDefinitionSource
Parameters:
object - the object being secured
Returns:
the ConfigAttributeDefinition that applies to the passed object
Throws:
IllegalArgumentException - if the passed object is not of a type supported by the ObjectDefinitionSource implementation

lookupAttributes

protected abstract ConfigAttributeDefinition lookupAttributes(Method method)
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.

Parameters:
method - the method being invoked for which configuration attributes should be looked up
Returns:
the ConfigAttributeDefinition that applies to the specified Method

supports

public boolean supports(Class clazz)
Description copied from interface: ObjectDefinitionSource
Indicates whether the ObjectDefinitionSource implementation is able to provide ConfigAttributeDefinitions for the indicated secure object type.

Specified by:
supports in interface ObjectDefinitionSource
Parameters:
clazz - the class that is being queried
Returns:
true if the implementation can process the indicated class

Spring Security Framework

Copyright © 2004-2010 SpringSource, Inc. All Rights Reserved.