UrlMappingsHolder (Grails 6.0.0)

Package: grails.web.mapping

## [Java] Interface UrlMappingsHolder

-     public interface UrlMappingsHolder

  Main entry point of Grails URL mapping mechanism. This interface defines methods to match URLs and create reverse mappings based on the UrlMapping instances the implementer contains.

  Authors:
    Graeme Rocher
  Since:
    0.5

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `java.lang.String` | `BEAN_ID` |

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public java.util.Set<org.springframework.http.HttpMethod>` | `allowedMethods(java.lang.String uri)` Return the allowed HTTP methods for the given URI
    `` | `public java.util.List` | `getExcludePatterns()` Retrieves the held Exclude Pattern instances as a list, could be null if there is no exclude
    `` | `public UrlCreator` | `getReverseMapping(java.lang.String controller, java.lang.String action, java.lang.String pluginName, java.util.Map params)` Retrieves the best guess of a URI for the given controller, action and parameters
    `` | `public UrlCreator` | `getReverseMapping(java.lang.String controller, java.lang.String action, java.lang.String namespace, java.lang.String pluginName, java.lang.String httpMethod, java.util.Map params)` Retrieves the best guess of a URI for the given controller, action and parameters
    `` | `public UrlCreator` | `getReverseMapping(java.lang.String controller, java.lang.String action, java.lang.String namespace, java.lang.String pluginName, java.lang.String httpMethod, java.lang.String version, java.util.Map params)` Retrieves the best guess of a URI for the given controller, action and parameters
    `` | `public UrlCreator` | `getReverseMapping(java.lang.String controller, java.lang.String action, java.lang.String namespace, java.lang.String pluginName, java.util.Map params)` Retrieves the best guess of a URI for the given controller, action and parameters
    `` | `public UrlCreator` | `getReverseMapping(java.lang.String controller, java.lang.String action, java.util.Map params)` Retrieves the best guess of a URI for the given controller, action and parameters
    `` | `public UrlCreator` | `getReverseMappingNoDefault(java.lang.String controller, java.lang.String action, java.util.Map params)` Retrieves the best guess of a URI for the given controller, action and parameters or null if non could be found.
    `` | `public UrlCreator` | `getReverseMappingNoDefault(java.lang.String controller, java.lang.String action, java.lang.String namespace, java.lang.String pluginName, java.lang.String httpMethod, java.util.Map params)` Retrieves the best guess of a URI for the given controller, action and parameters or null if non could be found.
    `` | `public UrlCreator` | `getReverseMappingNoDefault(java.lang.String controller, java.lang.String action, java.lang.String namespace, java.lang.String pluginName, java.lang.String httpMethod, java.lang.String version, java.util.Map params)` Retrieves the best guess of a URI for the given controller, action and parameters or null if non could be found.
    `` | `public UrlMapping[]` | `getUrlMappings()` Retrieves the held UrlMapping instances as an array
    `` | `public UrlMappingInfo` | `match(java.lang.String uri)` Match and return the first UrlMappingInfo instance possible
    `` | `public UrlMappingInfo[]` | `matchAll(java.lang.String uri)` Matches all possible UrlMappingInfo instances to the given URI and returns them all
    `` | `public UrlMappingInfo[]` | `matchAll(java.lang.String uri, java.lang.String httpMethod)` Match all possible UrlMappingInfo instances to the given URI and HTTP method
    `` | `public UrlMappingInfo[]` | `matchAll(java.lang.String uri, java.lang.String httpMethod, java.lang.String version)` Match all possible UrlMappingInfo instances to the given URI and HTTP method
    `` | `public UrlMappingInfo[]` | `matchAll(java.lang.String uri, org.springframework.http.HttpMethod httpMethod)` Match all possible UrlMappingInfo instances to the given URI and HTTP method
    `` | `public UrlMappingInfo[]` | `matchAll(java.lang.String uri, org.springframework.http.HttpMethod httpMethod, java.lang.String version)` Match all possible UrlMappingInfo instances to the given URI and HTTP method
    `` | `public UrlMappingInfo` | `matchStatusCode(int responseCode)` Match and return the first UrlMappingInfo instance possible
    `` | `public UrlMappingInfo` | `matchStatusCode(int responseCode, java.lang.Throwable e)` Match and return for first UrlMappingInfo for the give response code and exception

- - ### Field Detail

    - #### java.lang.String BEAN_ID

  - ### Method Detail

    - #### public java.util.Set<org.springframework.http.HttpMethod> allowedMethods(java.lang.String uri)

      Return the allowed HTTP methods for the given URI

      Parameters:
        `uri` - The URI
      Returns:
        The allowed methods

    - #### @java.lang.SuppressWarnings("rawtypes") public java.util.List getExcludePatterns()

      Retrieves the held Exclude Pattern instances as a list, could be null if there is no exclude

      Returns:
        An list of String

    - #### @java.lang.SuppressWarnings("rawtypes") public UrlCreator getReverseMapping(java.lang.String controller, java.lang.String action, java.lang.String pluginName, java.util.Map params)

      Retrieves the best guess of a URI for the given controller, action and parameters

      Parameters:
        `controller` - The name of the controller
        `action` - The name of the action or null
        `pluginName` - the name of the plugin which provides the controller
        `params` - The parameters or null
      Returns:
        A URI for the given arguments

    - #### @java.lang.SuppressWarnings("rawtypes") public UrlCreator getReverseMapping(java.lang.String controller, java.lang.String action, java.lang.String namespace, java.lang.String pluginName, java.lang.String httpMethod, java.util.Map params)

      Retrieves the best guess of a URI for the given controller, action and parameters

      Parameters:
        `controller` - The name of the controller
        `action` - The name of the action or null
        `namespace` - The controller namespace
        `pluginName` - the name of the plugin which provides the controller
        `httpMethod` - The HTTP method to reverse map
        `params` - The parameters or null
      Returns:
        A URI for the given arguments

    - #### @java.lang.SuppressWarnings("rawtypes") public UrlCreator getReverseMapping(java.lang.String controller, java.lang.String action, java.lang.String namespace, java.lang.String pluginName, java.lang.String httpMethod, java.lang.String version, java.util.Map params)

      Retrieves the best guess of a URI for the given controller, action and parameters

      Parameters:
        `controller` - The name of the controller
        `action` - The name of the action or null
        `namespace` - The controller namespace
        `pluginName` - the name of the plugin which provides the controller
        `httpMethod` - The HTTP method to reverse map
        `version` - The version of the mapping
        `params` - The parameters or null
      Returns:
        A URI for the given arguments

    - #### @java.lang.SuppressWarnings("rawtypes") public UrlCreator getReverseMapping(java.lang.String controller, java.lang.String action, java.lang.String namespace, java.lang.String pluginName, java.util.Map params)

      Retrieves the best guess of a URI for the given controller, action and parameters

      Parameters:
        `controller` - The name of the controller
        `action` - The name of the action or null
        `namespace` - The controller namespace or null
        `pluginName` - the name of the plugin which provides the controller
        `params` - The parameters or null
      Returns:
        A URI for the given arguments

    - #### @java.lang.SuppressWarnings("rawtypes") public UrlCreator getReverseMapping(java.lang.String controller, java.lang.String action, java.util.Map params)

      Retrieves the best guess of a URI for the given controller, action and parameters

      Parameters:
        `controller` - The name of the controller
        `action` - The name of the action or null
        `params` - The parameters or null
      Returns:
        A URI for the given arguments

    - #### @java.lang.SuppressWarnings("rawtypes") public UrlCreator getReverseMappingNoDefault(java.lang.String controller, java.lang.String action, java.util.Map params)

      Retrieves the best guess of a URI for the given controller, action and parameters or null if non could be found.

      Parameters:
        `controller` - The name of the controller
        `action` - The name of the action or null
        `params` - The parameters or null
      Returns:
        A URI for the given arguments

    - #### @java.lang.SuppressWarnings("rawtypes") public UrlCreator getReverseMappingNoDefault(java.lang.String controller, java.lang.String action, java.lang.String namespace, java.lang.String pluginName, java.lang.String httpMethod, java.util.Map params)

      Retrieves the best guess of a URI for the given controller, action and parameters or null if non could be found.

      Parameters:
        `controller` - The name of the controller
        `action` - The name of the action or null
        `namespace` - The controller namespace or null
        `pluginName` - the name of the plugin which provides the controller
        `httpMethod` - the HTTP method
        `params` - The parameters or null
      Returns:
        A URI for the given arguments

    - #### @java.lang.SuppressWarnings("rawtypes") public UrlCreator getReverseMappingNoDefault(java.lang.String controller, java.lang.String action, java.lang.String namespace, java.lang.String pluginName, java.lang.String httpMethod, java.lang.String version, java.util.Map params)

      Retrieves the best guess of a URI for the given controller, action and parameters or null if non could be found.

      Parameters:
        `controller` - The name of the controller
        `action` - The name of the action or null
        `namespace` - The controller namespace or null
        `pluginName` - the name of the plugin which provides the controller
        `httpMethod` - the HTTP method
        `params` - The parameters or null
      Returns:
        A URI for the given arguments

    - #### public UrlMapping[] getUrlMappings()

      Retrieves the held UrlMapping instances as an array

      Returns:
        An array of UrlMapping instances

    - #### public UrlMappingInfo match(java.lang.String uri)

      Match and return the first UrlMappingInfo instance possible

      Parameters:
        `uri` - The URI to match
      Returns:
        A UrlMappingInfo or null

    - #### public UrlMappingInfo[] matchAll(java.lang.String uri)

      Matches all possible UrlMappingInfo instances to the given URI and returns them all

      Parameters:
        `uri` - The URI to match
      Returns:
        An array of 0 or many UrlMappngInfo instances

    - #### public UrlMappingInfo[] matchAll(java.lang.String uri, java.lang.String httpMethod)

      Match all possible UrlMappingInfo instances to the given URI and HTTP method

      Parameters:
        `uri` - The URI to match
        `httpMethod` - The HTTP method (GET,POST,PUT,DELETE etc.)
      Returns:
        An array of 0 or many UrlMappingInfo instances

    - #### public UrlMappingInfo[] matchAll(java.lang.String uri, java.lang.String httpMethod, java.lang.String version)

      Match all possible UrlMappingInfo instances to the given URI and HTTP method

      Parameters:
        `uri` - The URI to match
        `httpMethod` - The HTTP method (GET,POST,PUT,DELETE etc.)
        `version` - The version of the API
      Returns:
        An array of 0 or many UrlMappingInfo instances

    - #### public UrlMappingInfo[] matchAll(java.lang.String uri, org.springframework.http.HttpMethod httpMethod)

      Match all possible UrlMappingInfo instances to the given URI and HTTP method

      Parameters:
        `uri` - The URI to match
        `httpMethod` - The HTTP method (GET,POST,PUT,DELETE etc.)
      Returns:
        An array of 0 or many UrlMappingInfo instances

    - #### public UrlMappingInfo[] matchAll(java.lang.String uri, org.springframework.http.HttpMethod httpMethod, java.lang.String version)

      Match all possible UrlMappingInfo instances to the given URI and HTTP method

      Parameters:
        `uri` - The URI to match
        `httpMethod` - The HTTP method (GET,POST,PUT,DELETE etc.)
        `version` - The version
      Returns:
        An array of 0 or many UrlMappingInfo instances

    - #### public UrlMappingInfo matchStatusCode(int responseCode)

      Match and return the first UrlMappingInfo instance possible

      Parameters:
        `responseCode` - The responseCode to match
      Returns:
        A UrlMappingInfo or null

    - #### public UrlMappingInfo matchStatusCode(int responseCode, java.lang.Throwable e)

      Match and return for first UrlMappingInfo for the give response code and exception

      Parameters:
        `responseCode` - The response code
        `e` - The exception
      Returns:
        The UrlMappingInfo instance