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

## org.codehaus.groovy.grails.plugins.web.api
[Java] Class CommonWebApi

    java.lang.Object
      org.codehaus.groovy.grails.plugins.web.api.CommonWebApi

All Implemented Interfaces:
  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

Constructor Summary
`CommonWebApi(GrailsPluginManager pluginManager)`
`CommonWebApi()`

Method Summary
`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.String` | `getControllerName(java.lang.Object instance)` Obtains the currently executing controller name
`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
`void` | `setApplicationContext(org.springframework.context.ApplicationContext applicationContext)`
`void` | `setGrailsApplication(GrailsApplication grailsApplication)`
`void` | `setServletContext(javax.servlet.ServletContext servletContext)`

Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), 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()

Constructor Detail

### CommonWebApi

    public CommonWebApi(GrailsPluginManager pluginManager)

### CommonWebApi

    public CommonWebApi()

Method Detail

### currentRequestAttributes

    protected GrailsWebRequest currentRequestAttributes()

### getActionName

    public java.lang.String getActionName(@SuppressWarnings("unused") java.lang.Object instance)

  Obtains the currently executing action name
  Returns:
    The action name

### getApplicationContext

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

  Obtains the ApplicationContext instance
  Returns:
    The ApplicationContext instance

### getControllerName

    public java.lang.String getControllerName(@SuppressWarnings("unused") java.lang.Object instance)

  Obtains the currently executing controller name
  Returns:
    The controller name

### getFlash

    public FlashScope getFlash(@SuppressWarnings("unused") java.lang.Object instance)

  Obtains the Grails FlashScope instance
  Returns:
    The FlashScope instance

### getGrailsApplication

    public GrailsApplication getGrailsApplication(java.lang.Object instance)

  Obtains the GrailsApplication instance
  Returns:
    The GrailsApplication instance

### getGrailsAttributes

    public GrailsApplicationAttributes getGrailsAttributes(@SuppressWarnings("unused") java.lang.Object instance)

  Obtains the GrailsApplicationAttributes instance
  Returns:
    The GrailsApplicationAttributes instance

### getParams

    public GrailsParameterMap getParams(@SuppressWarnings("unused") java.lang.Object instance)

  Obtains the Grails parameter map
  Returns:
    The GrailsParameterMap instance

### getPluginContextPath

    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

### getRequest

    public javax.servlet.http.HttpServletRequest getRequest(@SuppressWarnings("unused") java.lang.Object instance)

  Obtains the HttpServletRequest instance
  Returns:
    The HttpServletRequest instance

### getResponse

    public javax.servlet.http.HttpServletResponse getResponse(@SuppressWarnings("unused") java.lang.Object instance)

  Obtains the HttpServletResponse instance
  Returns:
    The HttpServletResponse instance

### getServletContext

    public javax.servlet.ServletContext getServletContext(@SuppressWarnings("unused") java.lang.Object instance)

  Obtains the ServletContext instance
  Returns:
    The ServletContext instance

### getSession

    public javax.servlet.http.HttpSession getSession(@SuppressWarnings("unused") java.lang.Object instance)

  Obtains the HttpSession instance
  Returns:
    The HttpSession instance

### getWebRequest

    public GrailsWebRequest getWebRequest(@SuppressWarnings("unused") java.lang.Object instance)

  Obtains the currently executing web request
  Returns:
    The GrailsWebRequest instance

### setApplicationContext

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

### setGrailsApplication

    public void setGrailsApplication(GrailsApplication grailsApplication)

### setServletContext

    public void setServletContext(javax.servlet.ServletContext servletContext)

Groovy Documentation