Class NuxeoGroupJsonWriter

All Implemented Interfaces:
Marshaller<NuxeoGroup>, Writer<NuxeoGroup>

@Setup(mode=SINGLETON, priority=2000) public class NuxeoGroupJsonWriter extends ExtensibleEntityJsonWriter<NuxeoGroup>
Convert 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(Object, JsonGenerator).

Format is:

 
 {
   "entity-type":"group",
   "groupname": "GROUP_NAME", <- deprecated, for backward compatibility
   "grouplabel": "GROUP_DISPLAY_NAME", <- deprecated, for backward compatibility
   "id": "GROUP_NAME",
   "properties":{   <- depending on the group schema / format is managed by {@link DocumentPropertyJsonWriter }
     "groupname":"GROUP_NAME",
     "grouplabel":"GROUP_DISPLAY_NAME",
     "description": "GROUP_DESCRIPTION"
   },
   "memberUsers": [
     "USERNAME1",
     "USERNAME2",
     ...
   ],
   "memberGroups": [
     "GROUPNAME1",
     "GROUPNAME2",
     ...
   ],
   "parentGroups": [
     "GROUPNAME1",
     "GROUPNAME2",
     ...
   ]
             <-- contextParameters if there are enrichers activated
             <-- additional property provided by extend() method
 }
 
 
Since:
7.2