directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kiran Ayyagari <kayyag...@apache.org>
Subject Re: Advice for recursive delete?
Date Wed, 26 Nov 2014 04:18:14 GMT
On Wed, Nov 26, 2014 at 11:55 AM, <Carlo.Accorsi@ibs-ag.com> 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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message