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

java.lang.Object
  extended by org.codehaus.groovy.grails.web.mapping.DefaultUrlCreator
All Implemented Interfaces:
UrlCreator

public class DefaultUrlCreator
extends java.lang.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 java.lang.String ARGUMENT_ID
           
 
Constructor Summary
DefaultUrlCreator(java.lang.String controller, java.lang.String action)
           
 
Method Summary
 java.lang.String createRelativeURL(java.lang.String controller, java.lang.String action, java.util.Map parameterValues, java.lang.String encoding)
          Creates a URL for the given parameters values, controller and action names without the context path information
 java.lang.String createURL(java.util.Map parameterValues, java.lang.String encoding)
          Creates a URL for the given parameter values
 java.lang.String createURL(java.util.Map parameterValues, java.lang.String encoding, java.lang.String fragment)
          Creates a URL for the given parameter values
 java.lang.String createURL(java.lang.String controller, java.lang.String action, java.util.Map parameterValues, java.lang.String encoding)
          Creates a URL for the given parameters values, controller and action names
 java.lang.String createURL(java.lang.String controller, java.lang.String action, java.util.Map parameterValues, java.lang.String encoding, java.lang.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 java.lang.String ARGUMENT_ID
See Also:
Constant Field Values
Constructor Detail

DefaultUrlCreator

public DefaultUrlCreator(java.lang.String controller,
                         java.lang.String action)
Method Detail

createURL

public java.lang.String createURL(java.util.Map parameterValues,
                                  java.lang.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 java.lang.String createURL(java.util.Map parameterValues,
                                  java.lang.String encoding,
                                  java.lang.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 java.lang.String createURL(java.lang.String controller,
                                  java.lang.String action,
                                  java.util.Map parameterValues,
                                  java.lang.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 java.lang.String createRelativeURL(java.lang.String controller,
                                          java.lang.String action,
                                          java.util.Map parameterValues,
                                          java.lang.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

createURL

public java.lang.String createURL(java.lang.String controller,
                                  java.lang.String action,
                                  java.util.Map parameterValues,
                                  java.lang.String encoding,
                                  java.lang.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-2006 The Grails project