On Thu, Jul 23, 2009 at 7:25 AM, Emmanuel Lecharny <email@example.com>
You may be right. If the server does not support the control, what should we do ? Implement the recursive deletion cliennt side ? That does not make a lot of sense, IMO.
Stefan Seelmann wrote:
Emmanuel Lecharny wrote:
Alex Karasulu wrote:
Hmmm if I want to delete a tree of entries then I will have no choice
Yes, true. IMO, your proposal (deleteTree) is probably better.
wrap my LdapDN in a DeleteRequest which I must now create, just to add
control to delete the subtree.
I think the main API shouldn't be overloaded with too much convenience
methods and should be close to the LDAP protocol. I also think the main
API should not implement such algorithms (if server supports
TreeDeleteControl use it, else search/delete recursively).
Maybe we can split the API in two parts :
What about putting these helpful convenience methods to a Helper class?
DeleteHelper.deleteTree( LdapConnection, LdapDN )
DeleteHelper.deleteChildren( LdapConnection, LdapDN)
- the core API
- an extended API (something like ldapx, as Sun define a javax)
Pretty much agree but maybe we don't have to go to that degree. The helpers recommended sound nice.