Allan,

Typically if you work with Magnolia you use the Magnolia API instead of the JCR API. Means you use Content class instead of the Node class. And Magnolia provides a very convenient addVersion() command, so that you do not have to deal with the details. Maybe you could have a look at the addVersion(Rule rule) command to not only version a node, but sub nodes as well. As you wrote, Magnolia even adds mixin:versionable, so you do not have to change the nodetypes of the whole workspace, gaining performance.

Of course you can use the JCR API with checkin() and checkout() to create versions, but I recommend to use the Magnolia API...

Ralf

Allan Boyd schrieb:
Hi Ralf,

I am uncertain about what you mean by "author based versioning". Could you 
elaborate please?

My assumption was that checking in a versioned item in jackrabbit would create 
a version of this item. A subsequent checkout, change and check in again would 
create another version. This as well as obtaining version history I thought was 
all supported by Jackrabbit automatically as long as the type was versionable. 
Just now I did a quick search on Google and the following url seems to support 
my theory - which is only a theory because I have not tried it: 
http://wiki.apache.org/jackrabbit/ExamplesPage

I believe that Magnolia dynamically adds mixin:versionable for content items in 
the website module. It would be interesting to understand the history and 
reasoning behind that approach. Is this anything to do with your assertion that 
jackrabbit will not version data content on check in?

Could you explain the difference between Magnolia versioning and Jackrabbit 
versioning and why it would be necessary to use Content.addVersion() for 
example?

Thanks,
Allan.

-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Ralf Hirning
Sent: 10 February 2009 20:27
To: Magnolia User-List
Subject: Re: [magnolia-user] versioning in the data module


Hi,

Quoting Allan: "This would hopefully make jackrabbit version data content on check-in."

This will never happen as JCR supports author based versioning only. Means that you can create versions, checkout versions, etc. But you have to create the versions on your own. Magnolia provides a method Content.addVersion() for that. Content.getVersionHistory() provides access to the available versions.

Ralf


Katherine Thomson schrieb:
Hi Allan,

We are looking into this too.  Did you get anywhere with it?

I've successfully added mixin:versionable to our nodeType definition but I'm 
not sure how to get the onParentVersion to be set correctly.  Can you help?

Cheers
Katherine

-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Allan Boyd
Sent: 06 February 2009 09:26
To: Magnolia User-List
Subject: [magnolia-user] versioning in the data module

Hi,

Has anyone tried to make the data module versionable?
I guess the place to start would be to modify the data type definitions to 
include mixin:versionable and set required onParentVersion values. This would 
hopefully make jackrabbit version data content on check-in. If this is correct 
then I wonder how easy it is to use the version command and dialog used in the 
website module to access version history and revert previous version etc?

I would be interested to hear from anyone who has done this kind of thing or 
has similar thoughts on the subject.

Thanks,
Allan.

----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to