@Setup(mode=SINGLETON, priority=2000) public class NuxeoPrincipalJsonReader extends EntityJsonReader<NuxeoPrincipal>
NuxeoPrincipal
.
Format is (any additional json property is ignored):
{
"entity-type":"user",
"id":"USERNAME",
"properties":{ <- depending on the user schema / format is managed by DocumentPropertiesJsonReader
"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",
...
]
}
}
ctx, registry
Constructor and Description |
---|
NuxeoPrincipalJsonReader() |
Modifier and Type | Method and Description |
---|---|
protected NuxeoPrincipal |
readEntity(org.codehaus.jackson.JsonNode jn)
Implement this method to read the entity.
|
read
accept, getBooleanField, getNode, getStringField, getStringListField, read, readEntity
public NuxeoPrincipalJsonReader()
protected NuxeoPrincipal readEntity(org.codehaus.jackson.JsonNode jn) throws IOException
EntityJsonReader
readEntity
in class EntityJsonReader<NuxeoPrincipal>
jn
- A JsonNode
pointing at the root of the json input.IOException
Copyright © 2018 Nuxeo. All rights reserved.