directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r1002358 - in /directory: apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ shared/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/ shared/trunk/ldap-client-api/src/mai...
Date Tue, 28 Sep 2010 21:17:07 GMT
Author: seelmann
Date: Tue Sep 28 21:17:07 2010
New Revision: 1002358

URL: http://svn.apache.org/viewvc?rev=1002358&view=rev
Log:
Delete api.listener package, interfaces aren't used.

Removed:
    directory/shared/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/
Modified:
    directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientDeleteRequestTest.java
    directory/shared/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java

Modified: directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientDeleteRequestTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientDeleteRequestTest.java?rev=1002358&r1=1002357&r2=1002358&view=diff
==============================================================================
--- directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientDeleteRequestTest.java
(original)
+++ directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientDeleteRequestTest.java
Tue Sep 28 21:17:07 2010
@@ -36,7 +36,6 @@ import java.util.concurrent.atomic.Atomi
 import org.apache.directory.ldap.client.api.LdapAsyncConnection;
 import org.apache.directory.ldap.client.api.LdapNetworkConnection;
 import org.apache.directory.ldap.client.api.future.DeleteFuture;
-import org.apache.directory.ldap.client.api.listener.DeleteListener;
 import org.apache.directory.server.annotations.CreateLdapServer;
 import org.apache.directory.server.annotations.CreateTransport;
 import org.apache.directory.server.core.CoreSession;
@@ -190,8 +189,7 @@ public class ClientDeleteRequestTest ext
 
         assertTrue( session.exists( dn ) );
 
-        Method deleteChildrenMethod = connection.getClass().getDeclaredMethod( "deleteRecursive",
DN.class, Map.class,
-            DeleteListener.class );
+        Method deleteChildrenMethod = connection.getClass().getDeclaredMethod( "deleteRecursive",
DN.class, Map.class );
         deleteChildrenMethod.setAccessible( true );
 
         DeleteResponse response = ( DeleteResponse ) deleteChildrenMethod.invoke( connection,
dn, null, null );
@@ -213,22 +211,11 @@ public class ClientDeleteRequestTest ext
 
         assertTrue( session.exists( dn ) );
 
-        Method deleteChildrenMethod = connection.getClass().getDeclaredMethod( "deleteRecursive",
DN.class, Map.class,
-            DeleteListener.class );
+        Method deleteChildrenMethod = connection.getClass().getDeclaredMethod( "deleteRecursive",
DN.class, Map.class );
         deleteChildrenMethod.setAccessible( true );
 
         final AtomicInteger count = new AtomicInteger();
 
-        DeleteListener listener = new DeleteListener()
-        {
-            public void entryDeleted( LdapAsyncConnection connection, DeleteResponse response
) throws LdapException
-            {
-                assertNotNull( response );
-                assertEquals( ResultCodeEnum.SUCCESS, response.getLdapResult().getResultCode()
);
-                count.incrementAndGet();
-            }
-        };
-
         try
         {
             connection.deleteTree( dn );

Modified: directory/shared/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java?rev=1002358&r1=1002357&r2=1002358&view=diff
==============================================================================
--- directory/shared/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
(original)
+++ directory/shared/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
Tue Sep 28 21:17:07 2010
@@ -56,7 +56,6 @@ import org.apache.directory.ldap.client.
 import org.apache.directory.ldap.client.api.future.ModifyFuture;
 import org.apache.directory.ldap.client.api.future.ResponseFuture;
 import org.apache.directory.ldap.client.api.future.SearchFuture;
-import org.apache.directory.ldap.client.api.listener.DeleteListener;
 import org.apache.directory.ldap.client.api.protocol.LdapProtocolCodecFactory;
 import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.asn1.codec.DecoderException;
@@ -2476,10 +2475,9 @@ public class LdapNetworkConnection exten
      *
      * @param dn the DN which will be removed after removing its children
      * @param map a map to hold the Cursor related to a DN
-     * @param listener  the delete operation response listener
      * @throws LdapException If the DN is not valid or if the deletion failed
      */
-    private DeleteResponse deleteRecursive( DN dn, Map<DN, Cursor<Response>>
cursorMap, DeleteListener listener )
+    private DeleteResponse deleteRecursive( DN dn, Map<DN, Cursor<Response>>
cursorMap )
         throws LdapException
     {
         LOG.debug( "searching for {}", dn.getName() );
@@ -2520,7 +2518,7 @@ public class LdapNetworkConnection exten
                     if ( searchResp instanceof SearchResultEntry )
                     {
                         SearchResultEntry searchResult = ( SearchResultEntry ) searchResp;
-                        deleteRecursive( searchResult.getEntry().getDn(), cursorMap, listener
);
+                        deleteRecursive( searchResult.getEntry().getDn(), cursorMap );
                     }
                 }
                 while ( cursor.next() );



Mime
View raw message