|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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 org.springframework.webflow.executor.support.FlowRequestHandler |
createRequestHandler(org.springframework.webflow.executor.support.FlowExecutorArgumentHandler argumentHandler)
Factory method that creates a new helper for processing a request into this flow controller. |
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 |
protected ModelAndView |
executeFlow(GrailsWebRequest webRequest,
HttpServletRequest request,
HttpServletResponse response)
This method is responsible for execution of a flow based on the currently executing GrailsWebRequest |
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 |
protected org.springframework.webflow.executor.FlowExecutor |
getFlowExecutor()
Retrieves the FlowExecutor instance stored in the ApplicationContext |
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 |
protected ModelAndView |
toModelAndView(org.springframework.webflow.executor.ResponseInstruction responseInstruction,
org.springframework.webflow.context.servlet.ServletExternalContext context,
org.springframework.webflow.executor.support.FlowExecutorArgumentHandler argumentHandler)
Deals with translating a WebFlow ResponseInstruction instance into an appropriate Spring ModelAndView |
| 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 GrailsControllerHelperpublic GrailsControllerClass getControllerClassByName(String name)
GrailsControllerHelper
getControllerClassByName in interface GrailsControllerHelperpublic GrailsControllerClass getControllerClassByURI(String uri)
GrailsControllerHelper
getControllerClassByURI in interface GrailsControllerHelperuri - The URI to lookup
public groovy.lang.GroovyObject getControllerInstance(GrailsControllerClass controllerClass)
GrailsControllerHelper
getControllerInstance in interface GrailsControllerHelpercontrollerClass - The GrailsControllerClass
public ModelAndView handleURI(String uri,
GrailsWebRequest webRequest)
GrailsControllerHelper
handleURI in interface GrailsControllerHelperuri - The URI to processswebRequest - The GrailsWebRequest
public ModelAndView handleURI(String uri,
GrailsWebRequest webRequest,
Map params)
GrailsControllerHelper
handleURI in interface GrailsControllerHelperuri - The URI to processswebRequest - the GrailsWebRequest instanceparams - A map of controller parameters
protected ModelAndView executeFlow(GrailsWebRequest webRequest,
HttpServletRequest request,
HttpServletResponse response)
webRequest - The GrailsWebRequestrequest - The HttpServletRequest instanceresponse - The HttpServletResponse instance
protected ModelAndView toModelAndView(org.springframework.webflow.executor.ResponseInstruction responseInstruction,
org.springframework.webflow.context.servlet.ServletExternalContext context,
org.springframework.webflow.executor.support.FlowExecutorArgumentHandler argumentHandler)
responseInstruction - The ResponseInstruction instancecontext - The ExternalContext for the webflowargumentHandler - The FlowExecutorArgumentHandler instance
protected org.springframework.webflow.executor.support.FlowRequestHandler createRequestHandler(org.springframework.webflow.executor.support.FlowExecutorArgumentHandler argumentHandler)
FlowRequestHandler.
argumentHandler - The FlowExecutorArgumentHandler to use
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 GrailsControllerHelperaction - 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 GrailsControllerHelperaction - 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 GrailsControllerHelpercontroller - The controller instancereturnValue - The response from the closureclosurePropertyName - The property name of the closureviewName - The name of the view
protected org.springframework.webflow.executor.FlowExecutor getFlowExecutor()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||