Oh and I do agree completely with Stefan's comments as well.  Think of it also this way.  The less surface area exposed by the API the less of an overhead it is to deal with things like deprecation etc.

Alex

On Thu, Jul 23, 2009 at 9:26 AM, Alex Karasulu <akarasulu@gmail.com> wrote:
I like this idea with the DeleteHelper.


On Thu, Jul 23, 2009 at 4:55 AM, Stefan Seelmann <seelmann@apache.org> wrote:
Emmanuel Lecharny wrote:
> Alex Karasulu wrote:
>> Hmmm if I want to delete a tree of entries then I will have no choice
>> but to
>> wrap my LdapDN in a DeleteRequest which I must now create, just to add
>> the
>> control to delete the subtree.
>>
> Yes, true. IMO, your proposal (deleteTree) is probably better.
>

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).

What about putting these helpful convenience methods to a Helper class?
 DeleteHelper.deleteTree( LdapConnection, LdapDN )
 DeleteHelper.deleteChildren( LdapConnection, LdapDN)

My 2 cents,
Stefan



--
Alex Karasulu
My Blog :: http://www.jroller.com/akarasulu/
Apache Directory Server :: http://directory.apache.org
Apache MINA :: http://mina.apache.org




--
Alex Karasulu
My Blog :: http://www.jroller.com/akarasulu/
Apache Directory Server :: http://directory.apache.org
Apache MINA :: http://mina.apache.org