@Setup(mode=SINGLETON, priority=2000) public class NuxeoPrincipalJsonWriter extends ExtensibleEntityJsonWriter<NuxeoPrincipal>
NuxeoPrincipal to Json.
This marshaller is enrichable: register class implementing AbstractJsonEnricher and managing
NuxeoPrincipal.
This marshaller is also extensible: extend it and simply override
ExtensibleEntityJsonWriter#extend(NuxeoPrincipal, JsonWriter).
Format is:
{
"entity-type":"user",
"id":"USERNAME",
"properties":{ <- depending on the user schema / format is managed by {@link DocumentPropertyJsonWriter}
"firstName":"FIRSTNAME",
"lastName":"LASTNAME",
"username":"USERNAME",
"email":"user@mail.com",
"company":"COMPANY",
"password":"", <- ALWAYS EMPTY
"groups":[
"GROUP1 NAME OF THE USER",
"GROUP2 NAME OF THE USER",
...
]
},
"extendedGroups":[
{
"name":"GROUP1NAME",
"label":"GROUP1 DISPLAY NAME",
"url":"GROUP1 URL"
},
...
],
"isAdministrator":true|false,
"isAnonymous":false|false
<-- contextParameters if there are enrichers activated
<-- additional property provided by extend() method
}
| Modifier and Type | Field and Description |
|---|---|
static String |
ENTITY_TYPE |
| Constructor and Description |
|---|
NuxeoPrincipalJsonWriter() |
writeaccept, writepublic static final String ENTITY_TYPE
Copyright © 2015 Nuxeo SA. All rights reserved.