Thanks Kiran.. exactly what we needed! -----Original Message----- From: Kiran Ayyagari [mailto:[email protected]] Sent: Tuesday, November 25, 2014 11:18 PM To: [email protected] Subject: Re: Advice for recursive delete?
On Wed, Nov 26, 2014 at 11:55 AM, <[email protected]> wrote: > Hi, We just loaded up M19 and the new M26 API.. everything working > great so far. Thanks!!! > > perfect :) > We're looking to recursively delete entries from an arbitrary point in > the directory. > After some testing to users, we want to programmatically reload > portions of the tree from a known good running instance. > Before we do this, we must delete everything from below a certain OU, > including nested OU's and user entries. > We have a good solution to reload the system but no elegant way of > recursively deleting. > > see the deleteRecursive() method in ReplicationConsumerImpl[1] this > uses SortControl to delete the entries without opening multiple cursors. You can reuse that code after removing all the replication related parts. [1] http://svn.apache.org/repos/asf/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/consumer/ReplicationConsumerImpl.java > Any ideas are appreciated. > Thank you, > Carlo Accorsi > > > -- Kiran Ayyagari http://keydap.com
