Package org.grails.web.mapping
Class DefaultUrlCreator
- java.lang.Object
-
- org.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
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringARGUMENT_ID
-
Constructor Summary
Constructors Constructor Description DefaultUrlCreator(java.lang.String controller, java.lang.String action)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringcreateRelativeURL(java.lang.String controller, java.lang.String action, java.lang.String namespace, java.lang.String pluginName, java.util.Map parameterValues, java.lang.String encoding)Creates a URL for the given parameters values, controller and action names without the context path informationjava.lang.StringcreateRelativeURL(java.lang.String controller, java.lang.String action, java.lang.String namespace, java.lang.String pluginName, java.util.Map parameterValues, java.lang.String encoding, java.lang.String fragment)Creates a URL for the given parameters values, controller and action names without the context path informationjava.lang.StringcreateRelativeURL(java.lang.String controller, java.lang.String action, java.lang.String pluginName, java.util.Map parameterValues, java.lang.String encoding)Creates a URL for the given parameters values, controller and action names without the context path informationjava.lang.StringcreateRelativeURL(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 informationjava.lang.StringcreateRelativeURL(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 without the context path informationjava.lang.StringcreateURL(java.lang.String controller, java.lang.String action, java.lang.String namespace, java.lang.String pluginName, java.util.Map parameterValues, java.lang.String encoding)Creates a URL for the given parameters values, controller and action namesjava.lang.StringcreateURL(java.lang.String controller, java.lang.String action, java.lang.String namespace, java.lang.String pluginName, java.util.Map parameterValues, java.lang.String encoding, java.lang.String fragment)Creates a URL for the given parameters values, controller and action namesjava.lang.StringcreateURL(java.lang.String controller, java.lang.String action, java.lang.String pluginName, java.util.Map parameterValues, java.lang.String encoding)Creates a URL for the given parameters values, controller and action namesjava.lang.StringcreateURL(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 namesjava.lang.StringcreateURL(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 namesjava.lang.StringcreateURL(java.util.Map parameterValues, java.lang.String encoding)Creates a URL for the given parameter valuesjava.lang.StringcreateURL(java.util.Map parameterValues, java.lang.String encoding, java.lang.String fragment)Creates a URL for the given parameter values
-
-
-
Field Detail
-
ARGUMENT_ID
public static final java.lang.String ARGUMENT_ID
- See Also:
- Constant Field Values
-
-
Method Detail
-
createURL
public java.lang.String createURL(java.util.Map parameterValues, java.lang.String encoding)Description copied from interface:UrlCreatorCreates a URL for the given parameter values- Specified by:
createURLin interfaceUrlCreator- Parameters:
parameterValues- The parameter valuesencoding- 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:UrlCreatorCreates a URL for the given parameter values- Specified by:
createURLin interfaceUrlCreator- Parameters:
parameterValues- The parameter valuesencoding- The encoding to use for parametersfragment- 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:UrlCreatorCreates a URL for the given parameters values, controller and action names- Specified by:
createURLin interfaceUrlCreator- Parameters:
controller- The controller nameaction- The action nameparameterValues- The parameter valuesencoding- 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.lang.String pluginName, java.util.Map parameterValues, java.lang.String encoding)Description copied from interface:UrlCreatorCreates a URL for the given parameters values, controller and action names- Specified by:
createURLin interfaceUrlCreator- Parameters:
controller- The controller nameaction- The action namepluginName- The name of the plugin which provides the controllerparameterValues- The parameter valuesencoding- 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.lang.String namespace, java.lang.String pluginName, java.util.Map parameterValues, java.lang.String encoding)Description copied from interface:UrlCreatorCreates a URL for the given parameters values, controller and action names- Specified by:
createURLin interfaceUrlCreator- Parameters:
controller- The controller nameaction- The action namenamespace- The controller namespacepluginName- The name of the plugin which provides the controllerparameterValues- The parameter valuesencoding- 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:UrlCreatorCreates a URL for the given parameters values, controller and action names without the context path information- Specified by:
createRelativeURLin interfaceUrlCreator- Parameters:
controller- The controller nameaction- The action nameparameterValues- The parameter valuesencoding- 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.lang.String pluginName, java.util.Map parameterValues, java.lang.String encoding)Description copied from interface:UrlCreatorCreates a URL for the given parameters values, controller and action names without the context path information- Specified by:
createRelativeURLin interfaceUrlCreator- Parameters:
controller- The controller nameaction- The action namepluginName- The name of the plugin which provides the controllerparameterValues- The parameter valuesencoding- 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.lang.String namespace, java.lang.String pluginName, java.util.Map parameterValues, java.lang.String encoding)Description copied from interface:UrlCreatorCreates a URL for the given parameters values, controller and action names without the context path information- Specified by:
createRelativeURLin interfaceUrlCreator- Parameters:
controller- The controller nameaction- The action namenamespace- The controller namespacepluginName- The name of the plugin which provides the controllerparameterValues- The parameter valuesencoding- 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, java.lang.String fragment)Description copied from interface:UrlCreatorCreates a URL for the given parameters values, controller and action names without the context path information- Specified by:
createRelativeURLin interfaceUrlCreator- Parameters:
controller- The controller nameaction- The action nameparameterValues- The parameter valuesencoding- The encoding to use for parametersfragment- The fragment to append to the end- Returns:
- The created URL for the given arguments
-
createRelativeURL
public java.lang.String createRelativeURL(java.lang.String controller, java.lang.String action, java.lang.String namespace, java.lang.String pluginName, java.util.Map parameterValues, java.lang.String encoding, java.lang.String fragment)Description copied from interface:UrlCreatorCreates a URL for the given parameters values, controller and action names without the context path information- Specified by:
createRelativeURLin interfaceUrlCreator- Parameters:
controller- The controller nameaction- The action namenamespace- The controller namespacepluginName- The name of the plugin which provides the controllerparameterValues- The parameter valuesencoding- The encoding to use for parametersfragment- The fragment to append to the end- 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:UrlCreatorCreates a URL for the given parameters values, controller and action names- Specified by:
createURLin interfaceUrlCreator- Parameters:
controller- The controller nameaction- The action nameparameterValues- The parameter valuesencoding- The encoding to use for parametersfragment- The URL fragment to be appended to the URL following a #- Returns:
- The created URL for the given arguments
-
createURL
public java.lang.String createURL(java.lang.String controller, java.lang.String action, java.lang.String namespace, java.lang.String pluginName, java.util.Map parameterValues, java.lang.String encoding, java.lang.String fragment)Description copied from interface:UrlCreatorCreates a URL for the given parameters values, controller and action names- Specified by:
createURLin interfaceUrlCreator- Parameters:
controller- The controller nameaction- The action namenamespace- The controller namespacepluginName- The name of the plugin which provides the controllerparameterValues- The parameter valuesencoding- The encoding to use for parametersfragment- The URL fragment to be appended to the URL following a #- Returns:
- The created URL for the given arguments
-
-