From jackrabbit-dev-return-4830-apmail-incubator-jackrabbit-dev-archive=www.apache.org@incubator.apache.org Fri Dec 09 17:11:09 2005 Return-Path: Delivered-To: apmail-incubator-jackrabbit-dev-archive@www.apache.org Received: (qmail 45659 invoked from network); 9 Dec 2005 17:11:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 9 Dec 2005 17:11:09 -0000 Received: (qmail 70062 invoked by uid 500); 9 Dec 2005 17:11:07 -0000 Mailing-List: contact jackrabbit-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jackrabbit-dev@incubator.apache.org Delivered-To: mailing list jackrabbit-dev@incubator.apache.org Received: (qmail 70051 invoked by uid 99); 9 Dec 2005 17:11:07 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Dec 2005 09:11:07 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [212.249.34.130] (HELO picanmix.dev.day.com) (212.249.34.130) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Dec 2005 09:11:06 -0800 Received: from eu-mail.day.com (eu-mail.dev.day.com [10.0.0.30]) by picanmix.dev.day.com (DAY) with ESMTP id jB9HAiO10680 for ; Fri, 9 Dec 2005 18:10:44 +0100 (MET) Received: from [10.0.0.72] ([10.0.0.72]) by eu-mail.day.com (Lotus Domino Release 5.0.8) with ESMTP id 2005120918104217:16476 ; Fri, 9 Dec 2005 18:10:42 +0100 Message-ID: <4399BA92.1050402@day.com> Date: Fri, 09 Dec 2005 18:10:42 +0100 From: Angela Schreiber User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: jackrabbit-dev@incubator.apache.org Subject: Re: checkins to jcr-server References: <4397F383.1090209@day.com> <439859E5.8050100@osafoundation.org> <439898F5.5070301@zitting.name> <43989F44.7090309@osafoundation.org> <4399564D.3070103@day.com> <4399AAC5.5040506@osafoundation.org> In-Reply-To: <4399AAC5.5040506@osafoundation.org> X-MIMETrack: Itemize by SMTP Server on eu-mail/Day(Release 5.0.8 |June 18, 2001) at 12/09/2005 06:10:42 PM, Serialize by Router on eu-mail/Day(Release 5.0.8 |June 18, 2001) at 12/09/2005 06:10:43 PM, Serialize complete at 12/09/2005 06:10:43 PM Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=ISO-8859-1; format=flowed X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N hi brian thanks for your explanation. Brian Moseley wrote: > > however, i also have to override initProperties in order to initialize > the resource's caldav properties. this is an example of a jcr-server > method that wasn't designed with subclassing in mind. the initProperties is indeed a case where i could see a benefit of the protected access modifier and you may noticed, that i left it protected :). > the fact is, DavResourceImpl is almost perfectly usable for me (it was > less so in the past, but it's much better now after the latest > refactoring). glad to hear > if we keep > extensibility as a primary goal for the simple server, then i'll be able > to reuse your fine work instead of having to copy it and tweaking little > bits here and there. don't get me wrong, i'm not against extensibility and i'm happy if you implementation is useful for you project. but it feels awkward to me, if all private methods of a implementation need to be protected... i could never express things like jukka did, but i agreed. there are a few non-interface methods that are protected, because they cover things that are really implementation specific (nothing to do with Dav-Library in general), but on the other ask for being used by subclasses: - getExportContext - getImportContext - getNode on the other hand there is are a couple of methods, that are just there for improving code readability ('getDavName'), others that i think contain really internal stuff such as 'isLocked', 'isFilteredItem' or 'isJsrLockable'. sometimes i even tend to make private methods for code that i don't feel totally happy with. i want to encapsulate it into a separate method to be able to look at this problem separately. quite often i find those method containing bugs and sometimes they need to be replaced, if i finally found a solution that seems better to me. the 'isLocked' is such a candidate. this is the point about private methods from my point of view. since it's an opensource project, i will not know (and i should not know) about subclasses. but i must pay attention and respect potential subclasses, if a mark a method protected. for methods i can't give this guarantee (for the reasons mentioned above), i think it would not be ok. just one more example: the 'setIsCollection' method in the DavResourceImpl. this one is a hack from my point of view. since i wanted to complete my modifications i left it... but i don't like it a all and i would not want this to be protected. hope you understand, what i'm trying to say. kind regards angela