Return-Path: X-Original-To: apmail-chemistry-dev-archive@www.apache.org Delivered-To: apmail-chemistry-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6F2804D40 for ; Fri, 10 Jun 2011 16:18:52 +0000 (UTC) Received: (qmail 2272 invoked by uid 500); 10 Jun 2011 16:18:52 -0000 Delivered-To: apmail-chemistry-dev-archive@chemistry.apache.org Received: (qmail 2237 invoked by uid 500); 10 Jun 2011 16:18:52 -0000 Mailing-List: contact dev-help@chemistry.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@chemistry.apache.org Delivered-To: mailing list dev@chemistry.apache.org Received: (qmail 2227 invoked by uid 99); 10 Jun 2011 16:18:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Jun 2011 16:18:52 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of florian.mueller@alfresco.com designates 207.126.144.141 as permitted sender) Received: from [207.126.144.141] (HELO eu1sys200aog116.obsmtp.com) (207.126.144.141) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 10 Jun 2011 16:18:43 +0000 Received: from zimbra.alfresco.com ([88.151.129.3]) by eu1sys200aob116.postini.com ([207.126.147.11]) with SMTP ID DSNKTfJDzC7XNwXYOg98+vK19cXwvpMtUT7n@postini.com; Fri, 10 Jun 2011 16:18:23 UTC Received: from localhost (localhost.localdomain [127.0.0.1]) by zimbra.alfresco.com (Postfix) with ESMTP id 2C95228C371; Fri, 10 Jun 2011 17:18:20 +0100 (BST) X-Virus-Scanned: amavisd-new at unx-d-manc4.tc.ifeltd.com Received: from zimbra.alfresco.com ([127.0.0.1]) by localhost (zimbra.alfresco.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QwxQybpBXUPt; Fri, 10 Jun 2011 17:18:20 +0100 (BST) Received: from Florian-Mullers-MacBook-Pro-2.local (unknown [194.75.202.169]) (Authenticated sender: florian.mueller) by zimbra.alfresco.com (Postfix) with ESMTP id 97D3228C370; Fri, 10 Jun 2011 17:18:18 +0100 (BST) Message-ID: <4DF243C7.6040109@alfresco.com> Date: Fri, 10 Jun 2011 17:18:15 +0100 From: =?ISO-8859-1?Q?Florian_M=FCller?= User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 To: "dev@chemistry.apache.org" , nathan.degroff@fmr.com Subject: Re: VersioningService.cancelCheckOut() and working-copy vs self rel link References: <2A1D0A84B520BE4D84231A6156F934C05CC2C28E5A@MSGDALCCRC2WIN.DMN1.FMR.COM> In-Reply-To: <2A1D0A84B520BE4D84231A6156F934C05CC2C28E5A@MSGDALCCRC2WIN.DMN1.FMR.COM> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi Nathan, Thanks for your report! I can't really comment on the EMC Documentum CMIS implementation because I haven't had a chance to test it extensively. Could you describe how you get the PWC id in the first place? Did you do something like this: ObjectId pwcId = document.checkOut(); If so, EMC does not return the PWC entry but the document entry, which would be a bug on their end. Using the working-copy relation would be a valid workaround. Let me play with that a bit and if it works with other repositories, I'll open an issue and change it. Thanks, Florian On 10/06/2011 16:22, Degroff, Nathan wrote: > 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://://resources/repositories//objects/ > > instead of the working copy: > > DELETE http://://resources/repositories//checkedout/ > > 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.