Package org.nuxeo.ecm.directory.io
Class DirectoryEntryJsonReader
- java.lang.Object
-
- org.nuxeo.ecm.core.io.marshallers.json.AbstractJsonReader<EntityType>
-
- org.nuxeo.ecm.core.io.marshallers.json.EntityJsonReader<DirectoryEntry>
-
- org.nuxeo.ecm.directory.io.DirectoryEntryJsonReader
-
- All Implemented Interfaces:
Marshaller<DirectoryEntry>,Reader<DirectoryEntry>
@Setup(mode=SINGLETON, priority=2000) public class DirectoryEntryJsonReader extends EntityJsonReader<DirectoryEntry>
Convert Json asDirectoryEntry.Format is (any additional json property is ignored):
{ "entity-type": "directoryEntry", "directoryName": "DIRECTORY_NAME", <- use it to update an existing document "properties": { <- entry properties depending on the directory schema (password fields are hidden) <- format is managed byDocumentPropertiesJsonReader} }- Since:
- 7.2
-
-
Field Summary
-
Fields inherited from class org.nuxeo.ecm.core.io.marshallers.json.AbstractJsonReader
ctx, registry
-
-
Constructor Summary
Constructors Constructor Description DirectoryEntryJsonReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CloseableopenWrappedContext(Directory directory)Wraps and opens the currentRenderingContextwith the directory schema and the parent resolver in case of hierarchical vocabulary.protected DirectoryEntryreadEntity(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
read
-
Methods inherited from class org.nuxeo.ecm.core.io.marshallers.json.AbstractJsonReader
accept, getBooleanField, getLongField, getNode, getStringField, getStringListField, read, readEntity
-
-
-
-
Method Detail
-
readEntity
protected DirectoryEntry readEntity(com.fasterxml.jackson.databind.JsonNode jn) throws IOException
Description copied from class:EntityJsonReaderImplement this method to read the entity.- Specified by:
readEntityin classEntityJsonReader<DirectoryEntry>- Parameters:
jn- AJsonNodepointing at the root of the json input.- Returns:
- The parsed entity.
- Throws:
IOException
-
openWrappedContext
protected Closeable openWrappedContext(Directory directory)
Wraps and opens the currentRenderingContextwith the directory schema and the parent resolver in case of hierarchical vocabulary.
-
-