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.mvc
Interface GrailsControllerHelper

All Known Implementing Classes:
  SimpleGrailsControllerHelper

    public interface GrailsControllerHelper

Processes Grails controller requests and responses.

Since:
  0.2
Author:
  Graeme Rocher

Method Summary
`GrailsControllerClass` | `getControllerClassByName(String className)` Retrieves a controller class for the specified class name
`GrailsControllerClass` | `getControllerClassByURI(String uri)` Retrieves a GrailsControllerClass by URI.
`groovy.lang.GroovyObject` | `getControllerInstance(GrailsControllerClass controllerClass)` Creates a new controller instance for the specified GrailsControllerClass.
`GrailsApplicationAttributes` | `getGrailsAttributes()`
`ServletContext` | `getServletContext()`
`Object` | `handleAction(groovy.lang.GroovyObject controller, groovy.lang.Closure action, HttpServletRequest request, HttpServletResponse response)` Handles a Controller action.
`Object` | `handleAction(groovy.lang.GroovyObject controller, groovy.lang.Closure action, HttpServletRequest request, HttpServletResponse response, Map params)` Handles a Controller action.
`ModelAndView` | `handleActionResponse(groovy.lang.GroovyObject controller, Object returnValue, String closurePropertyName, String viewName)` Processes an action response for the specified arguments.
`ModelAndView` | `handleURI(String uri, GrailsWebRequest webRequest)` Handles a Grails URI.
`ModelAndView` | `handleURI(String uri, GrailsWebRequest webRequest, Map params)`

Method Detail

### getServletContext

    ServletContext getServletContext()

  Returns:
    The servlet context instance

### getControllerClassByName

    GrailsControllerClass getControllerClassByName(String className)

  Retrieves a controller class for the specified class name

  Parameters:
    `className` -
  Returns:
    The controller class or null

### getControllerClassByURI

    GrailsControllerClass getControllerClassByURI(String uri)

  Retrieves a GrailsControllerClass by URI.

  Parameters:
    `uri` - The URI to lookup
  Returns:
    A GrailsControllerClass

### getControllerInstance

    groovy.lang.GroovyObject getControllerInstance(GrailsControllerClass controllerClass)

  Creates a new controller instance for the specified GrailsControllerClass.

  Parameters:
    `controllerClass` - The GrailsControllerClass
  Returns:
    A new controller instance

### handleURI

    ModelAndView handleURI(String uri,
                           GrailsWebRequest webRequest)

  Handles a Grails URI.

  Parameters:
    `uri` - The URI to process
    `webRequest` - The GrailsWebRequest
  Returns:
    A ModelAndView instance

### handleAction

    Object handleAction(groovy.lang.GroovyObject controller,
                        groovy.lang.Closure action,
                        HttpServletRequest request,
                        HttpServletResponse response)

  Handles a Controller action.

  Parameters:
    `action` - An action Closure instance
    `request` - The request object
    `response` - The response
  Returns:
    The action response

### handleAction

    Object handleAction(groovy.lang.GroovyObject controller,
                        groovy.lang.Closure action,
                        HttpServletRequest request,
                        HttpServletResponse response,
                        Map params)

  Handles a Controller action.

  Parameters:
    `action` - An action Closure instance
    `request` - The request object
    `response` - The response
    `params` - A Map of controller parameters
  Returns:
    The action response

### handleActionResponse

    ModelAndView handleActionResponse(groovy.lang.GroovyObject controller,
                                      Object returnValue,
                                      String closurePropertyName,
                                      String viewName)

  Processes an action response for the specified arguments.

  Parameters:
    `controller` - The controller instance
    `returnValue` - The response from the closure
    `closurePropertyName` - The property name of the closure
    `viewName` - The name of the view
  Returns:
    A ModelAndView object

### handleURI

    ModelAndView handleURI(String uri,
                           GrailsWebRequest webRequest,
                           Map params)

### getGrailsAttributes

    GrailsApplicationAttributes getGrailsAttributes()

  Returns:
    Returns the grails request attributes instance

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