jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Klimetschek <aklim...@day.com>
Subject Re: Versioning nodes to accomplish snapshot behavior
Date Mon, 16 Feb 2009 19:50:47 GMT
On Mon, Feb 16, 2009 at 8:27 PM, Samuel Cox <crankydillo@gmail.com> wrote:
> My users can change Ps or add Ns a bunch of times and we don't generally
> care about those changes.  However, at some point in time we want to take a
> snapshot so that the current state of the hierarchy can be retrieved after
> future edits.
>
> What I've been doing is marking the nodes as versionable and the removing
> the previous versions using VersionHistory.removeVersion(versionName).
>
> Of course this gets kind of tricky.  For example, if I change N4.P, then I
> need to remove the versions created for N1, N3, and N4.

JCR actually supports nested versioning. Apart from the spec (section
8.2.11) [1], there is a nice introduction to JCR that includes a good
description of versioning and the (in this case important)
on-parent-version attribute [2].

[1] http://www.day.com/specs/jcr/1.0/
[2] http://jtoee.com/jsr-170/the_jcr_primer/5/

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetschek@day.com

Mime
View raw message