|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.security.web.util.RegexRequestMatcher
public final class RegexRequestMatcher
Uses a regular expression to decide whether a supplied the URL of a supplied HttpServletRequest
.
Can also be configured to match a specific HTTP method.
The match is performed against the servletPath + pathInfo + queryString
of the request and is case-sensitive
by default. Case-insensitive matching can be used by using the constructor which takes the caseInsensitive
argument.
Constructor Summary | |
---|---|
RegexRequestMatcher(String pattern,
String httpMethod)
Creates a case-sensitive Pattern instance to match against the request. |
|
RegexRequestMatcher(String pattern,
String httpMethod,
boolean caseInsensitive)
As above, but allows setting of whether case-insensitive matching should be used. |
Method Summary | |
---|---|
boolean |
matches(javax.servlet.http.HttpServletRequest request)
Performs the match of the request URL ( servletPath + pathInfo + queryString ) against
the compiled pattern. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RegexRequestMatcher(String pattern, String httpMethod)
Pattern
instance to match against the request.
pattern
- the regular expression to compile into a pattern.httpMethod
- the HTTP method to match. May be null to match all methods.public RegexRequestMatcher(String pattern, String httpMethod, boolean caseInsensitive)
pattern
- the regular expression to compile into a pattern.httpMethod
- the HTTP method to match. May be null to match all methods.caseInsensitive
- if true, the pattern will be compiled with the Pattern.CASE_INSENSITIVE
flag set.Method Detail |
---|
public boolean matches(javax.servlet.http.HttpServletRequest request)
servletPath + pathInfo + queryString
) against
the compiled pattern. If the query string is present, a question mark will be prepended.
matches
in interface RequestMatcher
request
- the request to match
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |