Class MapBasedMethodSecurityMetadataSource
java.lang.Object
org.springframework.security.access.method.AbstractMethodSecurityMetadataSource
org.springframework.security.access.method.AbstractFallbackMethodSecurityMetadataSource
org.springframework.security.access.method.MapBasedMethodSecurityMetadataSource
- All Implemented Interfaces:
- org.springframework.aop.framework.AopInfrastructureBean,- org.springframework.beans.factory.Aware,- org.springframework.beans.factory.BeanClassLoaderAware,- MethodSecurityMetadataSource,- SecurityMetadataSource
@NullUnmarked
@Deprecated
public class MapBasedMethodSecurityMetadataSource
extends AbstractFallbackMethodSecurityMetadataSource
implements org.springframework.beans.factory.BeanClassLoaderAware
Deprecated.
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.
 
- Since:
- 2.0
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected final Map<org.springframework.security.access.method.MapBasedMethodSecurityMetadataSource.RegisteredMethod,List<ConfigAttribute>> Deprecated.Map from RegisteredMethod to ConfigAttribute listFields inherited from class org.springframework.security.access.method.AbstractMethodSecurityMetadataSourcelogger
- 
Constructor SummaryConstructorsConstructorDescriptionDeprecated.MapBasedMethodSecurityMetadataSource(Map<String, List<ConfigAttribute>> methodMap) Deprecated.Creates the MapBasedMethodSecurityMetadataSource from a
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddSecureMethod(Class<?> javaType, Method method, List<ConfigAttribute> attr) Deprecated.Adds configuration attributes for a specific method, for example where the method has been matched using a pointcut expression.voidaddSecureMethod(Class<?> javaType, String mappedName, List<ConfigAttribute> attr) Deprecated.Add configuration attributes for a secure method.protected @Nullable Collection<ConfigAttribute>findAttributes(Class<?> clazz) Deprecated.Implementation does not support class-level attributes.protected @Nullable Collection<ConfigAttribute>findAttributes(Method method, Class<?> targetClass) Deprecated.Will walk the method inheritance tree to find the most specific declaration applicable.Deprecated.Obtains the configuration attributes explicitly defined against this bean.intDeprecated.voidsetBeanClassLoader(ClassLoader beanClassLoader) Deprecated.Methods inherited from class org.springframework.security.access.method.AbstractFallbackMethodSecurityMetadataSourcegetAttributesMethods inherited from class org.springframework.security.access.method.AbstractMethodSecurityMetadataSourcegetAttributes, supports
- 
Field Details- 
methodMapprotected final Map<org.springframework.security.access.method.MapBasedMethodSecurityMetadataSource.RegisteredMethod,List<ConfigAttribute>> methodMapDeprecated.Map from RegisteredMethod to ConfigAttribute list
 
- 
- 
Constructor Details- 
MapBasedMethodSecurityMetadataSourcepublic MapBasedMethodSecurityMetadataSource()Deprecated.
- 
MapBasedMethodSecurityMetadataSourceDeprecated.Creates the MapBasedMethodSecurityMetadataSource from a- Parameters:
- methodMap- map of method names to ConfigAttributes.
 
 
- 
- 
Method Details- 
findAttributesDeprecated.Implementation does not support class-level attributes.- Specified by:
- findAttributesin class- AbstractFallbackMethodSecurityMetadataSource
- Parameters:
- clazz- the target class for the invocation (never- null)
- Returns:
- the security metadata (or null if no metadata applies)
 
- 
findAttributesDeprecated.Will walk the method inheritance tree to find the most specific declaration applicable.- Specified by:
- findAttributesin 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)
 
- 
addSecureMethodDeprecated.Add configuration attributes for a secure method. Mapped method names can end or start with*for matching multiple methods.- Parameters:
- javaType- target interface or class the security configuration attribute applies to
- mappedName- mapped method name, which the javaType has declared or inherited
- attr- required authorities associated with the method
 
- 
addSecureMethodDeprecated.Adds configuration attributes for a specific method, for example where the method has been matched using a pointcut expression. If a match already exists in the map for the method, then the existing match will be retained, so that if this method is called for a more general pointcut it will not override a more specific one which has already been added.This method should only be called during initialization of the BeanFactory.
- 
getAllConfigAttributesDeprecated.Obtains the configuration attributes explicitly defined against this bean.- Specified by:
- getAllConfigAttributesin interface- SecurityMetadataSource
- Returns:
- the attributes explicitly defined against this bean
 
- 
setBeanClassLoaderDeprecated.- Specified by:
- setBeanClassLoaderin interface- org.springframework.beans.factory.BeanClassLoaderAware
 
- 
getMethodMapSizepublic int getMethodMapSize()Deprecated.- Returns:
- map size (for unit tests and diagnostics)
 
 
- 
use-authorization-managerattribute for<method-security>and<intercept-methods>instead or use annotation-based orAuthorizationManager-based authorization