Re: Another topic, something easy (I hope).

2010-05-26 Thread Justin Edelson
The version of Jackrabbit used within Sling supports versioning.

So this is an area where you do need to use the JCR API directly in
servlets or scripts of your own creation.

I would strongly suggest you search the list archives for information on
this subject as there have been plenty of discussions around versioning
in the past.

Justin


On 5/26/10 4:02 PM, Tony Giaccone wrote:
 
 
 Versioning...
 
 
 I've read the Jackrabbit docs that talk about Versioning. What I've read says 
 that versioning is an optional feature.  
 
 First Question: Does the version of jackrabbit used with the launchpad 
 support versioning? 
 
 
 I see that there's some documents that talk about how to get 
 
 I see in the sling docs this comment:
 
 checkin checkin:=(true|false) false The checkin directive specifies whether 
 versionable nodes should be checked in.
 
 
 So using curl how would I create a node which is version-able? 
 
 How can in insert a new value into that node replacing a value that exists 
 already? 
 
 How do I retrieve a pervious version of a node?
 
 
 
 Tony



Re: Another topic, something easy (I hope).

2010-05-26 Thread Peter Chiochetti

Hello Tony,

to get you started, some incomplete pointers. I think that its worth to 
repeat them here, although they are already archived at markmail:



So using curl how would I create a node which is version-able?


$ curl -Fjcr:mixinTypes=mix:versionable http://


How can in insert a new value into that node replacing a value that exists 
already?


currentNode.checkin(); changeValue(); currentNode.checkout(); // correct 
sequence?



How do I retrieve a pervious version of a node?


https://cwiki.apache.org/confluence/display/SLING/FAQ#FAQ-HowdoIgeneratelinkstopreviousversionsofanode%3F

Please feel free to post a complete protocol of how you worked it out!

--
peter


Re: Another topic, something easy (I hope).

2010-05-26 Thread Alexander Klimetschek
On Wed, May 26, 2010 at 22:45, Peter Chiochetti p...@myzel.net wrote:
 How can in insert a new value into that node replacing a value that exists
 already?

 currentNode.checkin(); changeValue(); currentNode.checkout(); // correct
 sequence?

No, a little bit different:

currentNode.checkout(); // make the HEAD of the versioned node modifiable

changeValue(); // modify using normal JCR ops
session.save(); // save changes (this could happen multiple times
between checkouts/ins)

currentNode.checkin(); // archive a new version based on the current HEAD

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetsc...@day.com