/** * {@inheritDoc} * * @see org.modeshape.graph.request.processor.RequestProcessor#process(org.modeshape.graph.request.CloneBranchRequest) */ @Override public void process( CloneBranchRequest request ) { CloneBranchRequest source = (CloneBranchRequest)federatedRequest.getFirstProjectedRequest().getRequest(); if (checkErrorOrCancel(request, source)) return; request.setActualLocations(source.getActualLocationBefore(), source.getActualLocationAfter()); request.setRemovedNodes(source.getRemovedNodes()); }
/** * {@inheritDoc} * * @see org.modeshape.graph.request.processor.RequestProcessor#process(org.modeshape.graph.request.CloneBranchRequest) */ @Override public void process( CloneBranchRequest request ) { ProjectedRequest projected = federatedRequest.getFirstProjectedRequest(); // 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>(); for (Location location : request.getRemovedNodes()) { removed.add(projectToFederated(projected.getSecondProjection(), location, request)); } request.setRemovedNodes(Collections.unmodifiableSet(removed)); } }
for (Location removed : cloneRequest.getRemovedNodes()) { NetChangeDetails removedDetails = changeContext.detailsFor(workspace, removed); removedDetails.addEventType(ChangeType.NODE_REMOVED);
for (Location removed : request.getRemovedNodes()) { Path path = removed.getPath(); if (isBelow(path, removedAlready)) {