Package org.apache.jackrabbit.mk.store

Examples of org.apache.jackrabbit.mk.store.NotFoundException


        String parentPath = PathUtils.getParentPath(nodePath);
        String nodeName = PathUtils.getName(nodePath);

        StagedNode parent = getStagedNode(parentPath, true);
        if (parent.remove(nodeName) == null) {
            throw new NotFoundException(nodePath);
        }

        // discard any staged changes at nodePath
        unstageNode(nodePath);
    }
View Full Code Here


        String destParentPath = PathUtils.getParentPath(destPath);
        String destNodeName = PathUtils.getName(destPath);

        StagedNode srcParent = getStagedNode(srcParentPath, true);
        if (srcParent.getChildNodeEntry(srcNodeName) == null) {
            throw new NotFoundException(srcPath);
        }
        StagedNode destParent = getStagedNode(destParentPath, true);
        if (destParent.getChildNodeEntry(destNodeName) != null) {
            throw new Exception("node already exists at move destination path: " + destPath);
        }
View Full Code Here

        StagedNode srcParent = getStagedNode(srcParentPath, false);
        if (srcParent == null) {
            // the subtree to be copied has not been modified
            ChildNodeEntry entry = getStoredNode(srcParentPath).getChildNodeEntry(srcNodeName);
            if (entry == null) {
                throw new NotFoundException(srcPath);
            }
            StagedNode destParent = getStagedNode(destParentPath, true);
            if (destParent.getChildNodeEntry(destNodeName) != null) {
                throw new Exception("node already exists at copy destination path: " + destPath);
            }
            destParent.add(new ChildNodeEntry(destNodeName, entry.getId()));
            return;
        }

        ChildNodeEntry srcEntry = srcParent.getChildNodeEntry(srcNodeName);
        if (srcEntry == null) {
            throw new NotFoundException(srcPath);
        }

        StagedNode destParent = getStagedNode(destParentPath, true);
        StagedNode srcNode = getStagedNode(srcPath, false);
        if (srcNode != null) {
View Full Code Here

        StoredNode parent = store.getRootNode(baseRevisionId), node = null;
        for (String name : PathUtils.elements(path)) {
            ChildNodeEntry entry = parent.getChildNodeEntry(name);
            if (entry == null) {
                throw new NotFoundException(path);
            }
            node = store.getNode(entry.getId());
            if (node == null) {
                throw new NotFoundException(path);
            }
            parent = node;
        }
        return node;
    }
View Full Code Here

                    if (createIfNotStaged) {
                        child = new StagedNode(store.getNode(entry.getId()), store);
                        stagedChildNodes.put(name, child);
                    }
                } else {
                    throw new NotFoundException(name);
                }
            }
            return child;
        }
View Full Code Here

        String parentPath = PathUtils.getParentPath(nodePath);
        String nodeName = PathUtils.getName(nodePath);

        StagedNode parent = getStagedNode(parentPath, true);
        if (parent.remove(nodeName) == null) {
            throw new NotFoundException(nodePath);
        }

        // discard any staged changes at nodePath
        unstageNode(nodePath);
    }
View Full Code Here

        String destParentPath = PathUtils.getParentPath(destPath);
        String destNodeName = PathUtils.getName(destPath);

        StagedNode srcParent = getStagedNode(srcParentPath, true);
        if (srcParent.getChildNodeEntry(srcNodeName) == null) {
            throw new NotFoundException(srcPath);
        }
        StagedNode destParent = getStagedNode(destParentPath, true);
        if (destParent.getChildNodeEntry(destNodeName) != null) {
            throw new Exception("node already exists at move destination path: " + destPath);
        }
View Full Code Here

        StagedNode srcParent = getStagedNode(srcParentPath, false);
        if (srcParent == null) {
            // the subtree to be copied has not been modified
            ChildNodeEntry entry = getStoredNode(srcParentPath).getChildNodeEntry(srcNodeName);
            if (entry == null) {
                throw new NotFoundException(srcPath);
            }
            StagedNode destParent = getStagedNode(destParentPath, true);
            if (destParent.getChildNodeEntry(destNodeName) != null) {
                throw new Exception("node already exists at copy destination path: " + destPath);
            }
            destParent.add(new ChildNodeEntry(destNodeName, entry.getId()));
            return;
        }

        ChildNodeEntry srcEntry = srcParent.getChildNodeEntry(srcNodeName);
        if (srcEntry == null) {
            throw new NotFoundException(srcPath);
        }

        StagedNode destParent = getStagedNode(destParentPath, true);
        StagedNode srcNode = getStagedNode(srcPath, false);
        if (srcNode != null) {
View Full Code Here

        StoredNode parent = store.getRootNode(baseRevisionId), node = null;
        for (String name : PathUtils.elements(path)) {
            ChildNodeEntry entry = parent.getChildNodeEntry(name);
            if (entry == null) {
                throw new NotFoundException(path);
            }
            node = store.getNode(entry.getId());
            if (node == null) {
                throw new NotFoundException(path);
            }
            parent = node;
        }
        return node;
    }
View Full Code Here

                    if (createIfNotStaged) {
                        child = new StagedNode(store.getNode(entry.getId()), store);
                        stagedChildNodes.put(name, child);
                    }
                } else {
                    throw new NotFoundException(name);
                }
            }
            return child;
        }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.mk.store.NotFoundException

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.