public class DefaultGrailsApplicationAttributes extends java.lang.Object implements GrailsApplicationAttributes
GrailsWebRequest| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
DEFAULT_NAMESPACE |
ACTION_NAME_ATTRIBUTE, APP_URI_ATTRIBUTE, ASYNC_STARTED, CONTENT_FORMAT, CONTROLLER, CONTROLLER_NAME_ATTRIBUTE, CONTROLLER_NAMESPACE_ATTRIBUTE, ERRORS, FLASH_SCOPE, GRAILS_CONTROLLER_CLASS, GRAILS_CONTROLLER_CLASS_AVAILABLE, GSP_CODEC, GSP_TEMPLATE_ENGINE, GSP_TMP_WRITER, GSP_TO_RENDER, ID_PARAM, MODEL_AND_VIEW, OUT, PAGE_SCOPE, PARAMS_OBJECT, PATH_TO_VIEWS, PROPERTY_REGISTRY, REDIRECT_ISSUED, RENDERING_ERROR_ATTRIBUTE, REQUEST_FORMATS, REQUEST_REDIRECTED_ATTRIBUTE, RESPONSE_FORMAT, RESPONSE_FORMATS, RESPONSE_MIME_TYPE, RESPONSE_MIME_TYPES, TAG_CACHE, TEMPLATE_MODEL, WEB_REQUEST| Constructor and Description |
|---|
DefaultGrailsApplicationAttributes(javax.servlet.ServletContext context) |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.context.ApplicationContext |
getApplicationContext() |
java.lang.String |
getApplicationUri(javax.servlet.ServletRequest request)
Deprecated.
Use
instead |
groovy.lang.GroovyObject |
getController(javax.servlet.ServletRequest request) |
java.lang.String |
getControllerActionUri(javax.servlet.ServletRequest request) |
java.lang.String |
getControllerUri(javax.servlet.ServletRequest request) |
org.springframework.validation.Errors |
getErrors(javax.servlet.ServletRequest request) |
FlashScope |
getFlashScope(javax.servlet.ServletRequest request)
Retrieves the flash scope instance for the given requeste
|
org.codehaus.groovy.grails.commons.GrailsApplication |
getGrailsApplication() |
GroovyPagesUriService |
getGroovyPagesUriService() |
org.springframework.context.MessageSource |
getMessageSource() |
java.lang.String |
getNoSuffixViewURI(groovy.lang.GroovyObject controller,
java.lang.String viewName) |
java.io.Writer |
getOut(javax.servlet.http.HttpServletRequest request)
Holds the current response write for the request
|
ResourceAwareTemplateEngine |
getPagesTemplateEngine() |
java.lang.String |
getPluginContextPath(javax.servlet.http.HttpServletRequest request)
Retrieves the plugin context path for the current request.
|
javax.servlet.ServletContext |
getServletContext()
Retrieves the servlet context instance
|
groovy.lang.GroovyObject |
getTagLibraryForTag(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.String tagName)
Retrieves a Grails tag library from the request for the named tag in
the default namespace GroovyPage.DEFAULT_NAMESPACE
|
groovy.lang.GroovyObject |
getTagLibraryForTag(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.String tagName,
java.lang.String namespace)
Retrieves a Grails tag library from the request for the named tag in a
given namespace.
|
java.lang.String |
getTemplateUri(java.lang.CharSequence templateName,
javax.servlet.ServletRequest request) |
java.lang.String |
getTemplateURI(groovy.lang.GroovyObject controller,
java.lang.String templateName) |
java.lang.String |
getViewUri(java.lang.String viewName,
javax.servlet.http.HttpServletRequest request)
Retrieves the uri of a named view
|
void |
setOut(javax.servlet.http.HttpServletRequest request,
java.io.Writer out2)
Sets the current write for the request
|
protected static final java.lang.String DEFAULT_NAMESPACE
public DefaultGrailsApplicationAttributes(javax.servlet.ServletContext context)
public org.springframework.context.ApplicationContext getApplicationContext()
getApplicationContext in interface org.codehaus.groovy.grails.commons.ApplicationAttributespublic java.lang.String getPluginContextPath(javax.servlet.http.HttpServletRequest request)
GrailsApplicationAttributesgetPluginContextPath in interface GrailsApplicationAttributespublic groovy.lang.GroovyObject getController(javax.servlet.ServletRequest request)
getController in interface GrailsApplicationAttributespublic java.lang.String getControllerUri(javax.servlet.ServletRequest request)
getControllerUri in interface GrailsApplicationAttributes@Deprecated public java.lang.String getApplicationUri(javax.servlet.ServletRequest request)
insteadgetApplicationUri in interface GrailsApplicationAttributesrequest - The Servlet Reqestpublic javax.servlet.ServletContext getServletContext()
GrailsApplicationAttributesgetServletContext in interface GrailsApplicationAttributespublic FlashScope getFlashScope(javax.servlet.ServletRequest request)
GrailsApplicationAttributesgetFlashScope in interface GrailsApplicationAttributespublic java.lang.String getTemplateUri(java.lang.CharSequence templateName,
javax.servlet.ServletRequest request)
getTemplateUri in interface GrailsApplicationAttributespublic java.lang.String getViewUri(java.lang.String viewName,
javax.servlet.http.HttpServletRequest request)
GrailsApplicationAttributesgetViewUri in interface GrailsApplicationAttributesviewName - The name of the viewrequest - The request instancepublic java.lang.String getControllerActionUri(javax.servlet.ServletRequest request)
getControllerActionUri in interface GrailsApplicationAttributespublic org.springframework.validation.Errors getErrors(javax.servlet.ServletRequest request)
getErrors in interface GrailsApplicationAttributespublic ResourceAwareTemplateEngine getPagesTemplateEngine()
getPagesTemplateEngine in interface GrailsApplicationAttributespublic org.codehaus.groovy.grails.commons.GrailsApplication getGrailsApplication()
getGrailsApplication in interface org.codehaus.groovy.grails.commons.ApplicationAttributespublic groovy.lang.GroovyObject getTagLibraryForTag(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.String tagName)
GrailsApplicationAttributesgetTagLibraryForTag in interface GrailsApplicationAttributesrequest - the request instanceresponse - the response instanctetagName - The name of the tag that contains the tag librarypublic groovy.lang.GroovyObject getTagLibraryForTag(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.String tagName,
java.lang.String namespace)
GrailsApplicationAttributesgetTagLibraryForTag in interface GrailsApplicationAttributesrequest - the request instanceresponse - the response instanctetagName - The name of the tag that contains the tag librarynamespace - The namespace of the tagpublic java.io.Writer getOut(javax.servlet.http.HttpServletRequest request)
GrailsApplicationAttributesgetOut in interface GrailsApplicationAttributespublic void setOut(javax.servlet.http.HttpServletRequest request,
java.io.Writer out2)
GrailsApplicationAttributessetOut in interface GrailsApplicationAttributesrequest - The requestout2 - The writerpublic java.lang.String getNoSuffixViewURI(groovy.lang.GroovyObject controller,
java.lang.String viewName)
getNoSuffixViewURI in interface GrailsApplicationAttributespublic java.lang.String getTemplateURI(groovy.lang.GroovyObject controller,
java.lang.String templateName)
getTemplateURI in interface GrailsApplicationAttributespublic GroovyPagesUriService getGroovyPagesUriService()
getGroovyPagesUriService in interface GrailsApplicationAttributespublic org.springframework.context.MessageSource getMessageSource()
getMessageSource in interface GrailsApplicationAttributes