AccessControlList acl = refParent.getACL();
AccessManager am = session.getAccessManager();
if (!am.hasPermission(acl, PermissionType.READ, session.getUserState().getIdentity()))
{
throw new AccessDeniedException("Can not delete node " + refNode.getQPath() + " ("
+ refNode.getIdentifier() + ")" + ". It is currently the target of a REFERENCE property and "
+ refProp.getQPath().getAsString());
}
throw new ReferentialIntegrityException("Can not delete node " + refNode.getQPath() + " ("
+ refNode.getIdentifier() + ")" + ". It is currently the target of a REFERENCE property "