On Thu, Aug 5, 2010 at 3:56 PM, Francois <[email protected]> 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.
-- Alex Karasulu My Blog :: http://www.jroller.com/akarasulu/ Apache Directory Server :: http://directory.apache.org Apache MINA :: http://mina.apache.org To set up a meeting with me: http://tungle.me/AlexKarasulu
