jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tomasz Dabrowski" <Tomasz.Dabrow...@cognifide.com>
Subject RE: adding two time the same label for history...
Date Mon, 14 Nov 2005 08:56:55 GMT
> yeah :-) but your adding the label to the same version? this one would
throw an exception:
> node.getVersionHistory().addVersionLabel("1.0", "foo", false); 
> node.getVersionHistory().addVersionLabel("1.1", "foo", false);

as you can see I'm adding label to the current base version.

this is from method body "addLabel"..
>             String versionName = node.getBaseVersion().getName();
>             node.getVersionHistory().addVersionLabel(versionName, 
> label, false);

these are steps to call this method (I don't modify node in time (don't
increase current version), just follow bellow sequence)

> Node myRoot = session.getRootNode().getNode("myRoot");
> addLabel(myRoot, "MY_LABEL");
>
> // this should throw exception
> addLabel(myRoot, "MY_LABEL");

Mime
View raw message