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, immutableValueTypes| Constructor and Description |
|---|
GrailsWebRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
GrailsApplicationAttributes attributes) |
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.
|
void |
addParametersFrom(java.util.Map previousParams) |
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.Object |
getControllerClass() |
java.lang.String |
getControllerName() |
java.lang.String |
getControllerNamespace() |
javax.servlet.http.HttpServletRequest |
getCurrentRequest() |
javax.servlet.http.HttpServletResponse |
getCurrentResponse() |
org.codehaus.groovy.grails.support.encoding.EncodingStateRegistry |
getEncodingStateRegistry() |
java.lang.String |
getFilteringCodec() |
org.codehaus.groovy.grails.support.encoding.Encoder |
getFilteringEncoder() |
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() |
javax.servlet.http.HttpServletResponse |
getWrappedResponse() |
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() |
boolean |
isSkipFilteringCodec() |
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.
|
org.codehaus.groovy.grails.support.encoding.Encoder |
lookupFilteringEncoder() |
void |
requestCompleted() |
void |
resetParams()
Reset params by re-reading & initializing parameters from request
|
void |
setActionName(java.lang.String actionName) |
void |
setControllerName(java.lang.String controllerName) |
void |
setControllerNamespace(java.lang.String controllerNamespace) |
void |
setFilteringCodec(java.lang.String codecName) |
void |
setFilteringEncoder(org.codehaus.groovy.grails.support.encoding.Encoder filteringEncoder) |
void |
setId(java.lang.Object id)
Sets the id of the request.
|
void |
setOut(java.io.Writer out) |
void |
setRenderView(boolean renderView) |
void |
setSkipFilteringCodec(boolean skipCodec) |
void |
setWrappedResponse(javax.servlet.http.HttpServletResponse wrappedResponse) |
getLocalecheckNotModified, checkNotModified, getDescription, getHeader, getHeaderNames, getHeaderValues, getHttpMethod, getNativeRequest, getNativeRequest, getNativeResponse, getNativeResponse, getParameter, getParameterNames, getParameterValues, getRemoteUser, getUserPrincipal, isNotModified, isSecure, isUserInRole, toStringgetAttribute, getAttributeNames, getRequest, getResponse, getSession, getSessionId, getSessionMutex, isImmutableSessionAttribute, 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,
GrailsApplicationAttributes attributes)
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 javax.servlet.http.HttpServletResponse getWrappedResponse()
public void setWrappedResponse(javax.servlet.http.HttpServletResponse wrappedResponse)
public GrailsParameterMap getParams()
public void resetParams()
public void addParametersFrom(java.util.Map previousParams)
public void informParameterCreationListeners()
public GrailsHttpSession getSession()
public GrailsApplicationAttributes getAttributes()
public void setActionName(java.lang.String actionName)
public void setControllerName(java.lang.String controllerName)
public void setControllerNamespace(java.lang.String controllerNamespace)
public java.lang.String getActionName()
public java.lang.String getControllerName()
public java.lang.Object getControllerClass()
public java.lang.String getControllerNamespace()
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()
public org.codehaus.groovy.grails.support.encoding.EncodingStateRegistry getEncodingStateRegistry()
public boolean isSkipFilteringCodec()
public void setSkipFilteringCodec(boolean skipCodec)
public java.lang.String getFilteringCodec()
public void setFilteringCodec(java.lang.String codecName)
public org.codehaus.groovy.grails.support.encoding.Encoder lookupFilteringEncoder()
public org.codehaus.groovy.grails.support.encoding.Encoder getFilteringEncoder()
public void setFilteringEncoder(org.codehaus.groovy.grails.support.encoding.Encoder filteringEncoder)