/** * {@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)); } }
request.desiredName(), request.desiredSegment(), request.removeExisting(), removedExistingNodes); Path newPath = getExecutionContext().getValueFactories().getPathFactory().create(newParentPath, newNode.getName());
request.desiredName(), request.desiredSegment(), request.removeExisting(), removedExistingNodes); Path newPath = getExecutionContext().getValueFactories().getPathFactory().create(newParentPath, newNode.getName());
intoProxy.location(), intoProxy.workspaceName(), request.desiredName(), request.desiredSegment(), request.removeExisting());