org.springframework.security.web.util
Class AntUrlPathMatcher

java.lang.Object
  extended by org.springframework.security.web.util.AntUrlPathMatcher
All Implemented Interfaces:
UrlMatcher

public class AntUrlPathMatcher
extends Object
implements UrlMatcher

Ant path strategy for URL matching.

If the path consists of the pattern /** or **, it is treated as a universal match, which wil match any URL.

For all other cases, Spring's AntPathMatcher is used to perform the check for a match. See the Spring documentation for this class for more information on the syntax details.


Constructor Summary
AntUrlPathMatcher()
           
AntUrlPathMatcher(boolean requiresLowerCaseUrl)
           
 
Method Summary
 Object compile(String path)
           
 String getUniversalMatchPattern()
          Returns the path which matches every URL
 boolean pathMatchesUrl(Object path, String url)
           
 boolean requiresLowerCaseUrl()
          Returns true if the matcher expects the URL to be converted to lower case before calling UrlMatcher.pathMatchesUrl(Object, String).
 void setRequiresLowerCaseUrl(boolean requiresLowerCaseUrl)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AntUrlPathMatcher

public AntUrlPathMatcher()

AntUrlPathMatcher

public AntUrlPathMatcher(boolean requiresLowerCaseUrl)
Method Detail

compile

public Object compile(String path)
Specified by:
compile in interface UrlMatcher

setRequiresLowerCaseUrl

public void setRequiresLowerCaseUrl(boolean requiresLowerCaseUrl)

pathMatchesUrl

public boolean pathMatchesUrl(Object path,
                              String url)
Specified by:
pathMatchesUrl in interface UrlMatcher

getUniversalMatchPattern

public String getUniversalMatchPattern()
Description copied from interface: UrlMatcher
Returns the path which matches every URL

Specified by:
getUniversalMatchPattern in interface UrlMatcher

requiresLowerCaseUrl

public boolean requiresLowerCaseUrl()
Description copied from interface: UrlMatcher
Returns true if the matcher expects the URL to be converted to lower case before calling UrlMatcher.pathMatchesUrl(Object, String).

Specified by:
requiresLowerCaseUrl in interface UrlMatcher

toString

public String toString()
Overrides:
toString in class Object