From dev-return-39719-apmail-directory-dev-archive=directory.apache.org@directory.apache.org Fri Dec 2 09:28:23 2011 Return-Path: X-Original-To: apmail-directory-dev-archive@www.apache.org Delivered-To: apmail-directory-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 21707996E for ; Fri, 2 Dec 2011 09:28:23 +0000 (UTC) Received: (qmail 25891 invoked by uid 500); 2 Dec 2011 09:28:22 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 25819 invoked by uid 500); 2 Dec 2011 09:28:21 -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 25812 invoked by uid 99); 2 Dec 2011 09:28:20 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Dec 2011 09:28:20 +0000 Received: from localhost (HELO emmanuel-lecharnys-MacBook-Pro.local) (127.0.0.1) (smtp-auth username elecharny, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Dec 2011 09:28:19 +0000 Message-ID: <4ED89A28.7050505@apache.org> Date: Fri, 02 Dec 2011 10:28:08 +0100 From: =?UTF-8?B?RW1tYW51ZWwgTMOpY2hhcm55?= Reply-To: elecharny@apache.org Organization: The Apache Software Foundation User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: Apache Directory Developers List Subject: Re: We may need to add a hasChildren() method in the Partition interface References: <4ED89186.1080603@gmail.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 12/2/11 10:14 AM, Pierre-Arnaud Marcelot wrote: > +1 > > Definitely a good utility method to have. > > But I feel that the verification that the entry is a leaf and does not have any children, in the case of a delete operation, should be done by a higher level interceptor (or class). > I'm not sure this scenario should be verified on each partition type but that a higher class (DirectoryService maybe) should take the responsibility to ask the underlying partition if the entry is a leaf and then ask it to delete the entry. This is what was done before, but using a search request, which was costly. If we have a hasChildren(Dn) on the Interceptor interface too, then it would be possible. -- Regards, Cordialement, Emmanuel Lécharny www.iktek.com