Groovy Documentation

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

java.lang.Object
  org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerHelper
All Implemented Interfaces:
org.springframework.context.ApplicationContextAware, org.springframework.web.context.ServletContextAware, GrailsApplicationAware

public abstract class AbstractGrailsControllerHelper
extends java.lang.Object

Processes Grails controller requests and responses.

Authors:
Graeme Rocher
Stephane Maldini
Since:
1.4


Field Summary
protected java.lang.String actionName

protected GrailsApplication application

protected org.springframework.context.ApplicationContext applicationContext

protected java.util.Map chainModel

protected java.lang.String controllerName

protected GrailsApplicationAttributes grailsAttributes

protected java.lang.String id

protected javax.servlet.ServletContext servletContext

protected GrailsWebRequest webRequest

 
Method Summary
protected org.springframework.web.servlet.ModelAndView executeAction(groovy.lang.GroovyObject controller, GrailsControllerClass controllerClass, java.lang.String viewName, javax.servlet.http.HttpServletRequest request, javax.servlet.http.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()

javax.servlet.ServletContext getServletContext()

java.lang.Object handleAction(groovy.lang.GroovyObject controller, java.lang.Object action, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)

java.lang.Object handleAction(groovy.lang.GroovyObject controller, java.lang.Object action, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.util.Map params)

org.springframework.web.servlet.ModelAndView handleActionResponse(groovy.lang.GroovyObject controller, java.lang.Object returnValue, java.lang.String closurePropertyName, java.lang.String viewName)

org.springframework.web.servlet.ModelAndView handleURI(java.lang.String uri, GrailsWebRequest request)

org.springframework.web.servlet.ModelAndView handleURI(java.lang.String uri, GrailsWebRequest grailsWebRequest, java.util.Map params)

protected java.lang.Object invoke(groovy.lang.GroovyObject controller, java.lang.Object action)

protected java.lang.Object retrieveAction(groovy.lang.GroovyObject controller, java.lang.String actionName, javax.servlet.http.HttpServletResponse response)

void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)

void setGrailsApplication(GrailsApplication application)

void setServletContext(javax.servlet.ServletContext servletContext)

 
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()
 

Field Detail

actionName

protected java.lang.String actionName


application

protected GrailsApplication application


applicationContext

protected org.springframework.context.ApplicationContext applicationContext


chainModel

@SuppressWarnings("rawtypes")
protected java.util.Map chainModel


controllerName

protected java.lang.String controllerName


grailsAttributes

protected GrailsApplicationAttributes grailsAttributes


id

protected java.lang.String id


servletContext

protected javax.servlet.ServletContext servletContext


webRequest

protected GrailsWebRequest webRequest


 
Method Detail

executeAction

@SuppressWarnings({ "unchecked", "rawtypes" })
protected org.springframework.web.servlet.ModelAndView executeAction(groovy.lang.GroovyObject controller, GrailsControllerClass controllerClass, java.lang.String viewName, javax.servlet.http.HttpServletRequest request, javax.servlet.http.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 javax.servlet.ServletContext getServletContext()


handleAction

public java.lang.Object handleAction(groovy.lang.GroovyObject controller, @SuppressWarnings("rawtypes") java.lang.Object action, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)


handleAction

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


handleActionResponse

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


handleURI

public org.springframework.web.servlet.ModelAndView handleURI(java.lang.String uri, GrailsWebRequest request)


handleURI

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


invoke

protected java.lang.Object invoke(groovy.lang.GroovyObject controller, java.lang.Object action)


retrieveAction

protected java.lang.Object retrieveAction(groovy.lang.GroovyObject controller, java.lang.String actionName, javax.servlet.http.HttpServletResponse response)


setApplicationContext

public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)


setGrailsApplication

public void setGrailsApplication(GrailsApplication application)


setServletContext

public void setServletContext(javax.servlet.ServletContext servletContext)


 

Groovy Documentation