directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pierre-Arnaud Marcelot>
Subject Re: We may need to add a hasChildren() method in the Partition interface
Date Fri, 02 Dec 2011 09:32:49 GMT

On 2 déc. 2011, at 10:28, Emmanuel Lécharny wrote:

> 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.

Indeed, and depending on the partition implementation, we might not even have to run a one
level search to find the children (me may have some kind of index that we could use on some
sort of partitions).


> -- 
> Regards,
> Cordialement,
> Emmanuel Lécharny

View raw message