Package: org.grails.web.util

## [Java] Interface GrailsApplicationAttributes

- grails.core.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

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `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_NAMESPACE_ATTRIBUTE` |
    `java.lang.String` | `CONTROLLER_NAME_ATTRIBUTE` |
    `java.lang.String` | `ERRORS` |
    `java.lang.String` | `FLASH_SCOPE` |
    `java.lang.String` | `FORWARD_IN_PROGRESS` |
    `java.lang.String` | `FORWARD_ISSUED` |
    `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` |

  - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `interface ApplicationAttributes` | `APPLICATION, APPLICATION_CONTEXT, PARENT_APPLICATION_CONTEXT, PLUGIN_MANAGER, REQUEST_SCOPE_ID`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public java.lang.String` | `getApplicationUri(javax.servlet.ServletRequest request)` deprecated: Use instead
    `` | `public groovy.lang.GroovyObject` | `getController(javax.servlet.ServletRequest request)` Returns: The controller for the request
    `` | `public java.lang.String` | `getControllerActionUri(javax.servlet.ServletRequest request)` Parameters: request
    `` | `public java.lang.String` | `getControllerUri(javax.servlet.ServletRequest request)` Parameters: request
    `` | `public org.springframework.validation.Errors` | `getErrors(javax.servlet.ServletRequest request)` Parameters: request
    `` | `public FlashScope` | `getFlashScope(javax.servlet.ServletRequest request)` Retrieves the flash scope instance for the given requeste
    `` | `public GroovyPagesUriService` | `getGroovyPagesUriService()` Returns: The GroovyPageUriService instance
    `` | `public org.springframework.context.MessageSource` | `getMessageSource()` Returns: The MessageSource instance
    `` | `public java.lang.String` | `getNoSuffixViewURI(groovy.lang.GroovyObject controller, java.lang.String viewName)`
    `` | `public java.io.Writer` | `getOut(javax.servlet.http.HttpServletRequest request)` Holds the current response write for the request
    `` | `public org.grails.gsp.ResourceAwareTemplateEngine` | `getPagesTemplateEngine()` Returns: Retrieves the shared GSP template engine
    `` | `public java.lang.String` | `getPluginContextPath(javax.servlet.http.HttpServletRequest request)` Retrieves the plugin context path for the current request.
    `` | `public javax.servlet.ServletContext` | `getServletContext()` Retrieves the servlet context instance
    `` | `public java.lang.String` | `getTemplateURI(groovy.lang.GroovyObject controller, java.lang.String templateName)` Resolve the URI for a template
    `` | `public java.lang.String` | `getTemplateURI(groovy.lang.GroovyObject controller, java.lang.String templateName, boolean includeExtension)` Resolve the URI for a template
    `` | `public java.lang.String` | `getTemplateUri(java.lang.CharSequence templateName, javax.servlet.ServletRequest request)` Parameters: templateName
    `` | `public java.lang.String` | `getViewUri(java.lang.String viewName, javax.servlet.http.HttpServletRequest request)` Retrieves the uri of a named view
    `` | `public void` | `setOut(javax.servlet.http.HttpServletRequest currentRequest, java.io.Writer out2)` Sets the current write for the request

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `interface ApplicationAttributes` | `getApplicationContext, getGrailsApplication`

- - ### Field Detail

    - #### 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_NAMESPACE_ATTRIBUTE

    - #### java.lang.String CONTROLLER_NAME_ATTRIBUTE

    - #### java.lang.String ERRORS

    - #### java.lang.String FLASH_SCOPE

    - #### java.lang.String FORWARD_IN_PROGRESS

    - #### java.lang.String FORWARD_ISSUED

    - #### 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

  - ### Method Detail

    - #### @java.lang.Deprecated public java.lang.String getApplicationUri(javax.servlet.ServletRequest request)

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

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

      Returns:
        The controller for the request

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

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

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

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

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

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

    - #### public FlashScope getFlashScope(javax.servlet.ServletRequest request)

      Retrieves the flash scope instance for the given requeste

      Parameters:
        request
      Returns:
        The FlashScope instance

    - #### public GroovyPagesUriService getGroovyPagesUriService()

      Returns:
        The GroovyPageUriService instance

    - #### public org.springframework.context.MessageSource getMessageSource()

      Returns:
        The MessageSource instance

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

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

      Holds the current response write for the request

      Returns:
        The held response writer

    - #### public org.grails.gsp.ResourceAwareTemplateEngine getPagesTemplateEngine()

      Returns:
        Retrieves the shared GSP template engine

    - #### 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

    - #### public javax.servlet.ServletContext getServletContext()

      Retrieves the servlet context instance

      Returns:
        The servlet context instance

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

      Resolve the URI for a template

      Parameters:
        `controller` - The controller
        `templateName` - The name of the template
      Returns:
        The template name

    - #### public java.lang.String getTemplateURI(groovy.lang.GroovyObject controller, java.lang.String templateName, boolean includeExtension)

      Resolve the URI for a template

      Parameters:
        `controller` - The controller
        `templateName` - The name of the template
        `includeExtension` - Whether to include the GSP etension
      Returns:
        The template name

    - #### 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

    - #### 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

    - #### 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