Package org.springframework.security.access.annotation

# Class SecuredAnnotationSecurityMetadataSource

java.lang.Object
org.springframework.security.access.method.AbstractMethodSecurityMetadataSource
org.springframework.security.access.method.AbstractFallbackMethodSecurityMetadataSource
org.springframework.security.access.annotation.SecuredAnnotationSecurityMetadataSource

All Implemented Interfaces:
  `org.springframework.aop.framework.AopInfrastructureBean`, `MethodSecurityMetadataSource`, `SecurityMetadataSource`

@Deprecated public class SecuredAnnotationSecurityMetadataSource extends AbstractFallbackMethodSecurityMetadataSource
Deprecated.
Use `AuthorizationManagerBeforeMethodInterceptor.secured()`
Sources method security metadata from Spring Security's `Secured` annotation.

Can also be used with custom security annotations by injecting an `AnnotationMetadataExtractor`. The annotation type will then be obtained from the generic parameter type supplied to this interface

## Field Summary

### Fields inherited from class org.springframework.security.access.method.AbstractMethodSecurityMetadataSource

`logger`

## Constructor Summary

Constructors
Constructor
Description
`SecuredAnnotationSecurityMetadataSource()`
Deprecated.
`SecuredAnnotationSecurityMetadataSource(AnnotationMetadataExtractor annotationMetadataExtractor)`
Deprecated.

## Method Summary

Modifier and Type
Method
Description
`protected Collection<ConfigAttribute>`
`findAttributes(Class<?> clazz)`
Deprecated.
Obtains the security metadata registered against the specified class.
`protected Collection<ConfigAttribute>`
`findAttributes(Method method, Class<?> targetClass)`
Deprecated.
Obtains the security metadata applicable to the specified method invocation.
`Collection<ConfigAttribute>`
`getAllConfigAttributes()`
Deprecated.
If available, returns all of the `ConfigAttribute`s defined by the implementing class.

### Methods inherited from class org.springframework.security.access.method.AbstractFallbackMethodSecurityMetadataSource

`getAttributes`

### Methods inherited from class org.springframework.security.access.method.AbstractMethodSecurityMetadataSource

`getAttributes, supports`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### SecuredAnnotationSecurityMetadataSource

public SecuredAnnotationSecurityMetadataSource()
Deprecated.

### SecuredAnnotationSecurityMetadataSource

public SecuredAnnotationSecurityMetadataSource(AnnotationMetadataExtractor annotationMetadataExtractor)
Deprecated.

## Method Details

### findAttributes

protected Collection<ConfigAttribute> findAttributes(Class<?> clazz)
Deprecated.
Description copied from class: `AbstractFallbackMethodSecurityMetadataSource`
Obtains the security metadata registered against the specified class.

Subclasses should only return metadata expressed at a class level. Subclasses should NOT aggregate metadata for each method registered against a class, as the abstract superclass will separate invoke `AbstractFallbackMethodSecurityMetadataSource.findAttributes(Method, Class)` for individual methods as appropriate.

Specified by:
  `findAttributes` in class `AbstractFallbackMethodSecurityMetadataSource`
Parameters:
  `clazz` - the target class for the invocation (never `null`)
Returns:
  the security metadata (or null if no metadata applies)

### findAttributes

protected Collection<ConfigAttribute> findAttributes(Method method, Class<?> targetClass)
Deprecated.
Description copied from class: `AbstractFallbackMethodSecurityMetadataSource`
Obtains the security metadata applicable to the specified method invocation.

Note that the `Method.getDeclaringClass()` may not equal the `targetClass`. Both parameters are provided to assist subclasses which may wish to provide advanced capabilities related to method metadata being "registered" against a method even if the target class does not declare the method (i.e. the subclass may only inherit the method).

Specified by:
  `findAttributes` in class `AbstractFallbackMethodSecurityMetadataSource`
Parameters:
  `method` - the method for the current invocation (never `null`)
  `targetClass` - the target class for the invocation (may be `null`)
Returns:
  the security metadata (or null if no metadata applies)

### getAllConfigAttributes

public Collection<ConfigAttribute> getAllConfigAttributes()
Deprecated.
Description copied from interface: `SecurityMetadataSource`
If available, returns all of the `ConfigAttribute`s defined by the implementing class.

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

Returns:
  the `ConfigAttribute`s or `null` if unsupported