GrailsApplicationAttributes (Grails 2.3.8)
Date: 2014-04-24

Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD

## org.codehaus.groovy.grails.web.servlet
[Java] Interface GrailsApplicationAttributes

    org.codehaus.groovy.grails.web.servlet.GrailsApplicationAttributes
      org.codehaus.groovy.grails.commons.ApplicationAttributes

All Superinterfaces:
  ApplicationAttributes

    public interface GrailsApplicationAttributes
    extends ApplicationAttributes

Defines the names of and methods to retrieve Grails specific request and servlet attributes.

Authors:
  Graeme Rocher

Field Summary
`java.lang.String` | `ACTION_NAME_ATTRIBUTE`
`java.lang.String` | `APP_URI_ATTRIBUTE`
`java.lang.String` | `ASYNC_STARTED`
`java.lang.String` | `CONTENT_FORMAT`
`java.lang.String` | `CONTROLLER`
`java.lang.String` | `CONTROLLER_NAME_ATTRIBUTE`
`java.lang.String` | `ERRORS`
`java.lang.String` | `FLASH_SCOPE`
`java.lang.String` | `GRAILS_CONTROLLER_CLASS`
`java.lang.String` | `GRAILS_CONTROLLER_CLASS_AVAILABLE`
`java.lang.String` | `GSP_CODEC`
`java.lang.String` | `GSP_TEMPLATE_ENGINE`
`java.lang.String` | `GSP_TMP_WRITER`
`java.lang.String` | `GSP_TO_RENDER`
`java.lang.String` | `ID_PARAM`
`java.lang.String` | `MODEL_AND_VIEW`
`java.lang.String` | `OUT`
`java.lang.String` | `PAGE_SCOPE`
`java.lang.String` | `PARAMS_OBJECT`
`java.lang.String` | `PATH_TO_VIEWS`
`java.lang.String` | `PROPERTY_REGISTRY`
`java.lang.String` | `REDIRECT_ISSUED`
`java.lang.String` | `RENDERING_ERROR_ATTRIBUTE`
`java.lang.String` | `REQUEST_FORMATS`
`java.lang.String` | `REQUEST_REDIRECTED_ATTRIBUTE`
`java.lang.String` | `RESPONSE_FORMAT`
`java.lang.String` | `RESPONSE_FORMATS`
`java.lang.String` | `RESPONSE_MIME_TYPE`
`java.lang.String` | `RESPONSE_MIME_TYPES`
`java.lang.String` | `TAG_CACHE`
`java.lang.String` | `TEMPLATE_MODEL`
`java.lang.String` | `WEB_REQUEST`

Fields inherited from interface ApplicationAttributes
APPLICATION_CONTEXT, PARENT_APPLICATION_CONTEXT, PLUGIN_MANAGER, REQUEST_SCOPE_ID

Method Summary
`java.lang.String` | `getApplicationUri(javax.servlet.ServletRequest request)` @param request
`groovy.lang.GroovyObject` | `getController(javax.servlet.ServletRequest request)` @return The controller for the request
`java.lang.String` | `getControllerActionUri(javax.servlet.ServletRequest request)` @param request
`java.lang.String` | `getControllerUri(javax.servlet.ServletRequest request)` @param request
`org.springframework.validation.Errors` | `getErrors(javax.servlet.ServletRequest request)` @param request
`FlashScope` | `getFlashScope(javax.servlet.ServletRequest request)` Retrieves the flash scope instance for the given requeste
`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
`GroovyPagesTemplateEngine` | `getPagesTemplateEngine()` @return Retrieves the shared GSP template engine
`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(groovy.lang.GroovyObject controller, java.lang.String templateName)`
`java.lang.String` | `getTemplateUri(java.lang.CharSequence templateName, javax.servlet.ServletRequest request)` @param 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 currentRequest, java.io.Writer out2)` Sets the current write for the request

Methods inherited from interface ApplicationAttributes
getApplicationContext, getGrailsApplication

Field Detail

### ACTION_NAME_ATTRIBUTE

    public java.lang.String ACTION_NAME_ATTRIBUTE

### APP_URI_ATTRIBUTE

    public java.lang.String APP_URI_ATTRIBUTE

### ASYNC_STARTED

    public java.lang.String ASYNC_STARTED

### CONTENT_FORMAT

    public java.lang.String CONTENT_FORMAT

### CONTROLLER

    public java.lang.String CONTROLLER

### CONTROLLER_NAME_ATTRIBUTE

    public java.lang.String CONTROLLER_NAME_ATTRIBUTE

### ERRORS

    public java.lang.String ERRORS

### FLASH_SCOPE

    public java.lang.String FLASH_SCOPE

### GRAILS_CONTROLLER_CLASS

    public java.lang.String GRAILS_CONTROLLER_CLASS

