@Setup(mode=SINGLETON, priority=2000) public class ACLJsonEnricher extends AbstractJsonEnricher<DocumentModel>
DocumentModel Json.
 
 Add DocumentModel's ACP as json attachment.
 
Enable if parameter enrichers-document=acls is present.
Format is:
 
 {
   "entity-type":"document",
   ...
   "contextParameters": {
     "acls": [
       {
         "name": "inherited",
         "aces" :[
           {
             "username": "administrators",
             "permission": "Everything",
             "granted": true,
             "creator": "Administrator",
             "begin": "2014-10-19T09:16:30.291Z",
             "end": "2016-10-19T09:16:30.291Z"
             "notify": true // optional
             "comment": "" // optional
           },
           ...
         ]
       },
       ...
     ]
   }
 }
 
 
 {@code username} and {@code creator} property can be fetched with fetch.acls=username or fetch.acls=creator.
Additional ACE fields (such as notify and notification comment) can be written by using fetch.acls=extended.
NuxeoPrincipalJsonWriter, 
NuxeoGroupJsonWriter| Modifier and Type | Field and Description | 
|---|---|
static String | 
COMPATIBILITY_CONFIGURATION_PARAM  | 
static String | 
CREATOR_PROPERTY  | 
static String | 
EXTENDED_ACLS_PROPERTY  | 
static String | 
NAME  | 
static String | 
USERNAME_PROPERTY  | 
ENTITY_ENRICHER_NAMEctx, registry| Constructor and Description | 
|---|
ACLJsonEnricher()  | 
| Modifier and Type | Method and Description | 
|---|---|
protected Map<String,Serializable> | 
computeAdditionalFields(DocumentModel doc,
                       String aclName,
                       String aceId)  | 
protected String | 
computeDirectoryId(DocumentModel doc,
                  String aclName,
                  String aceId)  | 
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). | 
protected void | 
writeACEsField(com.fasterxml.jackson.core.JsonGenerator jg,
              String fieldName,
              ACL acl,
              DocumentModel document)  | 
protected void | 
writePrincipalOrGroup(String propertyName,
                     String value,
                     com.fasterxml.jackson.core.JsonGenerator jg)  | 
accept, writegetGenerator, write, writeEntity, writeEntity, writeEntityField, writeSerializable, writeSerializableField, writeSerializableListField, writeSerializableMapFieldpublic static final String NAME
public static final String USERNAME_PROPERTY
public static final String CREATOR_PROPERTY
public static final String EXTENDED_ACLS_PROPERTY
public static final String COMPATIBILITY_CONFIGURATION_PARAM
public ACLJsonEnricher()
public void write(com.fasterxml.jackson.core.JsonGenerator jg, DocumentModel document) throws IOException
AbstractJsonEnricherJsonGenerator 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.IOExceptionprotected void writeACEsField(com.fasterxml.jackson.core.JsonGenerator jg, String fieldName, ACL acl, DocumentModel document) throws IOException
IOExceptionprotected void writePrincipalOrGroup(String propertyName, String value, com.fasterxml.jackson.core.JsonGenerator jg) throws IOException
IOExceptionprotected Map<String,Serializable> computeAdditionalFields(DocumentModel doc, String aclName, String aceId)
protected String computeDirectoryId(DocumentModel doc, String aclName, String aceId)
Copyright © 2019 Nuxeo. All rights reserved.