directory-api mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <elecha...@gmail.com>
Subject DN API polishing
Date Thu, 05 Aug 2010 11:17:52 GMT
  Hi guys,

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.

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.

2) The JNDI related methods like toName( DN ) and fromName( Name ) have 
been moved to the JndiUtils class. There is no reason to make the DN api 
more heavy than strictly than necessary, IMO

3) There are helper methods like normalize( DN, OIDMap ), normalize( 
String, OIDMap ) or normalize( OIDMap ) that does not belong to the DN 
public API : theyr are used by tests. I think they should also be 
removed from the DN api.

thoughts ?

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


Mime
View raw message