directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Carlo.Acco...@ibs-ag.com>
Subject RE: Advice for recursive delete?
Date Wed, 26 Nov 2014 04:49:13 GMT
Thanks Kiran.. exactly what we needed!
 

-----Original Message-----
From: Kiran Ayyagari [mailto:kayyagari@apache.org] 
Sent: Tuesday, November 25, 2014 11:18 PM
To: users@directory.apache.org
Subject: Re: Advice for recursive delete?

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
View raw message