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 928B0905E for ; Thu, 12 Apr 2012 18:07:31 +0000 (UTC) Received: (qmail 93789 invoked by uid 500); 12 Apr 2012 18:07:31 -0000 Delivered-To: apmail-jackrabbit-oak-dev-archive@jackrabbit.apache.org Received: (qmail 93764 invoked by uid 500); 12 Apr 2012 18:07:31 -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 93756 invoked by uid 99); 12 Apr 2012 18:07:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Apr 2012 18:07:31 +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 anchela@adobe.com designates 64.18.1.27 as permitted sender) Received: from [64.18.1.27] (HELO exprod6og111.obsmtp.com) (64.18.1.27) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Apr 2012 18:07:22 +0000 Received: from outbound-smtp-1.corp.adobe.com ([192.150.11.134]) by exprod6ob111.postini.com ([64.18.5.12]) with SMTP ID DSNKT4cZxfk/OI6yrj7HQpwj7I4VZ0+JDXgK@postini.com; Thu, 12 Apr 2012 11:07:02 PDT Received: from inner-relay-1.corp.adobe.com ([153.32.1.51]) by outbound-smtp-1.corp.adobe.com (8.12.10/8.12.10) with ESMTP id q3CI4qJ0028105 for ; Thu, 12 Apr 2012 11:04:52 -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 q3CI2uvs002715 for ; Thu, 12 Apr 2012 11:06:58 -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 11:05:19 -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 19:05:15 +0100 Message-ID: <4F87195B.6080409@adobe.com> Date: Thu, 12 Apr 2012 20:05:15 +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> <4F86C6F7.20601@adobe.com> <4F86E0C7.7060901@apache.org> <4F86F8D9.6010007@apache.org> <4F87071C.2010205@adobe.com> <4F871254.8070904@apache.org> In-Reply-To: <4F871254.8070904@apache.org> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org hi michael >> what i am actually looking for (and had a quick discussion looking >> at my real privilege-registration example) was probably some sort >> of changelog/changeset and second some way of adding state >> modifications independent from accessing jcr items. > > That's exactly what my proposal tries to solve. You would use the > "system node editor" for that. ok, than maybe i was just confused by the name :) >> example: registering a new privilege could for example consist of >> >> - add a new node state underneath the dedicated priv-root >> - add 2 properties to that new node state >> - maybe there was even an additional next-level child node states. >> >> currently, i simply didn't find how i was able to do that >> in a reasonable (simple) way and whether that really would >> do, what i wanted it to do. > > editor.addNode("priv-root") but that one already exists... i don't want to add it. but re-reading the docu: "does nothing if it exists..." *arrrrrgh* :) > privRootEditor = editor.edit("priv-root") well. but if it was at a lower level i had to call 'addNode' for every single level? and also call 'edit' for every single level? ohno... i neither want to add nor to edit at those - lets say - 5 top-levels until i reach my target node... here the methods-names simple not represent what i want to do. ... if there was getNodeStateEditor(String path) i just had that in one single method call... just an example. >> 1) tried to use your workspace.copy example.... but >> to connection.getNodeStateEditor i can't pass >> a path but only a state other than the root node >> that i simply don't have access to if i don't want to >> use the current session..... >> the currentroot was not the right location to add content. >> -> see also my comment on NodeStateEditor#edit below > > TransientNodeState.getChildNode() but i don't want to have the transient state of the root nor any other sublevel that i would want to bypass in order to get to my target node... they can happily stay untouched. and if i can commit any editor not only the root i don't know why i had to do all the effort described above. i really try to be very lazy ;) >> >> 2) i find it odd that NodeStateEditor#addNode doesn't >> return me the new node state. > That's easy to change and we probably should. cool. >> 3) the only way i found to add a next level to that new node state >> was NodeStateEditor#edit(String)... was that assumption correct? >> if it was i would find that API really troublesome and it looks >> like a mixture of different concepts.... > > Which concepts does it mix? It actually separates representation of > state from modification of state. yes... from the current aspect of the interfaces i just got the impression that they are not natural to use which imo usually evolves when mixing different things: a simple editor for one node that does nothing else mixed up with some sort of state-manager functionality... that was my impression. so maybe we want to separate state-access-management from changelog|set recording functionality... what do you think? [...] [skipped explanations] (thanks! i really didn't get it from looking at the interfaces...) > Well there are no other proposals so far. So this API is still the best > we have... see above. with your explanations at hand i will take a closer look at it again tomorrow... maybe i can come up with some suggestions. kind regards angela