Hi all,
According to the JSR-170, the "onParentVersion" attribute of the
property/node specifies what happens to this property/node if a new
version of its parent node is checked-in/checked out.
I want to set the "onParentVersion" attribute of the child nodes of a
versionable node to "COPY" programmatically from my code.
But the problem is I can't find any "setOnParentVersion()" in the JCR api.
I don't want to use jackrabbit specific code since I want my code to
work with any JSR-170 compliant repository.
I want to do something like this :
Node parent= root.addNode("parent", "nt:unstructured");
parent.addMixin("mix:versionable");
parent.setProperty("anyProperty", "Blah");
Node child = parent.addNode("child", "nt:unstructured");
//child.setOnParentVersion(OnParentVersionAction.COPY); This is not
possible using JCR API. How can it be done?
child.setProperty("childProp","blah-blah");
session.save();
Version firstVersion = parent.checkin();
So when the checkin is called on the parent all its child nodes data should also be
saved in the version history.
I would really appreciate if someone could suggest how to accomplish this since it is very critical for my project
to get the versionable functionality.
Thanks & Regards,
Prakash Reddy