Beispiel #1
0
 @Override
 public void setACP(Document doc, ACP acp, boolean overwrite) {
   if (!overwrite && acp == null) {
     return;
   }
   checkNegativeAcl(acp);
   Node node = ((SQLDocument) doc).getNode();
   ACLRow[] aclrows;
   if (overwrite) {
     aclrows = acp == null ? null : acpToAclRows(acp);
   } else {
     aclrows = (ACLRow[]) node.getCollectionProperty(Model.ACL_PROP).getValue();
     aclrows = updateAclRows(aclrows, acp);
   }
   node.getCollectionProperty(Model.ACL_PROP).setValue(aclrows);
   session.requireReadAclsUpdate();
 }
Beispiel #2
0
 protected ACP getACP(Document doc) {
   Node node = ((SQLDocument) doc).getNode();
   ACLRow[] aclrows = (ACLRow[]) node.getCollectionProperty(Model.ACL_PROP).getValue();
   return aclRowsToACP(aclrows);
 }