public class CommonWebApi
extends java.lang.Object
implements org.codehaus.groovy.grails.plugins.support.aware.GrailsApplicationAware, org.springframework.web.context.ServletContextAware, org.springframework.context.ApplicationContextAware, java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
RAW_CODEC_NAME |
| Constructor and Description |
|---|
CommonWebApi() |
CommonWebApi(org.codehaus.groovy.grails.plugins.GrailsPluginManager pluginManager) |
| Modifier and Type | Method and Description |
|---|---|
protected GrailsWebRequest |
currentRequestAttributes() |
java.lang.String |
getActionName(java.lang.Object instance)
Obtains the currently executing action name
|
org.springframework.context.ApplicationContext |
getApplicationContext(java.lang.Object instance)
Obtains the ApplicationContext instance
|
java.lang.Object |
getControllerClass(java.lang.Object instance)
Obtains the currently executing controllerClass
|
java.lang.String |
getControllerName(java.lang.Object instance)
Obtains the currently executing controller name
|
java.lang.String |
getControllerNamespace(java.lang.Object instance)
Obtains the currently executing controller namespace
|
FlashScope |
getFlash(java.lang.Object instance)
Obtains the Grails FlashScope instance
|
org.codehaus.groovy.grails.commons.GrailsApplication |
getGrailsApplication(java.lang.Object instance)
Obtains the GrailsApplication instance
|
GrailsApplicationAttributes |
getGrailsAttributes(java.lang.Object instance)
Obtains the GrailsApplicationAttributes instance
|
GrailsParameterMap |
getParams(java.lang.Object instance)
Obtains the Grails parameter map
|
java.lang.String |
getPluginContextPath(java.lang.Object delegate)
Obtains the pluginContextPath
|
javax.servlet.http.HttpServletRequest |
getRequest(java.lang.Object instance)
Obtains the HttpServletRequest instance
|
javax.servlet.http.HttpServletResponse |
getResponse(java.lang.Object instance)
Obtains the HttpServletResponse instance
|
javax.servlet.ServletContext |
getServletContext(java.lang.Object instance)
Obtains the ServletContext instance
|
javax.servlet.http.HttpSession |
getSession(java.lang.Object instance)
Obtains the HttpSession instance
|
GrailsWebRequest |
getWebRequest(java.lang.Object instance)
Obtains the currently executing web request
|
java.lang.Object |
raw(java.lang.Object instance,
java.lang.Object value)
Marks the given value to be output in raw form without encoding
|
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
void |
setGrailsApplication(org.codehaus.groovy.grails.commons.GrailsApplication grailsApplication) |
void |
setServletContext(javax.servlet.ServletContext servletContext) |
public static final java.lang.String RAW_CODEC_NAME
public CommonWebApi(org.codehaus.groovy.grails.plugins.GrailsPluginManager pluginManager)
public CommonWebApi()
public java.lang.Object raw(java.lang.Object instance,
java.lang.Object value)
instance - The instancevalue - The valuepublic GrailsParameterMap getParams(java.lang.Object instance)
public FlashScope getFlash(java.lang.Object instance)
public javax.servlet.http.HttpSession getSession(java.lang.Object instance)
public javax.servlet.http.HttpServletRequest getRequest(java.lang.Object instance)
public javax.servlet.ServletContext getServletContext(java.lang.Object instance)
public javax.servlet.http.HttpServletResponse getResponse(java.lang.Object instance)
public GrailsApplicationAttributes getGrailsAttributes(java.lang.Object instance)
public org.codehaus.groovy.grails.commons.GrailsApplication getGrailsApplication(java.lang.Object instance)
public org.springframework.context.ApplicationContext getApplicationContext(java.lang.Object instance)
public java.lang.String getActionName(java.lang.Object instance)
public java.lang.String getControllerName(java.lang.Object instance)
public java.lang.String getControllerNamespace(java.lang.Object instance)
public java.lang.Object getControllerClass(java.lang.Object instance)
public GrailsWebRequest getWebRequest(java.lang.Object instance)
public java.lang.String getPluginContextPath(java.lang.Object delegate)
delegate - The object the method is being invoked onpublic void setGrailsApplication(org.codehaus.groovy.grails.commons.GrailsApplication grailsApplication)
setGrailsApplication in interface org.codehaus.groovy.grails.plugins.support.aware.GrailsApplicationAwarepublic void setServletContext(javax.servlet.ServletContext servletContext)
setServletContext in interface org.springframework.web.context.ServletContextAwarepublic void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionprotected GrailsWebRequest currentRequestAttributes()