public class DefaultUrlMappingsHolder extends java.lang.Object implements UrlMappings
UrlMapping,
ComparableBEAN_ID| Constructor and Description |
|---|
DefaultUrlMappingsHolder(java.util.List<UrlMapping> mappings) |
DefaultUrlMappingsHolder(java.util.List<UrlMapping> mappings,
java.util.List excludePatterns) |
DefaultUrlMappingsHolder(java.util.List<UrlMapping> mappings,
java.util.List excludePatterns,
boolean doNotCallInit) |
| Modifier and Type | Method and Description |
|---|---|
java.util.Collection<UrlMapping> |
addMappings(groovy.lang.Closure mappings)
Adds URL mappings to the current definition for the given closure
|
java.util.Set<org.springframework.http.HttpMethod> |
allowedMethods(java.lang.String uri)
Return the allowed HTTP methods for the given URI
|
java.util.List |
getExcludePatterns()
Retrieves the held Exclude Pattern instances as a list, could be null if there is no exclude
|
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
|
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
|
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
|
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
|
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
|
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.
|
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.
|
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.
|
UrlMapping[] |
getUrlMappings()
Retrieves the held UrlMapping instances as an array
|
void |
initialize() |
protected UrlMapping |
lookupMapping(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)
Performs a match uses reverse mappings to looks up a mapping from the
controller, action and params.
|
UrlMappingInfo |
match(java.lang.String uri)
Match and return the first UrlMappingInfo instance possible
|
UrlMappingInfo[] |
matchAll(java.lang.String uri)
Matches all possible UrlMappingInfo instances to the given URI and returns them all
|
UrlMappingInfo[] |
matchAll(java.lang.String uri,
org.springframework.http.HttpMethod httpMethod)
Match all possible UrlMappingInfo instances to the given URI and HTTP method
|
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
|
UrlMappingInfo[] |
matchAll(java.lang.String uri,
java.lang.String httpMethod)
Match all possible UrlMappingInfo instances to the given URI and HTTP method
|
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
|
UrlMappingInfo |
matchStatusCode(int responseCode)
Match and return the first UrlMappingInfo instance possible
|
UrlMappingInfo |
matchStatusCode(int responseCode,
java.lang.Throwable e)
Match and return for first UrlMappingInfo for the give response code and exception
|
void |
setMaxWeightedCacheCapacity(int maxWeightedCacheCapacity) |
void |
setUrlCreatorMaxWeightedCacheCapacity(int urlCreatorMaxWeightedCacheCapacity) |
java.lang.String |
toString() |
public DefaultUrlMappingsHolder(java.util.List<UrlMapping> mappings)
public DefaultUrlMappingsHolder(java.util.List<UrlMapping> mappings, java.util.List excludePatterns)
public DefaultUrlMappingsHolder(java.util.List<UrlMapping> mappings, java.util.List excludePatterns, boolean doNotCallInit)
public java.util.Collection<UrlMapping> addMappings(groovy.lang.Closure mappings)
UrlMappingsaddMappings in interface UrlMappingsmappings - The mappingsUrlMappingsHolder.getUrlMappings()public void initialize()
public UrlMapping[] getUrlMappings()
UrlMappingsHoldergetUrlMappings in interface UrlMappingsHolderpublic java.util.List getExcludePatterns()
UrlMappingsHoldergetExcludePatterns in interface UrlMappingsHolderpublic UrlCreator getReverseMapping(java.lang.String controller, java.lang.String action, java.util.Map params)
UrlMappingsHoldergetReverseMapping in interface UrlMappingsHoldercontroller - The name of the controlleraction - The name of the action or nullparams - The parameters or nullpublic UrlCreator getReverseMapping(java.lang.String controller, java.lang.String action, java.lang.String pluginName, java.util.Map params)
UrlMappingsHoldergetReverseMapping in interface UrlMappingsHoldercontroller - The name of the controlleraction - The name of the action or nullpluginName - the name of the plugin which provides the controllerparams - The parameters or nullpublic 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)
UrlMappingsHoldergetReverseMapping in interface UrlMappingsHoldercontroller - 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 nullpublic 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)
UrlMappingsHoldergetReverseMapping in interface UrlMappingsHoldercontroller - 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 nullpublic UrlCreator getReverseMapping(java.lang.String controller, java.lang.String action, java.lang.String namespace, java.lang.String pluginName, java.util.Map params)
UrlMappingsHoldergetReverseMapping in interface UrlMappingsHoldercontroller - 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 nullUrlMappingsHolder.getReverseMapping(String, String, java.util.Map)public UrlCreator getReverseMappingNoDefault(java.lang.String controller, java.lang.String action, java.util.Map params)
UrlMappingsHoldergetReverseMappingNoDefault in interface UrlMappingsHoldercontroller - The name of the controlleraction - The name of the action or nullparams - The parameters or nullpublic 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)
UrlMappingsHoldergetReverseMappingNoDefault in interface UrlMappingsHoldercontroller - 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 nullpublic 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)
UrlMappingsHoldergetReverseMappingNoDefault in interface UrlMappingsHoldercontroller - 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 nullprotected UrlMapping lookupMapping(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)
controller - The controller nameaction - The action namehttpMethod - The HTTP methodversion - params - The params @return A UrlMapping instance or nullpublic UrlMappingInfo match(java.lang.String uri)
UrlMappingsHoldermatch in interface UrlMappingsHolderuri - The URI to matchUrlMappingsHolder.match(String)public UrlMappingInfo[] matchAll(java.lang.String uri)
UrlMappingsHoldermatchAll in interface UrlMappingsHolderuri - The URI to matchpublic UrlMappingInfo[] matchAll(java.lang.String uri, java.lang.String httpMethod)
UrlMappingsHoldermatchAll in interface UrlMappingsHolderuri - The URI to matchhttpMethod - The HTTP method (GET,POST,PUT,DELETE etc.)public UrlMappingInfo[] matchAll(java.lang.String uri, java.lang.String httpMethod, java.lang.String version)
UrlMappingsHoldermatchAll in interface UrlMappingsHolderuri - The URI to matchhttpMethod - The HTTP method (GET,POST,PUT,DELETE etc.)version - The version of the APIpublic UrlMappingInfo[] matchAll(java.lang.String uri, org.springframework.http.HttpMethod httpMethod)
UrlMappingsHoldermatchAll in interface UrlMappingsHolderuri - The URI to matchhttpMethod - The HTTP method (GET,POST,PUT,DELETE etc.)public UrlMappingInfo[] matchAll(java.lang.String uri, org.springframework.http.HttpMethod httpMethod, java.lang.String version)
UrlMappingsHoldermatchAll in interface UrlMappingsHolderuri - The URI to matchhttpMethod - The HTTP method (GET,POST,PUT,DELETE etc.)version - The versionpublic UrlMappingInfo matchStatusCode(int responseCode)
UrlMappingsHoldermatchStatusCode in interface UrlMappingsHolderresponseCode - The responseCode to matchpublic java.util.Set<org.springframework.http.HttpMethod> allowedMethods(java.lang.String uri)
UrlMappingsHolderallowedMethods in interface UrlMappingsHolderuri - The URIpublic UrlMappingInfo matchStatusCode(int responseCode, java.lang.Throwable e)
UrlMappingsHoldermatchStatusCode in interface UrlMappingsHolderresponseCode - The response codee - The exceptionpublic java.lang.String toString()
toString in class java.lang.Objectpublic void setMaxWeightedCacheCapacity(int maxWeightedCacheCapacity)
public void setUrlCreatorMaxWeightedCacheCapacity(int urlCreatorMaxWeightedCacheCapacity)