public class GrailsWebRequest extends org.springframework.web.servlet.handler.DispatcherServletWebRequest implements ParameterInitializationCallback
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ID_PARAMETER |
DESTRUCTION_CALLBACK_NAME_PREFIX| Constructor and Description |
|---|
GrailsWebRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.ServletContext servletContext) |
GrailsWebRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.ServletContext servletContext,
org.springframework.context.ApplicationContext applicationContext) |
| Modifier and Type | Method and Description |
|---|---|
void |
addParameterListener(ParameterCreationListener creationListener)
Adds a listener that will be called when the parameters are created.
|
java.lang.String |
getActionName() |
org.springframework.context.ApplicationContext |
getApplicationContext()
Obtains the ApplicationContext object.
|
GrailsApplicationAttributes |
getAttributes() |
java.lang.String |
getBaseUrl() |
java.lang.String |
getContextPath()
Returns the context path of the request.
|
java.lang.String |
getControllerName() |
javax.servlet.http.HttpServletRequest |
getCurrentRequest() |
javax.servlet.http.HttpServletResponse |
getCurrentResponse() |
FlashScope |
getFlashScope() |
java.lang.String |
getId() |
java.io.Writer |
getOut() |
java.util.Map |
getParameterMap()
Overriden to return the GrailsParameterMap instance,
|
GrailsParameterMap |
getParams() |
org.springframework.beans.PropertyEditorRegistry |
getPropertyEditorRegistry()
Obtains the PropertyEditorRegistry instance.
|
javax.servlet.ServletContext |
getServletContext() |
GrailsHttpSession |
getSession() |
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() |
static GrailsWebRequest |
lookup()
Looks up the current Grails WebRequest instance
|
static GrailsWebRequest |
lookup(javax.servlet.http.HttpServletRequest request)
Looks up the GrailsWebRequest from the current request.
|
static org.codehaus.groovy.grails.commons.GrailsApplication |
lookupApplication()
Looks up the GrailsApplication from the current request.
|
void |
requestCompleted() |
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) |
void |
setRenderView(boolean renderView) |
getLocalecheckNotModified, checkNotModified, getDescription, getHeader, getHeaderNames, getHeaderValues, getNativeRequest, getNativeRequest, getNativeResponse, getNativeResponse, getParameter, getParameterNames, getParameterValues, getRemoteUser, getResponse, getUserPrincipal, isNotModified, isSecure, isUserInRole, toStringgetAttribute, getAttributeNames, getRequest, getSession, getSessionId, getSessionMutex, registerDestructionCallback, registerSessionDestructionCallback, removeAttribute, resolveReference, setAttribute, updateAccessedSessionAttributesisRequestActive, registerRequestDestructionCallback, removeRequestDestructionCallbackpublic static final java.lang.String ID_PARAMETER
public GrailsWebRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.ServletContext servletContext)
public GrailsWebRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.ServletContext servletContext,
org.springframework.context.ApplicationContext applicationContext)
public java.util.Map getParameterMap()
getParameterMap in interface org.springframework.web.context.request.WebRequestgetParameterMap in class org.springframework.web.context.request.ServletWebRequestpublic void requestCompleted()
requestCompleted in class org.springframework.web.context.request.AbstractRequestAttributespublic java.io.Writer getOut()
public boolean isActive()
public void setOut(java.io.Writer out)
out - the out to setpublic javax.servlet.ServletContext getServletContext()
public java.lang.String getContextPath()
getContextPath in interface org.springframework.web.context.request.WebRequestgetContextPath in class org.springframework.web.context.request.ServletWebRequestpublic FlashScope getFlashScope()
public javax.servlet.http.HttpServletRequest getCurrentRequest()
public javax.servlet.http.HttpServletResponse getCurrentResponse()
public GrailsParameterMap getParams()
public void informParameterCreationListeners()
public GrailsHttpSession getSession()
public GrailsApplicationAttributes getAttributes()
public void setActionName(java.lang.String actionName)
public void setControllerName(java.lang.String controllerName)
public java.lang.String getActionName()
public java.lang.String getControllerName()
public void setRenderView(boolean renderView)
public boolean isRenderView()
public java.lang.String getId()
public boolean isFlowRequest()
public void addParameterListener(ParameterCreationListener creationListener)
ParameterInitializationCallbackaddParameterListener in interface ParameterInitializationCallbackcreationListener - the listenerpublic org.springframework.context.ApplicationContext getApplicationContext()
public org.springframework.beans.PropertyEditorRegistry getPropertyEditorRegistry()
public static GrailsWebRequest lookup(javax.servlet.http.HttpServletRequest request)
request - The current requestpublic static GrailsWebRequest lookup()
public static org.codehaus.groovy.grails.commons.GrailsApplication lookupApplication()
public void setId(java.lang.Object id)
id - The idpublic java.lang.String getBaseUrl()