/** * Check if the Node identified by <code>nodePath</code> is itself part of ACL * defining content. It this case setting or modifying an AC-policy is * obviously not possible. * * @param nodePath the node path * @throws AccessControlException If the given nodePath identifies a Node that * represents a ACL or ACE item. * @throws RepositoryException */ private void checkProtectsNode(String nodePath) throws RepositoryException { if (nodePath != null) { NodeImpl node = getNode(nodePath); if (utils.isAcItem(node)) { throw new AccessControlException("Node " + nodePath + " defines ACL or ACE itself."); } } }
/** * Check if the Node identified by <code>nodePath</code> is itself part of ACL * defining content. It this case setting or modifying an AC-policy is * obviously not possible. * * @param nodePath the node path * @throws AccessControlException If the given nodePath identifies a Node that * represents a ACL or ACE item. * @throws RepositoryException */ private void checkProtectsNode(String nodePath) throws RepositoryException { if (nodePath != null) { NodeImpl node = getNode(nodePath); if (utils.isAcItem(node)) { throw new AccessControlException("Node " + nodePath + " defines ACL or ACE itself."); } } }
/** * Returns the rep:Policy node below the Node identified at the given * path or <code>null</code> if the node is not mix:AccessControllable * or if no policy node exists. * * @param nodePath the node path * @return node or <code>null</code> * @throws PathNotFoundException if not found * @throws RepositoryException if an error occurs */ private NodeImpl getAclNode(String nodePath) throws PathNotFoundException, RepositoryException { NodeImpl controlledNode; if (nodePath == null) { controlledNode = (NodeImpl) session.getRootNode(); } else { controlledNode = getNode(nodePath); } return getAclNode(controlledNode, nodePath); }
/** * Returns the rep:Policy node below the Node identified at the given * path or <code>null</code> if the node is not mix:AccessControllable * or if no policy node exists. * * @param nodePath the node path * @return node or <code>null</code> * @throws PathNotFoundException if not found * @throws RepositoryException if an error occurs */ private NodeImpl getAclNode(String nodePath) throws PathNotFoundException, RepositoryException { NodeImpl controlledNode; if (nodePath == null) { controlledNode = (NodeImpl) session.getRootNode(); } else { controlledNode = getNode(nodePath); } return getAclNode(controlledNode, nodePath); }
/** * * @param nodePath the node path * @return the new node * @throws RepositoryException if an error occurs */ private NodeImpl createAclNode(String nodePath) throws RepositoryException { NodeImpl protectedNode = getNode(nodePath); if (!protectedNode.isNodeType(NT_REP_ACCESS_CONTROLLABLE)) { protectedNode.addMixin(NT_REP_ACCESS_CONTROLLABLE); } return addNode(protectedNode, N_POLICY, NT_REP_ACL); }
/** * * @param nodePath the node path * @return the new node * @throws RepositoryException if an error occurs */ private NodeImpl createAclNode(String nodePath) throws RepositoryException { NodeImpl protectedNode = getNode(nodePath); if (!protectedNode.isNodeType(NT_REP_ACCESS_CONTROLLABLE)) { protectedNode.addMixin(NT_REP_ACCESS_CONTROLLABLE); } return addNode(protectedNode, N_POLICY, NT_REP_ACL); }
aclName = N_REPO_POLICY; } else { controlledNode = getNode(nodePath); mixin = session.getJCRName(NT_REP_ACCESS_CONTROLLABLE); aclName = N_POLICY;
aclName = N_REPO_POLICY; } else { controlledNode = getNode(nodePath); mixin = session.getJCRName(NT_REP_ACCESS_CONTROLLABLE); aclName = N_POLICY;