Package: grails.artefact.controller

## [Groovy] Trait RestResponder

- grails.artefact.controller.RestResponder

-     @groovy.transform.Trait
      @groovy.transform.CompileStatic
      trait RestResponder
      extends java.lang.Object

  Authors:
    Jeff Brown
  Since:
    3.0

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `private java.lang.String` | `PROPERTY_RESPONSE_FORMATS` |
    `private ProxyHandler` | `proxyHandler` |
    `private RendererRegistry` | `rendererRegistry` |

  - ### Properties Summary

    Properties
    Type | Name and description
    --- | ---
    `ProxyHandler` | `proxyHandler`
    `RendererRegistry` | `rendererRegistry`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `private java.util.List<java.lang.String>` | `calculateFormats(java.lang.String actionName, java.lang.Object value, java.util.Map args)`
    `` | `private java.lang.Object` | `callRender(java.util.Map args)`
    `` | `private java.util.List<java.lang.String>` | `getDefaultResponseFormats(java.lang.Object value)`
    `` | `private org.springframework.validation.Errors` | `getDomainErrors(java.lang.Object object)`
    `` | `ProxyHandler` | `getProxyHandler()`
    `` | `RendererRegistry` | `getRendererRegistry()`
    `` | `private MimeType[]` | `getResponseFormat(javax.servlet.http.HttpServletResponse response)`
    `` | `private java.lang.Object` | `internalRespond(java.lang.Object value, java.util.Map args)`
    `` | `java.lang.Object` | `respond(java.util.Map args, java.lang.Object value)` Same as RestResponder.respond, but here to support Groovy named arguments
    `` | `java.lang.Object` | `respond(java.util.Map value)` The respond method will attempt to delivery an appropriate response for the requested response format and Map value.
    `` | `java.lang.Object` | `respond(java.util.Map namedArgs, java.util.Map value)` Same as RestResponder.respond, but here to support Groovy named arguments
    `` | `java.lang.Object` | `respond(java.lang.Object value, java.util.Map args)` The respond method will attempt to delivery an appropriate response for the requested response format and value.
    `` | `void` | `setProxyHandler(ProxyHandler proxyHandler)`
    `` | `void` | `setRendererRegistry(RendererRegistry rendererRegistry)`

  - ### Inherited Methods Summary

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

    - #### private java.lang.String PROPERTY_RESPONSE_FORMATS

    - #### private ProxyHandler proxyHandler

    - #### private RendererRegistry rendererRegistry

  - ### Property Detail

    - #### ProxyHandler proxyHandler

    - #### RendererRegistry rendererRegistry

  - ### Method Detail

    - #### private java.util.List<java.lang.String> calculateFormats(java.lang.String actionName, java.lang.Object value, java.util.Map args)

    - #### private java.lang.Object callRender(java.util.Map args)

    - #### private java.util.List<java.lang.String> getDefaultResponseFormats(java.lang.Object value)

    - #### @groovy.transform.CompileStatic(value: TypeCheckingMode.SKIP) private org.springframework.validation.Errors getDomainErrors(java.lang.Object object)

    - #### @groovy.transform.Generated ProxyHandler getProxyHandler()

    - #### @groovy.transform.Generated RendererRegistry getRendererRegistry()

    - #### @groovy.transform.CompileDynamic private MimeType[] getResponseFormat(javax.servlet.http.HttpServletResponse response)

    - #### private java.lang.Object internalRespond(java.lang.Object value, java.util.Map args)

    - #### @groovy.transform.Generated java.lang.Object respond(java.util.Map args, java.lang.Object value)

      Same as RestResponder.respond, but here to support Groovy named arguments

    - #### @groovy.transform.Generated java.lang.Object respond(java.util.Map value)

      The respond method will attempt to delivery an appropriate response for the requested response format and Map value. If the value is null then a 404 will be returned. Otherwise the RendererRegistry will be consulted for an appropriate response renderer for the requested response format. @return

      Parameters:
        `value` - The value

    - #### @groovy.transform.Generated java.lang.Object respond(java.util.Map namedArgs, java.util.Map value)

      Same as RestResponder.respond, but here to support Groovy named arguments

    - #### @groovy.transform.Generated java.lang.Object respond(java.lang.Object value, java.util.Map args)

      The respond method will attempt to delivery an appropriate response for the requested response format and value. If the value is null then a 404 will be returned. Otherwise the RendererRegistry will be consulted for an appropriate response renderer for the requested response format. @return

      Parameters:
        `value` - The value
        `args` - The arguments

    - #### @groovy.transform.Generated @org.springframework.beans.factory.annotation.Autowired(required: false) void setProxyHandler(ProxyHandler proxyHandler)

    - #### @groovy.transform.Generated @org.springframework.beans.factory.annotation.Autowired(required: false) void setRendererRegistry(RendererRegistry rendererRegistry)