Return-Path: X-Original-To: apmail-jackrabbit-oak-dev-archive@minotaur.apache.org Delivered-To: apmail-jackrabbit-oak-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D19B79B8A for ; Thu, 12 Apr 2012 12:14:20 +0000 (UTC) Received: (qmail 47203 invoked by uid 500); 12 Apr 2012 12:14:20 -0000 Delivered-To: apmail-jackrabbit-oak-dev-archive@jackrabbit.apache.org Received: (qmail 47147 invoked by uid 500); 12 Apr 2012 12:14:20 -0000 Mailing-List: contact oak-dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: oak-dev@jackrabbit.apache.org Delivered-To: mailing list oak-dev@jackrabbit.apache.org Received: (qmail 47139 invoked by uid 99); 12 Apr 2012 12:14:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Apr 2012 12:14:20 +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 (nike.apache.org: domain of anchela@adobe.com designates 64.18.1.189 as permitted sender) Received: from [64.18.1.189] (HELO exprod6og105.obsmtp.com) (64.18.1.189) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Apr 2012 12:14:10 +0000 Received: from outbound-smtp-2.corp.adobe.com ([193.104.215.16]) by exprod6ob105.postini.com ([64.18.5.12]) with SMTP ID DSNKT4bG/G9yJPKFAEYr6Tfp8oov71Lvr3KS@postini.com; Thu, 12 Apr 2012 05:13:49 PDT Received: from inner-relay-1.corp.adobe.com (inner-relay-1.adobe.com [153.32.1.51]) by outbound-smtp-2.corp.adobe.com (8.12.10/8.12.10) with ESMTP id q3CCDkaW011072 for ; Thu, 12 Apr 2012 05:13:47 -0700 (PDT) Received: from nacas01.corp.adobe.com (nacas01.corp.adobe.com [10.8.189.99]) by inner-relay-1.corp.adobe.com (8.12.10/8.12.10) with ESMTP id q3CCDkvm008073 for ; Thu, 12 Apr 2012 05:13:46 -0700 (PDT) Received: from eurhub01.eur.adobe.com (10.128.4.30) by nacas01.corp.adobe.com (10.8.189.99) with Microsoft SMTP Server (TLS) id 8.3.192.1; Thu, 12 Apr 2012 05:13:46 -0700 Received: from angela.corp.adobe.com (10.132.1.18) by eurhub01.eur.adobe.com (10.128.4.111) with Microsoft SMTP Server id 8.3.192.1; Thu, 12 Apr 2012 13:13:43 +0100 Message-ID: <4F86C6F7.20601@adobe.com> Date: Thu, 12 Apr 2012 14:13:43 +0200 From: Angela Schreiber User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.18) Gecko/20110616 Thunderbird/3.1.11 MIME-Version: 1.0 To: Subject: Re: Different types of 'item modification' on oak-jcr (and oak-api) References: <4F85A60E.3020709@adobe.com> <4F85B19C.5030601@apache.org> <4F8688B1.5050206@adobe.com> <4F869CC0.8030907@apache.org> In-Reply-To: <4F869CC0.8030907@apache.org> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit hi michael >> that looks really wrong to me. the way i think of the oak-api >> is that i obtain the connection from oak-api upon Repository.login >> and it would be used for the communication for the lifespan of the >> JCR session obtained. retrieving another connection is definitely >> not what i am looking for as it would require separate >> authentication. that doesn't make sense to me. > > See my reply to Jukka and my related commit of rev. 1325159. well, i still don't see how/where you plan to implement the notion of transient modification. in other words to make it clear (in case it isn't): how do i change protected items in oak-jcr such that the items are marked modified and the session has pending transient changes? and such that i don't have to use the JCR API methods, which in this case from my understanding are 'invalid'? so, how do we make sure that Session#hasPendingChanges Item#isNew Item#isModified never return true in case the workspace operation fails on the oak api for constraint or access violation and on the other hand assert that all kind of transient modifications really trigger the flags to be set? i couldn't follow you here since those methods are not implemented. >>> Regarding the "special modifications" we still need to come up with a >>> way to handle those. They should IMO also be done through the >>> Connection, NodeEditor, etc. interfaces which might need to be tweaked >>> accordingly. >> >> as stated before i have the impression that this would need to >> be reflected on the API. > > Yes, that's what I said. So let's come up with a way to do that. let's first define how to distinguish transient modifications. i think that is the special case here from a oak-api perspective. > Workspace operation should be doable now with my changes in rev. > 1325159. I will try to implement copy and move to validate this. i added a check for srcWorkspace not being the current workspace. > TransientNodeState turned out to be a bad name for several reasons: 1. > it implies being a NodeState which it isn't, and 2. it implies a one to > one correspondences with transient modifications of JCR items which > seems a too restrictive assumption. see above. > > I think the next steps should be: > > 1. Validate my claim from above re. workspace operations what was your claim? can't follow you here. > 2. Come up with a way to do "special modifications" following the > general direction sketched by NodeStateEditor et. all. This might > require adding higher level abstractions to the oak API and/or oak-jcr > and might also require changes/tweaks to the current state of affairs. well, your approach of having a separate editor for workspace operations already goes into the direction of separating different change-sets. that was one thing i was wondering about. IMO we we can basically use the same behavior for registering a node type and an namespace or a privilege under /jcr:system/something... (the latter was actually what brought up my questions). oak-core was in any case in charge of validating the changes individually and detecting the distinction between a change to the node type registry or just a workspace. so, maybe we can use the same mechanism. what do you think? angela > 3. In the process come up with better names. > Michael > >> >> kind regards >> angela >>> Michael >>> >>>> >>>> kind regards >>>> angela >>>>