|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.web.servlet.handler.DispatcherServletWebRequest org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequest
public class GrailsWebRequest extends DispatcherServletWebRequest
Encapsulates a Grails request. An instance of this class is bound to the current thread using Spring's RequestContextHolder which can later be retrieved using: def webRequest = RequestContextHolder.currentRequestAttributes()
Field Summary | |
---|---|
static java.lang.String |
ID_PARAMETER
|
Constructor Summary | |
GrailsWebRequest(HttpServletRequest request, HttpServletResponse response, ServletContext servletContext)
|
Method Summary | |
---|---|
void
|
addParameterListener(ParameterCreationListener creationListener)
|
java.lang.String
|
getActionName()
@return the actionName |
ApplicationContext
|
getApplicationContext()
Obtains the ApplicationContext object. |
GrailsApplicationAttributes
|
getAttributes()
@return The GrailsApplicationAttributes instance |
java.lang.String
|
getContextPath()
Returns the context path of the request. |
java.lang.String
|
getControllerName()
@return the controllerName |
HttpServletRequest
|
getCurrentRequest()
@return The currently executing request |
HttpServletResponse
|
getCurrentResponse()
|
FlashScope
|
getFlashScope()
@return The FlashScope instance for the current request |
java.lang.String
|
getId()
|
java.io.Writer
|
getOut()
@return the out |
java.util.Map
|
getParameterMap()
Overriden to return the GrailsParameterMap instance, |
GrailsParameterMap
|
getParams()
@return The Grails params object |
PropertyEditorRegistry
|
getPropertyEditorRegistry()
Obtains the PropertyEditorRegistry instance. |
ServletContext
|
getServletContext()
@return The ServletContext instance |
GrailsHttpSession
|
getSession()
@return The Grails session object |
void
|
informParameterCreationListeners()
Informs any parameter creation listeners. |
boolean
|
isActive()
Whether the web request is still active |
boolean
|
isFlowRequest()
Returns true if the current executing request is a flow request |
boolean
|
isRenderView()
@return True if the view for this GrailsWebRequest should be rendered |
static GrailsWebRequest
|
lookup(HttpServletRequest request)
Looks up the GrailsWebRequest from the current request. |
void
|
setActionName(java.lang.String actionName)
|
void
|
setControllerName(java.lang.String controllerName)
|
void
|
setId(java.lang.Object id)
Sets the id of the request. |
void
|
setOut(java.io.Writer out)
@param out the out to set |
void
|
setRenderView(boolean renderView)
|
Field Detail |
---|
public static final java.lang.String ID_PARAMETER
Constructor Detail |
---|
public GrailsWebRequest(HttpServletRequest request, HttpServletResponse response, ServletContext servletContext)
Method Detail |
---|
public void addParameterListener(ParameterCreationListener creationListener)
public java.lang.String getActionName()
public ApplicationContext getApplicationContext()
public GrailsApplicationAttributes getAttributes()
@Override public java.lang.String getContextPath()
public java.lang.String getControllerName()
public HttpServletRequest getCurrentRequest()
public HttpServletResponse getCurrentResponse()
public FlashScope getFlashScope()
public java.lang.String getId()
public java.io.Writer getOut()
@Override @SuppressWarnings({ "unchecked", "rawtypes" }) public java.util.Map getParameterMap()
public GrailsParameterMap getParams()
public PropertyEditorRegistry getPropertyEditorRegistry()
public ServletContext getServletContext()
public GrailsHttpSession getSession()
public void informParameterCreationListeners()
public boolean isActive()
public boolean isFlowRequest()
public boolean isRenderView()
public static GrailsWebRequest lookup(HttpServletRequest request)
request
- The current request
public void setActionName(java.lang.String actionName)
public void setControllerName(java.lang.String controllerName)
public void setId(java.lang.Object id)
id
- The id
public void setOut(java.io.Writer out)
out
- the out to set
public void setRenderView(boolean renderView)
Groovy Documentation