jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dave Brosius" <dbros...@mebigfatguy.com>
Subject Re: Version.getPredecessors()?
Date Thu, 10 Apr 2008 03:06:55 GMT
Yes, it should.

Strictly speaking i believe it is reading the jcr:baseVersion property of 
the node, which is a reference property.

When you checkin the code does

internalSetProperty(NameConstants.JCR_BASEVERSION, InternalValue.create(new 
UUID(v.getUUID())));



http://wiki.apache.org/jackrabbit/mix:versionable

The following might be of use to you.

http://www.xs4all.nl/~weertj/jcr/



It's nice to get an 'impartial' view of your repository so you are sure 
what's in there.



----- Original Message ----- 
From: "Conoly, Brett" <Brett.Conoly@digitalinsight.com>
To: <users@jackrabbit.apache.org>
Sent: Tuesday, April 08, 2008 9:46 AM
Subject: Version.getPredecessors()?


I'm currently trying to retrieve a list of all the previous versions of
a node.
I'm actually using:

<pre>
Version version = node.getBaseVersion();
Version[] versionArray = version.getPredecessors();
for (int i = 0; i < versionArray.length; i++)
       versions.add(versionArray[i]);
</pre>

Going through the debugger this doesn't seem to be throwing any errors
but for some reason this ALWAYS seems to return 1 version no matter how
many there actually are.

Am I doing something wrong? I'm also assuming that the BaseVersion is
the most recent version, is this right?
Thanks,
Brett 


Mime
View raw message