Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.groovy.grails.web.servlet.mvc
[Java] Class SimpleGrailsControllerHelper

    java.lang.Object
      org.codehaus.groovy.grails.web.servlet.mvc.SimpleGrailsControllerHelper

All Implemented Interfaces:
  GrailsControllerHelper

    public class SimpleGrailsControllerHelper

Does the main job of dealing with Grails web requests.

Authors:
  Graeme Rocher

Since:
  0.1

Constructor Summary
`SimpleGrailsControllerHelper(GrailsApplication application, ApplicationContext context, ServletContext servletContext)`

Method Summary
`protected ModelAndView` | `executeAction(groovy.lang.GroovyObject controller, GrailsControllerClass controllerClass, java.lang.String viewName, HttpServletRequest request, HttpServletResponse response, java.util.Map params)` Invokes the action defined by the webRequest for the given arguments.
`GrailsControllerClass` | `getControllerClassByName(java.lang.String name)`
`GrailsControllerClass` | `getControllerClassByURI(java.lang.String uri)`
`groovy.lang.GroovyObject` | `getControllerInstance(GrailsControllerClass controllerClass)`
`GrailsApplicationAttributes` | `getGrailsAttributes()`
`ServletContext` | `getServletContext()`
`java.lang.Object` | `handleAction(groovy.lang.GroovyObject controller, groovy.lang.Closure action, HttpServletRequest request, HttpServletResponse response)`
`java.lang.Object` | `handleAction(groovy.lang.GroovyObject controller, groovy.lang.Closure action, HttpServletRequest request, HttpServletResponse response, java.util.Map params)`
`ModelAndView` | `handleActionResponse(groovy.lang.GroovyObject controller, java.lang.Object returnValue, java.lang.String closurePropertyName, java.lang.String viewName)`
`ModelAndView` | `handleURI(java.lang.String uri, GrailsWebRequest request)`
`ModelAndView` | `handleURI(java.lang.String uri, GrailsWebRequest grailsWebRequest, java.util.Map params)`

Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()

Constructor Detail

### SimpleGrailsControllerHelper

    public SimpleGrailsControllerHelper(GrailsApplication application, ApplicationContext context, ServletContext servletContext)

Method Detail

### executeAction

    @SuppressWarnings({ "unchecked", "rawtypes" })
    protected ModelAndView executeAction(groovy.lang.GroovyObject controller, @SuppressWarnings("unused") GrailsControllerClass controllerClass, java.lang.String viewName, HttpServletRequest request, HttpServletResponse response, java.util.Map params)

  Invokes the action defined by the webRequest for the given arguments.
  Parameters:
    `controller` - The controller instance
    `controllerClass` - The GrailsControllerClass that defines the conventions within the controller
    `viewName` - The name of the view to delegate to if necessary
    `request` - The HttpServletRequest object
    `response` - The HttpServletResponse object
    `params` - A map of parameters
  Returns:
    A Spring ModelAndView instance

### getControllerClassByName

    public GrailsControllerClass getControllerClassByName(java.lang.String name)

### getControllerClassByURI

    public GrailsControllerClass getControllerClassByURI(java.lang.String uri)

### getControllerInstance

    public groovy.lang.GroovyObject getControllerInstance(GrailsControllerClass controllerClass)

### getGrailsAttributes

    public GrailsApplicationAttributes getGrailsAttributes()

### getServletContext

    public ServletContext getServletContext()

### handleAction

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

### handleAction

    @SuppressWarnings("rawtypes")
    public java.lang.Object handleAction(groovy.lang.GroovyObject controller, groovy.lang.Closure action, HttpServletRequest request, HttpServletResponse response, java.util.Map params)

### handleActionResponse

    @SuppressWarnings({ "unchecked", "rawtypes" })
    public ModelAndView handleActionResponse(groovy.lang.GroovyObject controller, java.lang.Object returnValue, java.lang.String closurePropertyName, java.lang.String viewName)

### handleURI

    public ModelAndView handleURI(java.lang.String uri, GrailsWebRequest request)

### handleURI

    @SuppressWarnings("rawtypes")
    public ModelAndView handleURI(java.lang.String uri, GrailsWebRequest grailsWebRequest, java.util.Map params)

Groovy Documentation