interface Matcher
A Matcher is used to configure matching for Interceptor instances
| Modifiers | Name | Description |
|---|---|---|
static java.lang.String |
THROWABLE |
| Type Params | Return Type | Name and description |
|---|---|---|
|
abstract boolean |
doesMatch(java.lang.String uri, UrlMappingInfo info)Checks whether the given UrlMappingInfo matches |
|
abstract boolean |
doesMatch(java.lang.String uri, UrlMappingInfo info, java.lang.String method)Perform the matches using the http method of the request instead of the UrlMappingInfo |
|
boolean |
doesMatch(java.lang.String uri, UrlMappingInfo info, java.lang.String method, java.lang.String contextPath)Performs the match for a request deployed under a context path. |
|
abstract Matcher |
except(java.util.Map arguments)Synonym for Matcher.excludes |
|
abstract Matcher |
excludes(java.util.Map arguments)Adds an exclusion for the given arguments |
|
abstract Matcher |
excludes(Closure<java.lang.Boolean> condition)Adds an exclusion that is calculated by the given closure |
|
abstract boolean |
isExclude()Checks whether the current matcher is a exclude matcher or not |
|
abstract Matcher |
matchAll()Indicate that this matcher should match all requests |
|
abstract Matcher |
matches(java.util.Map arguments)Defines the match for the given arguments |
Checks whether the given UrlMappingInfo matches
info - The UrlMappingInfo to checkPerform the matches using the http method of the request instead of the UrlMappingInfo @return
Performs the match for a request deployed under a context path.
Interceptor.doesMatch canonicalizes the request path once and calls this method for every matcher. The default implementation delegates to doesMatch(String, UrlMappingInfo, String) with the same path, so a custom matcher only needs to implement this method if it wants to take the context path into account.
uri - The path of the request within the application: decoded, with matrix parameters removed and the
context path stripped, exactly as URL mappings route itinfo - The UrlMappingInfo matched for the request, or null if none was matchedmethod - The HTTP method of the requestcontextPath - The context path of the request, empty when the application is deployed at the rootSynonym for Matcher.excludes
Adds an exclusion for the given arguments
arguments - A named argument map including one or more of the controller name, action name, namespace and methodAdds an exclusion that is calculated by the given closure
condition - The condition, a closure which has full access to the properties of the InterceptorChecks whether the current matcher is a exclude matcher or not
Indicate that this matcher should match all requests
Defines the match for the given arguments
arguments - A named argument map including one or more of the controller name, action name, namespace and method