directory-api mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <elecha...@gmail.com>
Subject Re: DN API polishing
Date Thu, 05 Aug 2010 22:37:36 GMT
  On 8/5/10 8:33 PM, Alex Karasulu wrote:
> On Thu, Aug 5, 2010 at 3:56 PM, Francois<fanf42@gmail.com>  wrote:
>
>> On 05/08/2010 13:17, Emmanuel Lecharny wrote:
>>
>>> Hi guys,
>>>
>>
>> Hello,
>>
>> Reply in the text underneath
>>
>>
>>   I'm in the process of polishing the API now that Kiran has included many
>>> of the missing parts. It raised some questions :
>>>
>>> 1) there are 3 different methods that give back the list of RDNs :
>>> - getAll()
>>> - iterator()
>>> - getRdns()
>>>
>>> One of them is obviously a duplicate. The getAll() is a remaining taint
>>> of the ancient JNDI API : DN was implementing Name back 5 years ago. I
>>> don't think we need it anymore.
>>>
>>
>> Agree with that.
>>
>>
>>
>>   The iterator() and getRdns() are doing the exact same thing, which is
>>> different from the getAll() mtehod : there return the inner RDNs in the
>>> revert order.
>>>
>>> For instance, if we have a DN like 'dc=c, dc=b, dc=a', there each of
>>> those three methods will return RDNs in the following order :
>>> o getRdns() and iterator() :
>>> 'dc=c' then 'dc=b' then 'dc=a'
>>> o getAll() will do the opposite :
>>> 'dc=a' then 'dc=b' then 'dc=c'
>>>
>>> I think that the iterator() method should behave as the getAll() method
>>> does, and getRdns() should keep the internal order (as it simply return
>>> the inner field storing the rdns.
>>>
>>
>> I'm not really sure we need the two... A reverse is really easy to do if
>> getRdns return a list, and as you said, there is no need to make DN api
>> heavier than needed...
>>
>> About the return type, I would prefer to have a collection I could use
>> directly (a List, or even better an immutable list or a list of copies of
>> RDN) than an iterator.
>>
>>
>>
> +1 on immutable list.
>
The returned list is now immutable.

All the other modifications have been applied, except the ones on 
normalize() methods.


-- 
Regards,
Cordialement,
Emmanuel L├ęcharny
www.iktek.com


Mime
View raw message