Package org.jboss.dna.graph

Examples of org.jboss.dna.graph.Location


     * </p>
     *
     * @param request the request
     */
    public void process( UnlockBranchRequest request ) {
        Location actualLocation = request.at();
        if (!actualLocation.hasPath()) {
            VerifyNodeExistsRequest nodeExists = new VerifyNodeExistsRequest(request.at(), request.inWorkspace());

            process(nodeExists);

            if (nodeExists.hasError()) {
View Full Code Here


        // Check the projection first ...
        if (checkErrorOrCancel(request, federatedRequest)) return;

        UpdatePropertiesRequest source = (UpdatePropertiesRequest)projected.getRequest();
        if (checkErrorOrCancel(request, source)) return;
        Location sourceLocation = source.getActualLocationOfNode();
        request.setActualLocationOfNode(projectToFederated(request.on(), projected.getProjection(), sourceLocation, request));
        request.setNewProperties(source.getNewPropertyNames());
    }
View Full Code Here

        if (checkErrorOrCancel(request, federatedRequest)) return;

        SetPropertyRequest source = (SetPropertyRequest)projected.getRequest();
        if (checkErrorOrCancel(request, source)) return;
        // Set the actual location and created flags ...
        Location sourceLocation = source.getActualLocationOfNode();
        request.setActualLocationOfNode(projectToFederated(request.on(), projected.getProjection(), sourceLocation, request));
        request.setNewProperty(source.isNewProperty());
    }
View Full Code Here

        // Check the projection first ...
        if (checkErrorOrCancel(request, federatedRequest)) return;

        SetPropertyRequest source = (SetPropertyRequest)projected.getRequest();
        if (checkErrorOrCancel(request, source)) return;
        Location sourceLocation = source.getActualLocationOfNode();
        request.setActualLocationOfNode(projectToFederated(request.from(), projected.getProjection(), sourceLocation, request));
    }
View Full Code Here

        // Do an initial check to make sure that there was no error on the source that prevented projection
        Request projectedSource = projected.getRequest();
        if (checkErrorOrCancel(request, projectedSource)) return;

        // Go through the projected requests, and look for the top-most node ...
        Location highest = null;
        while (projected != null) {
            // The projected request should either be a DeleteChildrenRequest (if the node being deleted is
            // at the top of a projection and therefore required to exist) or a DeleteBranchRequest (in all
            // other cases)...
            Location actual = null;
            Request sourceRequest = projected.getRequest();
            if (sourceRequest instanceof DeleteBranchRequest) {
                DeleteBranchRequest source = (DeleteBranchRequest)projected.getRequest();
                actual = source.getActualLocationOfNode();
            } else {
                DeleteChildrenRequest source = (DeleteChildrenRequest)projected.getRequest();
                actual = source.getActualLocationOfNode();
            }
            if (checkErrorOrCancel(request, sourceRequest)) return;
            if (!projected.isSameLocation() && projected.getProjection() != null) {
                actual = projectToFederated(request.at(), projected.getProjection(), actual, request);
            }
            if (highest == null) highest = actual;
            else if (highest.getPath().isDecendantOf(actual.getPath())) highest = actual;
            projected = projected.next();
        }
        assert highest != null;
        request.setActualLocationOfNode(highest);
    }
View Full Code Here

        // Do an initial check to make sure that there was no error on the source that prevented projection
        Request projectedSource = projected.getRequest();
        if (checkErrorOrCancel(request, projectedSource)) return;

        // Go through the projected requests, and look for the top-most node ...
        Location highest = null;
        while (projected != null) {
            // The projected request should a DeleteChildrenRequest ...
            Request sourceRequest = projected.getRequest();
            DeleteChildrenRequest source = (DeleteChildrenRequest)projected.getRequest();
            Location actual = source.getActualLocationOfNode();
            if (checkErrorOrCancel(request, sourceRequest)) return;
            if (!projected.isSameLocation() && projected.getProjection() != null) {
                actual = projectToFederated(request.at(), projected.getProjection(), actual, request);
            }
            if (highest == null) highest = actual;
            else if (highest.getPath().isDecendantOf(actual.getPath())) highest = actual;
            projected = projected.next();
        }
        assert highest != null;
        request.setActualLocationOfNode(highest);
    }
View Full Code Here

        // Check the projection first ...
        if (checkErrorOrCancel(request, federatedRequest)) return;

        RenameNodeRequest source = (RenameNodeRequest)projected.getRequest();
        if (checkErrorOrCancel(request, source)) return;
        Location locationBefore = source.getActualLocationBefore();
        Location locationAfter = source.getActualLocationBefore();
        locationBefore = projectToFederated(request.at(), projected.getProjection(), locationBefore, request);
        locationAfter = projectToFederated(request.at(), projected.getSecondProjection(), locationAfter, request);
        request.setActualLocations(locationBefore, locationAfter);
    }
View Full Code Here

        // Check the projection first ...
        if (checkErrorOrCancel(request, federatedRequest)) return;

        CopyBranchRequest source = (CopyBranchRequest)projected.getRequest();
        if (checkErrorOrCancel(request, source)) return;
        Location locationBefore = source.getActualLocationBefore();
        Location locationAfter = source.getActualLocationBefore();
        locationBefore = projectToFederated(request.from(), projected.getProjection(), locationBefore, request);
        locationAfter = projectToFederated(request.into(), projected.getSecondProjection(), locationAfter, request);
        request.setActualLocations(locationBefore, locationAfter);
    }
View Full Code Here

        // Check the projection first ...
        if (checkErrorOrCancel(request, federatedRequest)) return;

        CloneBranchRequest source = (CloneBranchRequest)projected.getRequest();
        if (checkErrorOrCancel(request, source)) return;
        Location locationBefore = source.getActualLocationBefore();
        Location locationAfter = source.getActualLocationBefore();
        locationBefore = projectToFederated(request.from(), projected.getProjection(), locationBefore, request);
        locationAfter = projectToFederated(request.into(), projected.getSecondProjection(), locationAfter, request);
        request.setActualLocations(locationBefore, locationAfter);
        if (source.removeExisting()) {
            Set<Location> removed = new HashSet<Location>();
View Full Code Here

        // Check the projection first ...
        if (checkErrorOrCancel(request, federatedRequest)) return;

        MoveBranchRequest source = (MoveBranchRequest)projected.getRequest();
        if (checkErrorOrCancel(request, source)) return;
        Location locationBefore = source.getActualLocationBefore();
        Location locationAfter = source.getActualLocationBefore();
        locationBefore = projectToFederated(request.from(), projected.getProjection(), locationBefore, request);
        Projection afterProjection = projected.getSecondProjection();
        if (afterProjection == null) projected.getProjection();
        locationAfter = projectToFederated(request.into(), afterProjection, locationAfter, request);
        request.setActualLocations(locationBefore, locationAfter);
View Full Code Here

TOP

Related Classes of org.jboss.dna.graph.Location

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.