Class DefaultFilterInvocationSecurityMetadataSource
- java.lang.Object
-
- org.springframework.security.web.access.intercept.DefaultFilterInvocationSecurityMetadataSource
-
- All Implemented Interfaces:
org.springframework.aop.framework.AopInfrastructureBean
,org.springframework.security.access.SecurityMetadataSource
,FilterInvocationSecurityMetadataSource
- Direct Known Subclasses:
ExpressionBasedFilterInvocationSecurityMetadataSource
public class DefaultFilterInvocationSecurityMetadataSource extends java.lang.Object implements FilterInvocationSecurityMetadataSource
Default implementation of FilterInvocationDefinitionSource.Stores an ordered map of
RequestMatcher
s to ConfigAttribute collections and provides matching ofFilterInvocation
s against the items stored in the map.The order of the
RequestMatcher
s in the map is very important. The first one which matches the request will be used. Later matchers in the map will not be invoked if a match has already been found. Accordingly, the most specific matchers should be registered first, with the most general matches registered last.The most common method creating an instance is using the Spring Security namespace. For example, the
pattern
andaccess
attributes of the<intercept-url>
elements defined as children of the<http>
element are combined to build the instance used by theFilterSecurityInterceptor
.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.commons.logging.Log
logger
-
Constructor Summary
Constructors Constructor Description DefaultFilterInvocationSecurityMetadataSource(java.util.LinkedHashMap<RequestMatcher,java.util.Collection<org.springframework.security.access.ConfigAttribute>> requestMap)
Sets the internal request map from the supplied map.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Collection<org.springframework.security.access.ConfigAttribute>
getAllConfigAttributes()
java.util.Collection<org.springframework.security.access.ConfigAttribute>
getAttributes(java.lang.Object object)
boolean
supports(java.lang.Class<?> clazz)
-
-
-
Constructor Detail
-
DefaultFilterInvocationSecurityMetadataSource
public DefaultFilterInvocationSecurityMetadataSource(java.util.LinkedHashMap<RequestMatcher,java.util.Collection<org.springframework.security.access.ConfigAttribute>> requestMap)
Sets the internal request map from the supplied map. The key elements should be of typeRequestMatcher
, which. The path stored in the key will depend on the type of the supplied UrlMatcher.- Parameters:
requestMap
- order-preserving map of request definitions to attribute lists
-
-
Method Detail
-
getAllConfigAttributes
public java.util.Collection<org.springframework.security.access.ConfigAttribute> getAllConfigAttributes()
- Specified by:
getAllConfigAttributes
in interfaceorg.springframework.security.access.SecurityMetadataSource
-
getAttributes
public java.util.Collection<org.springframework.security.access.ConfigAttribute> getAttributes(java.lang.Object object)
- Specified by:
getAttributes
in interfaceorg.springframework.security.access.SecurityMetadataSource
-
supports
public boolean supports(java.lang.Class<?> clazz)
- Specified by:
supports
in interfaceorg.springframework.security.access.SecurityMetadataSource
-
-