@Setup(mode=SINGLETON, priority=2000) public class NuxeoGroupJsonWriter extends ExtensibleEntityJsonWriter<NuxeoGroup>
NuxeoGroup to Json.
This marshaller is enrichable: register class implementing AbstractJsonEnricher and managing
NuxeoGroup.
This marshaller is also extensible: extend it and simply override
ExtensibleEntityJsonWriter#extend(NuxeoGroup, JsonWriter).
Format is:
{
"entity-type":"group",
"groupname": "GROUP_NAME",
"grouplabel": "GROUP_DISPLAY_NAME",
"memberUsers": [
"USERNAME1",
"USERNAME2",
...
],
"memberGroups": [
"GROUPNAME1",
"GROUPNAME2",
...
]
<-- contextParameters if there are enrichers activated
<-- additional property provided by extend() method
}
| Modifier and Type | Field and Description |
|---|---|
static String |
ENTITY_TYPE |
ctx, registry| Constructor and Description |
|---|
NuxeoGroupJsonWriter() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
writeEntityBody(NuxeoGroup group,
org.codehaus.jackson.JsonGenerator jg)
Implement this method to write the entity body.
|
extend, writeaccept, getGenerator, write, writeEntity, writeEntity, writeEntityFieldpublic static final String ENTITY_TYPE
public NuxeoGroupJsonWriter()
protected void writeEntityBody(NuxeoGroup group, org.codehaus.jackson.JsonGenerator jg) throws IOException
ExtensibleEntityJsonWriterwriteEntityBody in class ExtensibleEntityJsonWriter<NuxeoGroup>group - The Java entity.jg - A JsonGenerator ready to write your entity as Json.IOExceptionCopyright © 2015 Nuxeo SA. All rights reserved.