org.openi.web.spring
Class CustomUrlHandlerMapping

java.lang.Object
  extended by org.springframework.context.support.ApplicationObjectSupport
      extended by org.springframework.web.context.support.WebApplicationObjectSupport
          extended by org.springframework.web.servlet.handler.AbstractHandlerMapping
              extended by org.springframework.web.servlet.handler.AbstractUrlHandlerMapping
                  extended by org.springframework.web.servlet.handler.SimpleUrlHandlerMapping
                      extended by org.openi.web.spring.CustomUrlHandlerMapping
All Implemented Interfaces:
org.springframework.context.ApplicationContextAware, org.springframework.core.Ordered, org.springframework.web.context.ServletContextAware, org.springframework.web.servlet.HandlerMapping

public class CustomUrlHandlerMapping
extends org.springframework.web.servlet.handler.SimpleUrlHandlerMapping

Extended version of SimpleUrlHandlerMapping. Provides getter method for url handler map

Author:
Dipendra Pokhrel

Field Summary
 
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
CustomUrlHandlerMapping()
           
 
Method Summary
 java.util.Map getUrlMap()
          returns new instance of url map containing all entry
 void setMappings(java.util.Properties mappings)
          Map URL paths to handler bean names.
 void setUrlMap(java.util.Map urlMap)
          Set a Map with URL paths as keys and handler beans as values.
 
Methods inherited from class org.springframework.web.servlet.handler.SimpleUrlHandlerMapping
initApplicationContext, registerHandlers
 
Methods inherited from class org.springframework.web.servlet.handler.AbstractUrlHandlerMapping
exposePathWithinMapping, getHandlerInternal, 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
 

Constructor Detail

CustomUrlHandlerMapping

public CustomUrlHandlerMapping()
Method Detail

setMappings

public void setMappings(java.util.Properties mappings)
Map URL paths to handler bean names. This is the typical way of configuring this HandlerMapping.

Supports direct URL matches and Ant-style pattern matches. For syntax details, see the AntPathMatcher class.

Overrides:
setMappings in class org.springframework.web.servlet.handler.SimpleUrlHandlerMapping
Parameters:
mappings - properties with URLs as keys and bean names as values
See Also:
AntPathMatcher

setUrlMap

public void setUrlMap(java.util.Map 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 AntPathMatcher class.

Overrides:
setUrlMap in class org.springframework.web.servlet.handler.SimpleUrlHandlerMapping
Parameters:
urlMap - map with URLs as keys and beans as values
See Also:
AntPathMatcher

getUrlMap

public java.util.Map getUrlMap()
returns new instance of url map containing all entry

Returns: