|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.context.support.ApplicationObjectSupport
org.springframework.web.context.support.WebApplicationObjectSupport
org.springframework.web.servlet.handler.AbstractHandlerMapping
net.sourceforge.xconf.toolbox.spring.mvc.URITemplateHandlerMapping
public class URITemplateHandlerMapping
HandlerMapping implementation to match URITemplate patterns.
URITemplate| Field Summary | |
|---|---|
static String |
PARAMETERS_ATTRIBUTE
Request attribute key used to retrieve parameter map parsed from the current request's path. |
static String |
TEMPLATE_ATTRIBUTE
Request attribute key used to retrieve the URITemplate that matched the current request. |
| Fields inherited from class org.springframework.context.support.ApplicationObjectSupport |
|---|
logger |
| Fields inherited from interface org.springframework.web.servlet.HandlerMapping |
|---|
PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE |
| Fields inherited from interface org.springframework.core.Ordered |
|---|
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE |
| Constructor Summary | |
|---|---|
URITemplateHandlerMapping()
|
|
| Method Summary | |
|---|---|
protected void |
exposeTemplateAndParameters(String lookupPath,
URITemplate template,
HttpServletRequest request)
Expose the path within the current mapping, the template used to match the path, and the parameters parsed from the path as request attributes. |
protected Object |
getHandlerInternal(HttpServletRequest request)
Look up a handler for the URL path of the given request. |
void |
setAlwaysUseFullPath(boolean alwaysUseFullPath)
Set if URL lookup should always use the full path within the current servlet context. |
void |
setMappings(Map<String,String> mappings)
Map URL paths to handler bean names. |
void |
setMappings(Properties mappings)
Map URL paths to handler bean names. |
void |
setUrlDecode(boolean urlDecode)
Set if context path and request URI should be URL-decoded. |
| Methods inherited from class org.springframework.web.servlet.handler.AbstractHandlerMapping |
|---|
adaptInterceptor, getAdaptedInterceptors, getDefaultHandler, getHandler, getHandlerExecutionChain, getOrder, initApplicationContext, initInterceptors, setDefaultHandler, setInterceptors, setOrder |
| Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport |
|---|
getServletContext, getTempDir, getWebApplicationContext, isContextRequired, setServletContext |
| Methods inherited from class org.springframework.context.support.ApplicationObjectSupport |
|---|
getApplicationContext, getMessageSourceAccessor, requiredContextClass, setApplicationContext |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String TEMPLATE_ATTRIBUTE
URITemplate.matches(String),
exposeTemplateAndParameters(String, net.sourceforge.xconf.toolbox.web.URITemplate,
javax.servlet.http.HttpServletRequest)public static final String PARAMETERS_ATTRIBUTE
URITemplate.parse(String),
exposeTemplateAndParameters(String, net.sourceforge.xconf.toolbox.web.URITemplate,
javax.servlet.http.HttpServletRequest)| Constructor Detail |
|---|
public URITemplateHandlerMapping()
| Method Detail |
|---|
public void setAlwaysUseFullPath(boolean alwaysUseFullPath)
Default is "false".
UrlPathHelper.setAlwaysUseFullPath(boolean)public void setUrlDecode(boolean urlDecode)
Uses either the request encoding or the default encoding according to the Servlet spec (ISO-8859-1).
Note: Setting this to "true" requires JDK 1.4 if the encoding differs from the VM's platform default encoding, as JDK 1.3's URLDecoder class does not offer a way to specify the encoding.
UrlPathHelper.setUrlDecode(boolean)public void setMappings(Properties mappings)
mappings - properties with URLs as keys and bean names as valuespublic void setMappings(Map<String,String> mappings)
mappings - map with URLs as keys and bean names as values
protected Object getHandlerInternal(HttpServletRequest request)
throws Exception
getHandlerInternal in class AbstractHandlerMappingrequest - current HTTP request
null if none found
Exception
protected void exposeTemplateAndParameters(String lookupPath,
URITemplate template,
HttpServletRequest request)
lookupPath - the path used to lookup a handler mappingtemplate - the template that matched the lookup pathrequest - the request to expose the path, template and parameters toHandlerMapping.PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE,
PARAMETERS_ATTRIBUTE,
TEMPLATE_ATTRIBUTE,
URITemplate.parse(String)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||