Class NuxeoPrincipalJsonReader
java.lang.Object
org.nuxeo.ecm.core.io.marshallers.json.AbstractJsonReader<NuxeoPrincipal>
org.nuxeo.ecm.core.io.marshallers.json.EntityJsonReader<NuxeoPrincipal>
org.nuxeo.ecm.platform.usermanager.io.NuxeoPrincipalJsonReader
- All Implemented Interfaces:
Marshaller<NuxeoPrincipal>,Reader<NuxeoPrincipal>
@Setup(mode=SINGLETON,
priority=2000)
public class NuxeoPrincipalJsonReader
extends EntityJsonReader<NuxeoPrincipal>
Convert Json as
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":"[email protected]",
"company":"COMPANY",
"password":"", <- ALWAYS EMPTY
"groups":[
"GROUP1 NAME OF THE USER",
"GROUP2 NAME OF THE USER",
...
]
}
}
- Since:
- 7.2
-
Field Summary
Fields inherited from class org.nuxeo.ecm.core.io.marshallers.json.AbstractJsonReader
ctx, registry -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected NuxeoPrincipalreadEntity(com.fasterxml.jackson.databind.JsonNode jn) Implement this method to read the entity.Methods inherited from class org.nuxeo.ecm.core.io.marshallers.json.EntityJsonReader
readMethods inherited from class org.nuxeo.ecm.core.io.marshallers.json.AbstractJsonReader
accept, getBooleanField, getLongField, getNode, getStringField, getStringListField, read, readEntity
-
Constructor Details
-
NuxeoPrincipalJsonReader
public NuxeoPrincipalJsonReader()
-
-
Method Details
-
readEntity
Description copied from class:EntityJsonReaderImplement this method to read the entity.- Specified by:
readEntityin classEntityJsonReader<NuxeoPrincipal>- Parameters:
jn- AJsonNodepointing at the root of the json input.- Returns:
- The parsed entity.
- Throws:
IOException
-