continue;
}
while (child != null && child.isProxy()) {
if (!children.isEmpty()) {
// Take any children so far and simply record a ReadNodeRequest with results ...
ReadAllChildrenRequest placeholderRequest = new ReadAllChildrenRequest(placeholder.location(),
request.inWorkspace());
placeholderRequest.addChildren(children);
if (firstRequest) {
firstRequest = false;
}
placeholderRequest.setActualLocationOfNode(placeholder.location());
federatedRequest.add(placeholderRequest, true, true, null);
children = new LinkedList<Location>();
}
// Now issue a VerifyNodeExistsRequest for the child.
// We'll mix these into the federated request along with the ReadNodeRequests ...
ProxyNode proxy = child.asProxy();
VerifyNodeExistsRequest verifyRequest = new VerifyNodeExistsRequest(proxy.location(),
proxy.workspaceName());
federatedRequest.add(verifyRequest, proxy.isSameLocationAsOriginal(), false, proxy.projection());
child = child.next();
}
}
if (!children.isEmpty() || firstRequest) {
// Submit the children so far ...
ReadAllChildrenRequest placeholderRequest = new ReadAllChildrenRequest(placeholder.location(),
request.inWorkspace());
placeholderRequest.addChildren(children);
if (firstRequest) {
firstRequest = false;
}
placeholderRequest.setActualLocationOfNode(placeholder.location());
federatedRequest.add(placeholderRequest, true, true, null);
}
} else if (projectedNode.isProxy()) {
ProxyNode proxy = projectedNode.asProxy();
// Create and submit a request for the projection ...
ReadAllChildrenRequest pushDownRequest = new ReadAllChildrenRequest(proxy.location(), proxy.workspaceName());
federatedRequest.add(pushDownRequest, proxy.isSameLocationAsOriginal(), false, proxy.projection());
}
projectedNode = projectedNode.next();
}
// Submit for processing ...