Package org.grails.web.mapping
Class DefaultUrlMappingInfo
- java.lang.Object
-
- org.grails.web.mapping.AbstractUrlMappingInfo
-
- org.grails.web.mapping.DefaultUrlMappingInfo
-
- All Implemented Interfaces:
UrlMappingInfo
public class DefaultUrlMappingInfo extends AbstractUrlMappingInfo
Holds information established from a matched URL.- Since:
- 0.5
-
-
Constructor Summary
Constructors Constructor Description DefaultUrlMappingInfo(UrlMappingInfo info, java.util.Map params, grails.core.GrailsApplication grailsApplication)DefaultUrlMappingInfo(java.lang.Object uri, UrlMappingData data, grails.core.GrailsApplication grailsApplication)DefaultUrlMappingInfo(java.lang.Object redirectInfo, java.lang.Object controllerName, java.lang.Object actionName, java.lang.Object namespace, java.lang.Object pluginName, java.lang.Object viewName, java.lang.String httpMethod, java.lang.String version, java.util.Map<?,?> params, UrlMappingData urlData, grails.core.GrailsApplication grailsApplication)DefaultUrlMappingInfo(java.lang.Object redirectInfo, java.lang.Object controllerName, java.lang.Object actionName, java.lang.Object namespace, java.lang.Object pluginName, java.lang.Object viewName, java.util.Map params, UrlMappingData urlData, grails.core.GrailsApplication grailsApplication)DefaultUrlMappingInfo(java.lang.Object uri, java.lang.String httpMethod, UrlMappingData data, grails.core.GrailsApplication grailsApplication)DefaultUrlMappingInfo(java.lang.Object viewName, java.util.Map params, UrlMappingData urlData, grails.core.GrailsApplication grailsApplication)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.lang.StringgetActionName()The name of the action that the URL mappping maps tojava.lang.StringgetControllerName()The name of the controller that the URL mapping maps tojava.lang.StringgetHttpMethod()The HTTP method that this URL mapping maps tojava.lang.StringgetId()The id part of the URL mapping if anyjava.lang.StringgetNamespace()java.util.MapgetParameters()The parameters that were extracted from the URI that was matchedjava.lang.StringgetPluginName()The name of the plugin that this UrlMappingInfo maps tojava.lang.ObjectgetRedirectInfo()The redirect information should be a String or a Map.java.lang.StringgetURI()The URI to map to.UrlMappingDatagetUrlData()Retrieves the UrlMappingData (information about a parsed URL) if anyjava.lang.StringgetVersion()java.lang.StringgetViewName()The name of the view that the URL mappping maps tointhashCode()booleanisParsingRequest()Returns true of the request body should be parsed.voidsetParsingRequest(boolean parsingRequest)java.lang.StringtoString()-
Methods inherited from class org.grails.web.mapping.AbstractUrlMappingInfo
configure, evaluateNameForValue, evaluateNameForValue, getParams, populateParamsForMapping, setParams
-
-
-
-
Constructor Detail
-
DefaultUrlMappingInfo
public DefaultUrlMappingInfo(java.lang.Object redirectInfo, java.lang.Object controllerName, java.lang.Object actionName, java.lang.Object namespace, java.lang.Object pluginName, java.lang.Object viewName, java.util.Map params, UrlMappingData urlData, grails.core.GrailsApplication grailsApplication)
-
DefaultUrlMappingInfo
public DefaultUrlMappingInfo(java.lang.Object redirectInfo, java.lang.Object controllerName, java.lang.Object actionName, java.lang.Object namespace, java.lang.Object pluginName, java.lang.Object viewName, java.lang.String httpMethod, java.lang.String version, java.util.Map<?,?> params, UrlMappingData urlData, grails.core.GrailsApplication grailsApplication)
-
DefaultUrlMappingInfo
public DefaultUrlMappingInfo(java.lang.Object viewName, java.util.Map params, UrlMappingData urlData, grails.core.GrailsApplication grailsApplication)
-
DefaultUrlMappingInfo
public DefaultUrlMappingInfo(java.lang.Object uri, UrlMappingData data, grails.core.GrailsApplication grailsApplication)
-
DefaultUrlMappingInfo
public DefaultUrlMappingInfo(java.lang.Object uri, java.lang.String httpMethod, UrlMappingData data, grails.core.GrailsApplication grailsApplication)
-
DefaultUrlMappingInfo
public DefaultUrlMappingInfo(UrlMappingInfo info, java.util.Map params, grails.core.GrailsApplication grailsApplication)
-
-
Method Detail
-
getVersion
public java.lang.String getVersion()
- Returns:
- The version of the API (for REST)
-
getHttpMethod
public java.lang.String getHttpMethod()
Description copied from interface:UrlMappingInfoThe HTTP method that this URL mapping maps to- Returns:
- The http method
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getParameters
public java.util.Map getParameters()
Description copied from interface:UrlMappingInfoThe parameters that were extracted from the URI that was matched- Returns:
- A Map of parameters
-
isParsingRequest
public boolean isParsingRequest()
Description copied from interface:UrlMappingInfoReturns true of the request body should be parsed. This typically happens in the case of REST requests that parse JSON or XML packets- Returns:
- true if it is
-
setParsingRequest
public void setParsingRequest(boolean parsingRequest)
-
getPluginName
public java.lang.String getPluginName()
Description copied from interface:UrlMappingInfoThe name of the plugin that this UrlMappingInfo maps to- Returns:
- The plugin name
-
getNamespace
public java.lang.String getNamespace()
- Returns:
- the namespace of the corresponding controller, null if none was specified
-
getControllerName
public java.lang.String getControllerName()
Description copied from interface:UrlMappingInfoThe name of the controller that the URL mapping maps to- Returns:
- The name of the controller
-
getActionName
public java.lang.String getActionName()
Description copied from interface:UrlMappingInfoThe name of the action that the URL mappping maps to- Returns:
- The name of the action or null if not known
-
getViewName
public java.lang.String getViewName()
Description copied from interface:UrlMappingInfoThe name of the view that the URL mappping maps to- Returns:
- The name of the view or null if not known
-
getId
public java.lang.String getId()
Description copied from interface:UrlMappingInfoThe id part of the URL mapping if any- Returns:
- The id or null
-
getURI
public java.lang.String getURI()
Description copied from interface:UrlMappingInfoThe URI to map to. Note when the URI is specified it overrides any explicit controller/action/id mappings. In other words you can either specify the URI or the controller/action/id, but not both- Returns:
- The URI to use
-
getRedirectInfo
public java.lang.Object getRedirectInfo()
Description copied from class:AbstractUrlMappingInfoThe redirect information should be a String or a Map. If it is a String that string is the URI to redirect to. If it is a Map, that Map may contain any entries supported as arguments to the dynamic redirect(Map) method on a controller.- Specified by:
getRedirectInfoin interfaceUrlMappingInfo- Overrides:
getRedirectInfoin classAbstractUrlMappingInfo- Returns:
- redirect information for this url mapping, null if no redirect is specified
-
getUrlData
public UrlMappingData getUrlData()
Description copied from interface:UrlMappingInfoRetrieves the UrlMappingData (information about a parsed URL) if any- Returns:
- The UrlMappingData instance
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-