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

## grails.rest.render.hal
[Groovy] Class HalXmlRenderer

    java.lang.Object
      grails.rest.render.AbstractRenderer
          grails.rest.render.AbstractIncludeExcludeRenderer
              grails.rest.render.util.AbstractLinkingRenderer
                  grails.rest.render.hal.HalXmlRenderer

    @groovy.transform.CompileStatic
    class HalXmlRenderer
    extends AbstractLinkingRenderer

Renders domain instances in HAL XML format (see http://stateless.co/hal_specification.html)

Authors:
  Graeme Rocher

Since:
  2.3

Field Summary
`static java.lang.String` | `LINK_TAG`
`static MimeType` | `MIME_TYPE`
`static java.lang.String` | `RELATIONSHIP_ATTRIBUTE`
`static java.lang.String` | `RESOURCE_TAG`

Fields inherited from class AbstractLinkingRenderer
DEFAULT_EXCLUDES, DEPRECATED_ATTRIBUTE, HREFLANG_ATTRIBUTE, HREF_ATTRIBUTE, RELATIONSHIP_SELF, TEMPLATED_ATTRIBUTE, TITLE_ATTRIBUTE, TYPE_ATTRIBUTE

Constructor Summary
`HalXmlRenderer(java.lang.Class targetType)`
`HalXmlRenderer(java.lang.Class targetType, MimeType mimeType)`
`HalXmlRenderer(java.lang.Class targetType, MimeType[] mimeTypes)`

Method Summary
`void` | `renderInternal(java.lang.Object object, RenderContext context)`
`protected void` | `startResourceTag(XMLStreamWriter writer, java.lang.String resourceHref, java.util.Locale locale, java.lang.String title)`
`protected void` | `startResourceTagForCurrentPath(RenderContext context, XMLStreamWriter writer)`
`protected void` | `writeDomainProperty(java.lang.Object value, java.lang.String propertyName, java.lang.Object writerObject)`
`protected void` | `writeDomainWithEmbeddedAndLinks(org.grails.datastore.mapping.model.PersistentEntity entity, java.lang.Object object, RenderContext context, XML xml, java.util.Set writtenObjects)`
`void` | `writeLink(Link link, java.util.Locale locale, java.lang.Object writerObject)`

Methods inherited from class AbstractLinkingRenderer
getLinkTitle, getLinksForObject, getResourceTitle, isDomainResource, render, renderInternal, writeAssociationLinks, writeDomain, writeDomainProperty, writeExtraLinks, writeLink

Methods inherited from class AbstractIncludeExcludeRenderer
excludesProperty, includesProperty, shouldIncludeProperty

Methods inherited from 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

### LINK_TAG

    public static final java.lang.String LINK_TAG

### MIME_TYPE

    public static final MimeType MIME_TYPE

### RELATIONSHIP_ATTRIBUTE

    public static final java.lang.String RELATIONSHIP_ATTRIBUTE

### RESOURCE_TAG

    public static final java.lang.String RESOURCE_TAG

Constructor Detail

### HalXmlRenderer

    HalXmlRenderer(java.lang.Class targetType)

### HalXmlRenderer

    HalXmlRenderer(java.lang.Class targetType, MimeType mimeType)

### HalXmlRenderer

    HalXmlRenderer(java.lang.Class targetType, MimeType[] mimeTypes)

Method Detail

### renderInternal

    @java.lang.Override
    void renderInternal(java.lang.Object object, RenderContext context)

### startResourceTag

    protected void startResourceTag(XMLStreamWriter writer, java.lang.String resourceHref, java.util.Locale locale, java.lang.String title)

### startResourceTagForCurrentPath

    protected void startResourceTagForCurrentPath(RenderContext context, XMLStreamWriter writer)

### writeDomainProperty

    @java.lang.Override
    protected void writeDomainProperty(java.lang.Object value, java.lang.String propertyName, java.lang.Object writerObject)

### writeDomainWithEmbeddedAndLinks

    protected void writeDomainWithEmbeddedAndLinks(org.grails.datastore.mapping.model.PersistentEntity entity, java.lang.Object object, RenderContext context, XML xml, java.util.Set writtenObjects)

### writeLink

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

Groovy Documentation