directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <elecha...@apache.org>
Subject Re: Client API : Delete request
Date Thu, 30 Jul 2009 23:05:12 GMT
So to freeze the delete() API, do we agree on that :

- delete( DN ) will handle the LDAP protocol, nothing more (no control, 
nothing, no recursive deletion )
- delete( DeleteRequest ) will allow an advanced user to stuff the 
deleteRequest object with whatever controls he wants
- delete( DeleteRequest, Listener ) do the exact same thing, asynchronously

And we can add something like :
- delete( String dn ) for convenience

Plus regarding the recursive deletion :

- deleteTree( DN ) will handle the LDAP protocol, nothing more (no 
control, nothing, no recursive deletion )
- deleteTree( String dn ) for convenience
- deleteTree( DeleteRequest ) will allow an advanced user to stuff the 
deleteRequest object with whatever controls he wants
- deleteTree( DeleteRequest, Listener ) do the exact same thing, 
asynchronously

Does it sounds good to you ?

PS : I was first considering the extended/helper things a good idea, but 
the more I think about it, the less I'm convinced it's convenient. Most 
new-ldappers really think that calling delete(DN) will remoive the entry 
*and* all of its children. Seing the deleteTree() method in the same 
LdapConnection class may help them to understand the difference.

Also I see that the current code is using a boolean flag to do that, and 
I don't think it's comfortable. The semantic is not as clear as a 
deleteTree() method, IMHO.

wdyt ?

PS: I have updated the wiki to reflect this proposal, I have kept the 
code as it was.

-- 
--
cordialement, regards,
Emmanuel L├ęcharny
www.iktek.com
directory.apache.org



Mime
View raw message