|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.codehaus.groovy.grails.web.servlet.mvc.SimpleGrailsControllerHelper
public class SimpleGrailsControllerHelper
This is a helper class that does the main job of dealing with Grails web requests
Constructor Summary | |
---|---|
SimpleGrailsControllerHelper(GrailsApplication application,
ApplicationContext context,
ServletContext servletContext)
|
Method Summary | |
---|---|
protected ModelAndView |
executeAction(groovy.lang.GroovyObject controller,
GrailsControllerClass controllerClass,
String viewName,
HttpServletRequest request,
HttpServletResponse response,
Map params)
Invokes the action defined by the webRequest for the given arguments |
GrailsControllerClass |
getControllerClassByName(String name)
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)
Handles a Grails URI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleGrailsControllerHelper(GrailsApplication application, ApplicationContext context, ServletContext servletContext)
Method Detail |
---|
public ServletContext getServletContext()
getServletContext
in interface GrailsControllerHelper
public GrailsControllerClass getControllerClassByName(String name)
GrailsControllerHelper
getControllerClassByName
in interface GrailsControllerHelper
public GrailsControllerClass getControllerClassByURI(String uri)
GrailsControllerHelper
getControllerClassByURI
in interface GrailsControllerHelper
uri
- The URI to lookup
public groovy.lang.GroovyObject getControllerInstance(GrailsControllerClass controllerClass)
GrailsControllerHelper
getControllerInstance
in interface GrailsControllerHelper
controllerClass
- The GrailsControllerClass
public ModelAndView handleURI(String uri, GrailsWebRequest webRequest)
GrailsControllerHelper
handleURI
in interface GrailsControllerHelper
uri
- The URI to processwebRequest
- The GrailsWebRequest
public ModelAndView handleURI(String uri, GrailsWebRequest webRequest, Map params)
GrailsControllerHelper
handleURI
in interface GrailsControllerHelper
uri
- The URI to processswebRequest
- the GrailsWebRequest instanceparams
- A map of controller parameters
protected ModelAndView executeAction(groovy.lang.GroovyObject controller, GrailsControllerClass controllerClass, String viewName, HttpServletRequest request, HttpServletResponse response, Map params)
controller
- The controller instancecontrollerClass
- The GrailsControllerClass that defines the conventions within the controllerviewName
- The name of the view to delegate to if necessaryrequest
- The HttpServletRequest objectresponse
- The HttpServletResponse objectparams
- A map of parameters
public GrailsApplicationAttributes getGrailsAttributes()
getGrailsAttributes
in interface GrailsControllerHelper
public Object handleAction(groovy.lang.GroovyObject controller, groovy.lang.Closure action, HttpServletRequest request, HttpServletResponse response)
GrailsControllerHelper
handleAction
in interface GrailsControllerHelper
action
- An action Closure instancerequest
- The request objectresponse
- The response
public Object handleAction(groovy.lang.GroovyObject controller, groovy.lang.Closure action, HttpServletRequest request, HttpServletResponse response, Map params)
GrailsControllerHelper
handleAction
in interface GrailsControllerHelper
action
- An action Closure instancerequest
- The request objectresponse
- The responseparams
- A Map of controller parameters
public ModelAndView handleActionResponse(groovy.lang.GroovyObject controller, Object returnValue, String closurePropertyName, String viewName)
GrailsControllerHelper
handleActionResponse
in interface GrailsControllerHelper
controller
- The controller instancereturnValue
- The response from the closureclosurePropertyName
- The property name of the closureviewName
- The name of the view
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |