org.ibisph.filter
Class AbstractPathPatternFilter.PathPattern

java.lang.Object
  extended by org.ibisph.filter.AbstractPathPatternFilter.PathPattern
All Implemented Interfaces:
java.io.Serializable
Enclosing class:
AbstractPathPatternFilter

protected class AbstractPathPatternFilter.PathPattern
extends java.lang.Object
implements java.io.Serializable

Inner class that allows for several patterns to be used for the filter. This filter handles checking the prefix or if the path includes the pattern, the path type to use (URI or PathInfo), the pattern list and the list separator.

Author:
garth
See Also:
Serialized Form

Constructor Summary
AbstractPathPatternFilter.PathPattern(java.lang.String matchList, java.lang.String matchListSeparator, java.lang.String matchType, java.lang.String pathType)
          Main constructor that sets the properties needed to control the pattern matching.
 
Method Summary
 boolean matches(javax.servlet.http.HttpServletRequest request)
          Main method that does the pattern matching/testing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractPathPatternFilter.PathPattern

public AbstractPathPatternFilter.PathPattern(java.lang.String matchList,
                                             java.lang.String matchListSeparator,
                                             java.lang.String matchType,
                                             java.lang.String pathType)
Main constructor that sets the properties needed to control the pattern matching.

Parameters:
matchList - String which contains a list of patterns to check against.
matchListSeparator - List separator that is used in the "matchList" string to delimit the values.
matchType - Controls whether to check the path's prefix to match the pattern or simply is present/included in the path.
pathType - Valid values are "URI" and "PathInfo". This property controls which request path to check.
Method Detail

matches

public boolean matches(javax.servlet.http.HttpServletRequest request)
Main method that does the pattern matching/testing.

Parameters:
request - Tests the URI or PathInfo request path based on the "pathType" constructor property.
Returns:
true if no patterns or if matches pattern(s), false otherwise.