public class DefaultFilterInvocationSecurityMetadataSource extends Object implements FilterInvocationSecurityMetadataSource
Stores an ordered map of RequestMatcher
s to ConfigAttribute collections and provides matching
of FilterInvocation
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
and access
attributes of the <intercept-url>
elements defined as children of the
<http>
element are combined to build the instance used by the FilterSecurityInterceptor
.
Modifier and Type | Field and Description |
---|---|
protected org.apache.commons.logging.Log |
logger |
Constructor and Description |
---|
DefaultFilterInvocationSecurityMetadataSource(LinkedHashMap<RequestMatcher,Collection<org.springframework.security.access.ConfigAttribute>> requestMap)
Sets the internal request map from the supplied map.
|
Modifier and Type | Method and Description |
---|---|
Collection<org.springframework.security.access.ConfigAttribute> |
getAllConfigAttributes() |
Collection<org.springframework.security.access.ConfigAttribute> |
getAttributes(Object object) |
boolean |
supports(Class<?> clazz) |
public DefaultFilterInvocationSecurityMetadataSource(LinkedHashMap<RequestMatcher,Collection<org.springframework.security.access.ConfigAttribute>> requestMap)
RequestMatcher
,
which. The path stored in the key will depend on
the type of the supplied UrlMatcher.requestMap
- order-preserving map of request definitions to attribute listspublic Collection<org.springframework.security.access.ConfigAttribute> getAllConfigAttributes()
getAllConfigAttributes
in interface org.springframework.security.access.SecurityMetadataSource
public Collection<org.springframework.security.access.ConfigAttribute> getAttributes(Object object)
getAttributes
in interface org.springframework.security.access.SecurityMetadataSource
public boolean supports(Class<?> clazz)
supports
in interface org.springframework.security.access.SecurityMetadataSource