chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Degroff, Nathan" <>
Subject VersioningService.cancelCheckOut() and working-copy vs self rel link
Date Fri, 10 Jun 2011 15:22:12 GMT
To whom it may concern,

Topic:      VersioningService.cancelCheckOut()
Binding:    AtomPub
Issue:      Deletion of object rather than cancelling checkout
Repository: EMC Documentum

We encountered an issue with utilizing the OpenCMIS client where depending on how you retrieve
the Document, the system would send a DELETE for the actual object:

DELETE http://<host>:<port>/<app>/resources/repositories/<repository>/objects/<roid>

instead of the working copy:

DELETE http://<host>:<port>/<app>/resources/repositories/<repository>/checkedout/<roid>

There are many ways around it by retrieving the doc using the Session.getCheckedOutDocs()
and then calling cancelCheckOut() from that object or just calling the SOAP version (which
calls the checkout operation directly), but I was wondering if this is a culmination of:

    -) CMIS 1.0 Spec specifying the "self" relationship while calling cancelCheckOut() instead
of using the "working-copy" relationship link
    -) EMC CMIS implementation not supporting a PWC

After tracing and inspecting to the LinkCache, I can see that if (atompub package) VersioningServiceImpl
used Constants.REL_WORKINGCOPY it would work in all instances whether you checked the doc
out in the same "OpenCMIS" session or if you are pulling it back from a new session.

    public void cancelCheckOut(String repositoryId, String objectId, ExtensionsData extension)
        // find the link
        String link = loadLink(repositoryId, objectId, Constants.REL_WORKINGCOPY, Constants.MEDIATYPE_ENTRY);

        if (link == null) {
            throwLinkException(repositoryId, objectId, Constants.REL_WORKINGCOPY, Constants.MEDIATYPE_ENTRY);

        delete(new UrlBuilder(link));

We were able to pull back many different ways to deal with it especially pulling back the
"checkedOutDocs" collection, but any thoughts would be appreciated.  Pulling the doc directly
without having to iterate through a collection to find the doc one needs.

View raw message