|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.codehaus.groovy.grails.web.mapping.DefaultUrlMappingsHolder
public class DefaultUrlMappingsHolder
The default implementation of the UrlMappingsHolder interface that takes a list of mappings and then sorts them according to their precdence rules as defined in the implementation of Comparable
UrlMapping
,
Comparable
Nested Class Summary | |
---|---|
(package private) class |
DefaultUrlMappingsHolder.UrlMappingKey
A class used as a key to lookup a UrlMapping based on controller, action and parameter names |
(package private) class |
DefaultUrlMappingsHolder.UrlMappingsList
|
(package private) class |
DefaultUrlMappingsHolder.UrlMappingsListKey
A class used as a key to lookup a all UrlMappings based on only controller and action. |
Field Summary |
---|
Fields inherited from interface org.codehaus.groovy.grails.web.mapping.UrlMappingsHolder |
---|
BEAN_ID |
Constructor Summary | |
---|---|
DefaultUrlMappingsHolder(List<UrlMapping> mappings)
|
|
DefaultUrlMappingsHolder(List<UrlMapping> mappings,
List excludePatterns)
|
Method Summary | |
---|---|
List |
getExcludePatterns()
Retrieves the held Exclude Pattern instances as a list, could be null if there is no exclude |
UrlCreator |
getReverseMapping(String controller,
String action,
Map params)
Retrieves the best guess of a URI for the given controller, action and parameters |
UrlMapping[] |
getUrlMappings()
Retrieves the held UrlMapping instances as an array |
protected UrlMapping |
lookupMapping(String controller,
String action,
Map params)
Performs a match uses reverse mappings to looks up a mapping from the controller, action and params. |
UrlMappingInfo |
match(String uri)
Match and return the first UrlMappingInfo instance possible |
UrlMappingInfo[] |
matchAll(String uri)
Matches all possible UrlMappingInfo instances to the given URI and returns them all |
UrlMappingInfo[] |
matchAll(String uri,
String httpMethod)
Match all possible UrlMappingInfo instances to the given URI and HTTP method |
UrlMappingInfo |
matchStatusCode(int responseCode)
Match and return the first UrlMappingInfo instance possible |
UrlMappingInfo |
matchStatusCode(int responseCode,
Throwable e)
Match and return for first UrlMappingInfo for the give response code and exception |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DefaultUrlMappingsHolder(List<UrlMapping> mappings)
public DefaultUrlMappingsHolder(List<UrlMapping> mappings, List excludePatterns)
Method Detail |
---|
public UrlMapping[] getUrlMappings()
UrlMappingsHolder
getUrlMappings
in interface UrlMappingsHolder
public List getExcludePatterns()
UrlMappingsHolder
getExcludePatterns
in interface UrlMappingsHolder
public UrlCreator getReverseMapping(String controller, String action, Map params)
UrlMappingsHolder
getReverseMapping
in interface UrlMappingsHolder
controller
- The name of the controlleraction
- The name of the action or nullparams
- The parameters or null
UrlMappingsHolder.getReverseMapping(String, String, java.util.Map)
protected UrlMapping lookupMapping(String controller, String action, Map params)
controller
- The controller nameaction
- The action nameparams
- The params
public UrlMappingInfo match(String uri)
UrlMappingsHolder
match
in interface UrlMappingsHolder
uri
- The URI to match
UrlMappingsHolder.match(String)
public UrlMappingInfo[] matchAll(String uri)
UrlMappingsHolder
matchAll
in interface UrlMappingsHolder
uri
- The URI to match
public UrlMappingInfo[] matchAll(String uri, String httpMethod)
UrlMappingsHolder
matchAll
in interface UrlMappingsHolder
uri
- The URI to matchhttpMethod
- The HTTP method (GET,POST,PUT,DELETE etc.)
public UrlMappingInfo matchStatusCode(int responseCode)
UrlMappingsHolder
matchStatusCode
in interface UrlMappingsHolder
responseCode
- The responseCode to match
public UrlMappingInfo matchStatusCode(int responseCode, Throwable e)
UrlMappingsHolder
matchStatusCode
in interface UrlMappingsHolder
responseCode
- The response codee
- The exception
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |