Package: grails.rest.render.util

## [Groovy] Class AbstractLinkingRenderer<T>

- grails.rest.render.util.AbstractLinkingRenderer

- Abstract base class for HAL renderers

  Authors:
    Graeme Rocher
  Since:
    2.3

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `protected static java.util.List<java.lang.String>` | `DEFAULT_EXCLUDES` |
    `static java.lang.String` | `DEPRECATED_ATTRIBUTE` |
    `static java.lang.String` | `HREFLANG_ATTRIBUTE` |
    `static java.lang.String` | `HREF_ATTRIBUTE` |
    `static java.lang.String` | `RELATIONSHIP_SELF` |
    `static java.lang.String` | `TEMPLATED_ATTRIBUTE` |
    `static java.lang.String` | `TITLE_ATTRIBUTE` |
    `static java.lang.String` | `TYPE_ATTRIBUTE` |

  - ### Properties Summary

    Properties
    Type | Name and description
    --- | ---
    `boolean` | `absoluteLinks`
    `java.lang.String` | `encoding`
    `GrailsConventionGroovyPageLocator` | `groovyPageLocator`
    `LinkGenerator` | `linkGenerator`
    `org.grails.datastore.mapping.model.MappingContext` | `mappingContext`
    `org.springframework.context.MessageSource` | `messageSource`
    `boolean` | `prettyPrint`
    `ProxyHandler` | `proxyHandler`
    `RendererRegistry` | `rendererRegistry`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `AbstractLinkingRenderer (java.lang.Class<T> targetType, MimeType mimeType)`
    `AbstractLinkingRenderer (java.lang.Class<T> targetType, MimeType[] mimeTypes)`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `protected java.lang.String` | `getLinkTitle(org.grails.datastore.mapping.model.PersistentEntity entity, java.util.Locale locale)`
    `` | `java.util.Collection<Link>` | `getLinksForObject(java.lang.Object object)`
    `` | `protected java.lang.String` | `getResourceTitle(java.lang.String uri, java.util.Locale locale)`
    `` | `protected boolean` | `isDomainResource(java.lang.Class clazz)`
    `` | `void` | `render(T object, RenderContext context)`
    `` | `void` | `renderInternal(T object, RenderContext context)`
    `` | `protected java.util.Map<org.grails.datastore.mapping.model.types.Association, java.lang.Object>` | `writeAssociationLinks(RenderContext context, java.lang.Object object, java.util.Locale locale, java.lang.Object writer, org.grails.datastore.mapping.model.PersistentEntity entity, groovy.lang.MetaClass metaClass)`
    `` | `protected void` | `writeDomain(RenderContext context, groovy.lang.MetaClass metaClass, org.grails.datastore.mapping.model.PersistentEntity entity, java.lang.Object object, java.lang.Object writer)` Writes a domain instance
    `` | `protected void` | `writeDomainProperty(java.lang.Object value, java.lang.String propertyName, java.lang.Object writer)`
    `` | `protected void` | `writeExtraLinks(java.lang.Object object, java.util.Locale locale, java.lang.Object writer)`
    `` | `protected void` | `writeLink(Link link, java.util.Locale locale, java.lang.Object writerObject)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class AbstractIncludeExcludeRenderer` | `excludesProperty, includesProperty, shouldIncludeProperty`
    `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

    - #### protected static java.util.List<java.lang.String> DEFAULT_EXCLUDES

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

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

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

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

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

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

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

  - ### Property Detail

    - #### boolean absoluteLinks

    - #### java.lang.String encoding

    - #### @org.springframework.beans.factory.annotation.Autowired(required = false) GrailsConventionGroovyPageLocator groovyPageLocator

    - #### @org.springframework.beans.factory.annotation.Autowired LinkGenerator linkGenerator

    - #### @org.springframework.beans.factory.annotation.Autowired @org.springframework.beans.factory.annotation.Qualifier('grailsDomainClassMappingContext') org.grails.datastore.mapping.model.MappingContext mappingContext

    - #### @org.springframework.beans.factory.annotation.Autowired org.springframework.context.MessageSource messageSource

    - #### boolean prettyPrint

    - #### @org.springframework.beans.factory.annotation.Autowired(required = false) ProxyHandler proxyHandler

    - #### @org.springframework.beans.factory.annotation.Autowired RendererRegistry rendererRegistry

  - ### Constructor Detail

    - #### AbstractLinkingRenderer(java.lang.Class<T> targetType, MimeType mimeType)

    - #### AbstractLinkingRenderer(java.lang.Class<T> targetType, MimeType[] mimeTypes)

  - ### Method Detail

    - #### protected java.lang.String getLinkTitle(org.grails.datastore.mapping.model.PersistentEntity entity, java.util.Locale locale)

    - #### @groovy.transform.CompileStatic(TypeCheckingMode.SKIP) java.util.Collection<Link> getLinksForObject(java.lang.Object object)

    - #### protected java.lang.String getResourceTitle(java.lang.String uri, java.util.Locale locale)

    - #### protected boolean isDomainResource(java.lang.Class clazz)

    - #### @java.lang.Override final void render(T object, RenderContext context)

    - #### void renderInternal(T object, RenderContext context)

    - #### protected java.util.Map<org.grails.datastore.mapping.model.types.Association, java.lang.Object> writeAssociationLinks(RenderContext context, java.lang.Object object, java.util.Locale locale, java.lang.Object writer, org.grails.datastore.mapping.model.PersistentEntity entity, groovy.lang.MetaClass metaClass)

    - #### protected void writeDomain(RenderContext context, groovy.lang.MetaClass metaClass, org.grails.datastore.mapping.model.PersistentEntity entity, java.lang.Object object, java.lang.Object writer)

      Writes a domain instance

      Parameters:
        `clazz` - The class
        `object` - The object
        `writer` - The writer
      Returns:
        Any associations embedded within the object

    - #### protected void writeDomainProperty(java.lang.Object value, java.lang.String propertyName, java.lang.Object writer)

    - #### protected void writeExtraLinks(java.lang.Object object, java.util.Locale locale, java.lang.Object writer)

    - #### protected void writeLink(Link link, java.util.Locale locale, java.lang.Object writerObject)