1 message in org.apache.jackrabbit.usersSetting OnParentVersion attribute of ...
FromSent OnAttachments
Prakash Reddy K. L. V.Oct 24, 2007 5:20 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Setting OnParentVersion attribute of a node/property using JCR APIActions...
From:Prakash Reddy K. L. V. (Prak@Sun.COM)
Date:Oct 24, 2007 5:20:02 am
List:org.apache.jackrabbit.users

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