@Setup(mode=SINGLETON, priority=2000) public class HasContentJsonEnricher extends AbstractJsonEnricher<DocumentModel>
Modifier and Type | Field and Description |
---|---|
static String |
FETCH_CHILD_QUERY |
static String |
FETCH_MEMBERS_QUERY |
static String |
NAME |
ENTITY_ENRICHER_NAME
ctx, registry
Constructor and Description |
---|
HasContentJsonEnricher() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
hasContent(DocumentModel document,
String query) |
void |
write(com.fasterxml.jackson.core.JsonGenerator jg,
DocumentModel document)
When implementing this method, the provided
JsonGenerator expect you write a field name and a field value
(or many). |
accept, write
getGenerator, write, writeEntity, writeEntity, writeEntityField, writeSerializable, writeSerializableField, writeSerializableListField, writeSerializableMapField
public static final String NAME
public static final String FETCH_CHILD_QUERY
public static final String FETCH_MEMBERS_QUERY
public HasContentJsonEnricher()
public void write(com.fasterxml.jackson.core.JsonGenerator jg, DocumentModel document) throws IOException
AbstractJsonEnricher
JsonGenerator
expect you write a field name and a field value
(or many).write
in class AbstractJsonEnricher<DocumentModel>
jg
- The JsonGenerator
to use.document
- The enriched entity.IOException
protected boolean hasContent(DocumentModel document, String query) throws IOException
IOException
Copyright © 2019 Nuxeo. All rights reserved.