public class PathBasedFilterInvocationDefinitionMap extends AbstractFilterInvocationDefinitionSource implements FilterInvocationDefinition
List
of ConfigAttributeDefinition
s associated with different HTTP request
URL Apache Ant path-based patterns.Apache Ant path expressions are used to match a HTTP request URL against a
ConfigAttributeDefinition
.
The order of registering the Ant paths using the addSecureUrl(String,ConfigAttributeDefinition)
is
very important. The system will identify the first matching path for a given HTTP URL. It will not proceed
to evaluate later paths if a match has already been found. Accordingly, the most specific paths should be
registered first, with the most general paths registered last.
If no registered paths match the HTTP URL, null
is returned.
Modifier and Type | Class and Description |
---|---|
protected class |
PathBasedFilterInvocationDefinitionMap.EntryHolder |
Constructor and Description |
---|
PathBasedFilterInvocationDefinitionMap() |
Modifier and Type | Method and Description |
---|---|
void |
addSecureUrl(String antPath,
ConfigAttributeDefinition attr) |
Iterator |
getConfigAttributeDefinitions()
If available, all of the
ConfigAttributeDefinition s defined by the implementing class. |
int |
getMapSize() |
boolean |
isConvertUrlToLowercaseBeforeComparison() |
ConfigAttributeDefinition |
lookupAttributes(String url)
Performs the actual lookup of the relevant
ConfigAttributeDefinition for the specified
FilterInvocation . |
void |
setConvertUrlToLowercaseBeforeComparison(boolean convertUrlToLowercaseBeforeComparison) |
getAttributes, supports
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAttributes, supports
public PathBasedFilterInvocationDefinitionMap()
public void addSecureUrl(String antPath, ConfigAttributeDefinition attr)
addSecureUrl
in interface FilterInvocationDefinitionMap
public Iterator getConfigAttributeDefinitions()
ObjectDefinitionSource
ConfigAttributeDefinition
s defined by the implementing class.This
is used by the AbstractSecurityInterceptor
to perform startup time validation of each
ConfigAttribute
configured against it.
getConfigAttributeDefinitions
in interface ObjectDefinitionSource
ConfigAttributeDefinition
s or null
if unsupportedpublic int getMapSize()
public boolean isConvertUrlToLowercaseBeforeComparison()
isConvertUrlToLowercaseBeforeComparison
in interface FilterInvocationDefinitionMap
public ConfigAttributeDefinition lookupAttributes(String url)
AbstractFilterInvocationDefinitionSource
ConfigAttributeDefinition
for the specified
FilterInvocation
.
Provided so subclasses need only to provide one basic method to properly interface with the
FilterInvocationDefinitionSource
.
Public visiblity so that tablibs or other view helper classes can access the
ConfigAttributeDefinition
applying to a given URI pattern without needing to construct a mock
FilterInvocation
and retrieving the attibutes via the AbstractFilterInvocationDefinitionSource.getAttributes(Object)
method.
lookupAttributes
in class AbstractFilterInvocationDefinitionSource
url
- the URI to retrieve configuration attributes forConfigAttributeDefinition
that applies to the specified FilterInvocation
public void setConvertUrlToLowercaseBeforeComparison(boolean convertUrlToLowercaseBeforeComparison)
setConvertUrlToLowercaseBeforeComparison
in interface FilterInvocationDefinitionMap
Copyright © 2016. All rights reserved.