jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Saumil.B...@zycus.com
Subject Re: Can anyone explain me how to change version from 1.0 to 2.0
Date Wed, 30 Jul 2008 13:28:45 GMT
Thanks for the reply but i didn't got what you want to say..

 Below is the code that I am using for updation of version. 

Node resNode = fileNode.getNode(JcrConstants.JCR_CONTENT);
resNode.checkout();
resNode.setProperty(JcrConstants.JCR_MIMETYPE , mimeType);
resNode.setProperty(JcrConstants.JCR_ENCODING, "");
resNode.setProperty(JcrConstants.JCR_DATA, inputStream);
resNode.setProperty(JcrConstants.JCR_LASTMODIFIED, 
Calendar.getInstance());
resNode.save(); 
resNode.checkin();

So where will i restore the root version and checkin again. 
Please try to provide some example to make it more clear

Thanks,
Saumil






"Tobias Bocanegra" <tobias.bocanegra@day.com> 
Sent by: tripod@day.com
07/30/2008 06:31 PM
Please respond to
users@jackrabbit.apache.org


To
users@jackrabbit.apache.org
cc

Subject
Re: Can anyone explain me how to change version from 1.0 to 2.0






you restore to the root version and then the next checkin will create 2.0.
regards, toby

On 7/30/08, Saumil.Baxi@zycus.com <Saumil.Baxi@zycus.com> wrote:
> Hi,
>         Whenever I am adding the revision version of the file . The
>  version changes from 1.0 to 1.1 . But in some situation I want the 
version
>  to change from 1.0 to 2.0 . Can anyone explain me how to do it? Code
>  snippet will help a lot.
>
>  Thanks,
>  Saumil


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