@Setup(mode=SINGLETON, priority=2000) public class ExtendedACLJsonEnricher extends AbstractJsonEnricher<DocumentModel>
DocumentModel
Json.
Add DocumentModel
's ACP as json attachment with notifications info for each ACE (such as whether a
notification should be send and the notification comment).
Enable if parameter enrichers.document=extendedAcls is present.
Format is:
{ "entity-type":"document", ... "contextParameters": { "acls": [ { "name":" inherited", "ace": [ { "username": "administrators", "permission": "Everything", "granted": true, "notify": false, "comment": "" }, ... ] }, ... ] } }
Modifier and Type | Field and Description |
---|---|
static String |
NAME |
ENTITY_ENRICHER_NAME
ctx, registry
Constructor and Description |
---|
ExtendedACLJsonEnricher() |
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(org.codehaus.jackson.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
public static final String NAME
public ExtendedACLJsonEnricher()
public void write(org.codehaus.jackson.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 Map<String,Serializable> computeAdditionalFields(DocumentModel doc, String aclName, String aceId)
protected String computeDirectoryId(DocumentModel doc, String aclName, String aceId)
Copyright © 2015 Nuxeo SA. All rights reserved.