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

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

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

Copyright (c) 2005-2006 The Grails project