directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r695528 - /directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportDsmlJob.java
Date Mon, 15 Sep 2008 16:15:55 GMT
Author: pamarcelot
Date: Mon Sep 15 09:15:55 2008
New Revision: 695528

URL: http://svn.apache.org/viewvc?rev=695528&view=rev
Log:
Part of a fix for DIRSTUDIO-355 (DSML Import and Export fail with "Internal Error: null").
	o Code cleaning
	o Added matchedDn attributes to the responses.

Modified:
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportDsmlJob.java

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportDsmlJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportDsmlJob.java?rev=695528&r1=695527&r2=695528&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportDsmlJob.java
(original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportDsmlJob.java
Mon Sep 15 09:15:55 2008
@@ -65,6 +65,7 @@
 import org.apache.directory.studio.dsmlv2.reponse.CompareResponseDsml;
 import org.apache.directory.studio.dsmlv2.reponse.DelResponseDsml;
 import org.apache.directory.studio.dsmlv2.reponse.ExtendedResponseDsml;
+import org.apache.directory.studio.dsmlv2.reponse.ModDNResponseDsml;
 import org.apache.directory.studio.dsmlv2.reponse.ModifyResponseDsml;
 import org.apache.directory.studio.dsmlv2.request.BatchRequest;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
@@ -221,9 +222,6 @@
         catch ( Exception e )
         {
             monitor.reportError( e );
-
-            // TODO Remove this
-            e.printStackTrace();
         }
     }
 
@@ -324,6 +322,7 @@
         {
             AddResponseDsml addResponseDsml = new AddResponseDsml();
             addResponseDsml.setLdapResult( getLdapResult( monitor, MessageTypeEnum.ADD_REQUEST
) );
+            addResponseDsml.getLdapResult().setMatchedDN( entry.getDn() );
             batchResponseDsml.addResponse( addResponseDsml );
         }
     }
@@ -437,6 +436,7 @@
         {
             ModifyResponseDsml modifyResponseDsml = new ModifyResponseDsml();
             modifyResponseDsml.setLdapResult( getLdapResult( monitor, MessageTypeEnum.MODIFY_REQUEST
) );
+            modifyResponseDsml.getLdapResult().setMatchedDN( request.getObject() );
             batchResponseDsml.addResponse( modifyResponseDsml );
         }
     }
@@ -482,9 +482,13 @@
             request.getNewRDN().toString(), request.isDeleteOldRDN(), ReferralHandlingMethod.IGNORE,
null, monitor,
             null );
 
-        if ( monitor.errorsReported() )
+        // Creating the response
+        if ( batchResponseDsml != null )
         {
-            monitor.getException().printStackTrace();
+            ModDNResponseDsml modDNResponseDsml = new ModDNResponseDsml();
+            modDNResponseDsml.setLdapResult( getLdapResult( monitor, MessageTypeEnum.MOD_DN_REQUEST
) );
+            modDNResponseDsml.getLdapResult().setMatchedDN( request.getEntry() );
+            batchResponseDsml.addResponse( modDNResponseDsml );
         }
     }
 
@@ -640,5 +644,4 @@
     {
         return BrowserCoreMessages.jobs__import_dsml_error;
     }
-
 }



Mime
View raw message