it.openutils.web.spring
Class ParamNameUrlHandlerMapping
java.lang.Object
org.springframework.context.support.ApplicationObjectSupport
org.springframework.web.context.support.WebApplicationObjectSupport
org.springframework.web.servlet.handler.AbstractHandlerMapping
org.springframework.web.servlet.handler.AbstractUrlHandlerMapping
it.openutils.web.spring.ParamNameUrlHandlerMapping
- All Implemented Interfaces:
- org.springframework.context.ApplicationContextAware, org.springframework.core.Ordered, org.springframework.web.context.ServletContextAware, org.springframework.web.servlet.HandlerMapping
public class ParamNameUrlHandlerMapping
- extends org.springframework.web.servlet.handler.AbstractUrlHandlerMapping
Implementation of the HandlerMapping interface to map from URLs to request handler beans.
- Author:
- Fabrizio Giustina
| 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 |
|
Method Summary |
protected java.lang.Object |
getHandlerInternal(javax.servlet.http.HttpServletRequest request)
|
void |
initApplicationContext()
init the application context |
void |
setMappings(java.util.Properties mappings)
Map URL paths to handler bean names. |
void |
setParamName(java.lang.String paramName)
set the parameter name |
void |
setUrlMap(java.util.Map<java.lang.String,java.lang.String> urlMap)
Set a Map with URL paths as keys and handler beans as values. |
| Methods inherited from class org.springframework.web.servlet.handler.AbstractUrlHandlerMapping |
exposePathWithinMapping, getHandlerMap, lookupHandler, registerHandler, registerHandler, setAlwaysUseFullPath, setLazyInitHandlers, setPathMatcher, setUrlDecode, setUrlPathHelper |
| Methods inherited from class org.springframework.web.servlet.handler.AbstractHandlerMapping |
adaptInterceptor, getDefaultHandler, getHandler, getOrder, 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 |
ParamNameUrlHandlerMapping
public ParamNameUrlHandlerMapping()
setUrlMap
public void setUrlMap(java.util.Map<java.lang.String,java.lang.String> urlMap)
- Set a Map with URL paths as keys and handler beans as values. Convenient for population with bean references.
Supports direct URL matches and Ant-style pattern matches. For syntax details, see the PathMatcher class.
- Parameters:
urlMap - map with URLs as keys and beans as values- See Also:
PathMatcher
setParamName
public void setParamName(java.lang.String paramName)
- set the parameter name
- Parameters:
paramName -
setMappings
public void setMappings(java.util.Properties mappings)
- Map URL paths to handler bean names. This the typical way of configuring this HandlerMapping.
Supports direct URL matches and Ant-style pattern matches. For syntax details, see the PathMatcher class.
- Parameters:
mappings - properties with URLs as keys and bean names as values- See Also:
PathMatcher
initApplicationContext
public void initApplicationContext()
throws org.springframework.beans.BeansException
- init the application context
- Overrides:
initApplicationContext in class org.springframework.web.servlet.handler.AbstractHandlerMapping
- Throws:
org.springframework.beans.BeansException- See Also:
ApplicationObjectSupport.initApplicationContext()
getHandlerInternal
protected java.lang.Object getHandlerInternal(javax.servlet.http.HttpServletRequest request)
throws java.lang.Exception
-
- Overrides:
getHandlerInternal in class org.springframework.web.servlet.handler.AbstractUrlHandlerMapping
- Throws:
java.lang.Exception
Copyright © 2007 Openmind. All Rights Reserved.