jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Fried <dfr...@phoenix-int.com>
Subject Result of VERSION-CONTROL request
Date Tue, 28 Oct 2008 15:22:11 GMT

The WebDAV standard seems to indicate that the result of a VERSION-CONTROL
request should be a resource which is in the checked-in state:

      "If the request-URL identified a
      versionable resource at the time of the request, the request MUST
      have created a new version history and MUST have created a new
      version resource in that version history.  The resource MUST have
      a DAV:checked-in property that identifies the new version."

But Jackrabbit's WebDAV implementation seems to leave the resource in the
checked-out state.  This probably isn't a problem in most cases, since the
VERSION-CONTROL request, when applied to an already version-controlled
resource, is not guaranteed to leave the resource in a checked-in state, so
applications will have to handle this anyway.  But it seems like an
arbitrary departure from the standard.

Two questions:
 * is this ever a problem in practice? (in other words, should I care?)
 * is there an easy way to add the version-controlled JCR mixin to the
resource and check it in atomically, all in one fell swoop, as part of the
version-control handler?

For example, in VersionControlledResourceImpl::addVersionControl(), would
the following code work?

        if (!isVersionControlled()) {
            Node item = getNode();
            try {
                item.checkin();  // <<<====== ADDED LINE OF CODE
            } catch (RepositoryException e) {
                throw new JcrDavException(e);

Should checkin() come before save()?  I am not so familiar with how JCR
works yet.

Thanks in advance!

View this message in context: http://www.nabble.com/Result-of-VERSION-CONTROL-request-tp20209013p20209013.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

View raw message