Package grails.web.mapping
Interface UrlMappingsHolder
-
- All Known Subinterfaces:
UrlMappings
- All Known Implementing Classes:
org.grails.web.mapping.mvc.AbstractGrailsControllerUrlMappings,DefaultUrlMappingsHolder,GrailsControllerUrlMappings
public interface UrlMappingsHolderMain entry point of Grails URL mapping mechanism. This interface defines methods to match URLs and create reverse mappings based on the UrlMapping instances the implementer contains.- Since:
- 0.5
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringBEAN_ID
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Set<org.springframework.http.HttpMethod>allowedMethods(java.lang.String uri)Return the allowed HTTP methods for the given URIjava.util.ListgetExcludePatterns()Retrieves the held Exclude Pattern instances as a list, could be null if there is no excludeUrlCreatorgetReverseMapping(java.lang.String controller, java.lang.String action, java.lang.String namespace, java.lang.String pluginName, java.lang.String httpMethod, java.lang.String version, java.util.Map params)Retrieves the best guess of a URI for the given controller, action and parametersUrlCreatorgetReverseMapping(java.lang.String controller, java.lang.String action, java.lang.String namespace, java.lang.String pluginName, java.lang.String httpMethod, java.util.Map params)Retrieves the best guess of a URI for the given controller, action and parametersUrlCreatorgetReverseMapping(java.lang.String controller, java.lang.String action, java.lang.String namespace, java.lang.String pluginName, java.util.Map params)Retrieves the best guess of a URI for the given controller, action and parametersUrlCreatorgetReverseMapping(java.lang.String controller, java.lang.String action, java.lang.String pluginName, java.util.Map params)Retrieves the best guess of a URI for the given controller, action and parametersUrlCreatorgetReverseMapping(java.lang.String controller, java.lang.String action, java.util.Map params)Retrieves the best guess of a URI for the given controller, action and parametersUrlCreatorgetReverseMappingNoDefault(java.lang.String controller, java.lang.String action, java.lang.String namespace, java.lang.String pluginName, java.lang.String httpMethod, java.lang.String version, java.util.Map params)Retrieves the best guess of a URI for the given controller, action and parameters or null if non could be found.UrlCreatorgetReverseMappingNoDefault(java.lang.String controller, java.lang.String action, java.lang.String namespace, java.lang.String pluginName, java.lang.String httpMethod, java.util.Map params)Retrieves the best guess of a URI for the given controller, action and parameters or null if non could be found.UrlCreatorgetReverseMappingNoDefault(java.lang.String controller, java.lang.String action, java.util.Map params)Retrieves the best guess of a URI for the given controller, action and parameters or null if non could be found.UrlMapping[]getUrlMappings()Retrieves the held UrlMapping instances as an arrayUrlMappingInfomatch(java.lang.String uri)Match and return the first UrlMappingInfo instance possibleUrlMappingInfo[]matchAll(java.lang.String uri)Matches all possible UrlMappingInfo instances to the given URI and returns them allUrlMappingInfo[]matchAll(java.lang.String uri, java.lang.String httpMethod)Match all possible UrlMappingInfo instances to the given URI and HTTP methodUrlMappingInfo[]matchAll(java.lang.String uri, java.lang.String httpMethod, java.lang.String version)Match all possible UrlMappingInfo instances to the given URI and HTTP methodUrlMappingInfo[]matchAll(java.lang.String uri, org.springframework.http.HttpMethod httpMethod)Match all possible UrlMappingInfo instances to the given URI and HTTP methodUrlMappingInfo[]matchAll(java.lang.String uri, org.springframework.http.HttpMethod httpMethod, java.lang.String version)Match all possible UrlMappingInfo instances to the given URI and HTTP methodUrlMappingInfomatchStatusCode(int responseCode)Match and return the first UrlMappingInfo instance possibleUrlMappingInfomatchStatusCode(int responseCode, java.lang.Throwable e)Match and return for first UrlMappingInfo for the give response code and exception
-
-
-
Field Detail
-
BEAN_ID
static final java.lang.String BEAN_ID
- See Also:
- Constant Field Values
-
-
Method Detail
-
getUrlMappings
UrlMapping[] getUrlMappings()
Retrieves the held UrlMapping instances as an array- Returns:
- An array of UrlMapping instances
-
getExcludePatterns
java.util.List getExcludePatterns()
Retrieves the held Exclude Pattern instances as a list, could be null if there is no exclude- Returns:
- An list of String
-
getReverseMapping
UrlCreator getReverseMapping(java.lang.String controller, java.lang.String action, java.lang.String pluginName, java.util.Map params)
Retrieves the best guess of a URI for the given controller, action and parameters- Parameters:
controller- The name of the controlleraction- The name of the action or nullpluginName- the name of the plugin which provides the controllerparams- The parameters or null- Returns:
- A URI for the given arguments
-
getReverseMapping
UrlCreator getReverseMapping(java.lang.String controller, java.lang.String action, java.lang.String namespace, java.lang.String pluginName, java.lang.String httpMethod, java.util.Map params)
Retrieves the best guess of a URI for the given controller, action and parameters- Parameters:
controller- The name of the controlleraction- The name of the action or nullnamespace- The controller namespacepluginName- the name of the plugin which provides the controllerhttpMethod- The HTTP method to reverse mapparams- The parameters or null- Returns:
- A URI for the given arguments
-
getReverseMapping
UrlCreator getReverseMapping(java.lang.String controller, java.lang.String action, java.lang.String namespace, java.lang.String pluginName, java.lang.String httpMethod, java.lang.String version, java.util.Map params)
Retrieves the best guess of a URI for the given controller, action and parameters- Parameters:
controller- The name of the controlleraction- The name of the action or nullnamespace- The controller namespacepluginName- the name of the plugin which provides the controllerhttpMethod- The HTTP method to reverse mapversion- The version of the mappingparams- The parameters or null- Returns:
- A URI for the given arguments
-
getReverseMapping
UrlCreator getReverseMapping(java.lang.String controller, java.lang.String action, java.lang.String namespace, java.lang.String pluginName, java.util.Map params)
Retrieves the best guess of a URI for the given controller, action and parameters- Parameters:
controller- The name of the controlleraction- The name of the action or nullnamespace- The controller namespace or nullpluginName- the name of the plugin which provides the controllerparams- The parameters or null- Returns:
- A URI for the given arguments
-
getReverseMapping
UrlCreator getReverseMapping(java.lang.String controller, java.lang.String action, java.util.Map params)
Retrieves the best guess of a URI for the given controller, action and parameters- Parameters:
controller- The name of the controlleraction- The name of the action or nullparams- The parameters or null- Returns:
- A URI for the given arguments
-
getReverseMappingNoDefault
UrlCreator getReverseMappingNoDefault(java.lang.String controller, java.lang.String action, java.util.Map params)
Retrieves the best guess of a URI for the given controller, action and parameters or null if non could be found.- Parameters:
controller- The name of the controlleraction- The name of the action or nullparams- The parameters or null- Returns:
- A URI for the given arguments
-
getReverseMappingNoDefault
UrlCreator getReverseMappingNoDefault(java.lang.String controller, java.lang.String action, java.lang.String namespace, java.lang.String pluginName, java.lang.String httpMethod, java.util.Map params)
Retrieves the best guess of a URI for the given controller, action and parameters or null if non could be found.- Parameters:
controller- The name of the controlleraction- The name of the action or nullnamespace- The controller namespace or nullpluginName- the name of the plugin which provides the controllerhttpMethod- the HTTP methodparams- The parameters or null- Returns:
- A URI for the given arguments
-
getReverseMappingNoDefault
UrlCreator getReverseMappingNoDefault(java.lang.String controller, java.lang.String action, java.lang.String namespace, java.lang.String pluginName, java.lang.String httpMethod, java.lang.String version, java.util.Map params)
Retrieves the best guess of a URI for the given controller, action and parameters or null if non could be found.- Parameters:
controller- The name of the controlleraction- The name of the action or nullnamespace- The controller namespace or nullpluginName- the name of the plugin which provides the controllerhttpMethod- the HTTP methodparams- The parameters or null- Returns:
- A URI for the given arguments
-
match
UrlMappingInfo match(java.lang.String uri)
Match and return the first UrlMappingInfo instance possible- Parameters:
uri- The URI to match- Returns:
- A UrlMappingInfo or null
-
matchAll
UrlMappingInfo[] matchAll(java.lang.String uri)
Matches all possible UrlMappingInfo instances to the given URI and returns them all- Parameters:
uri- The URI to match- Returns:
- An array of 0 or many UrlMappngInfo instances
-
matchAll
UrlMappingInfo[] matchAll(java.lang.String uri, java.lang.String httpMethod)
Match all possible UrlMappingInfo instances to the given URI and HTTP method- Parameters:
uri- The URI to matchhttpMethod- The HTTP method (GET,POST,PUT,DELETE etc.)- Returns:
- An array of 0 or many UrlMappingInfo instances
-
matchAll
UrlMappingInfo[] matchAll(java.lang.String uri, java.lang.String httpMethod, java.lang.String version)
Match all possible UrlMappingInfo instances to the given URI and HTTP method- Parameters:
uri- The URI to matchhttpMethod- The HTTP method (GET,POST,PUT,DELETE etc.)version- The version of the API- Returns:
- An array of 0 or many UrlMappingInfo instances
-
matchAll
UrlMappingInfo[] matchAll(java.lang.String uri, org.springframework.http.HttpMethod httpMethod)
Match all possible UrlMappingInfo instances to the given URI and HTTP method- Parameters:
uri- The URI to matchhttpMethod- The HTTP method (GET,POST,PUT,DELETE etc.)- Returns:
- An array of 0 or many UrlMappingInfo instances
-
matchAll
UrlMappingInfo[] matchAll(java.lang.String uri, org.springframework.http.HttpMethod httpMethod, java.lang.String version)
Match all possible UrlMappingInfo instances to the given URI and HTTP method- Parameters:
uri- The URI to matchhttpMethod- The HTTP method (GET,POST,PUT,DELETE etc.)version- The version- Returns:
- An array of 0 or many UrlMappingInfo instances
-
matchStatusCode
UrlMappingInfo matchStatusCode(int responseCode)
Match and return the first UrlMappingInfo instance possible- Parameters:
responseCode- The responseCode to match- Returns:
- A UrlMappingInfo or null
-
allowedMethods
java.util.Set<org.springframework.http.HttpMethod> allowedMethods(java.lang.String uri)
Return the allowed HTTP methods for the given URI- Parameters:
uri- The URI- Returns:
- The allowed methods
-
matchStatusCode
UrlMappingInfo matchStatusCode(int responseCode, java.lang.Throwable e)
Match and return for first UrlMappingInfo for the give response code and exception- Parameters:
responseCode- The response codee- The exception- Returns:
- The UrlMappingInfo instance
-
-