directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r697602 - in /directory/studio/trunk: connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ ldapbrowser-ui/src/main/java/org/apache/d...
Date Sun, 21 Sep 2008 20:25:40 GMT
Author: seelmann
Date: Sun Sep 21 13:25:39 2008
New Revision: 697602

URL: http://svn.apache.org/viewvc?rev=697602&view=rev
Log:
o Fix for DIRSTUDIO-395 (Problems with special chars german Umlauts), usage of LdapDN.getUpName() instead of toString()
o Added UI test for DIRSTUDIO-395
o Updated to ApacheDS 1.5.5-SNAPSHOT and SWTBot 1.2.0.921 for UI tests
o Refresh browser tree after DSML import


Added:
    directory/studio/trunk/test-integration-ui/resources/test-plugins/net.sf.swtbot.eclipse.finder_1.2.0.921.jar   (with props)
    directory/studio/trunk/test-integration-ui/resources/test-plugins/net.sf.swtbot.eclipse.ui_1.2.0.921.jar   (with props)
    directory/studio/trunk/test-integration-ui/resources/test-plugins/net.sf.swtbot.finder_1.2.0.921.jar   (with props)
    directory/studio/trunk/test-integration-ui/src/main/java/log4j.properties
    directory/studio/trunk/test-integration-ui/src/main/java/org/apache/directory/studio/test/integration/ui/ImportExportTest.java
    directory/studio/trunk/test-integration-ui/src/main/resources/org/apache/directory/studio/test/integration/ui/ImportExportTest.ldif
Removed:
    directory/studio/trunk/test-integration-ui/resources/test-plugins/net.sf.swtbot.eclipse.finder_1.2.0.840.jar
    directory/studio/trunk/test-integration-ui/resources/test-plugins/net.sf.swtbot.eclipse.spy_1.2.0.840.jar
    directory/studio/trunk/test-integration-ui/resources/test-plugins/net.sf.swtbot.eclipse.ui_1.2.0.840.jar
    directory/studio/trunk/test-integration-ui/resources/test-plugins/net.sf.swtbot.finder_1.2.0.840.jar
Modified:
    directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/BaseWidgetUtils.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportDsmlJob.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportLdifJob.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/ExportDsmlToWizardPage.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/ImportDsmlMainWizardPage.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/ImportLdifMainWizardPage.java
    directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/SearchResultEntryDsml.java
    directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/AddRequestDsml.java
    directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/AuthRequestDsml.java
    directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/CompareRequestDsml.java
    directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/DelRequestDsml.java
    directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/ModifyDNRequestDsml.java
    directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/ModifyRequestDsml.java
    directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/SearchRequestDsml.java
    directory/studio/trunk/test-integration-core/META-INF/MANIFEST.MF
    directory/studio/trunk/test-integration-core/pom.xml
    directory/studio/trunk/test-integration-ui/META-INF/MANIFEST.MF
    directory/studio/trunk/test-integration-ui/pom.xml
    directory/studio/trunk/test-integration-ui/src/main/java/org/apache/directory/studio/test/integration/ui/SWTBotUtils.java

Modified: directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/BaseWidgetUtils.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/BaseWidgetUtils.java?rev=697602&r1=697601&r2=697602&view=diff
==============================================================================
--- directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/BaseWidgetUtils.java (original)
+++ directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/BaseWidgetUtils.java Sun Sep 21 13:25:39 2008
@@ -121,7 +121,7 @@
     public static Label createWrappedLabel( Composite parent, String text, int span )
     {
         Label l = new Label( parent, SWT.WRAP );
-        GridData gd = new GridData( GridData.HORIZONTAL_ALIGN_FILL );
+        GridData gd = new GridData( GridData.FILL_HORIZONTAL );
         gd.horizontalSpan = span;
         gd.widthHint = 100;
         l.setLayoutData( gd );

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=697602&r1=697601&r2=697602&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 Sun Sep 21 13:25:39 2008
@@ -52,8 +52,10 @@
 import org.apache.directory.shared.ldap.entry.ModificationOperation;
 import org.apache.directory.shared.ldap.message.MessageTypeEnum;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.util.AttributeUtils;
 import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.connection.core.DnUtils;
 import org.apache.directory.studio.connection.core.Connection.AliasDereferencingMethod;
 import org.apache.directory.studio.connection.core.Connection.ReferralHandlingMethod;
 import org.apache.directory.studio.connection.core.io.jndi.StudioNamingEnumeration;
@@ -69,7 +71,10 @@
 import org.apache.directory.studio.dsmlv2.reponse.ModifyResponseDsml;
 import org.apache.directory.studio.dsmlv2.request.BatchRequest;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
+import org.apache.directory.studio.ldapbrowser.core.events.BulkModificationEvent;
+import org.apache.directory.studio.ldapbrowser.core.events.EventRegistry;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
+import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
 import org.apache.directory.studio.ldapbrowser.core.model.SearchParameter;
 
 
@@ -79,7 +84,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class ImportDsmlJob extends AbstractEclipseJob
+public class ImportDsmlJob extends AbstractNotificationJob
 {
     /** The connection to use */
     private IBrowserConnection browserConnection;
@@ -129,8 +134,8 @@
     }
 
 
-    /* (non-Javadoc)
-     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractEclipseJob#getConnections()
+    /**
+     * {@inheritDoc}
      */
     protected Connection[] getConnections()
     {
@@ -139,8 +144,8 @@
     }
 
 
-    /* (non-Javadoc)
-     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractEclipseJob#getLockedObjects()
+    /**
+     * {@inheritDoc}
      */
     protected Object[] getLockedObjects()
     {
@@ -150,10 +155,10 @@
     }
 
 
-    /* (non-Javadoc)
-     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractEclipseJob#executeAsyncJob(org.apache.directory.studio.ldapbrowser.core.jobs.ExtendedProgressMonitor)
+    /**
+     * {@inheritDoc}
      */
-    protected void executeAsyncJob( StudioProgressMonitor monitor )
+    protected void executeNotificationJob( StudioProgressMonitor monitor )
     {
         monitor.beginTask( BrowserCoreMessages.jobs__import_dsml_task, 2 );
         monitor.reportProgress( " " ); //$NON-NLS-1$
@@ -314,7 +319,7 @@
     {
         // Executing the add request
         Entry entry = request.getEntry();
-        browserConnection.getConnection().getJNDIConnectionWrapper().createEntry( entry.getDn().toString(),
+        browserConnection.getConnection().getJNDIConnectionWrapper().createEntry( entry.getDn().getUpName(),
             AttributeUtils.toAttributes( entry ), ReferralHandlingMethod.IGNORE, null, monitor, null );
 
         // Creating the response
@@ -325,6 +330,20 @@
             addResponseDsml.getLdapResult().setMatchedDN( entry.getDn() );
             batchResponseDsml.addResponse( addResponseDsml );
         }
+
+        // Update cached entries
+        LdapDN dn = entry.getDn();
+        IEntry e = browserConnection.getEntryFromCache( dn );
+        LdapDN parentDn = DnUtils.getParent( dn );
+        IEntry parentEntry = parentDn != null ? browserConnection.getEntryFromCache( parentDn ) : null;
+        if ( e != null )
+        {
+            e.setAttributesInitialized( false );
+        }
+        if ( parentEntry != null )
+        {
+            parentEntry.setChildrenInitialized( false );
+        }
     }
 
 
@@ -367,7 +386,7 @@
         StudioProgressMonitor monitor )
     {
         // Executing the del request
-        browserConnection.getConnection().getJNDIConnectionWrapper().deleteEntry( request.getEntry().toString(),
+        browserConnection.getConnection().getJNDIConnectionWrapper().deleteEntry( request.getEntry().getUpName(),
             ReferralHandlingMethod.IGNORE, null, monitor, null );
 
         // Creating the response
@@ -378,6 +397,22 @@
             delResponseDsml.getLdapResult().setMatchedDN( request.getEntry() );
             batchResponseDsml.addResponse( delResponseDsml );
         }
+        
+        // Update cached entries
+        LdapDN dn = request.getEntry();
+        IEntry e = browserConnection.getEntryFromCache( dn );
+        LdapDN parentDn = DnUtils.getParent( dn );
+        IEntry parentEntry = parentDn != null ? browserConnection.getEntryFromCache( parentDn )
+            : null;
+        if ( e != null )
+        {
+            e.setAttributesInitialized( false );
+            browserConnection.uncacheEntryRecursive( e );
+        }
+        if ( parentEntry != null )
+        {
+            parentEntry.setChildrenInitialized( false );
+        }
     }
 
 
@@ -428,7 +463,7 @@
         }
 
         // Executing the modify request
