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));