Package javax.jcr

Examples of javax.jcr.PathNotFoundException


        } catch (NameException e) {
            String msg = parentAbsPath + ": invalid path";
            log.debug(msg);
            throw new RepositoryException(msg, e);
        } catch (AccessDeniedException ade) {
            throw new PathNotFoundException(parentAbsPath);
        }

        // verify that parent node is checked-out, not locked and not protected
        // by either node type constraints nor by some retention or hold.
        int options = ItemValidator.CHECK_LOCK | ItemValidator.CHECK_CHECKED_OUT |
View Full Code Here


        this.uuidBehavior = uuidBehavior;
        userID = sessionContext.getSessionDelegate().getAuthInfo().getUserID();

        importTargetTree = root.getTree(absPath);
        if (!importTargetTree.exists()) {
            throw new PathNotFoundException(absPath);
        }

        // TODO: review usage of write-root and object obtained from session-context (OAK-931)
        VersionManager vMgr = sessionContext.getWorkspace().getVersionManager();
        if (!vMgr.isCheckedOut(absPath)) {
View Full Code Here

        if (oakPath != null) {
            return oakPath;
        } else {
            // check if the path is an SNS path with an index > 1 and throw a PathNotFoundException instead (see OAK-1216)
            if (getOakPathKeepIndex(jcrPath) != null) {
                throw new PathNotFoundException(jcrPath);
            } else {
                throw new RepositoryException("Invalid name or path: " + jcrPath);
            }

        }
View Full Code Here

    public String getOakPathOrThrowNotFound(String jcrPath) throws PathNotFoundException {
        String oakPath = getOakPath(jcrPath);
        if (oakPath != null) {
            return oakPath;
        } else {
            throw new PathNotFoundException(jcrPath);
        }
    }
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

        // check state of this instance
        sanityCheck();

        PropertyId id = resolveRelativePropertyPath(relPath);
        if (id == null) {
            throw new PathNotFoundException(relPath);
        }
        try {
            return (Property) itemMgr.getItem(id);
        } catch (ItemNotFoundException infe) {
            throw new PathNotFoundException(relPath);
        } catch (AccessDeniedException ade) {
            throw new PathNotFoundException(relPath);
        }
    }
View Full Code Here

    @Override
    public Node getNode(String absPath) throws RepositoryException {
        Node node = getNodeOrNull(absPath);
        if (node == null) {
            throw new PathNotFoundException("Node with path " + absPath + " does not exist.");
        }
        return node;
    }
View Full Code Here

    @Override
    public Property getProperty(String absPath) throws RepositoryException {
        Property property = getPropertyOrNull(absPath);
        if (property == null) {
            throw new PathNotFoundException(absPath);
        }
        return property;
    }
View Full Code Here

    @Override
    public Item getItem(String absPath) throws RepositoryException {
        Item item = getItemOrNull(absPath);
        if (item == null) {
            throw new PathNotFoundException(absPath);
        }
        return item;
    }
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.