|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.codehaus.groovy.grails.web.servlet.DefaultGrailsApplicationAttributes
public class DefaultGrailsApplicationAttributes
Implementation of the GrailsApplicationAttributes interface that holds knowledge about how to obtain certain attributes from either the ServletContext or the HttpServletRequest instance.
GrailsWebRequest
Field Summary |
---|
Fields inherited from interface org.codehaus.groovy.grails.web.servlet.GrailsApplicationAttributes |
---|
ACTION_NAME_ATTRIBUTE, APP_URI_ATTRIBUTE, CONTENT_FORMAT, CONTROLLER, CONTROLLER_NAME_ATTRIBUTE, ERRORS, FLASH_SCOPE, GSP_TEMPLATE_ENGINE, GSP_TMP_WRITER, GSP_TO_RENDER, ID_PARAM, MODEL_AND_VIEW, OUT, PAGE_SCOPE, PARAMS_OBJECT, PATH_TO_VIEWS, PROPERTY_REGISTRY, RENDERING_ERROR_ATTRIBUTE, REQUEST_FORMATS, REQUEST_REDIRECTED_ATTRIBUTE, TAG_CACHE, WEB_REQUEST |
Fields inherited from interface org.codehaus.groovy.grails.commons.ApplicationAttributes |
---|
APPLICATION_CONTEXT, PARENT_APPLICATION_CONTEXT, PLUGIN_MANAGER, REQUEST_SCOPE_ID |
Constructor Summary | |
---|---|
DefaultGrailsApplicationAttributes(ServletContext context)
|
Method Summary | |
---|---|
ApplicationContext |
getApplicationContext()
|
String |
getApplicationUri(ServletRequest request)
Deprecated. Use instead |
groovy.lang.GroovyObject |
getController(ServletRequest request)
|
String |
getControllerActionUri(ServletRequest request)
|
String |
getControllerUri(ServletRequest request)
|
Errors |
getErrors(ServletRequest request)
|
FlashScope |
getFlashScope(ServletRequest request)
Retrieves the flash scope instance for the given requeste |
GrailsApplication |
getGrailsApplication()
|
GroovyPagesUriService |
getGroovyPagesUriService()
|
MessageSource |
getMessageSource()
|
String |
getNoSuffixViewURI(groovy.lang.GroovyObject controller,
String viewName)
|
Writer |
getOut(HttpServletRequest request)
Holds the current response write for the request |
GroovyPagesTemplateEngine |
getPagesTemplateEngine()
|
String |
getPluginContextPath(HttpServletRequest request)
Retrieves the plugin context path for the current request. |
ServletContext |
getServletContext()
Retrieves the servlet context instance |
groovy.lang.GroovyObject |
getTagLibraryForTag(HttpServletRequest request,
HttpServletResponse response,
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(HttpServletRequest request,
HttpServletResponse response,
String tagName,
String namespace)
Retrieves a Grails tag library from the request for the named tag in a given namespace. |
String |
getTemplateUri(CharSequence templateName,
ServletRequest request)
|
String |
getTemplateURI(groovy.lang.GroovyObject controller,
String templateName)
|
String |
getViewUri(String viewName,
HttpServletRequest request)
Retrieves the uri of a named view |
void |
setOut(HttpServletRequest request,
Writer out2)
Sets the current write for the request |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultGrailsApplicationAttributes(ServletContext context)
Method Detail |
---|
public ApplicationContext getApplicationContext()
getApplicationContext
in interface ApplicationAttributes
public String getPluginContextPath(HttpServletRequest request)
GrailsApplicationAttributes
getPluginContextPath
in interface GrailsApplicationAttributes
public groovy.lang.GroovyObject getController(ServletRequest request)
getController
in interface GrailsApplicationAttributes
public String getControllerUri(ServletRequest request)
getControllerUri
in interface GrailsApplicationAttributes
@Deprecated public String getApplicationUri(ServletRequest request)
instead
getApplicationUri
in interface GrailsApplicationAttributes
request
- The Servlet Reqest
public ServletContext getServletContext()
GrailsApplicationAttributes
getServletContext
in interface GrailsApplicationAttributes
public FlashScope getFlashScope(ServletRequest request)
GrailsApplicationAttributes
getFlashScope
in interface GrailsApplicationAttributes
public String getTemplateUri(CharSequence templateName, ServletRequest request)
getTemplateUri
in interface GrailsApplicationAttributes
public String getViewUri(String viewName, HttpServletRequest request)
GrailsApplicationAttributes
getViewUri
in interface GrailsApplicationAttributes
viewName
- The name of the viewrequest
- The request instance
public String getControllerActionUri(ServletRequest request)
getControllerActionUri
in interface GrailsApplicationAttributes
public Errors getErrors(ServletRequest request)
getErrors
in interface GrailsApplicationAttributes
public GroovyPagesTemplateEngine getPagesTemplateEngine()
getPagesTemplateEngine
in interface GrailsApplicationAttributes
public GrailsApplication getGrailsApplication()
getGrailsApplication
in interface ApplicationAttributes
public groovy.lang.GroovyObject getTagLibraryForTag(HttpServletRequest request, HttpServletResponse response, String tagName)
GrailsApplicationAttributes
getTagLibraryForTag
in interface GrailsApplicationAttributes
request
- the request instanceresponse
- the response instanctetagName
- The name of the tag that contains the tag library
public groovy.lang.GroovyObject getTagLibraryForTag(HttpServletRequest request, HttpServletResponse response, String tagName, String namespace)
GrailsApplicationAttributes
getTagLibraryForTag
in interface GrailsApplicationAttributes
request
- the request instanceresponse
- the response instanctetagName
- The name of the tag that contains the tag librarynamespace
- The namespace of the tag
public Writer getOut(HttpServletRequest request)
GrailsApplicationAttributes
getOut
in interface GrailsApplicationAttributes
public void setOut(HttpServletRequest request, Writer out2)
GrailsApplicationAttributes
setOut
in interface GrailsApplicationAttributes
request
- The requestout2
- The writerpublic String getNoSuffixViewURI(groovy.lang.GroovyObject controller, String viewName)
getNoSuffixViewURI
in interface GrailsApplicationAttributes
public String getTemplateURI(groovy.lang.GroovyObject controller, String templateName)
getTemplateURI
in interface GrailsApplicationAttributes
public GroovyPagesUriService getGroovyPagesUriService()
getGroovyPagesUriService
in interface GrailsApplicationAttributes
public MessageSource getMessageSource()
getMessageSource
in interface GrailsApplicationAttributes
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |