CommonWebApi (Grails 2.4.4)
Date: 2014-10-28

Package: org.codehaus.groovy.grails.plugins.web.api

## [Java] Class CommonWebApi

- org.codehaus.groovy.grails.plugins.web.api.CommonWebApi

- All Implemented Interfaces and Traits:
    GrailsApplicationAware, org.springframework.web.context.ServletContextAware, org.springframework.context.ApplicationContextAware, java.io.Serializable

      public class CommonWebApi
      extends java.lang.Object

  API shared by controllers, tag libraries and any other web artifact.

  Authors:
    Graeme Rocher
  Since:
    2.0

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `static java.lang.String` | `RAW_CODEC_NAME` |

  - ### Constructor Summary

    Constructors
    Constructor and description
    `CommonWebApi (GrailsPluginManager pluginManager)`
    `CommonWebApi ()`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `protected GrailsWebRequest` | `currentRequestAttributes()`
    `java.lang.String` | `getActionName(java.lang.Object instance)` Obtains the currently executing action name
    `org.springframework.context.ApplicationContext` | `getApplicationContext(java.lang.Object instance)` Obtains the ApplicationContext instance
    `java.lang.Object` | `getControllerClass(java.lang.Object instance)` Obtains the currently executing controllerClass
    `java.lang.String` | `getControllerName(java.lang.Object instance)` Obtains the currently executing controller name
    `java.lang.String` | `getControllerNamespace(java.lang.Object instance)` Obtains the currently executing controller namespace
    `FlashScope` | `getFlash(java.lang.Object instance)` Obtains the Grails FlashScope instance
    `GrailsApplication` | `getGrailsApplication(java.lang.Object instance)` Obtains the GrailsApplication instance
    `GrailsApplicationAttributes` | `getGrailsAttributes(java.lang.Object instance)` Obtains the GrailsApplicationAttributes instance
    `GrailsParameterMap` | `getParams(java.lang.Object instance)` Obtains the Grails parameter map
    `java.lang.String` | `getPluginContextPath(java.lang.Object delegate)` Obtains the pluginContextPath
    `javax.servlet.http.HttpServletRequest` | `getRequest(java.lang.Object instance)` Obtains the HttpServletRequest instance
    `javax.servlet.http.HttpServletResponse` | `getResponse(java.lang.Object instance)` Obtains the HttpServletResponse instance
    `javax.servlet.ServletContext` | `getServletContext(java.lang.Object instance)` Obtains the ServletContext instance
    `javax.servlet.http.HttpSession` | `getSession(java.lang.Object instance)` Obtains the HttpSession instance
    `GrailsWebRequest` | `getWebRequest(java.lang.Object instance)` Obtains the currently executing web request
    `java.lang.Object` | `raw(java.lang.Object instance, java.lang.Object value)` Marks the given value to be output in raw form without encoding
    `void` | `setApplicationContext(org.springframework.context.ApplicationContext applicationContext)`
    `void` | `setGrailsApplication(GrailsApplication grailsApplication)`
    `void` | `setServletContext(javax.servlet.ServletContext servletContext)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class java.lang.Object` | `java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()`

- - ### Field Detail

    - #### public static final java.lang.String RAW_CODEC_NAME

  - ### Constructor Detail

    - #### public CommonWebApi(GrailsPluginManager pluginManager)

    - #### public CommonWebApi()

  - ### Method Detail

    - #### protected GrailsWebRequest currentRequestAttributes()

    - #### public java.lang.String getActionName(java.lang.Object instance)

      Obtains the currently executing action name

      Returns:
        The action name

    - #### public org.springframework.context.ApplicationContext getApplicationContext(java.lang.Object instance)

      Obtains the ApplicationContext instance

      Returns:
        The ApplicationContext instance

    - #### public java.lang.Object getControllerClass(java.lang.Object instance)

      Obtains the currently executing controllerClass

      Returns:
        The controller class

    - #### public java.lang.String getControllerName(java.lang.Object instance)

      Obtains the currently executing controller name

      Returns:
        The controller name

    - #### public java.lang.String getControllerNamespace(java.lang.Object instance)

      Obtains the currently executing controller namespace

      Returns:
        The controller name

    - #### public FlashScope getFlash(java.lang.Object instance)

      Obtains the Grails FlashScope instance

      Returns:
        The FlashScope instance

    - #### public GrailsApplication getGrailsApplication(java.lang.Object instance)

      Obtains the GrailsApplication instance

      Returns:
        The GrailsApplication instance

    - #### public GrailsApplicationAttributes getGrailsAttributes(java.lang.Object instance)

      Obtains the GrailsApplicationAttributes instance

      Returns:
        The GrailsApplicationAttributes instance

    - #### public GrailsParameterMap getParams(java.lang.Object instance)

      Obtains the Grails parameter map

      Returns:
        The GrailsParameterMap instance

    - #### public java.lang.String getPluginContextPath(java.lang.Object delegate)

      Obtains the pluginContextPath

      Parameters:
        `delegate` - The object the method is being invoked on
      Returns:
        The plugin context path

    - #### public javax.servlet.http.HttpServletRequest getRequest(java.lang.Object instance)

      Obtains the HttpServletRequest instance

      Returns:
        The HttpServletRequest instance

    - #### public javax.servlet.http.HttpServletResponse getResponse(java.lang.Object instance)

      Obtains the HttpServletResponse instance

      Returns:
        The HttpServletResponse instance

    - #### public javax.servlet.ServletContext getServletContext(java.lang.Object instance)

      Obtains the ServletContext instance

      Returns:
        The ServletContext instance

    - #### public javax.servlet.http.HttpSession getSession(java.lang.Object instance)

      Obtains the HttpSession instance

      Returns:
        The HttpSession instance

    - #### public GrailsWebRequest getWebRequest(java.lang.Object instance)

      Obtains the currently executing web request

      Returns:
        The GrailsWebRequest instance

    - #### public java.lang.Object raw(java.lang.Object instance, java.lang.Object value)

      Marks the given value to be output in raw form without encoding

      Parameters:
        `instance` - The instance
        `value` - The value
      Returns:
        The raw unencoded value
      Since:
        2.3

    - #### public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)

    - #### public void setGrailsApplication(GrailsApplication grailsApplication)

    - #### public void setServletContext(javax.servlet.ServletContext servletContext)