NodeBuilder dest,
VersionSelector selector)
throws RepositoryException, CommitFailedException {
// 15.7.6 Restoring Child Nodes
for (String name : src.getChildNodeNames()) {
NodeBuilder srcChild = src.getChildNode(name);
int action = getOPV(dest, srcChild, name);
if (action == COPY) {
// replace on destination
dest.getChildNode(name).remove();
restoreCopiedNode(srcChild, dest.child(name), selector);
} else if (action == VERSION) {
restoreState(srcChild, dest, name, selector);
}
}
for (String name : dest.getChildNodeNames()) {
if (src.hasChildNode(name)) {
continue;
}
NodeBuilder destChild = dest.getChildNode(name);
int action = getOPV(dest, destChild, name);
if (action == COPY || action == VERSION || action == ABORT) {
dest.getChildNode(name).remove();
} else if (action == IGNORE) {
// no action