@SuppressWarnings("rawtypes") public class DefaultUrlMappingsHolder extends Object implements UrlMappings
Default implementation of the UrlMappingsHolder interface that takes a list of mappings and then sorts them according to their precedence rules as defined in the implementation of Comparable.
Modifiers | Name | Description |
---|---|---|
static UrlMappingInfo[] |
EMPTY_RESULTS |
Constructor and description |
---|
DefaultUrlMappingsHolder(List<UrlMapping> mappings) |
DefaultUrlMappingsHolder(List<UrlMapping> mappings, List excludePatterns) |
DefaultUrlMappingsHolder(List<UrlMapping> mappings, List excludePatterns, boolean doNotCallInit) |
Type Params | Return Type | Name and description |
---|---|---|
|
public Collection<UrlMapping> |
addMappings(Closure mappings) |
|
public Set<HttpMethod> |
allowedMethods(String uri) |
|
public List<?> |
getExcludePatterns() |
|
public UrlCreator |
getReverseMapping(String controller, String action, Map params) |
|
public UrlCreator |
getReverseMapping(String controller, String action, String pluginName, Map params) |
|
public UrlCreator |
getReverseMapping(String controller, String action, String namespace, String pluginName, String httpMethod, Map params) |
|
public UrlCreator |
getReverseMapping(String controller, String action, String namespace, String pluginName, String httpMethod, String version, Map params) |
|
public UrlCreator |
getReverseMapping(String controller, String action, String namespace, String pluginName, Map params)
|
|
public UrlCreator |
getReverseMappingNoDefault(String controller, String action, Map params) |
|
public UrlCreator |
getReverseMappingNoDefault(String controller, String action, String namespace, String pluginName, String httpMethod, Map params) |
|
public UrlCreator |
getReverseMappingNoDefault(String controller, String action, String namespace, String pluginName, String httpMethod, String version, Map params) |
|
public UrlMapping[] |
getUrlMappings() |
|
public void |
initialize() |
|
protected UrlMapping |
lookupMapping(String controller, String action, String namespace, String pluginName, String httpMethod, String version, Map params) Performs a match uses reverse mappings to looks up a mapping from the controller, action and params. |
|
public UrlMappingInfo |
match(String uri)
|
|
public UrlMappingInfo[] |
matchAll(String uri) |
|
public UrlMappingInfo[] |
matchAll(String uri, String httpMethod) |
|
public UrlMappingInfo[] |
matchAll(String uri, String httpMethod, String version) |
|
public UrlMappingInfo[] |
matchAll(String uri, HttpMethod httpMethod) |
|
public UrlMappingInfo[] |
matchAll(String uri, HttpMethod httpMethod, String version) |
|
public UrlMappingInfo |
matchStatusCode(int responseCode) |
|
public UrlMappingInfo |
matchStatusCode(int responseCode, Throwable e) |
|
public void |
setMaxWeightedCacheCapacity(int maxWeightedCacheCapacity) |
|
public void |
setUrlCreatorMaxWeightedCacheCapacity(int urlCreatorMaxWeightedCacheCapacity) |
|
public String |
toString() |
Performs a match uses reverse mappings to looks up a mapping from the controller, action and params. This is refactored to use a list of mappings identified by only controller and action and then matches the mapping to select the mapping that best matches the params (most possible matches).
controller
- The controller nameaction
- The action namehttpMethod
- The HTTP methodparams
- The params