## org.codehaus.groovy.grails.web.mapping
Interface UrlMappingsHolder

All Known Implementing Classes:
  DefaultUrlMappingsHolder

    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 implementor contains

Since:
  0.5

  Created: Mar 6, 2007 Time: 8:03:25 AM
Author:
  Graeme Rocher

Field Summary
`static String` `BEAN_ID`

Method Summary
`List` `getExcludePatterns()` Retrieves the held Exclude Pattern instances as a list, could be null if there is no exclude
`UrlCreator` `getReverseMapping(String controller, String action, Map params)` Retrieves the best guess of a URI for the given controller, action and parameters
`UrlMapping[]` `getUrlMappings()` Retrieves the held UrlMapping instances as an array
`UrlMappingInfo` `match(String uri)` Match and return the first UrlMappingInfo instance possible
`UrlMappingInfo[]` `matchAll(String uri)` Matches all possible UrlMappingInfo instances to the given URI and returns them all
`UrlMappingInfo[]` `matchAll(String uri, String httpMethod)` Match all possible UrlMappingInfo instances to the given URI and HTTP method
`UrlMappingInfo` `matchStatusCode(int responseCode)` Match and return the first UrlMappingInfo instance possible
`UrlMappingInfo` `matchStatusCode(int responseCode, Throwable e)` Match and return for first UrlMappingInfo for the give response code and exception

Field Detail

### BEAN_ID

    static final String BEAN_ID

See Also:
  Constant Field Values

Method Detail

### getUrlMappings

    UrlMapping[] getUrlMappings()

  Retrieves the held UrlMapping instances as an array

  Returns:
    An array of UrlMapping instances

### getExcludePatterns

    List getExcludePatterns()

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

  Returns:
    An list of String

### getReverseMapping

    UrlCreator getReverseMapping(String controller,
                                 String action,
                                 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

### match

    UrlMappingInfo match(String uri)

  Match and return the first UrlMappingInfo instance possible

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

### matchAll

    UrlMappingInfo[] matchAll(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

### matchAll

    UrlMappingInfo[] matchAll(String uri,
                              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

### matchStatusCode

    UrlMappingInfo matchStatusCode(int responseCode)

  Match and return the first UrlMappingInfo instance possible

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

### matchStatusCode

    UrlMappingInfo matchStatusCode(int responseCode,
                                   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

Copyright (c) 2005-2009 The Grails project