Class DefaultListJsonReader<EntityType>

java.lang.Object
org.nuxeo.ecm.core.io.marshallers.json.AbstractJsonReader<EntityType>
org.nuxeo.ecm.core.io.marshallers.json.EntityJsonReader<List<EntityType>>
org.nuxeo.ecm.core.io.marshallers.json.DefaultListJsonReader<EntityType>
Type Parameters:
EntityType - The type of the element of this list.
All Implemented Interfaces:
Marshaller<List<EntityType>>, Reader<List<EntityType>>
Direct Known Subclasses:
AnnotationListJsonReader, CommentListJsonReader, DirectoryEntryListJsonReader, DocumentModelListJsonReader, NuxeoGroupListJsonReader, NuxeoPrincipalListJsonReader, SavedSearchListReader

public abstract class DefaultListJsonReader<EntityType> extends EntityJsonReader<List<EntityType>>
Base class to convert json as List.

It follow the classic Nuxeo list format :

 {
   "entity-type": "GIVEN_ENTITY_TYPE",
   "entries": [
     {...}, <-- A Reader must be able to manage this format.
     {...},
     ...
     {...}
   ]
 }
 

This reader delegates the unmarshalling of entries to the MarshallerRegistry. A Json Reader compatible with the required type and the json format must be registered.

Since:
7.2
  • Constructor Details

    • DefaultListJsonReader

      public DefaultListJsonReader(String entityType, Class<EntityType> elClazz)
      Use this constructor if the element of the list are not based on Java generic type.
      Parameters:
      entityType - The list "entity-type".
      elClazz - The class of the element of the list.
    • DefaultListJsonReader

      public DefaultListJsonReader(String entityType, Class<EntityType> elClazz, Type elGenericType)
      Use this constructor if the element of the list are based on Java generic type.
      Parameters:
      entityType - The list "entity-type".
      elClazz - The class of the element of the list.
      elGenericType - The generic type of the list (you can use to generate it
  • Method Details