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 20C1998BF for ; Wed, 11 Apr 2012 18:36:35 +0000 (UTC) Received: (qmail 93754 invoked by uid 500); 11 Apr 2012 18:36:35 -0000 Delivered-To: apmail-jackrabbit-oak-dev-archive@jackrabbit.apache.org Received: (qmail 93715 invoked by uid 500); 11 Apr 2012 18:36:35 -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 93706 invoked by uid 99); 11 Apr 2012 18:36:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Apr 2012 18:36:35 +0000 X-ASF-Spam-Status: No, hits=-1.6 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [64.18.1.185] (HELO exprod6og103.obsmtp.com) (64.18.1.185) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Apr 2012 18:36:26 +0000 Received: from outbound-smtp-2.corp.adobe.com ([193.104.215.16]) by exprod6ob103.postini.com ([64.18.5.12]) with SMTP ID DSNKT4XPFb3Z7d3++BmJIpAeNsIo8mZOhqKS@postini.com; Wed, 11 Apr 2012 11:36:06 PDT Received: from inner-relay-4.eur.adobe.com (inner-relay-4b [10.128.4.237]) by outbound-smtp-2.corp.adobe.com (8.12.10/8.12.10) with ESMTP id q3BIa4aW010834 for ; Wed, 11 Apr 2012 11:36:04 -0700 (PDT) Received: from nahub01.corp.adobe.com (nahub01.corp.adobe.com [10.8.189.97]) by inner-relay-4.eur.adobe.com (8.12.10/8.12.9) with ESMTP id q3BIa3Yr015584 for ; Wed, 11 Apr 2012 11:36:03 -0700 (PDT) Received: from eurhub01.eur.adobe.com (10.128.4.30) by nahub01.corp.adobe.com (10.8.189.97) with Microsoft SMTP Server (TLS) id 8.3.192.1; Wed, 11 Apr 2012 11:36:02 -0700 Received: from susi.local (10.136.134.56) by eurhub01.eur.adobe.com (10.128.4.111) with Microsoft SMTP Server id 8.3.192.1; Wed, 11 Apr 2012 19:36:00 +0100 Message-ID: <4F85CF10.7030903@apache.org> Date: Wed, 11 Apr 2012 19:36:00 +0100 From: =?ISO-8859-1?Q?Michael_D=FCrig?= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 To: Subject: Re: oak api References: <4F84569D.702@apache.org> <7F7F24B1-A237-44A0-BF04-2FCF3152D960@adobe.com> <4F8556E6.6050803@apache.org> <4F85C418.2050506@apache.org> In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org On 11.4.12 18:56, Felix Meschberger wrote: > Hi, > > Am 11.04.2012 um 19:49 schrieb Michael D�rig: > >> >> >> On 11.4.12 18:31, Felix Meschberger wrote: >>> Hi, >>> >>> Am 11.04.2012 um 12:03 schrieb Michael D�rig: >>> >>>> >>>> >>>> On 11.4.12 10:15, Felix Meschberger wrote: >>>> >>>> [...] >>>> >>>>> But then: the move and copy methods look like out-of-band somehow and do not really concern the state of the node itself but potentially completely unrelated ones. >>>>> I would move them somewhere else. >>>> >>>> That'd mean we need to introduce a Branch class on which those methods >>>> lived. Branch instances would then be returned from NodeStore.branch() >>>> and would additionally contain methods for obtaining NodeStateEditor >>>> instances. >>>> >>>> OTHO, those methods are not more out of band than Object.equals(). So in >>>> a way we are idiomatic ;-) >>> >>> How is Object.equals(Object) out of band ? It returns information on equality of another object with this. >>> >>> NodeStateEditor.move(src, dst) moves a node(state) to another location. This is per-se urelated to this NodeStateEditor. >> >> It is not so out of bound after all if you consider that a NodeState >> consists not only of its immediate children but rather of the full >> reflexive transitive closure on child states. The src and dst parameters >> may refer to such states only (see Javadoc) and thus only modify the >> state of this node state alone. > > The JavaDoc says "path relative to this" which per-se does not say "below" because a relative path can also be "../../some/other". Ok agreed. Then let's fix this in the Javadoc to only allow node states below this. Michael > > In addition the move and copy methods are the only ones taking "relative path" instead of just name. > > Its just kind of inconsistent. > > Regards > Felix > >> >> Michael >> >>> >>> But we could modify the API to actually related to this NodeStateEditor: NodeStateEditor.moveTo(dst) and NodeStateEditor.copyTo(dst). This in fact also sounds less "side-effecty" >>> >>> Regards >>> Felix >>> >>>> >>>> Michael >>>> >>>>> >>>>> Regards >>>>> Felix >>> >