Package org.grails.web.util
Interface GrailsApplicationAttributes
-
- All Superinterfaces:
grails.core.ApplicationAttributes
- All Known Implementing Classes:
DefaultGrailsApplicationAttributes
public interface GrailsApplicationAttributes extends grails.core.ApplicationAttributesDefines the names of and methods to retrieve Grails specific request and servlet attributes.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringACTION_NAME_ATTRIBUTEstatic java.lang.StringAPP_URI_ATTRIBUTEstatic java.lang.StringASYNC_STARTEDstatic java.lang.StringCONTENT_FORMATstatic java.lang.StringCONTROLLERstatic java.lang.StringCONTROLLER_NAME_ATTRIBUTEstatic java.lang.StringCONTROLLER_NAMESPACE_ATTRIBUTEstatic java.lang.StringERRORSstatic java.lang.StringFLASH_SCOPEstatic java.lang.StringFORWARD_IN_PROGRESSstatic java.lang.StringFORWARD_ISSUEDstatic java.lang.StringGRAILS_CONTROLLER_CLASSstatic java.lang.StringGRAILS_CONTROLLER_CLASS_AVAILABLEstatic java.lang.StringGSP_CODECstatic java.lang.StringGSP_TEMPLATE_ENGINEstatic java.lang.StringGSP_TMP_WRITERstatic java.lang.StringGSP_TO_RENDERstatic java.lang.StringID_PARAMstatic java.lang.StringMODEL_AND_VIEWstatic java.lang.StringOUTstatic java.lang.StringPAGE_SCOPEstatic java.lang.StringPARAMS_OBJECTstatic java.lang.StringPATH_TO_VIEWSstatic java.lang.StringPROPERTY_REGISTRYstatic java.lang.StringREDIRECT_ISSUEDstatic java.lang.StringRENDERING_ERROR_ATTRIBUTEstatic java.lang.StringREQUEST_FORMATSstatic java.lang.StringREQUEST_REDIRECTED_ATTRIBUTEstatic java.lang.StringRESPONSE_FORMATstatic java.lang.StringRESPONSE_FORMATSstatic java.lang.StringRESPONSE_MIME_TYPEstatic java.lang.StringRESPONSE_MIME_TYPESstatic java.lang.StringTAG_CACHEstatic java.lang.StringTEMPLATE_MODELstatic java.lang.StringWEB_REQUEST
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description java.lang.StringgetApplicationUri(javax.servlet.ServletRequest request)Deprecated.Useinsteadgroovy.lang.GroovyObjectgetController(javax.servlet.ServletRequest request)java.lang.StringgetControllerActionUri(javax.servlet.ServletRequest request)java.lang.StringgetControllerUri(javax.servlet.ServletRequest request)org.springframework.validation.ErrorsgetErrors(javax.servlet.ServletRequest request)FlashScopegetFlashScope(javax.servlet.ServletRequest request)Retrieves the flash scope instance for the given requesteGroovyPagesUriServicegetGroovyPagesUriService()org.springframework.context.MessageSourcegetMessageSource()java.lang.StringgetNoSuffixViewURI(groovy.lang.GroovyObject controller, java.lang.String viewName)java.io.WritergetOut(javax.servlet.http.HttpServletRequest request)Holds the current response write for the requestorg.grails.gsp.ResourceAwareTemplateEnginegetPagesTemplateEngine()java.lang.StringgetPluginContextPath(javax.servlet.http.HttpServletRequest request)Retrieves the plugin context path for the current request.javax.servlet.ServletContextgetServletContext()Retrieves the servlet context instancejava.lang.StringgetTemplateUri(java.lang.CharSequence templateName, javax.servlet.ServletRequest request)java.lang.StringgetTemplateURI(groovy.lang.GroovyObject controller, java.lang.String templateName)Resolve the URI for a templatejava.lang.StringgetTemplateURI(groovy.lang.GroovyObject controller, java.lang.String templateName, boolean includeExtension)Resolve the URI for a templatejava.lang.StringgetViewUri(java.lang.String viewName, javax.servlet.http.HttpServletRequest request)Retrieves the uri of a named viewvoidsetOut(javax.servlet.http.HttpServletRequest currentRequest, java.io.Writer out2)Sets the current write for the request
-
-
-
Field Detail
-
PATH_TO_VIEWS
static final java.lang.String PATH_TO_VIEWS
- See Also:
- Constant Field Values
-
GSP_TEMPLATE_ENGINE
static final java.lang.String GSP_TEMPLATE_ENGINE
- See Also:
- Constant Field Values
-
ASYNC_STARTED
static final java.lang.String ASYNC_STARTED
- See Also:
- Constant Field Values
-
CONTENT_FORMAT
static final java.lang.String CONTENT_FORMAT
- See Also:
- Constant Field Values
-
RESPONSE_FORMAT
static final java.lang.String RESPONSE_FORMAT
- See Also:
- Constant Field Values
-
RESPONSE_MIME_TYPE
static final java.lang.String RESPONSE_MIME_TYPE
- See Also:
- Constant Field Values
-
RESPONSE_MIME_TYPES
static final java.lang.String RESPONSE_MIME_TYPES
- See Also:
- Constant Field Values
-
REQUEST_FORMATS
static final java.lang.String REQUEST_FORMATS
- See Also:
- Constant Field Values
-
RESPONSE_FORMATS
static final java.lang.String RESPONSE_FORMATS
- See Also:
- Constant Field Values
-
FLASH_SCOPE
static final java.lang.String FLASH_SCOPE
- See Also:
- Constant Field Values
-
PARAMS_OBJECT
static final java.lang.String PARAMS_OBJECT
- See Also:
- Constant Field Values
-
CONTROLLER
static final java.lang.String CONTROLLER
- See Also:
- Constant Field Values
-
PROPERTY_REGISTRY
static final java.lang.String PROPERTY_REGISTRY
- See Also:
- Constant Field Values
-
ERRORS
static final java.lang.String ERRORS
- See Also:
- Constant Field Values
-
MODEL_AND_VIEW
static final java.lang.String MODEL_AND_VIEW
- See Also:
- Constant Field Values
-
TEMPLATE_MODEL
static final java.lang.String TEMPLATE_MODEL
- See Also:
- Constant Field Values
-
OUT
static final java.lang.String OUT
- See Also:
- Constant Field Values
-
TAG_CACHE
static final java.lang.String TAG_CACHE
- See Also:
- Constant Field Values
-
ID_PARAM
static final java.lang.String ID_PARAM
- See Also:
- Constant Field Values
-
GSP_TO_RENDER
static final java.lang.String GSP_TO_RENDER
- See Also:
- Constant Field Values
-
GSP_CODEC
static final java.lang.String GSP_CODEC
- See Also:
- Constant Field Values
-
WEB_REQUEST
static final java.lang.String WEB_REQUEST
- See Also:
- Constant Field Values
-
PAGE_SCOPE
static final java.lang.String PAGE_SCOPE
- See Also:
- Constant Field Values
-
GSP_TMP_WRITER
static final java.lang.String GSP_TMP_WRITER
- See Also:
- Constant Field Values
-
REQUEST_REDIRECTED_ATTRIBUTE
static final java.lang.String REQUEST_REDIRECTED_ATTRIBUTE
- See Also:
- Constant Field Values
-
ACTION_NAME_ATTRIBUTE
static final java.lang.String ACTION_NAME_ATTRIBUTE
- See Also:
- Constant Field Values
-
CONTROLLER_NAME_ATTRIBUTE
static final java.lang.String CONTROLLER_NAME_ATTRIBUTE
- See Also:
- Constant Field Values
-
CONTROLLER_NAMESPACE_ATTRIBUTE
static final java.lang.String CONTROLLER_NAMESPACE_ATTRIBUTE
- See Also:
- Constant Field Values
-
GRAILS_CONTROLLER_CLASS
static final java.lang.String GRAILS_CONTROLLER_CLASS
- See Also:
- Constant Field Values
-
APP_URI_ATTRIBUTE
static final java.lang.String APP_URI_ATTRIBUTE
- See Also:
- Constant Field Values
-
RENDERING_ERROR_ATTRIBUTE
static final java.lang.String RENDERING_ERROR_ATTRIBUTE
- See Also:
- Constant Field Values
-
REDIRECT_ISSUED
static final java.lang.String REDIRECT_ISSUED
- See Also:
- Constant Field Values
-
FORWARD_ISSUED
static final java.lang.String FORWARD_ISSUED
- See Also:
- Constant Field Values
-
FORWARD_IN_PROGRESS
static final java.lang.String FORWARD_IN_PROGRESS
- See Also:
- Constant Field Values
-
GRAILS_CONTROLLER_CLASS_AVAILABLE
static final java.lang.String GRAILS_CONTROLLER_CLASS_AVAILABLE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getPluginContextPath
java.lang.String getPluginContextPath(javax.servlet.http.HttpServletRequest request)
Retrieves the plugin context path for the current request. The plugin context path is the path used by plugins to reference resources such as javascript, CSS and so forth It is established by evaluating the current controller, if the current controller is plugin provided then it will attempt to evaluate the path based on the plugin the controller came from- Returns:
- The plugin context path
-
getController
groovy.lang.GroovyObject getController(javax.servlet.ServletRequest request)
- Returns:
- The controller for the request
-
getControllerUri
java.lang.String getControllerUri(javax.servlet.ServletRequest request)
- Parameters:
request-- Returns:
- The uri of the controller within the request
-
getApplicationUri
@Deprecated java.lang.String getApplicationUri(javax.servlet.ServletRequest request)
Deprecated.Useinstead- Parameters:
request-- Returns:
- The uri of the application relative to the server root
-
getTemplateURI
java.lang.String getTemplateURI(groovy.lang.GroovyObject controller, java.lang.String templateName)Resolve the URI for a template- Parameters:
controller- The controllertemplateName- The name of the template- Returns:
- The template name
-
getTemplateURI
java.lang.String getTemplateURI(groovy.lang.GroovyObject controller, java.lang.String templateName, boolean includeExtension)Resolve the URI for a template- Parameters:
controller- The controllertemplateName- The name of the templateincludeExtension- Whether to include the GSP etension- Returns:
- The template name
-
getNoSuffixViewURI
java.lang.String getNoSuffixViewURI(groovy.lang.GroovyObject controller, java.lang.String viewName)
-
getServletContext
javax.servlet.ServletContext getServletContext()
Retrieves the servlet context instance- Returns:
- The servlet context instance
-
getFlashScope
FlashScope getFlashScope(javax.servlet.ServletRequest request)
Retrieves the flash scope instance for the given requeste- Parameters:
request-- Returns:
- The FlashScope instance
-
getTemplateUri
java.lang.String getTemplateUri(java.lang.CharSequence templateName, javax.servlet.ServletRequest request)- Parameters:
templateName-request-- Returns:
- The uri of a named template for the current controller
-
getViewUri
java.lang.String getViewUri(java.lang.String viewName, javax.servlet.http.HttpServletRequest request)Retrieves the uri of a named view- Parameters:
viewName- The name of the viewrequest- The request instance- Returns:
- The name of the view
-
getControllerActionUri
java.lang.String getControllerActionUri(javax.servlet.ServletRequest request)
- Parameters:
request-- Returns:
- The uri of the action called within the controller
-
getErrors
org.springframework.validation.Errors getErrors(javax.servlet.ServletRequest request)
- Parameters:
request-- Returns:
- The errors instance contained within the request
-
getPagesTemplateEngine
org.grails.gsp.ResourceAwareTemplateEngine getPagesTemplateEngine()
- Returns:
- Retrieves the shared GSP template engine
-
getOut
java.io.Writer getOut(javax.servlet.http.HttpServletRequest request)
Holds the current response write for the request- Returns:
- The held response writer
-
setOut
void setOut(javax.servlet.http.HttpServletRequest currentRequest, java.io.Writer out2)Sets the current write for the request- Parameters:
currentRequest- The requestout2- The writer
-
getGroovyPagesUriService
GroovyPagesUriService getGroovyPagesUriService()
- Returns:
- The GroovyPageUriService instance
-
getMessageSource
org.springframework.context.MessageSource getMessageSource()
- Returns:
- The MessageSource instance
-
-