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