Package org.jboss.dna.graph.request

Examples of org.jboss.dna.graph.request.DeleteChildrenRequest


        if (startingLocation.getPath().isRoot()) {
            // Just delete the whole content ...
            process(new DeleteBranchRequest(startingLocation, workspaceName));
        } else {
            // We can't delete the node, since later same-name-siblings might be changed. So delete the children ...
            process(new DeleteChildrenRequest(startingLocation, workspaceName));
        }

        // Now update all of the properties, removing any that are no longer needed ...
        Location topNode = locationIter.next();
        assert topNode.equals(startingLocation);
View Full Code Here


                // Is this proxy represent the top level node of the projection?
                if (proxy.isTopLevelNode() || !includeParent) {
                    // Then we want to delete everything *underneath* the node, but we don't want to delete
                    // the node itself since it is the node being projected and must exist in order for the
                    // projection to work.
                    DeleteChildrenRequest pushDownRequest = new DeleteChildrenRequest(proxy.location(), proxy.workspaceName());
                    federatedRequest.add(pushDownRequest, proxy.isSameLocationAsOriginal(), false, proxy.projection());
                } else {
                    // Create and submit a request for the projection ...
                    DeleteBranchRequest pushDownRequest = new DeleteBranchRequest(proxy.location(), proxy.workspaceName());
                    federatedRequest.add(pushDownRequest, proxy.isSameLocationAsOriginal(), false, proxy.projection());
View Full Code Here

     *
     * @see org.jboss.dna.graph.request.processor.RequestProcessor#process(org.jboss.dna.graph.request.DeleteChildrenRequest)
     */
    @Override
    public void process( DeleteChildrenRequest request ) {
        DeleteChildrenRequest source = (DeleteChildrenRequest)federatedRequest.getFirstProjectedRequest().getRequest();
        if (checkErrorOrCancel(request, source)) return;
        request.setActualLocationOfNode(source.getActualLocationOfNode());
    }
View Full Code Here

            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);
            }
View Full Code Here

        // 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;
View Full Code Here

                    deleteLocationDetails(workspace, location, detailsByLocationByWorkspace);
                } else {
                    details.addEventType(ChangeType.NODE_REMOVED);
                }
            } else if (change instanceof DeleteChildrenRequest) {
                DeleteChildrenRequest delete = (DeleteChildrenRequest)change;
                for (Location deletedChild : delete.getActualChildrenDeleted()) {
                    NetChangeDetails childDetails = findDetailsByLocation(workspace, deletedChild, detailsByLocationByWorkspace);
                    // if a child node was previously added than a remove results in a net no change
                    if (childDetails.getEventTypes().contains(ChangeType.NODE_ADDED)) {
                        deleteLocationDetails(workspace, deletedChild, detailsByLocationByWorkspace);
                    } else {
View Full Code Here

                // Is this proxy represent the top level node of the projection?
                if (proxy.isTopLevelNode() || !includeParent) {
                    // Then we want to delete everything *underneath* the node, but we don't want to delete
                    // the node itself since it is the node being projected and must exist in order for the
                    // projection to work.
                    DeleteChildrenRequest pushDownRequest = new DeleteChildrenRequest(proxy.location(), proxy.workspaceName());
                    federatedRequest.add(pushDownRequest, proxy.isSameLocationAsOriginal(), false, proxy.projection());
                } else {
                    // Create and submit a request for the projection ...
                    DeleteBranchRequest pushDownRequest = new DeleteBranchRequest(proxy.location(), proxy.workspaceName());
                    federatedRequest.add(pushDownRequest, proxy.isSameLocationAsOriginal(), false, proxy.projection());
View Full Code Here

            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);
            }
View Full Code Here

        // 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;
View Full Code Here

                RemovePropertyRequest remove = (RemovePropertyRequest)change;
                details.removeProperty(remove.propertyName());
            } else if (change instanceof DeleteBranchRequest) {
                details.addEventType(ChangeType.NODE_REMOVED);
            } else if (change instanceof DeleteChildrenRequest) {
                DeleteChildrenRequest delete = (DeleteChildrenRequest)change;
                for (Location deletedChild : delete.getActualChildrenDeleted()) {
                    NetChangeDetails childDetails = detailsByLocation.get(location);
                    if (childDetails == null) {
                        childDetails = new NetChangeDetails();
                        detailsByLocation.put(deletedChild, childDetails);
                    }
View Full Code Here

TOP

Related Classes of org.jboss.dna.graph.request.DeleteChildrenRequest

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.