@groovy.transform.CompileStatic class HalJsonRenderer<T> extends AbstractLinkingRenderer<T>
Renders domain instances in HAL JSON format (see http://tools.ietf.org/html/draft-kelly-json-hal-05)
Modifiers | Name | Description |
---|---|---|
class |
HalJsonRenderer.1 |
|
private static class |
HalJsonRenderer.UTCDateConverter |
Modifiers | Name | Description |
---|---|---|
private static MimeType[] |
DEFAULT_MIME_TYPES |
|
static java.lang.String |
EMBEDDED_ATTRIBUTE |
|
static java.lang.String |
LINKS_ATTRIBUTE |
|
static MimeType |
MIME_TYPE |
|
private java.lang.String |
collectionName |
|
private DataBindingSourceRegistry |
dataBindingSourceRegistry |
|
private org.springframework.core.convert.converter.Converter<java.util.Date, java.lang.String> |
dateToStringConverter |
Type | Name and description |
---|---|
java.lang.String |
collectionName |
DataBindingSourceRegistry |
dataBindingSourceRegistry |
org.springframework.core.convert.converter.Converter<java.util.Date, java.lang.String> |
dateToStringConverter |
Constructor and description |
---|
HalJsonRenderer
(java.lang.Class<T> targetType) |
HalJsonRenderer
(java.lang.Class<T> targetType, MimeType[] mimeTypes) |
Type Params | Return Type | Name and description |
---|---|---|
|
void |
initialize() |
|
protected java.lang.Object |
renderEmbeddedAttributes(groovy.json.StreamingJsonBuilder$StreamingJsonDelegate writer, java.lang.Object object, RenderContext context, MimeType mimeType) |
|
void |
renderInternal(T object, RenderContext context) |
|
void |
setDateToStringConverter(org.springframework.core.convert.converter.Converter<java.util.Date, java.lang.String> converter) |
|
protected void |
writeDomainProperty(java.lang.Object value, java.lang.String propertyName, java.lang.Object jsonWriter) |
|
protected void |
writeDomainWithEmbeddedAndLinks(RenderContext context, java.lang.Class clazz, java.lang.Object object, groovy.json.StreamingJsonBuilder$StreamingJsonDelegate writer, java.util.Locale locale, MimeType contentType, java.util.Set writtenObjects, java.util.Stack referenceStack) |
|
protected void |
writeLink(Link link, java.util.Locale locale, java.lang.Object writer) |
|
protected void |
writeLinkForCurrentPath(RenderContext context, MimeType mimeType, groovy.json.StreamingJsonBuilder$StreamingJsonDelegate writer) |
|
protected java.util.Map<org.grails.datastore.mapping.model.types.Association, java.lang.Object> |
writeLinks(RenderContext context, groovy.lang.MetaClass metaClass, java.lang.Object object, org.grails.datastore.mapping.model.PersistentEntity entity, java.util.Locale locale, MimeType contentType, groovy.json.StreamingJsonBuilder$StreamingJsonDelegate writer, boolean associationLinks) |
|
protected void |
writeSimpleObject(java.lang.Object object, RenderContext context, groovy.json.StreamingJsonBuilder$StreamingJsonDelegate writer) |
|
protected java.lang.Object |
writeSimpleObjectAndLink(java.lang.Object o, RenderContext context, groovy.json.StreamingJsonBuilder$StreamingJsonDelegate writer, MimeType mimeType) |
Groovy Documentation