if (toNode.getDefinition().isProtected())
return;
+ // add mixins
+ for (NodeType mixinType : fromNode.getMixinNodeTypes()) {
+ toNode.addMixin(mixinType.getName());
+ }
+
// process properties
PropertyIterator pit = fromNode.getProperties();
properties: while (pit.hasNext()) {
// they existed, before adding the mixins
updateLastModified(toNode, true);
- // add mixins
- for (NodeType mixinType : fromNode.getMixinNodeTypes()) {
- toNode.addMixin(mixinType.getName());
- }
-
// process children nodes
NodeIterator nit = fromNode.getNodes();
while (nit.hasNext()) {
}
}
+ /**
+ * Update lastModified recursively until this parent.
+ *
+ * @param node the node
+ * @param untilPath the base path, null is equivalent to "/"
+ */
+ public static void updateLastModifiedAndParents(Node node, String untilPath) {
+ updateLastModifiedAndParents(node, untilPath, true);
+ }
+
/**
* Update lastModified recursively until this parent.
*