EntityType - The managed Java type.public abstract class ExtensibleEntityJsonWriter<EntityType> extends AbstractJsonWriter<EntityType>
MarshallerRegistry and compatible with the marshalled Java type.ctx, registry| Constructor and Description | 
|---|
ExtensibleEntityJsonWriter(String entityType,
                          Class<EntityType> entityClass)  | 
| Modifier and Type | Method and Description | 
|---|---|
protected void | 
extend(EntityType entity,
      com.fasterxml.jackson.core.JsonGenerator jg)
Override this method to add additional property in the entity. 
 | 
void | 
write(EntityType entity,
     com.fasterxml.jackson.core.JsonGenerator jg)
Implement this method to writes the entity in the provided  
JsonGenerator. | 
protected abstract void | 
writeEntityBody(EntityType entity,
               com.fasterxml.jackson.core.JsonGenerator jg)
Implement this method to write the entity body. 
 | 
accept, getGenerator, write, writeEntity, writeEntity, writeEntityField, writeSerializable, writeSerializableField, writeSerializableListField, writeSerializableMapFieldpublic ExtensibleEntityJsonWriter(String entityType, Class<EntityType> entityClass)
entityType - The "entity-type" Json property value.entityClass - The entity type.public void write(EntityType entity, com.fasterxml.jackson.core.JsonGenerator jg) throws IOException
AbstractJsonWriterJsonGenerator.
 This method implementation can use injected properties.
 The JsonGenerator's flushing is done by this abstract class, it's also not not necessary to flush it. Do
 not close the provided JsonGenerator. It may be used is another marshaller calling this one.
 
write in class AbstractJsonWriter<EntityType>entity - The entity to marshall as Json.jg - The JsonGenerator used to produce Json output.IOExceptionprotected abstract void writeEntityBody(EntityType entity, com.fasterxml.jackson.core.JsonGenerator jg) throws IOException
entity - The Java entity.jg - A JsonGenerator ready to write your entity as Json.IOExceptionprotected void extend(EntityType entity, com.fasterxml.jackson.core.JsonGenerator jg) throws IOException
entity - The Java entity.jg - A JsonGenerator ready to write your entity as Json.IOExceptionCopyright © 2019 Nuxeo. All rights reserved.