|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.acegisecurity.intercept.method.AbstractMethodDefinitionSource
org.acegisecurity.intercept.method.MethodDefinitionMap
public class MethodDefinitionMap
Stores a ConfigAttributeDefinition for each method signature defined in a bean context.
For
consistency with MethodDefinitionAttributes as well as support for
MethodDefinitionSourceAdvisor, this implementation will return a
ConfigAttributeDefinition containing all configuration attributes defined against:
In general you should therefore define the interface methods of your secure objects, not the
implementations. For example, define com.company.Foo.findAll=ROLE_TEST but not
com.company.FooImpl.findAll=ROLE_TEST.
| Field Summary | |
|---|---|
protected Map |
methodMap
Map from Method to ApplicationDefinition |
| Constructor Summary | |
|---|---|
MethodDefinitionMap()
|
|
| Method Summary | |
|---|---|
void |
addSecureMethod(Class clazz,
String mappedName,
ConfigAttributeDefinition attr)
Add configuration attributes for a secure method. |
void |
addSecureMethod(Method method,
ConfigAttributeDefinition attr)
Add configuration attributes for a secure method. |
void |
addSecureMethod(String name,
ConfigAttributeDefinition attr)
Add configuration attributes for a secure method. |
Iterator |
getConfigAttributeDefinitions()
Obtains the configuration attributes explicitly defined against this bean. |
int |
getMethodMapSize()
Obtains the number of configuration attributes explicitly defined against this bean. |
protected ConfigAttributeDefinition |
lookupAttributes(Method method)
Performs the actual lookup of the relevant ConfigAttributeDefinition for the specified
Method which is subject of the method invocation. |
| Methods inherited from class org.acegisecurity.intercept.method.AbstractMethodDefinitionSource |
|---|
getAttributes, supports |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Map methodMap
| Constructor Detail |
|---|
public MethodDefinitionMap()
| Method Detail |
|---|
public void addSecureMethod(Method method,
ConfigAttributeDefinition attr)
*
for matching multiple methods.
method - the method to be securedattr - required authorities associated with the method
public void addSecureMethod(String name,
ConfigAttributeDefinition attr)
*
for matching multiple methods.
name - class and method name, separated by a dotattr - required authorities associated with the method
IllegalArgumentException - DOCUMENT ME!
public void addSecureMethod(Class clazz,
String mappedName,
ConfigAttributeDefinition attr)
*
for matching multiple methods.
clazz - target interface or classmappedName - mapped method nameattr - required authorities associated with the method
IllegalArgumentException - DOCUMENT ME!public Iterator getConfigAttributeDefinitions()
lookupAttributes(Method) as it does not have
access to a method invocation at this time.
public int getMethodMapSize()
lookupAttributes(Method) as it
does not have access to a method invocation at this time.
protected ConfigAttributeDefinition lookupAttributes(Method method)
AbstractMethodDefinitionSourceConfigAttributeDefinition 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.
lookupAttributes in class AbstractMethodDefinitionSourcemethod - the method being invoked for which configuration attributes should be looked up
ConfigAttributeDefinition that applies to the specified Method
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||