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

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

public class DefaultUrlMappingInfo
extends Object
implements UrlMappingInfo

A Class that implements the UrlMappingInfo interface and holds information established from a matched URL

Since:
0.5

Created: Mar 1, 2007 Time: 7:19:35 AM

Author:
Graeme Rocher

Constructor Summary
DefaultUrlMappingInfo(Object viewName, Map params, UrlMappingData urlData, ServletContext servletContext)
           
DefaultUrlMappingInfo(Object controllerName, Object actionName, Object viewName, Map params, UrlMappingData urlData, ServletContext servletContext)
           
 
Method Summary
 void configure(GrailsWebRequest webRequest)
          Configure this UrlMappingInfo the for the given GrailsWebRequest
 String getActionName()
          The name of the action that the URL mappping maps to
 String getControllerName()
          The name of the controller that the URL mapping maps to
 String getId()
          The id part of the URL mapping if any
 Map getParameters()
          The parameters that were extracted from the URI that was matched
 String getViewName()
          The name of the view that the URL mappping maps to
 boolean isParsingRequest()
          Returns true of the request body should be parsed.
protected  void populateParamsForMapping(GrailsWebRequest webRequest)
          Populates request parameters for the given UrlMappingInfo instance using the GrailsWebRequest
 void setParsingRequest(boolean parsingRequest)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultUrlMappingInfo

public DefaultUrlMappingInfo(Object controllerName,
                             Object actionName,
                             Object viewName,
                             Map params,
                             UrlMappingData urlData,
                             ServletContext servletContext)

DefaultUrlMappingInfo

public DefaultUrlMappingInfo(Object viewName,
                             Map params,
                             UrlMappingData urlData,
                             ServletContext servletContext)
Method Detail

toString

public String toString()
Overrides:
toString in class Object

populateParamsForMapping

protected void populateParamsForMapping(GrailsWebRequest webRequest)
Populates request parameters for the given UrlMappingInfo instance using the GrailsWebRequest

Parameters:
webRequest - The Map instance
See Also:
GrailsWebRequest

getParameters

public Map getParameters()
Description copied from interface: UrlMappingInfo
The parameters that were extracted from the URI that was matched

Specified by:
getParameters in interface UrlMappingInfo
Returns:
A Map of parameters

configure

public void configure(GrailsWebRequest webRequest)
Description copied from interface: UrlMappingInfo
Configure this UrlMappingInfo the for the given GrailsWebRequest

Specified by:
configure in interface UrlMappingInfo
Parameters:
webRequest - The GrailsWebRequest instance

isParsingRequest

public boolean isParsingRequest()
Description copied from interface: UrlMappingInfo
Returns true of the request body should be parsed. This typically happens in the case of REST requests that parse JSON or XML packets

Specified by:
isParsingRequest in interface UrlMappingInfo
Returns:
True if it is

setParsingRequest

public void setParsingRequest(boolean parsingRequest)

getControllerName

public String getControllerName()
Description copied from interface: UrlMappingInfo
The name of the controller that the URL mapping maps to

Specified by:
getControllerName in interface UrlMappingInfo
Returns:
The name of the controller

getActionName

public String getActionName()
Description copied from interface: UrlMappingInfo
The name of the action that the URL mappping maps to

Specified by:
getActionName in interface UrlMappingInfo
Returns:
The name of the action or null if not known

getViewName

public String getViewName()
Description copied from interface: UrlMappingInfo
The name of the view that the URL mappping maps to

Specified by:
getViewName in interface UrlMappingInfo
Returns:
The name of the view or null if not known

getId

public String getId()
Description copied from interface: UrlMappingInfo
The id part of the URL mapping if any

Specified by:
getId in interface UrlMappingInfo
Returns:
The id or null


Copyright (c) 2005-2009 The Grails project