EntityType
- The managed Java type.public abstract class ExtensibleEntityJsonWriter<EntityType> extends AbstractJsonWriter<EntityType>
MarshallerRegistry
and compatible with the marshalled Java type.Constructor and Description |
---|
ExtensibleEntityJsonWriter(String entityType,
Class<EntityType> entityClass) |
Modifier and Type | Method and Description |
---|---|
void |
write(EntityType entity,
org.codehaus.jackson.JsonGenerator jg)
Implement this method to writes the entity in the provided
JsonGenerator . |
accept, write
public ExtensibleEntityJsonWriter(String entityType, Class<EntityType> entityClass)
entityType
- The "entity-type" Json property value.entityClass
- The entity type.public void write(EntityType entity, org.codehaus.jackson.JsonGenerator jg) throws IOException
AbstractJsonWriter
JsonGenerator
.
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.IOException
Copyright © 2015 Nuxeo SA. All rights reserved.