Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.acegisecurity.intercept.web
Class RegExpBasedFilterInvocationDefinitionMap

    java.lang.Object
      org.acegisecurity.intercept.web.AbstractFilterInvocationDefinitionSource
          org.acegisecurity.intercept.web.RegExpBasedFilterInvocationDefinitionMap

All Implemented Interfaces:
  ObjectDefinitionSource, FilterInvocationDefinitionMap, FilterInvocationDefinitionSource

    public class RegExpBasedFilterInvocationDefinitionMap

extends AbstractFilterInvocationDefinitionSource
implements FilterInvocationDefinitionMap

Maintains a `List` of `ConfigAttributeDefinition`s associated with different HTTP request URL regular expression patterns.

Regular expressions are used to match a HTTP request URL against a `ConfigAttributeDefinition`.

The order of registering the regular expressions using the `addSecureUrl(String, ConfigAttributeDefinition)` is very important. The system will identify the first matching regular expression for a given HTTP URL. It will not proceed to evaluate later regular expressions if a match has already been found. Accordingly, the most specific regular expressions should be registered first, with the most general regular expressions registered last.

If no registered regular expressions match the HTTP URL, `null` is returned.

Nested Class Summary
`protected class` | `RegExpBasedFilterInvocationDefinitionMap.EntryHolder`

Constructor Summary
`RegExpBasedFilterInvocationDefinitionMap()`

Method Summary
`void` | `addSecureUrl(String perl5RegExp, 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)`

Methods inherited from class org.acegisecurity.intercept.web.AbstractFilterInvocationDefinitionSource
`getAttributes, supports`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### RegExpBasedFilterInvocationDefinitionMap

    public RegExpBasedFilterInvocationDefinitionMap()

Method Detail

### getConfigAttributeDefinitions

    public Iterator getConfigAttributeDefinitions()

  Description copied from interface: `ObjectDefinitionSource`
  If available, all of the `ConfigAttributeDefinition`s defined by the implementing class.

  This is used by the `AbstractSecurityInterceptor` to perform startup time validation of each `ConfigAttribute` configured against it.

  Specified by:
    `getConfigAttributeDefinitions` in interface `ObjectDefinitionSource`
  Returns:
    an iterator over all the `ConfigAttributeDefinition`s or `null` if unsupported

### setConvertUrlToLowercaseBeforeComparison

    public void setConvertUrlToLowercaseBeforeComparison(boolean convertUrlToLowercaseBeforeComparison)

  Specified by:
    `setConvertUrlToLowercaseBeforeComparison` in interface `FilterInvocationDefinitionMap`

### isConvertUrlToLowercaseBeforeComparison

    public boolean isConvertUrlToLowercaseBeforeComparison()

### getMapSize

    public int getMapSize()

### addSecureUrl

    public void addSecureUrl(String perl5RegExp,
                             ConfigAttributeDefinition attr)

  Specified by:
    `addSecureUrl` in interface `FilterInvocationDefinitionMap`

### lookupAttributes

    public ConfigAttributeDefinition lookupAttributes(String url)

  Description copied from class: `AbstractFilterInvocationDefinitionSource`
  Performs the actual lookup of the relevant `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.

  Specified by:
    `lookupAttributes` in class `AbstractFilterInvocationDefinitionSource`
  Parameters:
    `url` - the URI to retrieve configuration attributes for
  Returns:
    the `ConfigAttributeDefinition` that applies to the specified `FilterInvocation`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2005 Acegi Technology Pty Limited. All Rights Reserved.