Save This Page
Home » spring-framework-2.5.5-with-dependencies » org.springframework » web » servlet » mvc » support » [javadoc | source]
org.springframework.web.servlet.mvc.support
abstract public class: AbstractControllerUrlHandlerMapping [javadoc | source]
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
               org.springframework.web.servlet.handler.AbstractDetectingUrlHandlerMapping
                  org.springframework.web.servlet.mvc.support.AbstractControllerUrlHandlerMapping

All Implemented Interfaces:
    HandlerMapping, Ordered, ServletContextAware, ApplicationContextAware

Direct Known Subclasses:
    ControllerBeanNameHandlerMapping, ControllerClassNameHandlerMapping

Base class for org.springframework.web.servlet.HandlerMapping implementations that derive URL paths according to conventions for specific controller types.
Fields inherited from org.springframework.context.support.ApplicationObjectSupport:
logger
Constructor:
 public AbstractControllerUrlHandlerMapping() 
Method from org.springframework.web.servlet.mvc.support.AbstractControllerUrlHandlerMapping Summary:
buildUrlsForHandler,   determineUrlsForHandler,   isControllerType,   isEligibleForMapping,   isMultiActionControllerType,   setExcludedClasses,   setExcludedPackages,   setIncludeAnnotatedControllers
Methods from org.springframework.web.servlet.handler.AbstractDetectingUrlHandlerMapping:
detectHandlers,   determineUrlsForHandler,   initApplicationContext,   setDetectHandlersInAncestorContexts
Methods from org.springframework.web.servlet.handler.AbstractUrlHandlerMapping:
buildPathExposingHandler,   exposePathWithinMapping,   getHandlerInternal,   getHandlerMap,   getPathMatcher,   getRootHandler,   lookupHandler,   registerHandler,   registerHandler,   setAlwaysUseFullPath,   setLazyInitHandlers,   setPathMatcher,   setRootHandler,   setUrlDecode,   setUrlPathHelper,   validateHandler
Methods from org.springframework.web.servlet.handler.AbstractHandlerMapping:
adaptInterceptor,   extendInterceptors,   getAdaptedInterceptors,   getDefaultHandler,   getHandler,   getHandlerExecutionChain,   getHandlerInternal,   getOrder,   initApplicationContext,   initInterceptors,   setDefaultHandler,   setInterceptors,   setOrder
Methods from org.springframework.web.context.support.WebApplicationObjectSupport:
getServletContext,   getTempDir,   getWebApplicationContext,   initApplicationContext,   initServletContext,   isContextRequired,   setServletContext
Methods from org.springframework.context.support.ApplicationObjectSupport:
getApplicationContext,   getMessageSourceAccessor,   initApplicationContext,   initApplicationContext,   isContextRequired,   requiredContextClass,   setApplicationContext
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.springframework.web.servlet.mvc.support.AbstractControllerUrlHandlerMapping Detail:
 abstract protected String[] buildUrlsForHandler(String beanName,
    Class beanClass)
    Abstract template method to be implemented by subclasses.
 protected String[] determineUrlsForHandler(String beanName) 
 protected boolean isControllerType(Class beanClass) 
    Determine whether the given bean class indicates a controller type that is supported by this mapping strategy.
 protected boolean isEligibleForMapping(String beanName,
    Class beanClass) 
    Determine whether the specified controller is excluded from this mapping.
 protected boolean isMultiActionControllerType(Class beanClass) 
    Determine whether the given bean class indicates a controller type that dispatches to multiple action methods.
 public  void setExcludedClasses(Class[] excludedClasses) 
    Specify controller classes that should be excluded from this mapping. Any such classes will simply be ignored by this HandlerMapping.
 public  void setExcludedPackages(String[] excludedPackages) 
    Specify Java packages that should be excluded from this mapping. Any classes in such a package (or any of its subpackages) will be ignored by this HandlerMapping.

    Default is to exclude the entire "org.springframework.web.servlet.mvc" package, including its subpackages, since none of Spring's out-of-the-box Controller implementations is a reasonable candidate for this mapping strategy. Such controllers are typically handled by a separate HandlerMapping, e.g. a org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping , alongside this ControllerClassNameHandlerMapping for application controllers.

 public  void setIncludeAnnotatedControllers(boolean includeAnnotatedControllers) 
    Set whether to activate or deactivate detection of annotated controllers.

    Annotated controllers will by included by default when runnong on JDK 1.5 or higher.