Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.acegisecurity.annotation
Class SecurityAnnotationAttributes

    java.lang.Object
      org.acegisecurity.annotation.SecurityAnnotationAttributes

All Implemented Interfaces:
  Attributes

    public class SecurityAnnotationAttributes

extends Object
implements Attributes

Java 5 Annotation `Attributes` metadata implementation used for secure method interception.

This `Attributes` implementation will return security configuration for classes described using the `Secured` Java 5 annotation.

The `SecurityAnnotationAttributes` implementation can be used to configure a `MethodDefinitionAttributes` and `MethodSecurityInterceptor` bean definition (see below).

For example:

     <bean id="attributes"
         class="org.acegisecurity.annotation.SecurityAnnotationAttributes"/>

     <bean id="objectDefinitionSource"
         class="org.acegisecurity.intercept.method.MethodDefinitionAttributes">
         <property name="attributes">
             <ref local="attributes"/>
         </property>
     </bean>

     <bean id="securityInterceptor"
         class="org.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor">
          . . .
          <property name="objectDefinitionSource">
              <ref local="objectDefinitionSource"/>
          </property>
     </bean>

These security annotations are similiar to the Commons Attributes approach, however they are using Java 5 language-level metadata support.

Version:
  $Id: SecurityAnnotationAttributes.java,v 1.2 2005/11/17 00:55:48 benalex Exp $
Author:
  Mark St.Godard
See Also:
  `Secured`

Constructor Summary
`SecurityAnnotationAttributes()`

Method Summary
`Collection` | `getAttributes(Class target)` Get the `Secured` attributes for a given target class.
`Collection` | `getAttributes(Class clazz, Class filter)`
`Collection` | `getAttributes(Field field)`
`Collection` | `getAttributes(Field field, Class clazz)`
`Collection` | `getAttributes(Method method)` Get the `Secured` attributes for a given target method.
`Collection` | `getAttributes(Method method, Class clazz)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SecurityAnnotationAttributes

    public SecurityAnnotationAttributes()

Method Detail

### getAttributes

    public Collection getAttributes(Class target)

  Get the `Secured` attributes for a given target class.

  Specified by:
    `getAttributes` in interface `Attributes`
  Parameters:
    `method` - The target method
  Returns:
    Collection of `SecurityConfig`
  See Also:
    `Attributes.getAttributes(java.lang.Class)`

### getAttributes

    public Collection getAttributes(Class clazz,
                                    Class filter)

  Specified by:
    `getAttributes` in interface `Attributes`

### getAttributes

    public Collection getAttributes(Method method)

  Get the `Secured` attributes for a given target method.

  Specified by:
    `getAttributes` in interface `Attributes`
  Parameters:
    `method` - The target method
  Returns:
    Collection of `SecurityConfig`
  See Also:
    `Attributes.getAttributes(java.lang.Class)`

### getAttributes

    public Collection getAttributes(Method method,
                                    Class clazz)

  Specified by:
    `getAttributes` in interface `Attributes`

### getAttributes

    public Collection getAttributes(Field field)

  Specified by:
    `getAttributes` in interface `Attributes`

### getAttributes

    public Collection getAttributes(Field field,
                                    Class clazz)

  Specified by:
    `getAttributes` in interface `Attributes`

Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2005 Acegi Technology Pty Limited. All Rights Reserved.