protected void setACP(Document doc, ACP newAcp, boolean overwrite, Map<String, Serializable> options) { DocumentModel docModel = readModel(doc); if (options == null) { options = new HashMap<>(); } options.put(CoreEventConstants.OLD_ACP, docModel.getACP().clone()); options.put(CoreEventConstants.NEW_ACP, newAcp); notifyEvent(DocumentEventTypes.BEFORE_DOC_SECU_UPDATE, docModel, options, null, null, true, true); getSession().setACP(doc, newAcp, overwrite); docModel = readModel(doc); options.put(CoreEventConstants.NEW_ACP, newAcp.clone()); notifyEvent(DocumentEventTypes.DOCUMENT_SECURITY_UPDATED, docModel, options, null, null, true, false); }
ACP acp = session.getACP(sourceDocument.getRef()).clone(); ACL acl = acp.getACL(ACL.LOCAL_ACL);