Package grails.web.mapping
Interface UrlMappingInfo
-
- All Known Implementing Classes:
AbstractUrlMappingInfo,DefaultUrlMappingInfo
public interface UrlMappingInfoDefines that data that was produced when matching a URI with a UrlMapping instance.- Since:
- 0.5
- See Also:
UrlMapping
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidconfigure(org.grails.web.servlet.mvc.GrailsWebRequest webRequest)Configure this UrlMappingInfo the for the given GrailsWebRequestjava.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 tobooleanisParsingRequest()Returns true of the request body should be parsed.
-
-
-
Method Detail
-
getURI
java.lang.String getURI()
The 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
-
getHttpMethod
java.lang.String getHttpMethod()
The HTTP method that this URL mapping maps to- Returns:
- The http method
-
getVersion
java.lang.String getVersion()
- Returns:
- The version of the API (for REST)
-
getControllerName
java.lang.String getControllerName()
The name of the controller that the URL mapping maps to- Returns:
- The name of the controller
-
getActionName
java.lang.String getActionName()
The name of the action that the URL mappping maps to- Returns:
- The name of the action or null if not known
-
getNamespace
java.lang.String getNamespace()
- Returns:
- the namespace of the corresponding controller, null if none was specified
-
getPluginName
java.lang.String getPluginName()
The name of the plugin that this UrlMappingInfo maps to- Returns:
- The plugin name
-
getViewName
java.lang.String getViewName()
The name of the view that the URL mappping maps to- Returns:
- The name of the view or null if not known
-
getId
java.lang.String getId()
The id part of the URL mapping if any- Returns:
- The id or null
-
getParameters
java.util.Map getParameters()
The parameters that were extracted from the URI that was matched- Returns:
- A Map of parameters
-
configure
void configure(org.grails.web.servlet.mvc.GrailsWebRequest webRequest)
Configure this UrlMappingInfo the for the given GrailsWebRequest- Parameters:
webRequest- The GrailsWebRequest instance
-
isParsingRequest
boolean isParsingRequest()
Returns 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
-
getRedirectInfo
java.lang.Object getRedirectInfo()
The 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.- Returns:
- redirect information for this url mapping, null if no redirect is specified
-
getUrlData
UrlMappingData getUrlData()
Retrieves the UrlMappingData (information about a parsed URL) if any- Returns:
- The UrlMappingData instance
-
-