RenderContext (Grails 6.0.0)

Package: grails.rest.render

## [Groovy] Interface RenderContext

-     interface RenderContext

  Passed to a renderer to provide context information

  Authors:
    Graeme Rocher
  Since:
    2.3

- - ### Properties Summary

    Properties
    Type | Name and description
    --- | ---
    `java.lang.String` | `viewName`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `abstract MimeType` | `getAcceptMimeType()` Returns: Returns the mime type accepted by the client or null if non specified
    `` | `abstract java.lang.String` | `getActionName()` Returns: The current action name
    `` | `abstract java.util.Map<java.lang.String, java.lang.Object>` | `getArguments()` Returns: Arguments passed by the user
    `` | `abstract java.lang.String` | `getControllerName()` Returns: The current controller name
    `` | `abstract java.lang.String` | `getControllerNamespace()` Returns: The current controller name
    `` | `abstract java.util.List<java.lang.String>` | `getExcludes()` Which properties should be excluded from rendering
    `` | `abstract org.springframework.http.HttpMethod` | `getHttpMethod()` Returns: The HTTP method
    `` | `abstract java.util.List<java.lang.String>` | `getIncludes()` Which properties should be included in rendering
    `` | `abstract java.util.Locale` | `getLocale()` Returns: The locale
    `` | `abstract java.lang.String` | `getResourcePath()` Returns: The path the the resource
    `` | `abstract java.lang.String` | `getViewName()` Returns: The view name to use
    `` | `abstract java.io.Writer` | `getWriter()` Returns: The writer to render to
    `` | `abstract void` | `setContentType(java.lang.String contentType)` Sets the content type of the rendered response
    `` | `abstract void` | `setModel(java.util.Map model)` The model to use for the response
    `` | `abstract void` | `setStatus(org.springframework.http.HttpStatus status)` Parameters: `status` - The status to set
    `` | `abstract void` | `setViewName(java.lang.String viewName)` The view to use for the response
    `` | `abstract boolean` | `wasWrittenTo()` Returns true if the getWriter() method was called

- - ### Property Detail

    - #### java.lang.String viewName

  - ### Method Detail

    - #### abstract MimeType getAcceptMimeType()

      Returns:
        Returns the mime type accepted by the client or null if non specified

    - #### abstract java.lang.String getActionName()

      Returns:
        The current action name

    - #### abstract java.util.Map<java.lang.String, java.lang.Object> getArguments()

      Returns:
        Arguments passed by the user

    - #### abstract java.lang.String getControllerName()

      Returns:
        The current controller name

    - #### abstract java.lang.String getControllerNamespace()

      Returns:
        The current controller name

    - #### abstract java.util.List<java.lang.String> getExcludes()

      Which properties should be excluded from rendering

      Returns:
        A list of excludes

    - #### abstract org.springframework.http.HttpMethod getHttpMethod()

      Returns:
        The HTTP method

    - #### abstract java.util.List<java.lang.String> getIncludes()

      Which properties should be included in rendering

      Returns:
        A list of includes

    - #### abstract java.util.Locale getLocale()

      Returns:
        The locale

    - #### abstract java.lang.String getResourcePath()

      Returns:
        The path the the resource

    - #### abstract java.lang.String getViewName()

      Returns:
        The view name to use

    - #### abstract java.io.Writer getWriter()

      Returns:
        The writer to render to

    - #### abstract void setContentType(java.lang.String contentType)

      Sets the content type of the rendered response

      Parameters:
        `contentType` - The content type

    - #### abstract void setModel(java.util.Map model)

      The model to use for the response

      Parameters:
        `model` - The model

    - #### abstract void setStatus(org.springframework.http.HttpStatus status)

      Parameters:
        `status` - The status to set

    - #### abstract void setViewName(java.lang.String viewName)

      The view to use for the response

      Parameters:
        `viewName` - The view name

    - #### abstract boolean wasWrittenTo()

      Returns true if the getWriter() method was called