-        browserConnection.getConnection().getJNDIConnectionWrapper().modifyEntry( request.getObject().toString(),
+        browserConnection.getConnection().getJNDIConnectionWrapper().modifyEntry( request.getObject().getUpName(),
             modificationItems.toArray( new ModificationItem[0] ), ReferralHandlingMethod.IGNORE, null, monitor, null );
 
         // Creating the response
@@ -439,6 +474,13 @@
             modifyResponseDsml.getLdapResult().setMatchedDN( request.getObject() );
             batchResponseDsml.addResponse( modifyResponseDsml );
         }
+        
+        LdapDN dn = request.getObject();
+        IEntry e = browserConnection.getEntryFromCache( dn );
+        if ( e != null )
+        {
+            e.setAttributesInitialized( false );
+        }
     }
 
 
@@ -478,8 +520,8 @@
         StudioProgressMonitor monitor )
     {
         // Executing the modify DN request
-        browserConnection.getConnection().getJNDIConnectionWrapper().renameEntry( request.getEntry().toString(),
-            request.getNewRDN().toString(), request.isDeleteOldRDN(), ReferralHandlingMethod.IGNORE, null, monitor,
+        browserConnection.getConnection().getJNDIConnectionWrapper().renameEntry( request.getEntry().getUpName(),
+            request.getNewRDN().getUpName(), request.isDeleteOldRDN(), ReferralHandlingMethod.IGNORE, null, monitor,
             null );
 
         // Creating the response
@@ -490,6 +532,31 @@
             modDNResponseDsml.getLdapResult().setMatchedDN( request.getEntry() );
             batchResponseDsml.addResponse( modDNResponseDsml );
         }
+        
+        // Update cached entries
+        LdapDN dn = request.getEntry();
+        IEntry e = browserConnection.getEntryFromCache( dn );
+        LdapDN parentDn = DnUtils.getParent( dn );
+        IEntry parentEntry = parentDn != null ? browserConnection.getEntryFromCache( parentDn )
+            : null;
+        if ( e != null )
+        {
+            e.setAttributesInitialized( false );
+            browserConnection.uncacheEntryRecursive( e );
+        }
+        if ( parentEntry != null )
+        {
+            parentEntry.setChildrenInitialized( false );
+        }
+        if ( request.getNewSuperior() != null )
+        {
+            LdapDN newSuperiorDn = request.getNewSuperior();
+            IEntry newSuperiorEntry = browserConnection.getEntryFromCache( newSuperiorDn );
+            if ( newSuperiorEntry != null )
+            {
+                newSuperiorEntry.setChildrenInitialized( false );
+            }
+        }
     }
 
 
@@ -511,7 +578,7 @@
         {
             // [Optimization] We're only searching if we need to produce a response
             StudioNamingEnumeration ne = browserConnection.getConnection().getJNDIConnectionWrapper().search(
-                request.getBaseObject().toString(), request.getFilter().toString(), getSearchControls( request ),
+                request.getBaseObject().getUpName(), request.getFilter().toString(), getSearchControls( request ),
                 getAliasDereferencingMethod( request ), ReferralHandlingMethod.IGNORE, null, monitor, null );
 
             SearchParameter sp = new SearchParameter();
@@ -637,11 +704,21 @@
     }
 
 
-    /* (non-Javadoc)
-     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractEclipseJob#getErrorMessage()
+    /**
+     * {@inheritDoc}
      */
     protected String getErrorMessage()
     {
         return BrowserCoreMessages.jobs__import_dsml_error;
     }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    protected void runNotification()
