Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 71370 invoked from network); 2 Jul 2010 08:47:11 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 2 Jul 2010 08:47:11 -0000 Received: (qmail 83013 invoked by uid 500); 2 Jul 2010 08:47:00 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 82967 invoked by uid 500); 2 Jul 2010 08:46:56 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 82960 invoked by uid 99); 2 Jul 2010 08:46:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Jul 2010 08:46:55 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of pajbam@gmail.com designates 74.125.82.44 as permitted sender) Received: from [74.125.82.44] (HELO mail-ww0-f44.google.com) (74.125.82.44) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Jul 2010 08:46:46 +0000 Received: by wwb24 with SMTP id 24so328876wwb.1 for ; Fri, 02 Jul 2010 01:46:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:content-type :mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=SVS4ZNHrsG74aIr2wagz33MG7ghV1Yu5Lab6z3TWdUU=; b=Ewp9/jOtNubOUrRe31V9EV1BiggX3VejwhDDEPGrrXlsowH1I7gog0IETFp8Mi51DI VgD4qS2k6law4ixzsz2tzn8h6mX8RwrprnFn+BIxYIbZuOb5Hf3d/h/AeMW+7qHtfQXo IsEnHyjwXQ4lWRPVDqOnb5GQ/CoFtWokwEmfg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; b=OGySa8fh8BABl8GCKhZdbg1dWlJs0Jpmcjaz5QkZ7KOk6QcUE4eAe81tyIeX8PTzS1 YMmcrkclacVRHPq1M+apUXxayv7WuIq4iVLjs2BtDmGEgMqALtWUX9zBrOL943wcXPW0 w5a4nlC7L4wCUjz8/6ITGPz6BsO91bAo4uxXU= Received: by 10.227.152.79 with SMTP id f15mr224233wbw.180.1278060385823; Fri, 02 Jul 2010 01:46:25 -0700 (PDT) Received: from [10.0.1.3] (def92-4-82-225-58-213.fbx.proxad.net [82.225.58.213]) by mx.google.com with ESMTPS id a1sm2990122wbb.14.2010.07.02.01.46.23 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 02 Jul 2010 01:46:24 -0700 (PDT) Sender: Pierre-Arnaud Marcelot Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1081) Subject: Re: ACITuple refactoring From: Pierre-Arnaud Marcelot In-Reply-To: <4C2D986F.3040802@gmail.com> Date: Fri, 2 Jul 2010 10:46:22 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <4C2D986F.3040802@gmail.com> To: "Apache Directory Developers List" X-Mailer: Apple Mail (2.1081) X-Virus-Checked: Checked by ClamAV on apache.org Hi Emmanuel, On 2 juil. 2010, at 09:42, Emmanuel Lecharny wrote: > Hi guys, >=20 > I'm going deeper into the ACI review. I have done some refactoring : > - The ProtectedItem class now does not contain all the ProtectedItem = subclasses anymore, each one of those classes has now its own Java class > - ACIItemParser is Schema aware. That means we don't manipulate = AttributeType as String. These are two good things... :) > There are a few more things I want to do: > 1) ACITuple constructor takes 6 parameters. I do think it's way too = many, and I'd like to either use setters (but that would make the class = mutable) or define a factory for tuples. > 2) The ACDFEngine checkPermission() and hasPermission() methods, plus = the ACITupleFilter filter() operations take 14 (!!!) parameters. I think = we should refactor those methods to take a data structure instead, = because it's really difficult to debug what's going on, assuming that = depending on the filter, some of the filter's parameters are null, = because useless. > 3) The checkPermission() and hasPermission() methods are most = certainly doing the same thing, I will remove one of them. +1 for the introduction of a simplified constructor (maybe with not = parameter at all) and use setters instead. Same thing for the methods with the idea of a data structure. This is definitely cleaner. I looked at the interface and I think it's the larger method signature = I've ever seen... :D Regards, Pierre-Arnaud=