Package org.jboss.dna.graph.property

Examples of org.jboss.dna.graph.property.PathNotFoundException


        try {

            kind = repos.checkPath(myPath, -1);
            if (kind == SVNNodeKind.NONE) {
                // node does not exist or requested node is not correct.
                throw new PathNotFoundException(Location.create(requestedPath), null,
                                                SVNRepositoryConnectorI18n.nodeDoesNotExist.text(myPath));
            } else if (kind == SVNNodeKind.UNKNOWN) {
                // node is unknown
                throw new PathNotFoundException(Location.create(requestedPath), null,
                                                SVNRepositoryConnectorI18n.nodeIsActuallyUnknow.text(myPath));
            }
        } catch (SVNException e) {
            throw new RepositorySourceException(
                                                getSourceName(),
View Full Code Here


            pathAsString = pathAsString.substring(1);
        }
        SVNNodeKind kind = repository.checkPath(pathAsString, -1);
        if (kind == SVNNodeKind.NONE) {
            // node does not exist or requested node is not correct.
            throw new PathNotFoundException(Location.create(path), null,
                                            SVNRepositoryConnectorI18n.nodeDoesNotExist.text(pathAsString));
        } else if (kind == SVNNodeKind.UNKNOWN) {
            // node is unknown
            throw new PathNotFoundException(Location.create(path), null,
                                            SVNRepositoryConnectorI18n.nodeIsActuallyUnknow.text(pathAsString));
        }
        return kind;
    }
View Full Code Here

        Path lowestExistingInFederated = pathFactory.createRootPath();
        while (projected != null) {
            Request projectedRequest = projected.getRequest();
            Throwable error = projectedRequest.getError();
            if (error instanceof PathNotFoundException) {
                PathNotFoundException notFound = (PathNotFoundException)error;
                Path lowestExisting = notFound.getLowestAncestorThatDoesExist();
                // Project back to the repository level ...
                for (Path federatedPath : projected.getProjection().getPathsInRepository(lowestExisting, pathFactory)) {
                    if (federatedPath.isAtOrBelow(lowestExistingInFederated)) {
                        lowestExistingInFederated = federatedPath;
                    }
                }
            }
            projected = projected.next();
        }
        original.setError(new PathNotFoundException(originalLocation, lowestExistingInFederated));
    }
View Full Code Here

        ProjectedNode projectedNode = workspace.project(getExecutionContext(), location, requiresUpdate);
        if (projectedNode == null) {
            I18n msg = GraphI18n.locationCannotBeProjectedIntoWorkspaceAndSource;
            Path root = getExecutionContext().getValueFactories().getPathFactory().createRootPath();
            request.setError(new PathNotFoundException(location, root, msg.text(readable(location),
                                                                                workspace.getName(),
                                                                                repository.getSourceName())));
        }
        return projectedNode;
    }
View Full Code Here

                            previousPath = path;
                        }
                    }
                } catch (PathNotFoundException e) {
                    // Use the correct desired path ...
                    throw new PathNotFoundException(Location.create(relativePath), e.getLowestAncestorThatDoesExist());
                }
            }
        }
        return node;
    }
View Full Code Here

            List<Node<Payload, PropertyPayload>> children = childrenByName.get(name); // never null
            try {
                return children.get(sns - 1); // SNS is 1-based, index is 0-based
            } catch (IndexOutOfBoundsException e) {
                Path missingPath = cache.pathFactory.create(getPath(), name, sns);
                throw new PathNotFoundException(Location.create(missingPath), getPath());
            }
        }
View Full Code Here

        // Look up the parent node, which must exist ...

        PathNode parentNode = workspace.getNode(parent);
        if (parentNode == null) {
            Path lowestExisting = workspace.getLowestExistingPath(parent);
            request.setError(new PathNotFoundException(request.under(), lowestExisting, GraphI18n.nodeDoesNotExist.text(parent)));
            return;
        }

        if (!(workspace instanceof WritablePathWorkspace)) {
            I18n msg = GraphI18n.workspaceIsReadOnly;
View Full Code Here

        }

        PathNode newParent = workspace.getNode(newParentPath);
        if (newParent == null) {
            Path lowestExisting = workspace.getLowestExistingPath(newParentPath);
            request.setError(new PathNotFoundException(request.into(), lowestExisting,
                                                       GraphI18n.nodeDoesNotExist.text(newParentPath)));
            return;
        }

        if (!(workspace instanceof WritablePathWorkspace)) {
View Full Code Here

        PathWorkspace workspace = getWorkspace(request, request.inWorkspace());
        if (workspace == null) return;

        PathNode node = getTargetNode(workspace, request, request.at());
        if (node == null) {
            request.setError(new PathNotFoundException(request.at(), workspace.getLowestExistingPath(request.at().getPath())));
            return;
        }

        // Get the names of the children ...
        for (Path.Segment childSegment : node.getChildSegments()) {
View Full Code Here

        PathWorkspace workspace = getWorkspace(request, request.inWorkspace());
        if (workspace == null) return;

        PathNode node = getTargetNode(workspace, request, request.of());
        if (node == null) {
            request.setError(new PathNotFoundException(request.of(), workspace.getLowestExistingPath(request.of().getPath())));
            return;
        }

        List<Path.Segment> childSegments = node.getChildSegments();
        for (Path.Segment childSegment : childSegments) {
View Full Code Here

TOP

Related Classes of org.jboss.dna.graph.property.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.