ch.elca.el4j.services.security.authorization
Class RolesAllowedAnnotationAttributes

java.lang.Object
  extended by ch.elca.el4j.services.security.authorization.RolesAllowedAnnotationAttributes
All Implemented Interfaces:
Attributes

public class RolesAllowedAnnotationAttributes
extends Object
implements Attributes

This class is a Java 5 Annotation Attributes metadata implementation used for secure method interception.

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

This class is the equivalent of Acegi Security's SecurityAnnotationAttributes class for the RolesAllowed annotation.

Author:
Alex Mathey (AMA)
See Also:
org.acegisecurity.annotation.SecurityAnnotationAttributes
File-location:
RolesAllowedAnnotationAttributes
Last check-in date:
2010-01-15 12:21:07 +0100 (Fr, 15. Jan 2010) by jonasha for revision 4091

Constructor Summary
RolesAllowedAnnotationAttributes()
           
 
Method Summary
 Collection getAttributes(Class target)
          Get the RolesAllowed attributes for a given target class.
 Collection getAttributes(Class clazz, Class filter)
          Return the class attributes of the target class of a given type.
 Collection getAttributes(Field field)
          Return the field attributes of the target field.
 Collection getAttributes(Field field, Class clazz)
          Return the field attributes of the target method of a given type.
 Collection getAttributes(Method method)
          Get the RolesAllowed attributes for a given target method.
 Collection getAttributes(Method method, Class clazz)
          Return the method attributes of the target method of a given type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RolesAllowedAnnotationAttributes

public RolesAllowedAnnotationAttributes()
Method Detail

getAttributes

public Collection getAttributes(Class target)
Get the RolesAllowed attributes for a given target class.

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

getAttributes

public Collection getAttributes(Class clazz,
                                Class filter)
Description copied from interface: Attributes
Return the class attributes of the target class of a given type.

The class attributes are filtered by providing a Class reference to indicate the type to filter on. This is useful if you know the type of the attribute you are looking for and don't want to sort through the unfiltered Collection yourself.

Specified by:
getAttributes in interface Attributes
Parameters:
clazz - the class that contains attribute information
filter - specify that only this type of class should be returned
Returns:
return only the Collection of attributes that are of the filter type

getAttributes

public Collection getAttributes(Method method)
Get the RolesAllowed 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)
Description copied from interface: Attributes
Return the method attributes of the target method of a given type.

The method attributes are filtered by providing a Class reference to indicate the type to filter on. This is useful if you know the type of the attribute you are looking for and don't want to sort through the unfiltered Collection yourself.

Specified by:
getAttributes in interface Attributes
Parameters:
method - the method that contains attribute information
clazz - specify that only this type of class should be returned
Returns:
a Collection of attributes, possibly an empty Collection, never null

getAttributes

public Collection getAttributes(Field field)
Description copied from interface: Attributes
Return the field attributes of the target field.

Specified by:
getAttributes in interface Attributes
Parameters:
field - the field that contains attribute information
Returns:
a Collection of attribute, possibly an empty Collection, never null

getAttributes

public Collection getAttributes(Field field,
                                Class clazz)
Description copied from interface: Attributes
Return the field attributes of the target method of a given type.

The field attributes are filtered by providing a Class reference to indicate the type to filter on. This is useful if you know the type of the attribute you are looking for and don't want to sort through the unfiltered Collection yourself.

Specified by:
getAttributes in interface Attributes
Parameters:
field - the field that contains attribute information
clazz - specify that only this type of class should be returned
Returns:
a Collection of attributes, possibly an empty Collection, never null


Copyright © 2005-2011 ELCA. All Rights Reserved.