You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2009/01/29 11:11:14 UTC

svn commit: r738811 - /directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/IntegrationUtils.java

Author: elecharny
Date: Thu Jan 29 10:11:13 2009
New Revision: 738811

URL: http://svn.apache.org/viewvc?rev=738811&view=rev
Log:
Apply Aleksander patch for DIRSERVER-1300

Modified:
    directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/IntegrationUtils.java

Modified: directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/IntegrationUtils.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/IntegrationUtils.java?rev=738811&r1=738810&r2=738811&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/IntegrationUtils.java (original)
+++ directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/IntegrationUtils.java Thu Jan 29 10:11:13 2009
@@ -101,6 +101,23 @@
         {
             service.getAdminSession().add( 
                 new DefaultServerEntry( service.getRegistries(), entry.getEntry() ) ); 
+            if ( entry.isChangeAdd() )
+            {
+                service.getAdminSession().add( 
+                    new DefaultServerEntry( service.getRegistries(), entry.getEntry() ) );
+            }
+            else if ( entry.isChangeModify() )
+            {
+                service.getAdminSession().modify( 
+                    entry.getDn(), entry.getModificationItems() );
+            }
+            else
+            {
+                String message = "Unsupported changetype found in LDIF: " + 
+                    entry.getChangeType();
+                LOG.error( message );
+                throw new NamingException( message );
+            }
         }
     }