### GRAILS_CONTROLLER_CLASS_AVAILABLE

    public java.lang.String GRAILS_CONTROLLER_CLASS_AVAILABLE

### GSP_CODEC

    public java.lang.String GSP_CODEC

### GSP_TEMPLATE_ENGINE

    public java.lang.String GSP_TEMPLATE_ENGINE

### GSP_TMP_WRITER

    public java.lang.String GSP_TMP_WRITER

### GSP_TO_RENDER

    public java.lang.String GSP_TO_RENDER

### ID_PARAM

    public java.lang.String ID_PARAM

### MODEL_AND_VIEW

    public java.lang.String MODEL_AND_VIEW

### OUT

    public java.lang.String OUT

### PAGE_SCOPE

    public java.lang.String PAGE_SCOPE

### PARAMS_OBJECT

    public java.lang.String PARAMS_OBJECT

### PATH_TO_VIEWS

    public java.lang.String PATH_TO_VIEWS

### PROPERTY_REGISTRY

    public java.lang.String PROPERTY_REGISTRY

### REDIRECT_ISSUED

    public java.lang.String REDIRECT_ISSUED

### RENDERING_ERROR_ATTRIBUTE

    public java.lang.String RENDERING_ERROR_ATTRIBUTE

### REQUEST_FORMATS

    public java.lang.String REQUEST_FORMATS

### REQUEST_REDIRECTED_ATTRIBUTE

    public java.lang.String REQUEST_REDIRECTED_ATTRIBUTE

### RESPONSE_FORMAT

    public java.lang.String RESPONSE_FORMAT

### RESPONSE_FORMATS

    public java.lang.String RESPONSE_FORMATS

### RESPONSE_MIME_TYPE

    public java.lang.String RESPONSE_MIME_TYPE

### RESPONSE_MIME_TYPES

    public java.lang.String RESPONSE_MIME_TYPES

### TAG_CACHE

    public java.lang.String TAG_CACHE

### TEMPLATE_MODEL

    public java.lang.String TEMPLATE_MODEL

### WEB_REQUEST

    public java.lang.String WEB_REQUEST

Method Detail

### getApplicationUri

    public java.lang.String getApplicationUri(javax.servlet.ServletRequest request)

  Parameters:
    request
  Returns:
    The uri of the application relative to the server root

### getController

    public groovy.lang.GroovyObject getController(javax.servlet.ServletRequest request)

  Returns:
    The controller for the request

### getControllerActionUri

    public java.lang.String getControllerActionUri(javax.servlet.ServletRequest request)

  Parameters:
    request
  Returns:
    The uri of the action called within the controller

### getControllerUri

    public java.lang.String getControllerUri(javax.servlet.ServletRequest request)

  Parameters:
    request
  Returns:
    The uri of the controller within the request

### getErrors

    public org.springframework.validation.Errors getErrors(javax.servlet.ServletRequest request)

  Parameters:
    request
  Returns:
    The errors instance contained within the request

### getFlashScope

    public FlashScope getFlashScope(javax.servlet.ServletRequest request)

  Retrieves the flash scope instance for the given requeste
  Parameters:
    request
  Returns:
    The FlashScope instance

### getGroovyPagesUriService

    public GroovyPagesUriService getGroovyPagesUriService()

### getMessageSource

    public org.springframework.context.MessageSource getMessageSource()

### getNoSuffixViewURI

    public java.lang.String getNoSuffixViewURI(groovy.lang.GroovyObject controller, java.lang.String viewName)

### getOut

    public java.io.Writer getOut(javax.servlet.http.HttpServletRequest request)

  Holds the current response write for the request
  Returns:
    The held response writer

### getPagesTemplateEngine

    public GroovyPagesTemplateEngine getPagesTemplateEngine()

  Returns:
    Retrieves the shared GSP template engine

### getPluginContextPath

    public 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

### getServletContext

    public javax.servlet.ServletContext getServletContext()

  Retrieves the servlet context instance
  Returns:
    The servlet context instance

### getTagLibraryForTag

    public 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
  Parameters:
    `request` - the request instance
    `response` - the response instancte
    `tagName` - The name of the tag that contains the tag library
  Returns:
    An instance of the tag library or null if not found

### getTagLibraryForTag

    public 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.
  Parameters:
    `request` - the request instance
    `response` - the response instancte
    `tagName` - The name of the tag that contains the tag library
    `namespace` - The namespace of the tag
  Returns:
    An instance of the tag library or null if not found

### getTemplateURI

    public java.lang.String getTemplateURI(groovy.lang.GroovyObject controller, java.lang.String templateName)

### getTemplateUri

    public 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

    public 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 view
    `request` - The request instance
  Returns:
    The name of the view

### setOut

    public void setOut(javax.servlet.http.HttpServletRequest currentRequest, java.io.Writer out2)

  Sets the current write for the request
  Parameters:
    `currentRequest` - The request
    `out2` - The writer

Groovy Documentation