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)
           
DefaultUrlMappingInfo(Object controllerName, Object actionName, Object viewName, Map params, UrlMappingData urlData)
           
 
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
protected  void populateParamsForMapping(Map dispatchParams)
          Populates request parameters for the given UrlMappingInfo instance using the GrailsWebRequest
 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)

DefaultUrlMappingInfo

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

toString

public String toString()
Overrides:
toString in class Object

populateParamsForMapping

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

Parameters:
dispatchParams - 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

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-2006 The Grails project