## org.codehaus.groovy.grails.web.mapping
Class DefaultUrlCreator

    java.lang.Object
      org.codehaus.groovy.grails.web.mapping.DefaultUrlCreator

All Implemented Interfaces:
  UrlCreator

    public class DefaultUrlCreator

extends Object
implements UrlCreator

The default implementation of the UrlCreator interface that constructs URLs in Grails default pattern of /controllerName/actionName/id

Since:
  0.5.5

  Created: May 30, 2007 Time: 8:37:15 AM
Author:
  Graeme Rocher

Field Summary
`static String` `ARGUMENT_ID`

Constructor Summary
`DefaultUrlCreator(String controller, String action)`

Method Summary
`String` `createRelativeURL(String controller, String action, Map parameterValues, String encoding)` Creates a URL for the given parameters values, controller and action names without the context path information
`String` `createRelativeURL(String controller, String action, Map parameterValues, String encoding, String fragment)` Creates a URL for the given parameters values, controller and action names without the context path information
`String` `createURL(Map parameterValues, String encoding)` Creates a URL for the given parameter values
`String` `createURL(Map parameterValues, String encoding, String fragment)` Creates a URL for the given parameter values
`String` `createURL(String controller, String action, Map parameterValues, String encoding)` Creates a URL for the given parameters values, controller and action names
`String` `createURL(String controller, String action, Map parameterValues, String encoding, String fragment)` Creates a URL for the given parameters values, controller and action names

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### ARGUMENT_ID

    public static final String ARGUMENT_ID

See Also:
  Constant Field Values

Constructor Detail

### DefaultUrlCreator

    public DefaultUrlCreator(String controller,
                             String action)

Method Detail

### createURL

    public String createURL(Map parameterValues,
                            String encoding)

  Description copied from interface: `UrlCreator`
  Creates a URL for the given parameter values

  Specified by:
    `createURL` in interface `UrlCreator`
  Parameters:
    `parameterValues` - The parameter values
    `encoding` - The encoding to use for parameters
  Returns:
    Returns the created URL for the given parameter values

### createURL

    public String createURL(Map parameterValues,
                            String encoding,
                            String fragment)

  Description copied from interface: `UrlCreator`
  Creates a URL for the given parameter values

  Specified by:
    `createURL` in interface `UrlCreator`
  Parameters:
    `parameterValues` - The parameter values
    `encoding` - The encoding to use for parameters
    `fragment` - The URL fragment to be appended to the URL following a #
  Returns:
    Returns the created URL for the given parameter values

### createURL

    public String createURL(String controller,
                            String action,
                            Map parameterValues,
                            String encoding)

  Description copied from interface: `UrlCreator`
  Creates a URL for the given parameters values, controller and action names

  Specified by:
    `createURL` in interface `UrlCreator`
  Parameters:
    `controller` - The controller name
    `action` - The action name
    `parameterValues` - The parameter values
    `encoding` - The encoding to use for parameters
  Returns:
    The created URL for the given arguments

### createRelativeURL

    public String createRelativeURL(String controller,
                                    String action,
                                    Map parameterValues,
                                    String encoding)

  Description copied from interface: `UrlCreator`
  Creates a URL for the given parameters values, controller and action names without the context path information

  Specified by:
    `createRelativeURL` in interface `UrlCreator`
  Parameters:
    `controller` - The controller name
    `action` - The action name
    `parameterValues` - The parameter values
    `encoding` - The encoding to use for parameters
  Returns:
    The created URL for the given arguments

### createRelativeURL

    public String createRelativeURL(String controller,
                                    String action,
                                    Map parameterValues,
                                    String encoding,
                                    String fragment)

  Description copied from interface: `UrlCreator`
  Creates a URL for the given parameters values, controller and action names without the context path information

  Specified by:
    `createRelativeURL` in interface `UrlCreator`
  Parameters:
    `controller` - The controller name
    `action` - The action name
    `parameterValues` - The parameter values
    `encoding` - The encoding to use for parameters
    `fragment` - The fragment to append to the end
  Returns:
    The created URL for the given arguments

### createURL

    public String createURL(String controller,
                            String action,
                            Map parameterValues,
                            String encoding,
                            String fragment)

  Description copied from interface: `UrlCreator`
  Creates a URL for the given parameters values, controller and action names

  Specified by:
    `createURL` in interface `UrlCreator`
  Parameters:
    `controller` - The controller name
    `action` - The action name
    `parameterValues` - The parameter values
    `encoding` - The encoding to use for parameters
    `fragment` - The URL fragment to be appended to the URL following a #
  Returns:
    The created URL for the given arguments

Copyright (c) 2005-2009 The Grails project