Class BasePermissionsJsonEnricher
- java.lang.Object
-
- org.nuxeo.ecm.core.io.marshallers.json.AbstractJsonWriter<Enriched<EntityType>>
-
- org.nuxeo.ecm.core.io.marshallers.json.enrichers.AbstractJsonEnricher<DocumentModel>
-
- org.nuxeo.ecm.core.io.marshallers.json.enrichers.BasePermissionsJsonEnricher
-
- All Implemented Interfaces:
Marshaller<Enriched<DocumentModel>>
,Writer<Enriched<DocumentModel>>
@Setup(mode=SINGLETON, priority=2000) public class BasePermissionsJsonEnricher extends AbstractJsonEnricher<DocumentModel>
EnrichDocumentModel
Json.Add permission available for current user on given
DocumentModel
's as json attachment. Limit permission to Read, Write and Everything.Enable if parameter enrichers-document=permissions is present.
Format is:
{ "entity-type":"document", ... "contextParameters": { "permissions": [ "Read", "Write", "Everything" ] <- depending on current user permission on document } }
- Since:
- 7.2
-
-
Field Summary
Fields Modifier and Type Field Description static String
NAME
-
Fields inherited from class org.nuxeo.ecm.core.io.marshallers.json.enrichers.AbstractJsonEnricher
ENTITY_ENRICHER_NAME, MAPPER
-
Fields inherited from class org.nuxeo.ecm.core.io.marshallers.json.AbstractJsonWriter
ctx, registry
-
-
Constructor Summary
Constructors Constructor Description BasePermissionsJsonEnricher()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
write(com.fasterxml.jackson.core.JsonGenerator jg, DocumentModel document)
When implementing this method, the providedJsonGenerator
expect you write a field name and a field value (or many).-
Methods inherited from class org.nuxeo.ecm.core.io.marshallers.json.enrichers.AbstractJsonEnricher
accept, safeReadBuffer, write
-
Methods inherited from class org.nuxeo.ecm.core.io.marshallers.json.AbstractJsonWriter
getGenerator, write, writeEntity, writeEntity, writeEntityField, writeSerializable, writeSerializableField, writeSerializableListField, writeSerializableMapField
-
-
-
-
Field Detail
-
NAME
public static final String NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
BasePermissionsJsonEnricher
public BasePermissionsJsonEnricher()
-
-
Method Detail
-
write
public void write(com.fasterxml.jackson.core.JsonGenerator jg, DocumentModel document) throws IOException
Description copied from class:AbstractJsonEnricher
When implementing this method, the providedJsonGenerator
expect you write a field name and a field value (or many).- Specified by:
write
in classAbstractJsonEnricher<DocumentModel>
- Parameters:
jg
- TheJsonGenerator
to use.document
- The enriched entity.- Throws:
IOException
-
-