jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Angela Schreiber <anch...@day.com>
Subject Re: wrapping jcr request inside webdav request
Date Tue, 12 Dec 2006 16:50:43 GMT

> * how to create new node version, 

if the node is already versionable a new version
is created whenever you CHECKIN a given resource
that represents a node.

otherwise you have to make sure first that the
node/resource is versionable.
- in jcr terms this means add 'mix:versionable'
   mixin types
- in dav terms: call VERSION-CONTROL on the given

both variants should work, if i'm not mistaken.

> retrieve version history 

in jcr terms: a versionable node contains a
ref property jcr:versionHistory pointing to
its version history.
since the property is in the dav-view represented
as separeted resource, you can determine the uuid
of the version history. that's a bit clumsy, since
you have to retrieve the uri of the vh from the
uuid first.

the dav-approach:
a version-controlled resource exposes the
DAV:version-history property that points to
the corresponding version-history resource.

> or restore
> previous node version with the webdav interface?

the jsr 170 restore functionality maps - from my
point of view - to UPDATE as it is defined by
deltaV. on the other hand, the jcr update functionality
is not version-related... the implementation works
around this and extends the dav UPDATE call to
handle both. in any case you may use this to restore
an older version... in the way it is defined by deltaV.

for the jcr-update you would have to cheat a bit and
build a customized Update request body.


btw: i re-checked the code regarding transient modifications.
in case the LOCK/UNLOCK bracket is omitted and therefore the
transient-mod-call does NOT provide the mention TransactionId
header, the changes are 'saved' upon completion of the request.

in other words: Node.addNode would be followed by a save()
call on the parent. this may fail if the nodetype defines
mandatory child-items, but only in those cases.

so... it should behave properly (unless there are bugs ;).

View raw message