Spring Security Framework

org.springframework.security.intercept
Interface ObjectDefinitionSource

All Known Subinterfaces:
FilterInvocationDefinitionSource, MethodDefinitionSource
All Known Implementing Classes:
AbstractFallbackMethodDefinitionSource, AbstractMethodDefinitionSource, DefaultFilterInvocationDefinitionSource, DelegatingMethodDefinitionSource, Jsr250MethodDefinitionSource, MapBasedMethodDefinitionSource, MethodDefinitionAttributes, SecuredMethodDefinitionSource

public interface ObjectDefinitionSource

Implemented by classes that store and can identify the ConfigAttributeDefinition that applies to a given secure object invocation.

Version:
$Id$
Author:
Ben Alex

Method Summary
 ConfigAttributeDefinition getAttributes(Object object)
          Accesses the ConfigAttributeDefinition that applies to a given secure object.
 Collection getConfigAttributeDefinitions()
          If available, returns all of the ConfigAttributeDefinitions defined by the implementing class.
 boolean supports(Class clazz)
          Indicates whether the ObjectDefinitionSource implementation is able to provide ConfigAttributeDefinitions for the indicated secure object type.
 

Method Detail

getAttributes

ConfigAttributeDefinition getAttributes(Object object)
                                        throws IllegalArgumentException
Accesses the ConfigAttributeDefinition that applies to a given secure object.

Returns null if no ConfigAttribiteDefinition applies.

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

getConfigAttributeDefinitions

Collection getConfigAttributeDefinitions()
If available, returns all of the ConfigAttributeDefinitions defined by the implementing class.

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

Returns:
the ConfigAttributeDefinitions or null if unsupported

supports

boolean supports(Class clazz)
Indicates whether the ObjectDefinitionSource implementation is able to provide ConfigAttributeDefinitions for the indicated secure object type.

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.