+    {
+        EventRegistry.fireEntryUpdated( new BulkModificationEvent( browserConnection ), this );
+    }
+
 }

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportLdifJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportLdifJob.java?rev=697602&r1=697601&r2=697602&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportLdifJob.java (original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportLdifJob.java Sun Sep 21 13:25:39 2008
@@ -142,7 +142,7 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractEclipseJob#getConnections()
+     * {@inheritDoc}
      */
     protected Connection[] getConnections()
     {
@@ -152,7 +152,7 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractEclipseJob#getLockedObjects()
+     * {@inheritDoc}
      */
     protected Object[] getLockedObjects()
     {
@@ -163,7 +163,7 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractNotificationJob#executeNotificationJob(org.apache.directory.studio.connection.core.jobs.StudioProgressMonitor)
+     * {@inheritDoc}
      */
     protected void executeNotificationJob( StudioProgressMonitor monitor )
     {
@@ -215,7 +215,7 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractEclipseJob#getErrorMessage()
+     * {@inheritDoc}
      */
     protected String getErrorMessage()
     {
@@ -224,7 +224,7 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractNotificationJob#runNotification()
+     * {@inheritDoc}
      */
     protected void runNotification()
     {

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/ExportDsmlToWizardPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/ExportDsmlToWizardPage.java?rev=697602&r1=697601&r2=697602&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/ExportDsmlToWizardPage.java (original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/ExportDsmlToWizardPage.java Sun Sep 21 13:25:39 2008
@@ -25,14 +25,11 @@
 import org.apache.directory.studio.ldapbrowser.ui.BrowserUIConstants;
 import org.apache.directory.studio.ldapbrowser.ui.BrowserUIPlugin;
 import org.apache.directory.studio.ldapbrowser.ui.wizards.ExportDsmlWizard.ExportDsmlWizardSaveAsType;
-import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
 
 
 /**

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/ImportDsmlMainWizardPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/ImportDsmlMainWizardPage.java?rev=697602&r1=697601&r2=697602&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/ImportDsmlMainWizardPage.java (original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/ImportDsmlMainWizardPage.java Sun Sep 21 13:25:39 2008
@@ -105,7 +105,7 @@
         Composite composite = BaseWidgetUtils.createColumnContainer( parent, 3, 1 );
 
         // DSML file
-        BaseWidgetUtils.createLabel( composite, "DSML file:", 1 );
+        BaseWidgetUtils.createLabel( composite, "DSML File:", 1 );
         dsmlFileBrowserWidget = new FileBrowserWidget( "Select a DSML File", EXTENSIONS, FileBrowserWidget.TYPE_OPEN );
         dsmlFileBrowserWidget.createWidget( composite );
         dsmlFileBrowserWidget.addWidgetModifyListener( new WidgetModifyListener()

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/ImportLdifMainWizardPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/ImportLdifMainWizardPage.java?rev=697602&r1=697601&r2=697602&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/ImportLdifMainWizardPage.java (original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/ImportLdifMainWizardPage.java Sun Sep 21 13:25:39 2008
@@ -194,7 +194,7 @@
         Composite composite = BaseWidgetUtils.createColumnContainer( parent, 3, 1 );
 
         // LDIF file
-        BaseWidgetUtils.createLabel( composite, "LDIF file:", 1 );
+        BaseWidgetUtils.createLabel( composite, "LDIF File:", 1 );
         ldifFileBrowserWidget = new FileBrowserWidget( "Select LDIF File", EXTENSIONS, FileBrowserWidget.TYPE_OPEN );
         ldifFileBrowserWidget.createWidget( composite );
         ldifFileBrowserWidget.addWidgetModifyListener( new WidgetModifyListener()

Modified: directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/SearchResultEntryDsml.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/SearchResultEntryDsml.java?rev=697602&r1=697601&r2=697602&view=diff
==============================================================================
--- directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/SearchResultEntryDsml.java (original)
+++ directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/SearchResultEntryDsml.java Sun Sep 21 13:25:39 2008
@@ -78,7 +78,7 @@
     {
         Element element = root.addElement( "searchResultEntry" );
         SearchResultEntry searchResultEntry = ( SearchResultEntry ) instance;
-        element.addAttribute( "dn", searchResultEntry.getObjectName().toString() );
+        element.addAttribute( "dn", searchResultEntry.getObjectName().getUpName() );
 
         Entry entry = searchResultEntry.getEntry();
         for ( EntryAttribute attribute : entry )

Modified: directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/AddRequestDsml.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/AddRequestDsml.java?rev=697602&r1=697601&r2=697602&view=diff
==============================================================================
--- directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/AddRequestDsml.java (original)
+++ directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/AddRequestDsml.java Sun Sep 21 13:25:39 2008
@@ -83,7 +83,7 @@
         // DN
         if ( request.getEntry() != null )
         {
-            element.addAttribute( "dn", request.getEntry().getDn().toString() );
+            element.addAttribute( "dn", request.getEntry().getDn().getUpName() );
         }
 
         // Attributes

Modified: directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/AuthRequestDsml.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/AuthRequestDsml.java?rev=697602&r1=697601&r2=697602&view=diff
==============================================================================
--- directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/AuthRequestDsml.java (original)
+++ directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/AuthRequestDsml.java Sun Sep 21 13:25:39 2008
@@ -72,7 +72,7 @@
         BindRequest request = ( BindRequest ) instance;
 
         // AbandonID
-        String name = request.getName().toString();
+        String name = request.getName().getUpName();
         if ( ( name != null ) && ( !"".equals( name ) ) )
         {
             element.addAttribute( "principal", name );

Modified: directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/CompareRequestDsml.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/CompareRequestDsml.java?rev=697602&r1=697601&r2=697602&view=diff
==============================================================================
--- directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/CompareRequestDsml.java (original)
+++ directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/CompareRequestDsml.java Sun Sep 21 13:25:39 2008
@@ -75,7 +75,7 @@
         // DN
         if ( request.getEntry() != null )
         {
-            element.addAttribute( "dn", request.getEntry().toString() );
+            element.addAttribute( "dn", request.getEntry().getUpName() );
         }
 
         // Assertion

Modified: directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/DelRequestDsml.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/DelRequestDsml.java?rev=697602&r1=697601&r2=697602&view=diff
==============================================================================
--- directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/DelRequestDsml.java (original)
+++ directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/DelRequestDsml.java Sun Sep 21 13:25:39 2008
@@ -75,7 +75,7 @@
         // DN
         if ( request.getEntry() != null )
         {
-            element.addAttribute( "dn", request.getEntry().toString() );
+            element.addAttribute( "dn", request.getEntry().getUpName() );
         }
 
         return element;

Modified: directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/ModifyDNRequestDsml.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/ModifyDNRequestDsml.java?rev=697602&r1=697601&r2=697602&view=diff
==============================================================================
--- directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/ModifyDNRequestDsml.java (original)
+++ directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/ModifyDNRequestDsml.java Sun Sep 21 13:25:39 2008
@@ -76,13 +76,13 @@
         // DN
         if ( request.getEntry() != null )
         {
-            element.addAttribute( "dn", request.getEntry().toString() );
+            element.addAttribute( "dn", request.getEntry().getUpName() );
         }
 
         // NewRDN
         if ( request.getNewRDN() != null )
         {
-            element.addAttribute( "newrdn", request.getNewRDN().toString() );
+            element.addAttribute( "newrdn", request.getNewRDN().getUpName() );
         }
 
         // DeleteOldRDN
@@ -91,7 +91,7 @@
         // NewSuperior
         if ( request.getNewRDN() != null )
         {
-            element.addAttribute( "newSuperior", request.getNewSuperior().toString() );
+            element.addAttribute( "newSuperior", request.getNewSuperior().getUpName() );
         }
 
         return element;

Modified: directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/ModifyRequestDsml.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/ModifyRequestDsml.java?rev=697602&r1=697601&r2=697602&view=diff
==============================================================================
--- directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/ModifyRequestDsml.java (original)
+++ directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/ModifyRequestDsml.java Sun Sep 21 13:25:39 2008
@@ -83,7 +83,7 @@
         // DN
         if ( request.getObject() != null )
         {
-            element.addAttribute( "dn", request.getObject().toString() );
+            element.addAttribute( "dn", request.getObject().getUpName() );
         }
 
         // Modifications

Modified: directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/SearchRequestDsml.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/SearchRequestDsml.java?rev=697602&r1=697601&r2=697602&view=diff
==============================================================================
--- directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/SearchRequestDsml.java (original)
+++ directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/SearchRequestDsml.java Sun Sep 21 13:25:39 2008
@@ -91,7 +91,7 @@
         // DN
         if ( request.getBaseObject() != null )
         {
-            element.addAttribute( "dn", request.getBaseObject().toString() );
+            element.addAttribute( "dn", request.getBaseObject().getUpName() );
         }
 
         // Scope

Modified: directory/studio/trunk/test-integration-core/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/directory/studio/trunk/test-integration-core/META-INF/MANIFEST.MF?rev=697602&r1=697601&r2=697602&view=diff
==============================================================================
--- directory/studio/trunk/test-integration-core/META-INF/MANIFEST.MF (original)
+++ directory/studio/trunk/test-integration-core/META-INF/MANIFEST.MF Sun Sep 21 13:25:39 2008
@@ -11,41 +11,41 @@
  org.junit
 Bundle-ClassPath: .,
  lib/antlr-2.7.7.jar,
- lib/apacheds-bootstrap-extract-1.5.4-SNAPSHOT.jar,
- lib/apacheds-bootstrap-partition-1.5.4-SNAPSHOT.jar,
- lib/apacheds-btree-base-1.5.4-SNAPSHOT.jar,
- lib/apacheds-core-1.5.4-SNAPSHOT.jar,
- lib/apacheds-core-avl-1.5.4-SNAPSHOT.jar,
- lib/apacheds-core-constants-1.5.4-SNAPSHOT.jar,
- lib/apacheds-core-cursor-1.5.4-SNAPSHOT.jar,
- lib/apacheds-core-entry-1.5.4-SNAPSHOT.jar,
- lib/apacheds-core-integ-1.5.4-SNAPSHOT.jar,
- lib/apacheds-core-jndi-1.5.4-SNAPSHOT.jar,
- lib/apacheds-core-shared-1.5.4-SNAPSHOT.jar,
- lib/apacheds-core-unit-1.5.4-SNAPSHOT.jar,
- lib/apacheds-interceptor-kerberos-1.5.4-SNAPSHOT.jar,
- lib/apacheds-jdbm-1.5.4-SNAPSHOT.jar,
- lib/apacheds-jdbm-store-1.5.4-SNAPSHOT.jar,
- lib/apacheds-kerberos-shared-1.5.4-SNAPSHOT.jar,
- lib/apacheds-protocol-ldap-1.5.4-SNAPSHOT.jar,
- lib/apacheds-protocol-shared-1.5.4-SNAPSHOT.jar,
- lib/apacheds-schema-bootstrap-1.5.4-SNAPSHOT.jar,
- lib/apacheds-schema-extras-1.5.4-SNAPSHOT.jar,
- lib/apacheds-schema-registries-1.5.4-SNAPSHOT.jar,
- lib/apacheds-server-jndi-1.5.4-SNAPSHOT.jar,
- lib/apacheds-server-unit-1.5.4-SNAPSHOT.jar,
- lib/apacheds-utils-1.5.4-SNAPSHOT.jar,
- lib/apacheds-xdbm-search-1.5.4-SNAPSHOT.jar,
- lib/apacheds-xdbm-tools-1.5.4-SNAPSHOT.jar,
+ lib/apacheds-bootstrap-extract-1.5.5-SNAPSHOT.jar,
+ lib/apacheds-bootstrap-partition-1.5.5-SNAPSHOT.jar,
+ lib/apacheds-core-1.5.5-SNAPSHOT.jar,
+ lib/apacheds-core-avl-1.5.5-SNAPSHOT.jar,
+ lib/apacheds-core-constants-1.5.5-SNAPSHOT.jar,
+ lib/apacheds-core-cursor-1.5.5-SNAPSHOT.jar,
+ lib/apacheds-core-entry-1.5.5-SNAPSHOT.jar,
+ lib/apacheds-core-integ-1.5.5-SNAPSHOT.jar,
+ lib/apacheds-core-jndi-1.5.5-SNAPSHOT.jar,
+ lib/apacheds-core-shared-1.5.5-SNAPSHOT.jar,
+ lib/apacheds-core-unit-1.5.5-SNAPSHOT.jar,
+ lib/apacheds-interceptor-kerberos-1.5.5-SNAPSHOT.jar,
+ lib/apacheds-jdbm-1.5.5-SNAPSHOT.jar,
+ lib/apacheds-jdbm-store-1.5.5-SNAPSHOT.jar,
+ lib/apacheds-kerberos-shared-1.5.5-SNAPSHOT.jar,
+ lib/apacheds-protocol-ldap-1.5.5-SNAPSHOT.jar,
+ lib/apacheds-protocol-shared-1.5.5-SNAPSHOT.jar,
+ lib/apacheds-schema-bootstrap-1.5.5-SNAPSHOT.jar,
+ lib/apacheds-schema-extras-1.5.5-SNAPSHOT.jar,
+ lib/apacheds-schema-registries-1.5.5-SNAPSHOT.jar,
+ lib/apacheds-server-jndi-1.5.5-SNAPSHOT.jar,
+ lib/apacheds-server-unit-1.5.5-SNAPSHOT.jar,
+ lib/apacheds-utils-1.5.5-SNAPSHOT.jar,
+ lib/apacheds-xdbm-base-1.5.5-SNAPSHOT.jar,
+ lib/apacheds-xdbm-search-1.5.5-SNAPSHOT.jar,
+ lib/apacheds-xdbm-tools-1.5.5-SNAPSHOT.jar,
  lib/commons-collections-3.2.jar,
  lib/commons-io-1.3.2.jar,
  lib/commons-lang-2.3.jar,
- lib/mina-core-1.1.6.jar,
- lib/mina-filter-ssl-1.1.6.jar,
+ lib/mina-core-1.1.7.jar,
+ lib/mina-filter-ssl-1.1.7.jar,
  lib/nlog4j-1.2.25.jar,
  lib/shared-asn1-0.9.13-SNAPSHOT.jar,
- lib/shared-asn1-codec-0.9.12-SNAPSHOT.jar,
- lib/shared-bouncycastle-reduced-0.9.12-SNAPSHOT.jar,
+ lib/shared-asn1-codec-0.9.13-SNAPSHOT.jar,
+ lib/shared-bouncycastle-reduced-0.9.13-SNAPSHOT.jar,
  lib/shared-ldap-0.9.13-SNAPSHOT.jar,
  lib/shared-ldap-constants-0.9.13-SNAPSHOT.jar,
- lib/slf4j-api-1.4.3.jar
+ lib/slf4j-api-1.5.2.jar

Modified: directory/studio/trunk/test-integration-core/pom.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/test-integration-core/pom.xml?rev=697602&r1=697601&r2=697602&view=diff
==============================================================================
--- directory/studio/trunk/test-integration-core/pom.xml (original)
+++ directory/studio/trunk/test-integration-core/pom.xml Sun Sep 21 13:25:39 2008
@@ -283,12 +283,12 @@
     <dependency>
       <groupId>org.apache.directory.server</groupId>
       <artifactId>apacheds-server-unit</artifactId>
-      <version>1.5.4-SNAPSHOT</version>
+      <version>1.5.5-SNAPSHOT</version>
     </dependency> 
     <dependency>
       <groupId>org.apache.directory.server</groupId>
       <artifactId>apacheds-core-integ</artifactId>
-      <version>1.5.4-SNAPSHOT</version>
+      <version>1.5.5-SNAPSHOT</version>
     </dependency> 
     <dependency>
       <groupId>junit</groupId>

Modified: directory/studio/trunk/test-integration-ui/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/directory/studio/trunk/test-integration-ui/META-INF/MANIFEST.MF?rev=697602&r1=697601&r2=697602&view=diff
==============================================================================
--- directory/studio/trunk/test-integration-ui/META-INF/MANIFEST.MF (original)
+++ directory/studio/trunk/test-integration-ui/META-INF/MANIFEST.MF Sun Sep 21 13:25:39 2008
@@ -18,41 +18,41 @@
  net.sf.swtbot.eclipse.finder
 Bundle-ClassPath: .,
  lib/antlr-2.7.7.jar,
- lib/apacheds-bootstrap-extract-1.5.4-SNAPSHOT.jar,
- lib/apacheds-bootstrap-partition-1.5.4-SNAPSHOT.jar,
- lib/apacheds-btree-base-1.5.4-SNAPSHOT.jar,
- lib/apacheds-core-1.5.4-SNAPSHOT.jar,
- lib/apacheds-core-avl-1.5.4-SNAPSHOT.jar,
- lib/apacheds-core-constants-1.5.4-SNAPSHOT.jar,
- lib/apacheds-core-cursor-1.5.4-SNAPSHOT.jar,
- lib/apacheds-core-entry-1.5.4-SNAPSHOT.jar,
- lib/apacheds-core-integ-1.5.4-SNAPSHOT.jar,
- lib/apacheds-core-jndi-1.5.4-SNAPSHOT.jar,
- lib/apacheds-core-shared-1.5.4-SNAPSHOT.jar,
- lib/apacheds-core-unit-1.5.4-SNAPSHOT.jar,
- lib/apacheds-interceptor-kerberos-1.5.4-SNAPSHOT.jar,
- lib/apacheds-jdbm-1.5.4-SNAPSHOT.jar,
- lib/apacheds-jdbm-store-1.5.4-SNAPSHOT.jar,
- lib/apacheds-kerberos-shared-1.5.4-SNAPSHOT.jar,
- lib/apacheds-protocol-ldap-1.5.4-SNAPSHOT.jar,
- lib/apacheds-protocol-shared-1.5.4-SNAPSHOT.jar,
- lib/apacheds-schema-bootstrap-1.5.4-SNAPSHOT.jar,
- lib/apacheds-schema-extras-1.5.4-SNAPSHOT.jar,
- lib/apacheds-schema-registries-1.5.4-SNAPSHOT.jar,
- lib/apacheds-server-jndi-1.5.4-SNAPSHOT.jar,
- lib/apacheds-server-unit-1.5.4-SNAPSHOT.jar,
- lib/apacheds-utils-1.5.4-SNAPSHOT.jar,
- lib/apacheds-xdbm-search-1.5.4-SNAPSHOT.jar,
- lib/apacheds-xdbm-tools-1.5.4-SNAPSHOT.jar,
+ lib/apacheds-bootstrap-extract-1.5.5-SNAPSHOT.jar,
+ lib/apacheds-bootstrap-partition-1.5.5-SNAPSHOT.jar,
+ lib/apacheds-core-1.5.5-SNAPSHOT.jar,
+ lib/apacheds-core-avl-1.5.5-SNAPSHOT.jar,
+ lib/apacheds-core-constants-1.5.5-SNAPSHOT.jar,
+ lib/apacheds-core-cursor-1.5.5-SNAPSHOT.jar,
+ lib/apacheds-core-entry-1.5.5-SNAPSHOT.jar,
+ lib/apacheds-core-integ-1.5.5-SNAPSHOT.jar,
+ lib/apacheds-core-jndi-1.5.5-SNAPSHOT.jar,
+ lib/apacheds-core-shared-1.5.5-SNAPSHOT.jar,
+ lib/apacheds-core-unit-1.5.5-SNAPSHOT.jar,
+ lib/apacheds-interceptor-kerberos-1.5.5-SNAPSHOT.jar,
+ lib/apacheds-jdbm-1.5.5-SNAPSHOT.jar,
+ lib/apacheds-jdbm-store-1.5.5-SNAPSHOT.jar,
+ lib/apacheds-kerberos-shared-1.5.5-SNAPSHOT.jar,
+ lib/apacheds-protocol-ldap-1.5.5-SNAPSHOT.jar,
+ lib/apacheds-protocol-shared-1.5.5-SNAPSHOT.jar,
+ lib/apacheds-schema-bootstrap-1.5.5-SNAPSHOT.jar,
+ lib/apacheds-schema-extras-1.5.5-SNAPSHOT.jar,
+ lib/apacheds-schema-registries-1.5.5-SNAPSHOT.jar,
+ lib/apacheds-server-jndi-1.5.5-SNAPSHOT.jar,
+ lib/apacheds-server-unit-1.5.5-SNAPSHOT.jar,
+ lib/apacheds-utils-1.5.5-SNAPSHOT.jar,
+ lib/apacheds-xdbm-base-1.5.5-SNAPSHOT.jar,
+ lib/apacheds-xdbm-search-1.5.5-SNAPSHOT.jar,
+ lib/apacheds-xdbm-tools-1.5.5-SNAPSHOT.jar,
  lib/commons-collections-3.2.jar,
  lib/commons-io-1.3.2.jar,
  lib/commons-lang-2.3.jar,
- lib/mina-core-1.1.6.jar,
- lib/mina-filter-ssl-1.1.6.jar,
+ lib/mina-core-1.1.7.jar,
+ lib/mina-filter-ssl-1.1.7.jar,
  lib/nlog4j-1.2.25.jar,
  lib/shared-asn1-0.9.13-SNAPSHOT.jar,
- lib/shared-asn1-codec-0.9.12-SNAPSHOT.jar,
- lib/shared-bouncycastle-reduced-0.9.12-SNAPSHOT.jar,
+ lib/shared-asn1-codec-0.9.13-SNAPSHOT.jar,
+ lib/shared-bouncycastle-reduced-0.9.13-SNAPSHOT.jar,
  lib/shared-ldap-0.9.13-SNAPSHOT.jar,
  lib/shared-ldap-constants-0.9.13-SNAPSHOT.jar,
- lib/slf4j-api-1.4.3.jar
+ lib/slf4j-api-1.5.2.jar

Modified: directory/studio/trunk/test-integration-ui/pom.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/test-integration-ui/pom.xml?rev=697602&r1=697601&r2=697602&view=diff
==============================================================================
--- directory/studio/trunk/test-integration-ui/pom.xml (original)
+++ directory/studio/trunk/test-integration-ui/pom.xml Sun Sep 21 13:25:39 2008
@@ -291,12 +291,12 @@
     <dependency>
       <groupId>org.apache.directory.server</groupId>
       <artifactId>apacheds-server-unit</artifactId>
-      <version>1.5.4-SNAPSHOT</version>
+      <version>1.5.5-SNAPSHOT</version>
     </dependency> 
     <dependency>
       <groupId>org.apache.directory.server</groupId>
       <artifactId>apacheds-core-integ</artifactId>
-      <version>1.5.4-SNAPSHOT</version>
+      <version>1.5.5-SNAPSHOT</version>
     </dependency> 
     <dependency>
       <groupId>junit</groupId>

Added: directory/studio/trunk/test-integration-ui/resources/test-plugins/net.sf.swtbot.eclipse.finder_1.2.0.921.jar
URL: http://svn.apache.org/viewvc/directory/studio/trunk/test-integration-ui/resources/test-plugins/net.sf.swtbot.eclipse.finder_1.2.0.921.jar?rev=697602&view=auto
==============================================================================
Binary file - no diff available.

Propchange: directory/studio/trunk/test-integration-ui/resources/test-plugins/net.sf.swtbot.eclipse.finder_1.2.0.921.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/studio/trunk/test-integration-ui/resources/test-plugins/net.sf.swtbot.eclipse.ui_1.2.0.921.jar
URL: http://svn.apache.org/viewvc/directory/studio/trunk/test-integration-ui/resources/test-plugins/net.sf.swtbot.eclipse.ui_1.2.0.921.jar?rev=697602&view=auto
==============================================================================
Binary file - no diff available.

Propchange: directory/studio/trunk/test-integration-ui/resources/test-plugins/net.sf.swtbot.eclipse.ui_1.2.0.921.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/studio/trunk/test-integration-ui/resources/test-plugins/net.sf.swtbot.finder_1.2.0.921.jar
URL: http://svn.apache.org/viewvc/directory/studio/trunk/test-integration-ui/resources/test-plugins/net.sf.swtbot.finder_1.2.0.921.jar?rev=697602&view=auto
==============================================================================
Binary file - no diff available.

Propchange: directory/studio/trunk/test-integration-ui/resources/test-plugins/net.sf.swtbot.finder_1.2.0.921.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/studio/trunk/test-integration-ui/src/main/java/log4j.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/test-integration-ui/src/main/java/log4j.properties?rev=697602&view=auto
==============================================================================
--- directory/studio/trunk/test-integration-ui/src/main/java/log4j.properties (added)
+++ directory/studio/trunk/test-integration-ui/src/main/java/log4j.properties Sun Sep 21 13:25:39 2008
@@ -0,0 +1,7 @@
+log4j.rootLogger=INFO, A1
+log4j.appender.A1=org.apache.log4j.ConsoleAppender
+log4j.appender.A1.layout=org.apache.log4j.PatternLayout
+log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
+
+#log4j.logger.net.sf.swtbot.finder.MenuFinder=DEBUG
+#log4j.logger.net.sf.swtbot.matcher=TRACE

Added: directory/studio/trunk/test-integration-ui/src/main/java/org/apache/directory/studio/test/integration/ui/ImportExportTest.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/test-integration-ui/src/main/java/org/apache/directory/studio/test/integration/ui/ImportExportTest.java?rev=697602&view=auto
==============================================================================
--- directory/studio/trunk/test-integration-ui/src/main/java/org/apache/directory/studio/test/integration/ui/ImportExportTest.java (added)
+++ directory/studio/trunk/test-integration-ui/src/main/java/org/apache/directory/studio/test/integration/ui/ImportExportTest.java Sun Sep 21 13:25:39 2008
@@ -0,0 +1,256 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+
+package org.apache.directory.studio.test.integration.ui;
+
+
+import java.io.File;
+import java.net.URL;
+
+import net.sf.swtbot.eclipse.finder.SWTEclipseBot;
+import net.sf.swtbot.wait.DefaultCondition;
+import net.sf.swtbot.widgets.SWTBotTree;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.directory.server.unit.AbstractServerTest;
+import org.eclipse.core.runtime.Platform;
+
+
+/**
+ * Tests the import and export (LDIF, DSML).
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ImportExportTest extends AbstractServerTest
+{
+    private SWTEclipseBot bot;
+
+
+    protected void setUp() throws Exception
+    {
+        super.setUp();
+        super.loadTestLdif( false );
+        bot = new SWTEclipseBot();
+        SWTBotUtils.openLdapPerspective( bot );
+        SWTBotUtils.createTestConnection( bot, "ImportExportTest", ldapService.getIpPort() );
+    }
+
+
+    protected void tearDown() throws Exception
+    {
+        SWTBotUtils.deleteTestConnections();
+        bot = null;
+        super.tearDown();
+    }
+
+
+    /**
+     * Test for DIRSTUDIO-395.
+     * 
+     * <li>export an entry with German umlaut in DN to LDIF</li>
+     * <li>verify that exported LDIF starts with the Base64 encoded DN</li>
+     * <li>delete the entry</li>
+     * <li>import the exported LDIF</li>
+     * <li>verify that entry with umlaut exists</li>
+     * 
+     * @throws Exception the exception
+     */
+    public void testExportImportLdifWithGermanUmlautInDN() throws Exception
+    {
+        URL url = Platform.getInstanceLocation().getURL();
+        String file = url.getFile() + "ImportExportTest.ldif";
+
+        final SWTBotTree browserTree = SWTBotUtils.getLdapBrowserTree( bot );
+
+        SWTBotUtils.selectEntry( bot, browserTree, false, "DIT", "Root DSE", "ou=system", "ou=users",
+            "cn=Wolfgang K\u00f6lbel" );
+
+        // export LDIF
+        SWTBotUtils.asyncClick( bot, browserTree.contextMenu( "LDIF Export..." ), new DefaultCondition()
+        {
+            public boolean test() throws Exception
+            {
+                return bot.shell( "LDIF Export" ) != null;
+            }
+
+
+            public String getFailureMessage()
+            {
+                return "Could not find dialog 'LDIF Export'";
+            }
+        } );
+        bot.button( "Next >" ).click();
+        bot.comboBoxWithLabel( "LDIF File:" ).setText( file );
+        bot.button( "Finish" ).click();
+
+        // verify that exported LDIF starts with the Base64 encoded DN 
+        String content = FileUtils.readFileToString( new File( file ) );
+        assertTrue( "LDIF must start with Base64 encoded DN.", content
+            .startsWith( "dn:: Y249V29sZmdhbmcgS8O2bGJlbCxvdT11c2VycyxvdT1zeXN0ZW0=" ) );
+
+        // delete entry
+        SWTBotUtils.asyncClick( bot, browserTree.contextMenu( "Delete Entry" ), new DefaultCondition()
+        {
+            public boolean test() throws Exception
+            {
+                return bot.shell( "Delete Entry" ) != null;
+            }
+
+
+            public String getFailureMessage()
+            {
+                return "Could not find dialog 'New Entry'";
+            }
+        } );
+        SWTBotUtils.asyncClick( bot, bot.button( "OK" ), new DefaultCondition()
+        {
+            public boolean test() throws Exception
+            {
+                return browserTree.selection().get( 0 ).get( 0 ).startsWith( "ou=users" );
+            }
+
+
+            public String getFailureMessage()
+            {
+                return "Could not select 'ou=system'";
+            }
+        } );
+
+        // import LDIF
+        SWTBotUtils.asyncClick( bot, browserTree.contextMenu( "LDIF Import..." ), new DefaultCondition()
+        {
+            public boolean test() throws Exception
+            {
+                return bot.shell( "LDIF Import" ) != null;
+            }
+
+
+            public String getFailureMessage()
+            {
+                return "Could not find dialog 'LDIF Import'";
+            }
+        } );
+        bot.comboBoxWithLabel( "LDIF File:" ).setText( file );
+        bot.button( "Finish" ).click();
+
+        // verify that entry with umlaut exists
+        SWTBotUtils.selectEntry( bot, browserTree, false, "DIT", "Root DSE", "ou=system", "ou=users",
+            "cn=Wolfgang K\u00f6lbel" );
+    }
+
+
+    /**
+     * Test for DIRSTUDIO-395.
+     * 
+     * <li>export an entry with German umlaut in DN to DSML</li>
+     * <li>verify that exported DSML starts with the Base64 encoded DN</li>
+     * <li>delete the entry</li>
+     * <li>import the exported DSML</li>
+     * <li>verify that entry with umlaut exists</li>
+     * 
+     * @throws Exception the exception
+     */
+    public void testExportImportDsmlWithGermanUmlautInDN() throws Exception
+    {
+        URL url = Platform.getInstanceLocation().getURL();
+        String file = url.getFile() + "ImportExportTest.dsml";
+
+        final SWTBotTree browserTree = SWTBotUtils.getLdapBrowserTree( bot );
+
+        SWTBotUtils.selectEntry( bot, browserTree, false, "DIT", "Root DSE", "ou=system", "ou=users",
+            "cn=Wolfgang K\u00f6lbel" );
+        bot.sleep( 2000 );
+
+        // export DSML
+        SWTBotUtils.asyncClick( bot, browserTree.contextMenu( "DSML Export..." ), new DefaultCondition()
+        {
+            public boolean test() throws Exception
+            {
+                return bot.shell( "DSML Export" ) != null;
+            }
+
+
+            public String getFailureMessage()
+            {
+                return "Could not find dialog 'DSML Export'";
+            }
+        } );
+        bot.button( "Next >" ).click();
+        bot.comboBoxWithLabel( "DSML File:" ).setText( file );
+        bot.radio( "DSML Request" ).click();
+        bot.button( "Finish" ).click();
+
+        // verify that exported DSML contains the Base64 encoded DN 
+        String content = FileUtils.readFileToString( new File( file ) );
+        assertTrue( "DSML must contain DN with umlaut.", content
+            .contains( "dn=\"cn=Wolfgang Kölbel,ou=users,ou=system\"" ) );
+
+        // delete entry
+        SWTBotUtils.asyncClick( bot, browserTree.contextMenu( "Delete Entry" ), new DefaultCondition()
+        {
+            public boolean test() throws Exception
+            {
+                return bot.shell( "Delete Entry" ) != null;
+            }
+
+
+            public String getFailureMessage()
+            {
+                return "Could not find dialog 'New Entry'";
+            }
+        } );
+        SWTBotUtils.asyncClick( bot, bot.button( "OK" ), new DefaultCondition()
+        {
+            public boolean test() throws Exception
+            {
+                return browserTree.selection().get( 0 ).get( 0 ).startsWith( "ou=users" );
+            }
+
+
+            public String getFailureMessage()
+            {
+                return "Could not select 'ou=system'";
+            }
+        } );
+
+        // import DSML
+        SWTBotUtils.asyncClick( bot, browserTree.contextMenu( "DSML Import..." ), new DefaultCondition()
+        {
+            public boolean test() throws Exception
+            {
+                return bot.shell( "DSML Import" ) != null;
+            }
+
+
+            public String getFailureMessage()
+            {
+                return "Could not find dialog 'LDIF Import'";
+            }
+        } );
+        bot.comboBoxWithLabel( "DSML File:" ).setText( file );
+        bot.button( "Finish" ).click();
+
+        // verify that entry with umlaut exists
+        SWTBotUtils.selectEntry( bot, browserTree, false, "DIT", "Root DSE", "ou=system", "ou=users",
+            "cn=Wolfgang K\u00f6lbel" );
+    }
+
+}

Modified: directory/studio/trunk/test-integration-ui/src/main/java/org/apache/directory/studio/test/integration/ui/SWTBotUtils.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/test-integration-ui/src/main/java/org/apache/directory/studio/test/integration/ui/SWTBotUtils.java?rev=697602&r1=697601&r2=697602&view=diff
==============================================================================
--- directory/studio/trunk/test-integration-ui/src/main/java/org/apache/directory/studio/test/integration/ui/SWTBotUtils.java (original)
+++ directory/studio/trunk/test-integration-ui/src/main/java/org/apache/directory/studio/test/integration/ui/SWTBotUtils.java Sun Sep 21 13:25:39 2008
@@ -85,7 +85,7 @@
         {
             // no 'Connections' view, continue to open the LDAP perspective
         }
-        
+
         // open "Open Perspective" dialog
         SWTBotMenu windowMenu = eBot.menu( "Window" );
         windowMenu.click();
@@ -116,7 +116,7 @@
                 return "Could not find widget";
             }
         } );
-        
+
         // close welcome view, if it is there
         try
         {

Added: directory/studio/trunk/test-integration-ui/src/main/resources/org/apache/directory/studio/test/integration/ui/ImportExportTest.ldif
URL: http://svn.apache.org/viewvc/directory/studio/trunk/test-integration-ui/src/main/resources/org/apache/directory/studio/test/integration/ui/ImportExportTest.ldif?rev=697602&view=auto
==============================================================================
--- directory/studio/trunk/test-integration-ui/src/main/resources/org/apache/directory/studio/test/integration/ui/ImportExportTest.ldif (added)
+++ directory/studio/trunk/test-integration-ui/src/main/resources/org/apache/directory/studio/test/integration/ui/ImportExportTest.ldif Sun Sep 21 13:25:39 2008
@@ -0,0 +1,8 @@
+dn:: Y249V29sZmdhbmcgS8O2bGJlbCxvdT11c2VycyxvdT1zeXN0ZW0=
+objectClass: person
+objectClass: organizationalPerson
+objectClass: inetOrgPerson
+objectClass: top
+cn:: V29sZmdhbmcgS8O2bGJlbA==
+sn:: S8O2bGJlbA==
+



Mime
View raw message