Matcher (Grails 5.2.4)

Package: grails.interceptors

## [Groovy] Interface Matcher

-     interface Matcher

  A Matcher is used to configure matching for Interceptor instances

  See Also:
    Interceptor.match
  Authors:
    Graeme Rocher
  Since:
    3.0

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `static java.lang.String` | `THROWABLE` |

  - ### Methods Summary

    Methods
    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
    `` | `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(groovy.lang.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

- - ### Field Detail

    - #### public static final java.lang.String THROWABLE

  - ### Method Detail

    - #### abstract boolean doesMatch(java.lang.String uri, UrlMappingInfo info)

      Checks whether the given UrlMappingInfo matches

      Parameters:
        `info` - The UrlMappingInfo to check
      Returns:
        True if it does match

    - #### 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 @return

      Parameters:
        uri
        info
        method

    - #### 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

      Parameters:
        `arguments` - A named argument map including one or more of the controller name, action name, namespace and method
      Returns:
        This matcher

    - #### abstract Matcher excludes(@groovy.lang.DelegatesTo(value: Interceptor) groovy.lang.Closure<java.lang.Boolean> condition)

      Adds an exclusion that is calculated by the given closure

      Parameters:
        `condition` - The condition, a closure which has full access to the properties of the groovy.lang.Interceptor
      Returns:
        This matcher

    - #### 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

      Returns:
        This matcher

    - #### abstract Matcher matches(java.util.Map arguments)

      Defines the match for the given arguments

      Parameters:
        `arguments` - A named argument map including one or more of the controller name, action name, namespace and method
      Returns:
        This matcher