Package javax.jcr

Examples of javax.jcr.PathNotFoundException


            if (!p.isAbsolute()) {
                throw new RepositoryException("not an absolute path: " + absPath);
            }
            return getItemManager().getNode(p);
        } catch (AccessDeniedException ade) {
            throw new PathNotFoundException(absPath);
        } catch (NameException e) {
            String msg = "invalid path:" + absPath;
            log.debug(msg);
            throw new RepositoryException(msg, e);
        }
View Full Code Here


            if (!p.isAbsolute()) {
                throw new RepositoryException("not an absolute path: " + absPath);
            }
            return getItemManager().getProperty(p);
        } catch (AccessDeniedException ade) {
            throw new PathNotFoundException(absPath);
        } catch (NameException e) {
            String msg = "invalid path:" + absPath;
            log.debug(msg);
            throw new RepositoryException(msg, e);
        }
View Full Code Here

            if (!p.isAbsolute()) {
                throw new RepositoryException("not an absolute path: " + absPath);
            }
            item = getItemManager().getItem(p);
        } catch (AccessDeniedException e) {
            throw new PathNotFoundException(absPath);
        } catch (NameException e) {
            String msg = "invalid path:" + absPath;
            log.debug(msg);
            throw new RepositoryException(msg, e);
        }
View Full Code Here

                srcState.getNodeTypeName(), CHECK_ACCESS | CHECK_LOCK
                | CHECK_CHECKED_OUT | CHECK_CONSTRAINTS | CHECK_HOLD | CHECK_RETENTION);
        // check read access right on source node using source access manager
        try {
            if (!srcAccessMgr.isGranted(srcPath, Permission.READ)) {
                throw new PathNotFoundException(safeGetJCRPath(srcPath));
            }
        } catch (ItemNotFoundException infe) {
            String msg =
                "internal error: failed to check access rights for "
                + safeGetJCRPath(srcPath);
View Full Code Here

        if ((options & CHECK_ACCESS) == CHECK_ACCESS) {
            try {
                // make sure current session is granted read access on parent node
                if (!accessMgr.isGranted(targetPath, Permission.READ)) {
                    throw new PathNotFoundException(safeGetJCRPath(targetPath));
                }
                // make sure current session is allowed to remove target node
                if (!accessMgr.isGranted(targetPath, Permission.REMOVE_NODE)) {
                    throw new AccessDeniedException(safeGetJCRPath(targetPath)
                            + ": not allowed to remove node");
View Full Code Here

        NodeState node = getNodeState(nodePath);

        // access rights
        // make sure current session is granted read access on node
        if (!accessMgr.isGranted(nodePath, Permission.READ)) {
            throw new PathNotFoundException(safeGetJCRPath(node.getNodeId()));
        }
        // TODO: removed check for 'WRITE' permission on node due to the fact,
        // TODO: that add_node and set_property permission are granted on the
        // TODO: items to be create/modified and not on their parent.
        // in any case, the ability to add child-nodes and properties is checked
View Full Code Here

    public void verifyCanRead(Path nodePath)
            throws PathNotFoundException, RepositoryException {
        // access rights
        // make sure current session is granted read access on node
        if (!accessMgr.isGranted(nodePath, Permission.READ)) {
            throw new PathNotFoundException(safeGetJCRPath(nodePath));
        }
    }
View Full Code Here

                                     Path nodePath)
            throws PathNotFoundException, RepositoryException {
        try {
            NodeId id = srcHierMgr.resolveNodePath(nodePath);
            if (id == null) {
                throw new PathNotFoundException(safeGetJCRPath(nodePath));
            }
            return (NodeState) getItemState(srcStateMgr, id);
        } catch (ItemNotFoundException infe) {
            throw new PathNotFoundException(safeGetJCRPath(nodePath));
        }
    }
View Full Code Here

                        "Unable to add a child node to property "
                        + session.getJCRPath(parentPath));
            }
            throw e;
        } catch (AccessDeniedException ade) {
            throw new PathNotFoundException(
                    "Failed to resolve path " + relPath + " relative to " + this);
        }

        // Resolve node type name (if any)
        Name typeName = null;
View Full Code Here

        sanityCheck();

        Path p = resolveRelativePath(relPath);
        NodeId id = getNodeId(p);
        if (id == null) {
            throw new PathNotFoundException(relPath);
        }

        // determine parent as mandated by path
        NodeId parentId = null;
        if (!p.denotesRoot()) {
            parentId = getNodeId(p.getAncestor(1));
        }
        try {
            if (parentId == null) {
                return (NodeImpl) itemMgr.getItem(id);
            }
            // if the node is shareable, it now returns the node with the right
            // parent
            return itemMgr.getNode(id, parentId);
        } catch (AccessDeniedException ade) {
            throw new PathNotFoundException(relPath);
        } catch (ItemNotFoundException infe) {
            throw new PathNotFoundException(relPath);
        }
    }
View Full Code Here

TOP

Related Classes of javax.jcr.PathNotFoundException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.