ResponseRenderer (Grails 6.0.0)

Package: grails.artefact.controller.support

## [Groovy] Trait ResponseRenderer

- grails.artefact.controller.support.ResponseRenderer

-     @groovy.transform.Trait
      @groovy.transform.CompileStatic
      trait ResponseRenderer
      extends WebAttributes

  A trait that adds behavior to allow rendering of objects to the response

  Authors:
    Jeff Brown
    Graeme Rocher
  Since:
    3.0

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `private java.util.Collection<ActionResultTransformer>` | `actionResultTransformers` |
    `private org.grails.web.sitemesh.GroovyPageLayoutFinder` | `groovyPageLayoutFinder` |
    `private MimeUtility` | `mimeUtility` |
    `private GrailsPluginManager` | `pluginManager` |

  - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `trait WebAttributes` | `grailsApplication`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `private boolean` | `applyContentType(javax.servlet.http.HttpServletResponse response, java.util.Map argMap, java.lang.Object renderArgument)`
    `` | `private boolean` | `applyContentType(javax.servlet.http.HttpServletResponse response, java.util.Map argMap, java.lang.Object renderArgument, boolean useDefault)`
    `` | `private void` | `applySiteMeshLayout(javax.servlet.http.HttpServletRequest request, boolean renderView, java.lang.String explicitSiteMeshLayout)`
    `` | `private boolean` | `detectContentTypeFromFileName(GrailsWebRequest webRequest, javax.servlet.http.HttpServletResponse response, java.util.Map argMap, java.lang.String fileName)`
    `` | `private java.lang.String` | `getContextPath(GrailsWebRequest webRequest, java.util.Map argMap)`
    `` | `private GrailsPluginManager` | `getPluginManager(GrailsWebRequest webRequest)`
    `` | `private boolean` | `handleStatusArgument(java.util.Map argMap, GrailsWebRequest webRequest, javax.servlet.http.HttpServletResponse response)`
    `` | `private boolean` | `isJSONResponse(javax.servlet.http.HttpServletResponse response)`
    `` | `void` | `render(java.lang.Object object)` Render the given object to the response
    `` | `void` | `render(groovy.lang.Closure closure)` Use the given closure to render markup to the response.
    `` | `void` | `render(java.util.Map argMap, groovy.lang.Closure closure)` Render the given closure, configured by the named argument map, to the response
    `` | `void` | `render(java.util.Map argMap, java.lang.CharSequence body)` Render the given CharSequence to the response with the give named arguments
    `` | `void` | `render(java.lang.CharSequence txt)` Renders text to the response for the given CharSequence
    `` | `void` | `render(java.util.Map argMap, groovy.lang.Writable writable)` Render the given writable to the response using the named arguments to configure the response
    `` | `void` | `render(java.util.Map argMap)` Render a response for the given named arguments
    `` | `private void` | `renderJsonInternal(javax.servlet.http.HttpServletResponse response, groovy.lang.Closure callable)`
    `` | `private void` | `renderMarkupInternal(GrailsWebRequest webRequest, groovy.lang.Closure closure, javax.servlet.http.HttpServletResponse response)`
    `` | `private void` | `renderTemplateForCollection(GrailsWebRequest webRequest, org.springframework.web.servlet.View view, java.util.Map binding, java.lang.Object colObject, java.lang.String var)`
    `` | `private void` | `renderViewForTemplate(GrailsWebRequest webRequest, org.springframework.web.servlet.View view, java.util.Map binding)`
    `` | `private void` | `renderWritable(groovy.lang.Writable writable, javax.servlet.http.HttpServletResponse response)`
    `` | `private java.lang.String` | `resolveContentTypeBySourceType(java.lang.Object renderArgument, java.lang.String defaultEncoding)`
    `` | `void` | `setActionResultTransformers(ActionResultTransformer[] actionResultTransformers)`
    `` | `private void` | `setContentType(javax.servlet.http.HttpServletResponse response, java.lang.String contentType, java.lang.String encoding)`
    `` | `private void` | `setContentType(javax.servlet.http.HttpServletResponse response, java.lang.String contentType, java.lang.String encoding, boolean contentTypeIsDefault)`
    `` | `void` | `setGroovyPageLayoutFinder(org.grails.web.sitemesh.GroovyPageLayoutFinder groovyPageLayoutFinder)`
    `` | `void` | `setMimeUtility(MimeUtility mimeUtility)`
    `` | `private void` | `setTemplateModel(GrailsWebRequest webRequest, java.util.Map binding, java.util.Map modelObject)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `trait WebAttributes` | `currentRequestAttributes, getActionName, getControllerClass, getControllerName, getControllerNamespace, getFlash, getGrailsApplication, getGrailsAttributes, getParams, getPluginContextPath, getWebRequest`

- - ### Field Detail

    - #### private java.util.Collection<ActionResultTransformer> actionResultTransformers

    - #### private org.grails.web.sitemesh.GroovyPageLayoutFinder groovyPageLayoutFinder

    - #### private MimeUtility mimeUtility

    - #### private GrailsPluginManager pluginManager

  - ### Method Detail

    - #### private boolean applyContentType(javax.servlet.http.HttpServletResponse response, java.util.Map argMap, java.lang.Object renderArgument)

    - #### private boolean applyContentType(javax.servlet.http.HttpServletResponse response, java.util.Map argMap, java.lang.Object renderArgument, boolean useDefault)

    - #### private void applySiteMeshLayout(javax.servlet.http.HttpServletRequest request, boolean renderView, java.lang.String explicitSiteMeshLayout)

    - #### private boolean detectContentTypeFromFileName(GrailsWebRequest webRequest, javax.servlet.http.HttpServletResponse response, java.util.Map argMap, java.lang.String fileName)

    - #### private java.lang.String getContextPath(GrailsWebRequest webRequest, java.util.Map argMap)

    - #### private GrailsPluginManager getPluginManager(GrailsWebRequest webRequest)

    - #### private boolean handleStatusArgument(java.util.Map argMap, GrailsWebRequest webRequest, javax.servlet.http.HttpServletResponse response)

    - #### private boolean isJSONResponse(javax.servlet.http.HttpServletResponse response)

    - #### @groovy.transform.Generated void render(java.lang.Object object)

      Render the given object to the response

      Parameters:
        `object` - The object to render

    - #### @groovy.transform.Generated void render(@groovy.lang.DelegatesTo(strategy: Closure.DELEGATE_FIRST) groovy.lang.Closure closure)

      Use the given closure to render markup to the response. The markup is assumed to be HTML. Use ResponseRenderer.render to change the content type.

      Parameters:
        `closure` - The markup to render

    - #### @groovy.transform.Generated void render(java.util.Map argMap, @groovy.lang.DelegatesTo(strategy: Closure.DELEGATE_FIRST) groovy.lang.Closure closure)

      Render the given closure, configured by the named argument map, to the response

      Parameters:
        `argMap` - The name arguments
        `closure` - The closure to render

    - #### @groovy.transform.Generated void render(java.util.Map argMap, java.lang.CharSequence body)

      Render the given CharSequence to the response with the give named arguments

      Parameters:
        `argMap` - The named arguments
        `body` - The text to render

    - #### @groovy.transform.Generated void render(java.lang.CharSequence txt)

      Renders text to the response for the given CharSequence

      Parameters:
        `txt` - The text to render

    - #### @groovy.transform.Generated void render(java.util.Map argMap, groovy.lang.Writable writable)

      Render the given writable to the response using the named arguments to configure the response

      Parameters:
        `argMap` - The named arguments
        `writable` - The writable

    - #### @groovy.transform.Generated void render(java.util.Map argMap)

      Render a response for the given named arguments

      Parameters:
        `argMap` - The named argument map

    - #### private void renderJsonInternal(javax.servlet.http.HttpServletResponse response, @groovy.lang.DelegatesTo(value: StreamingJsonBuilder.StreamingJsonDelegate.class, strategy: Closure.DELEGATE_FIRST) groovy.lang.Closure callable)

    - #### private void renderMarkupInternal(GrailsWebRequest webRequest, @groovy.lang.DelegatesTo(strategy: Closure.DELEGATE_FIRST) groovy.lang.Closure closure, javax.servlet.http.HttpServletResponse response)

    - #### private void renderTemplateForCollection(GrailsWebRequest webRequest, org.springframework.web.servlet.View view, java.util.Map binding, java.lang.Object colObject, java.lang.String var)

    - #### private void renderViewForTemplate(GrailsWebRequest webRequest, org.springframework.web.servlet.View view, java.util.Map binding)

    - #### private void renderWritable(groovy.lang.Writable writable, javax.servlet.http.HttpServletResponse response)

    - #### private java.lang.String resolveContentTypeBySourceType(java.lang.Object renderArgument, java.lang.String defaultEncoding)

    - #### @groovy.transform.Generated @org.springframework.beans.factory.annotation.Autowired(required: false) void setActionResultTransformers(ActionResultTransformer[] actionResultTransformers)

    - #### private void setContentType(javax.servlet.http.HttpServletResponse response, java.lang.String contentType, java.lang.String encoding)

    - #### private void setContentType(javax.servlet.http.HttpServletResponse response, java.lang.String contentType, java.lang.String encoding, boolean contentTypeIsDefault)

    - #### @groovy.transform.Generated @org.springframework.beans.factory.annotation.Autowired(required: false) void setGroovyPageLayoutFinder(org.grails.web.sitemesh.GroovyPageLayoutFinder groovyPageLayoutFinder)

    - #### @groovy.transform.Generated @org.springframework.beans.factory.annotation.Autowired(required: false) @org.springframework.beans.factory.annotation.Qualifier(value: grailsMimeUtility) void setMimeUtility(MimeUtility mimeUtility)

    - #### private void setTemplateModel(GrailsWebRequest webRequest, java.util.Map binding, java.util.Map modelObject)