jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zhihai Liu" <z...@cleverex.com>
Subject createdBy & version number
Date Thu, 17 Apr 2008 15:53:11 GMT


I have a couple of questions regarding to the use of version. 


Firstly, it is my understanding that there is no built-in support to save
the username who check in the node in version history. So I use a property

// set createdBy

node.setProperty("createdBy", session.getUserID());




Then I found that I cannot retrieve it from base version or version history.

// retrieve from base version

String createdBy;

Version baseVersion = node.getBaseVersion();

if (baseVersion.hasProperty("createdBy")) {

  createdBy = baseVersion.getProperty("createdBy").getString();



But it is saved correctly and can be retrieved from node.

// retrieve from node

String createdBy = node.getProperty("createdBy").getString();


I know that versions are different nodes in repository. Don't they keep all
the data that is saved before checkin? Did I do something wrong?


Secondly, is there built-in support to generate the version numbers like
1.1, 1.2, when checkin or do I have to set version label manually?


Thank you very much.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message