jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Samuel Cox <crankydi...@gmail.com>
Subject Versioning nodes to accomplish snapshot behavior
Date Mon, 16 Feb 2009 19:27:20 GMT
Hi,

I'm trying to give my users the ability to snapshot a hierarchy of 
documents.

For example, Let's say I have the following hierarchy where Ns are nodes 
and Ps are properties.

N1
|---------|
N2        N3
|---|     |---|
P   P     P   N4
               |
               P


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.

Does this sound crazy???

-- 
Samuel Cox

Mime
View raw message