|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.security.access.method.AbstractMethodSecurityMetadataSource
org.springframework.security.access.method.AbstractFallbackMethodSecurityMetadataSource
org.springframework.security.access.method.MapBasedMethodSecurityMetadataSource
public class MapBasedMethodSecurityMetadataSource
Stores a list of ConfigAttributes for a method or class signature.
This class is the preferred implementation of MethodSecurityMetadataSource for XML-based
definition of method security metadata. To assist in XML-based definition, wildcard support
is provided.
| Field Summary | |
|---|---|
protected Map<org.springframework.security.access.method.MapBasedMethodSecurityMetadataSource.RegisteredMethod,List<ConfigAttribute>> |
methodMap
Map from RegisteredMethod to ConfigAttribute list |
| Fields inherited from class org.springframework.security.access.method.AbstractMethodSecurityMetadataSource |
|---|
logger |
| Constructor Summary | |
|---|---|
MapBasedMethodSecurityMetadataSource()
|
|
MapBasedMethodSecurityMetadataSource(Map<String,List<ConfigAttribute>> methodMap)
Creates the MapBasedMethodSecurityMetadataSource from a |
|
| Method Summary | |
|---|---|
void |
addSecureMethod(Class<?> javaType,
Method method,
List<ConfigAttribute> attr)
Adds configuration attributes for a specific method, for example where the method has been matched using a pointcut expression. |
void |
addSecureMethod(Class<?> javaType,
String mappedName,
List<ConfigAttribute> attr)
Add configuration attributes for a secure method. |
protected Collection<ConfigAttribute> |
findAttributes(Class<?> clazz)
Implementation does not support class-level attributes. |
protected Collection<ConfigAttribute> |
findAttributes(Method method,
Class<?> targetClass)
Will walk the method inheritance tree to find the most specific declaration applicable. |
Collection<ConfigAttribute> |
getAllConfigAttributes()
Obtains the configuration attributes explicitly defined against this bean. |
int |
getMethodMapSize()
|
void |
setBeanClassLoader(ClassLoader beanClassLoader)
|
| 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 |
| Field Detail |
|---|
protected Map<org.springframework.security.access.method.MapBasedMethodSecurityMetadataSource.RegisteredMethod,List<ConfigAttribute>> methodMap
| Constructor Detail |
|---|
public MapBasedMethodSecurityMetadataSource()
public MapBasedMethodSecurityMetadataSource(Map<String,List<ConfigAttribute>> methodMap)
methodMap - map of method names to ConfigAttributes.| Method Detail |
|---|
protected Collection<ConfigAttribute> findAttributes(Class<?> clazz)
findAttributes in class AbstractFallbackMethodSecurityMetadataSourceclazz - the target class for the invocation (never null)
protected Collection<ConfigAttribute> findAttributes(Method method,
Class<?> targetClass)
findAttributes in class AbstractFallbackMethodSecurityMetadataSourcemethod - the method for the current invocation (never null)targetClass - the target class for the invocation (may be null)
public void addSecureMethod(Class<?> javaType,
String mappedName,
List<ConfigAttribute> attr)
*
for matching multiple methods.
javaType - target interface or class the security configuration attribute applies tomappedName - mapped method name, which the javaType has declared or inheritedattr - required authorities associated with the method
public void addSecureMethod(Class<?> javaType,
Method method,
List<ConfigAttribute> attr)
public Collection<ConfigAttribute> getAllConfigAttributes()
getAllConfigAttributes in interface SecurityMetadataSourcepublic void setBeanClassLoader(ClassLoader beanClassLoader)
setBeanClassLoader in interface BeanClassLoaderAwarepublic int getMethodMapSize()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||