JcrUtil.cloneNodes(nodes, provider, limiter);
targetRootNode.getSession().save();
}
private String getCommonParentPath(List<JcrNode> nodes) {
Path current = null;
String sitePath = SitePlugin.get().getSiteRootPath();
for (JcrNode node : nodes) {
if (node.getPath().startsWith(sitePath) && node instanceof GlobalContainerNode == false) {
if (current == null) {
current = new Path(node.getPath()).parent();
} else {
Path another = new Path(node.getPath()).parent();
Path common = Path.ROOT;
Iterator<String> i1 = current.iterator();
Iterator<String> i2 = another.iterator();
while (i1.hasNext() && i2.hasNext()) {
String s1 = i1.next();
String s2 = i2.next();
if (Objects.equal(s1, s2)) {
common = common.append(new Path(s1));
} else {
break;
}
}