jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cinnamon Scudworth <principalscudwo...@gmail.com>
Subject Re: after deleting version, name is unexpected
Date Fri, 23 Apr 2010 14:24:13 GMT
I forgot to link the page from the wiki with the instructions I'm
following: http://wiki.apache.org/jackrabbit/ExamplesPage#line-109 .
I'm copying and pasting the code in Versioning Basics, then running
this additional code:

> child = parentNode.getNode("childNode");
> child.checkout();
> child.setProperty("anyProperty", "Blah3");
> session.save();
> Version thisVersion = child.checkin();
> System.out.println(thisVersion.getName());

It's not that I want to have the version names be defined by a user; I
want adding a new version (from checkout to checkin) to be atomic:
either it is added successfully, or the version history is unaffected.
The reason it matters is that I'd like to show the end user the
version names as a way of indicating the version history. That the
version history might go 1.0 -> 1.0.0 -> 1.0.1 -> 1.0.2 -> is
non-obvious. I would like to show the user 1.0 -> 1.1 -> 1.2 -> 1.3 ->
1.4 , since that history is intuitive. If it's not possible, I could
use version labels to manually simulate a version history, so in the
above example, I'd label the 1.0 version with "1.0", the 1.0.0 with
"1.1", 1.0.1 with "1.2", etc. However, since Jackrabbit is made for
versioning, I'd be reimplementing something built in to Jackrabbit.

Thanks, Scudworth

> hi,
> i don't really understand what you try to accomplish.
> the version names can currently not be controlled via jcr but are
> generated automatically.
> if you need user defined "names", use version labels.
> regards, toby

View raw message