Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.groovy.grails.web.servlet
Class GrailsControllerHandlerMapping

    java.lang.Object
      org.springframework.context.support.ApplicationObjectSupport
          org.springframework.web.context.support.WebApplicationObjectSupport
              org.springframework.web.servlet.handler.AbstractHandlerMapping
                  org.codehaus.groovy.grails.web.servlet.GrailsControllerHandlerMapping

All Implemented Interfaces:
  GrailsApplicationAware, ApplicationContextAware, Ordered, ServletContextAware, HandlerMapping

Direct Known Subclasses:
  GrailsFlowHandlerMapping

    public class GrailsControllerHandlerMapping

extends AbstractHandlerMapping
implements GrailsApplicationAware

A handler mapping that matches Grails' SimpleController class

Since:
  1.2
Author:
  Graeme Rocher

Field Summary
`static String` | `MAIN_CONTROLLER_BEAN`

Fields inherited from class org.springframework.context.support.ApplicationObjectSupport
`logger`

Fields inherited from interface org.springframework.web.servlet.HandlerMapping
`BEST_MATCHING_PATTERN_ATTRIBUTE, PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE, URI_TEMPLATE_VARIABLES_ATTRIBUTE`

Fields inherited from interface org.springframework.core.Ordered
`HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE`

Constructor Summary
`GrailsControllerHandlerMapping()`

Method Summary
`protected HandlerInterceptor[]` | `establishInterceptors(WebApplicationContext webContext)` Evalutes the given WebApplicationContext for all HandlerInterceptor and WebRequestInterceptor instances
`protected void` | `extendInterceptors(List interceptors)`
`protected HandlerExecutionChain` | `getHandlerExecutionChain(Object handler, HttpServletRequest request)`
`protected Object` | `getHandlerForControllerClass(GrailsControllerClass controllerClass, HttpServletRequest request)` Obtains the handler for the given controller class
`protected Object` | `getHandlerInternal(HttpServletRequest request)`
`protected HandlerInterceptor[]` | `lookupInterceptors(WebApplicationContext applicationContext)`
`void` | `setGrailsApplication(GrailsApplication grailsApplication)` This method is called by the `ApplicationContext` that loads the Grails application.

Methods inherited from class org.springframework.web.servlet.handler.AbstractHandlerMapping
`adaptInterceptor, getAdaptedInterceptors, getDefaultHandler, getHandler, getOrder, initApplicationContext, initInterceptors, setDefaultHandler, setInterceptors, setOrder`

Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport
`getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, 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

### MAIN_CONTROLLER_BEAN

    public static final String MAIN_CONTROLLER_BEAN

See Also:
  Constant Field Values

Constructor Detail

### GrailsControllerHandlerMapping

    public GrailsControllerHandlerMapping()

Method Detail

### getHandlerInternal

    protected Object getHandlerInternal(HttpServletRequest request)
                                 throws Exception

  Specified by:
    `getHandlerInternal` in class `AbstractHandlerMapping`
  Throws:
    `Exception`

### getHandlerForControllerClass

    protected Object getHandlerForControllerClass(GrailsControllerClass controllerClass,
                                                  HttpServletRequest request)

  Obtains the handler for the given controller class

  Parameters:
    `controllerClass` - The controller class
    `request` - The HttpServletRequest
  Returns:
    The handler

### getHandlerExecutionChain

    protected final HandlerExecutionChain getHandlerExecutionChain(Object handler,
                                                                   HttpServletRequest request)

  Overrides:
    `getHandlerExecutionChain` in class `AbstractHandlerMapping`

### extendInterceptors

    protected void extendInterceptors(List interceptors)

  Overrides:
    `extendInterceptors` in class `AbstractHandlerMapping`

### lookupInterceptors

    protected HandlerInterceptor[] lookupInterceptors(WebApplicationContext applicationContext)

### establishInterceptors

    protected HandlerInterceptor[] establishInterceptors(WebApplicationContext webContext)

  Evalutes the given WebApplicationContext for all HandlerInterceptor and WebRequestInterceptor instances

  Parameters:
    `webContext` - The WebApplicationContext
  Returns:
    An array of HandlerInterceptor instances

### setGrailsApplication

    public void setGrailsApplication(GrailsApplication grailsApplication)

  Description copied from interface: `GrailsApplicationAware`

  This method is called by the `ApplicationContext` that loads the Grails application. The `GrailsApplication` instance that represents the loaded Grails application is injected.

  Specified by:
    `setGrailsApplication` in interface `GrailsApplicationAware`
  Parameters:
    `grailsApplication` - the `GrailsApplication` object that represents this Grails application

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 2005-2009 The Grails project