directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r591817 [4/4] - in /directory/studio/trunk: studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/ studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/ studio-ldapbrow...
Date Sun, 04 Nov 2007 19:10:26 GMT
Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/entry/EntryEditorNavigationLocation.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/entry/EntryEditorNavigationLocation.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/entry/EntryEditorNavigationLocation.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/entry/EntryEditorNavigationLocation.java Sun Nov  4 11:10:19 2007
@@ -21,15 +21,16 @@
 package org.apache.directory.studio.ldapbrowser.ui.editors.entry;
 
 
+import javax.naming.InvalidNameException;
+
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCorePlugin;
-import org.apache.directory.studio.ldapbrowser.core.model.DN;
 import org.apache.directory.studio.ldapbrowser.core.model.IBookmark;
 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.IRootDSE;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearch;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearchResult;
-import org.apache.directory.studio.ldapbrowser.core.model.NameException;
 import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.IMemento;
 import org.eclipse.ui.INavigationLocation;
@@ -72,7 +73,7 @@
                 }
                 else
                 {
-                    return "Entry " + eei.getEntryInput().getDn().toString();
+                    return "Entry " + eei.getEntryInput().getDn().getUpName();
                 }
             }
             else if ( eei.getSearchResultInput() != null )
@@ -83,7 +84,7 @@
                 }
                 else
                 {
-                    return "Search Result " + eei.getSearchResultInput().getDn().toString();
+                    return "Search Result " + eei.getSearchResultInput().getDn().getUpName();
                 }
             }
             else if ( eei.getBookmarkInput() != null )
@@ -94,7 +95,7 @@
                 }
                 else
                 {
-                    return "Bookmark " + eei.getBookmarkInput().getDn().toString();
+                    return "Bookmark " + eei.getBookmarkInput().getDn().getUpName();
                 }
             }
         }
@@ -114,14 +115,14 @@
             {
                 IEntry entry = eei.getEntryInput();
                 memento.putString( "TYPE", "IEntry" );
-                memento.putString( "DN", entry.getDn().toString() );
+                memento.putString( "DN", entry.getDn().getUpName() );
                 memento.putString( "CONNECTION", entry.getBrowserConnection().getConnection().getId() );
             }
             else if ( eei.getSearchResultInput() != null )
             {
                 ISearchResult searchResult = eei.getSearchResultInput();
                 memento.putString( "TYPE", "ISearchResult" );
-                memento.putString( "DN", searchResult.getDn().toString() );
+                memento.putString( "DN", searchResult.getDn().getUpName() );
                 memento.putString( "SEARCH", searchResult.getSearch().getName() );
                 memento.putString( "CONNECTION", searchResult.getSearch().getBrowserConnection().getConnection().getId() );
             }
@@ -149,7 +150,7 @@
             {
                 IBrowserConnection connection = BrowserCorePlugin.getDefault().getConnectionManager().getBrowserConnectionById(
                     memento.getString( "CONNECTION" ) );
-                DN dn = new DN( memento.getString( "DN" ) );
+                LdapDN dn = new LdapDN( memento.getString( "DN" ) );
                 IEntry entry = connection.getEntryFromCache( dn );
                 super.setInput( new EntryEditorInput( entry ) );
             }
@@ -159,7 +160,7 @@
                     memento.getString( "CONNECTION" ) );
                 ISearch search = connection.getSearchManager().getSearch( memento.getString( "SEARCH" ) );
                 ISearchResult[] searchResults = search.getSearchResults();
-                DN dn = new DN( memento.getString( "DN" ) );
+                LdapDN dn = new LdapDN( memento.getString( "DN" ) );
                 for ( int i = 0; i < searchResults.length; i++ )
                 {
                     if ( dn.equals( searchResults[i].getDn() ) )
@@ -177,7 +178,7 @@
                 super.setInput( new EntryEditorInput( bookmark ) );
             }
         }
-        catch ( NameException e )
+        catch ( InvalidNameException e )
         {
             e.printStackTrace();
         }

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorContentProvider.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorContentProvider.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorContentProvider.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorContentProvider.java Sun Nov  4 11:10:19 2007
@@ -130,7 +130,7 @@
             }
 
             // url += search.getURL();
-            url += "Search Base: " + search.getSearchBase().toString() + "  -  ";
+            url += "Search Base: " + search.getSearchBase().getUpName() + "  -  ";
             url += "Filter: " + search.getFilter();
 
             boolean showDn = BrowserUIPlugin.getDefault().getPreferenceStore().getBoolean(

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorFilter.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorFilter.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorFilter.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorFilter.java Sun Nov  4 11:10:19 2007
@@ -130,7 +130,7 @@
             // }
             // }
             if ( this.showDn
-                && searchResult.getDn().toString().toUpperCase().indexOf( this.quickFilterValue.toUpperCase() ) > -1 )
+                && searchResult.getDn().getUpName().toUpperCase().indexOf( this.quickFilterValue.toUpperCase() ) > -1 )
             {
                 return true;
             }

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorLabelProvider.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorLabelProvider.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorLabelProvider.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorLabelProvider.java Sun Nov  4 11:10:19 2007
@@ -91,7 +91,7 @@
 
                 if ( property == BrowserUIConstants.DN )
                 {
-                    return result.getDn().toString();
+                    return result.getDn().getUpName();
                 }
                 else
                 {

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorSorter.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorSorter.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorSorter.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorSorter.java Sun Nov  4 11:10:19 2007
@@ -258,7 +258,8 @@
 
         if ( attributeName == BrowserUIConstants.DN )
         {
-            return compare( entry1.getDn().toString(), entry2.getDn().toString() );
+            // compare normalized names
+            return compare( entry1.getDn().getNormName(), entry2.getDn().getNormName() );
         }
         else
         {

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorUniversalListener.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorUniversalListener.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorUniversalListener.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorUniversalListener.java Sun Nov  4 11:10:19 2007
@@ -731,7 +731,7 @@
 
                     // dnLink.setText("<a>"+sr.getDn().toString()+"</a>");
                     dnLink.setData( sr );
-                    dnLink.setText( sr.getDn().toString() );
+                    dnLink.setText( sr.getDn().getUpName() );
                     dnLink.setUnderlined( true );
                     dnLink.setFont( item.getFont() );
                     dnLink.setForeground( item.getForeground() );

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/BatchOperationApplyOnWizardPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/BatchOperationApplyOnWizardPage.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/BatchOperationApplyOnWizardPage.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/BatchOperationApplyOnWizardPage.java Sun Nov  4 11:10:19 2007
@@ -26,19 +26,20 @@
 import java.util.List;
 import java.util.Set;
 
+import javax.naming.InvalidNameException;
+
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.studio.ldapbrowser.common.actions.BrowserSelectionUtils;
 import org.apache.directory.studio.ldapbrowser.common.widgets.BaseWidgetUtils;
 import org.apache.directory.studio.ldapbrowser.common.widgets.WidgetModifyEvent;
 import org.apache.directory.studio.ldapbrowser.common.widgets.WidgetModifyListener;
 import org.apache.directory.studio.ldapbrowser.common.widgets.search.SearchPageWrapper;
-import org.apache.directory.studio.ldapbrowser.core.model.DN;
 import org.apache.directory.studio.ldapbrowser.core.model.IAttribute;
 import org.apache.directory.studio.ldapbrowser.core.model.IBookmark;
 import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearch;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearchResult;
 import org.apache.directory.studio.ldapbrowser.core.model.IValue;
-import org.apache.directory.studio.ldapbrowser.core.model.NameException;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection.ReferralHandlingMethod;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.wizard.WizardPage;
@@ -60,7 +61,7 @@
 
     private String[] initCurrentSelectionTexts;
 
-    private DN[][] initCurrentSelectionDns;
+    private LdapDN[][] initCurrentSelectionDns;
 
     private ISearch initSearch;
 
@@ -164,7 +165,7 @@
     }
 
 
-    public DN[] getApplyOnDns()
+    public LdapDN[] getApplyOnDns()
     {
         if ( currentSelectionButton.getSelection() )
         {
@@ -227,22 +228,22 @@
         IAttribute[] attributes = BrowserSelectionUtils.getAttributes( selection );
         IValue[] values = BrowserSelectionUtils.getValues( selection );
 
-        List textList = new ArrayList();
-        List dnsList = new ArrayList();
+        List<String> textList = new ArrayList<String>();
+        List<LdapDN[]> dnsList = new ArrayList<LdapDN[]>();
 
         if ( attributes.length + values.length > 0 )
         {
-            Set internalDnSet = new LinkedHashSet();
+            Set<LdapDN> internalDnSet = new LinkedHashSet<LdapDN>();
             for ( int v = 0; v < values.length; v++ )
             {
                 if ( values[v].isString() )
                 {
                     try
                     {
-                        DN dn = new DN( values[v].getStringValue() );
+                        LdapDN dn = new LdapDN( values[v].getStringValue() );
                         internalDnSet.add( dn );
                     }
-                    catch ( NameException e )
+                    catch ( InvalidNameException e )
                     {
                     }
                 }
@@ -257,10 +258,10 @@
                     {
                         try
                         {
-                            DN dn = new DN( vals[v].getStringValue() );
+                            LdapDN dn = new LdapDN( vals[v].getStringValue() );
                             internalDnSet.add( dn );
                         }
-                        catch ( NameException e )
+                        catch ( InvalidNameException e )
                         {
                         }
                     }
@@ -269,26 +270,26 @@
 
             if ( !internalDnSet.isEmpty() )
             {
-                dnsList.add( internalDnSet.toArray( new DN[internalDnSet.size()] ) );
+                dnsList.add( internalDnSet.toArray( new LdapDN[internalDnSet.size()] ) );
                 textList.add( "DNs of selected Attributes (" + internalDnSet.size() + " Entries)" );
             }
         }
         if ( searches.length == 1 && searches[0].getSearchResults() != null )
         {
-            Set internalDnSet = new LinkedHashSet();
+            Set<LdapDN> internalDnSet = new LinkedHashSet<LdapDN>();
             ISearchResult[] srs = searches[0].getSearchResults();
             for ( int i = 0; i < srs.length; i++ )
             {
                 internalDnSet.add( srs[i].getDn() );
             }
 
-            dnsList.add( internalDnSet.toArray( new DN[internalDnSet.size()] ) );
+            dnsList.add( internalDnSet.toArray( new LdapDN[internalDnSet.size()] ) );
             textList.add( "Search Results of '" + searches[0].getName() + "' (" + searches[0].getSearchResults().length
                 + " Entries)" );
         }
         if ( entries.length + searchResults.length + bookmarks.length > 0 )
         {
-            Set internalDnSet = new LinkedHashSet();
+            Set<LdapDN> internalDnSet = new LinkedHashSet<LdapDN>();
             for ( int i = 0; i < entries.length; i++ )
             {
                 internalDnSet.add( entries[i].getDn() );
@@ -302,12 +303,12 @@
                 internalDnSet.add( bookmarks[i].getDn() );
             }
 
-            dnsList.add( internalDnSet.toArray( new DN[internalDnSet.size()] ) );
+            dnsList.add( internalDnSet.toArray( new LdapDN[internalDnSet.size()] ) );
             textList.add( "Selected Entries (" + internalDnSet.size() + " Entries)" );
         }
 
-        this.initCurrentSelectionTexts = ( String[] ) textList.toArray( new String[textList.size()] );
-        this.initCurrentSelectionDns = ( DN[][] ) dnsList.toArray( new DN[0][0] );
+        this.initCurrentSelectionTexts = textList.toArray( new String[textList.size()] );
+        this.initCurrentSelectionDns = dnsList.toArray( new LdapDN[0][0] );
 
     }
 

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/BatchOperationWizard.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/BatchOperationWizard.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/BatchOperationWizard.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/BatchOperationWizard.java Sun Nov  4 11:10:19 2007
@@ -21,12 +21,12 @@
 package org.apache.directory.studio.ldapbrowser.ui.wizards;
 
 
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.ldapbrowser.common.actions.BrowserSelectionUtils;
 import org.apache.directory.studio.ldapbrowser.common.jobs.RunnableContextJobAdapter;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreConstants;
 import org.apache.directory.studio.ldapbrowser.core.jobs.SearchJob;
-import org.apache.directory.studio.ldapbrowser.core.model.DN;
 import org.apache.directory.studio.ldapbrowser.core.model.IAttribute;
 import org.apache.directory.studio.ldapbrowser.core.model.IBookmark;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
@@ -293,7 +293,7 @@
             }
 
             // get DNs
-            DN[] dns = applyOnPage.getApplyOnDns();
+            LdapDN[] dns = applyOnPage.getApplyOnDns();
             if ( dns == null )
             {
                 if ( applyOnPage.getApplyOnSearch() != null )
@@ -307,7 +307,7 @@
                         if ( job.getExternalResult().isOK() )
                         {
                             ISearchResult[] srs = search.getSearchResults();
-                            dns = new DN[srs.length];
+                            dns = new LdapDN[srs.length];
                             for ( int i = 0; i < srs.length; i++ )
                             {
                                 dns[i] = srs[i].getDn();
@@ -319,12 +319,11 @@
 
             if ( dns != null )
             {
-
                 StringBuffer ldif = new StringBuffer();
                 for ( int i = 0; i < dns.length; i++ )
                 {
                     ldif.append( "dn: " );
-                    ldif.append( dns[i].toString() );
+                    ldif.append( dns[i].getUpName() );
                     ldif.append( BrowserCoreConstants.LINE_SEPARATOR );
                     ldif.append( ldifFragment );
                     ldif.append( BrowserCoreConstants.LINE_SEPARATOR );

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewBookmarkMainWizardPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewBookmarkMainWizardPage.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewBookmarkMainWizardPage.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewBookmarkMainWizardPage.java Sun Nov  4 11:10:19 2007
@@ -21,11 +21,11 @@
 package org.apache.directory.studio.ldapbrowser.ui.wizards;
 
 
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.studio.ldapbrowser.common.widgets.BaseWidgetUtils;
 import org.apache.directory.studio.ldapbrowser.common.widgets.WidgetModifyEvent;
 import org.apache.directory.studio.ldapbrowser.common.widgets.WidgetModifyListener;
 import org.apache.directory.studio.ldapbrowser.common.widgets.search.EntryWidget;
-import org.apache.directory.studio.ldapbrowser.core.model.DN;
 import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
 import org.eclipse.jface.wizard.WizardPage;
 import org.eclipse.swt.SWT;
@@ -124,7 +124,7 @@
         Composite innerComposite = BaseWidgetUtils.createColumnContainer( composite, 3, 1 );
 
         BaseWidgetUtils.createLabel( innerComposite, "Bookmark Name:", 1 );
-        bookmarkNameText = BaseWidgetUtils.createText( innerComposite, entry.getDn().toString(), 2 );
+        bookmarkNameText = BaseWidgetUtils.createText( innerComposite, entry.getDn().getUpName(), 2 );
         bookmarkNameText.setFocus();
         bookmarkNameText.addModifyListener( new ModifyListener()
         {
@@ -158,7 +158,7 @@
      * 
      * @return the bookmark dn
      */
-    public DN getBookmarkDn()
+    public LdapDN getBookmarkDn()
     {
         return bookmarkEntryWidget.getDn();
     }

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewBookmarkWizard.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewBookmarkWizard.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewBookmarkWizard.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewBookmarkWizard.java Sun Nov  4 11:10:19 2007
@@ -21,10 +21,10 @@
 package org.apache.directory.studio.ldapbrowser.ui.wizards;
 
 
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.studio.ldapbrowser.common.widgets.browser.BrowserCategory;
 import org.apache.directory.studio.ldapbrowser.common.widgets.browser.BrowserEntryPage;
 import org.apache.directory.studio.ldapbrowser.common.widgets.browser.BrowserSearchResultPage;
-import org.apache.directory.studio.ldapbrowser.core.model.DN;
 import org.apache.directory.studio.ldapbrowser.core.model.IAttribute;
 import org.apache.directory.studio.ldapbrowser.core.model.IBookmark;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
@@ -200,7 +200,7 @@
         if ( selectedEntry != null )
         {
             String name = mainPage.getBookmarkName();
-            DN dn = mainPage.getBookmarkDn();
+            LdapDN dn = mainPage.getBookmarkDn();
             IBookmark bookmark = new Bookmark( selectedEntry.getBrowserConnection(), dn, name );
             selectedEntry.getBrowserConnection().getBookmarkManager().addBookmark( bookmark );
         }

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewEntryDnWizardPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewEntryDnWizardPage.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewEntryDnWizardPage.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewEntryDnWizardPage.java Sun Nov  4 11:10:19 2007
@@ -22,23 +22,25 @@
 
 
 import java.util.Arrays;
+import java.util.Iterator;
 
+import org.apache.directory.shared.ldap.name.AttributeTypeAndValue;
+import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.Rdn;
 import org.apache.directory.studio.ldapbrowser.common.jobs.RunnableContextJobAdapter;
 import org.apache.directory.studio.ldapbrowser.common.widgets.DnBuilderWidget;
 import org.apache.directory.studio.ldapbrowser.common.widgets.WidgetModifyEvent;
 import org.apache.directory.studio.ldapbrowser.common.widgets.WidgetModifyListener;
 import org.apache.directory.studio.ldapbrowser.core.events.EventRegistry;
 import org.apache.directory.studio.ldapbrowser.core.jobs.ReadEntryJob;
-import org.apache.directory.studio.ldapbrowser.core.model.DN;
 import org.apache.directory.studio.ldapbrowser.core.model.IAttribute;
 import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
 import org.apache.directory.studio.ldapbrowser.core.model.IValue;
-import org.apache.directory.studio.ldapbrowser.core.model.RDN;
-import org.apache.directory.studio.ldapbrowser.core.model.RDNPart;
 import org.apache.directory.studio.ldapbrowser.core.model.impl.Attribute;
 import org.apache.directory.studio.ldapbrowser.core.model.impl.DummyEntry;
 import org.apache.directory.studio.ldapbrowser.core.model.impl.Value;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.Subschema;
+import org.apache.directory.studio.ldapbrowser.core.utils.DnUtils;
 import org.apache.directory.studio.ldapbrowser.ui.BrowserUIConstants;
 import org.apache.directory.studio.ldapbrowser.ui.BrowserUIPlugin;
 import org.eclipse.jface.dialogs.MessageDialog;
@@ -125,17 +127,17 @@
         Subschema subschema = newEntry.getSubschema();
         String[] attributeNames = subschema.getAllAttributeNames();
 
-        DN parentDn = null;
-        if ( newEntry.getDn().getParentDn() != null )
+        LdapDN parentDn = null;
+        if ( DnUtils.getParent( newEntry.getDn() ) != null )
         {
-            parentDn = newEntry.getDn().getParentDn();
+            parentDn = DnUtils.getParent( newEntry.getDn() );
         }
         else if ( wizard.getSelectedEntry() != null )
         {
             parentDn = wizard.getSelectedEntry().getDn();
         }
 
-        RDN rdn = newEntry.getRdn();
+        Rdn rdn = newEntry.getRdn();
 
         dnBuilderWidget.setInput( wizard.getSelectedConnection(), attributeNames, rdn, parentDn );
     }
@@ -153,42 +155,50 @@
             EventRegistry.suspendEventFireingInCurrentThread();
 
             // remove old RDN
-            RDNPart[] oldRdnParts = newEntry.getRdn().getParts();
-            for ( int i = 0; i < oldRdnParts.length; i++ )
+            if( newEntry.getRdn().size() > 0 )
             {
-                IAttribute attribute = newEntry.getAttribute( oldRdnParts[i].getType() );
-                if ( attribute != null )
+                Iterator<AttributeTypeAndValue> atavIterator = newEntry.getRdn().iterator();
+                while(atavIterator.hasNext())
                 {
-                    IValue[] values = attribute.getValues();
-                    for ( int v = 0; v < values.length; v++ )
+                    AttributeTypeAndValue atav = atavIterator.next();
+                    IAttribute attribute = newEntry.getAttribute( atav.getUpType() );
+                    if ( attribute != null )
                     {
-                        if ( values[v].getStringValue().equals( oldRdnParts[i].getUnencodedValue() ) )
+                        IValue[] values = attribute.getValues();
+                        for ( int v = 0; v < values.length; v++ )
                         {
-                            attribute.deleteValue( values[v] );
+                            if ( values[v].getStringValue().equals( atav.getUpValue() ) )
+                            {
+                                attribute.deleteValue( values[v] );
+                            }
                         }
                     }
                 }
             }
 
             // set new DN
-            DN dn = new DN( dnBuilderWidget.getRdn(), dnBuilderWidget.getParentDn() );
+            LdapDN dn = DnUtils.composeDn( dnBuilderWidget.getRdn(), dnBuilderWidget.getParentDn() );
             newEntry.setDn( dn );
 
             // add new RDN
-            RDNPart[] newRdnParts = dn.getRdn().getParts();
-            for ( int i = 0; i < newRdnParts.length; i++ )
+            if( dn.getRdn().size() > 0 )
             {
-                IAttribute rdnAttribute = newEntry.getAttribute( newRdnParts[i].getType() );
-                if ( rdnAttribute == null )
+                Iterator<AttributeTypeAndValue> atavIterator = dn.getRdn().iterator();
+                while(atavIterator.hasNext())
                 {
-                    rdnAttribute = new Attribute( newEntry, newRdnParts[i].getType() );
-                    newEntry.addAttribute( rdnAttribute );
-                }
-                String rdnValue = newRdnParts[i].getUnencodedValue();
-                String[] stringValues = rdnAttribute.getStringValues();
-                if ( !Arrays.asList( stringValues ).contains( rdnValue ) )
-                {
-                    rdnAttribute.addValue( new Value( rdnAttribute, rdnValue ) );
+                    AttributeTypeAndValue atav = atavIterator.next();
+                    IAttribute rdnAttribute = newEntry.getAttribute( atav.getUpType() );
+                    if ( rdnAttribute == null )
+                    {
+                        rdnAttribute = new Attribute( newEntry, atav.getUpType() );
+                        newEntry.addAttribute( rdnAttribute );
+                    }
+                    Object rdnValue = atav.getUpValue();
+                    String[] stringValues = rdnAttribute.getStringValues();
+                    if ( !Arrays.asList( stringValues ).contains( rdnValue ) )
+                    {
+                        rdnAttribute.addValue( new Value( rdnAttribute, rdnValue ) );
+                    }
                 }
             }
 
@@ -239,16 +249,14 @@
      */
     public IWizardPage getNextPage()
     {
-
         dnBuilderWidget.validate();
-        final RDN[] rdns = new RDN[]
-            { dnBuilderWidget.getRdn() };
-        final DN[] parentDns = new DN[]
-            { dnBuilderWidget.getParentDn() };
-        final DN dn = new DN( rdns[0], parentDns[0] );
+        
+        Rdn rdn = dnBuilderWidget.getRdn();
+        LdapDN parentDn = dnBuilderWidget.getParentDn();
+        final LdapDN dn = DnUtils.composeDn( rdn, parentDn );
 
         // check if parent exists or new entry already exists
-        ReadEntryJob readEntryJob1 = new ReadEntryJob( wizard.getSelectedConnection(), parentDns[0] );
+        ReadEntryJob readEntryJob1 = new ReadEntryJob( wizard.getSelectedConnection(), parentDn );
         RunnableContextJobAdapter.execute( readEntryJob1, getContainer(), false );
         IEntry parentEntry = readEntryJob1.getReadEntry();
         if ( parentEntry == null )

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewEntryTypeWizardPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewEntryTypeWizardPage.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewEntryTypeWizardPage.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewEntryTypeWizardPage.java Sun Nov  4 11:10:19 2007
@@ -21,6 +21,7 @@
 package org.apache.directory.studio.ldapbrowser.ui.wizards;
 
 
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.studio.ldapbrowser.common.jobs.RunnableContextJobAdapter;
 import org.apache.directory.studio.ldapbrowser.common.widgets.BaseWidgetUtils;
 import org.apache.directory.studio.ldapbrowser.common.widgets.WidgetModifyEvent;
@@ -29,7 +30,6 @@
 import org.apache.directory.studio.ldapbrowser.core.events.EventRegistry;
 import org.apache.directory.studio.ldapbrowser.core.jobs.InitializeAttributesJob;
 import org.apache.directory.studio.ldapbrowser.core.jobs.ReadEntryJob;
-import org.apache.directory.studio.ldapbrowser.core.model.DN;
 import org.apache.directory.studio.ldapbrowser.core.model.IAttribute;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
@@ -141,7 +141,7 @@
         if ( templateButton.getSelection() )
         {
             final IBrowserConnection browserConnection = entryWidget.getBrowserConnection();
-            final DN dn = entryWidget.getDn();
+            final LdapDN dn = entryWidget.getDn();
             final IEntry[] templateEntries = new IEntry[1];
 
             if ( browserConnection == null )
@@ -218,7 +218,7 @@
         }
         else
         {
-            wizard.setPrototypeEntry( new DummyEntry( new DN(), new DummyConnection( wizard.getSelectedConnection().getSchema() ) ) );
+            wizard.setPrototypeEntry( new DummyEntry( new LdapDN(), new DummyConnection( wizard.getSelectedConnection().getSchema() ) ) );
         }
 
         return super.getNextPage();

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewEntryWizard.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewEntryWizard.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewEntryWizard.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewEntryWizard.java Sun Nov  4 11:10:19 2007
@@ -21,13 +21,12 @@
 package org.apache.directory.studio.ldapbrowser.ui.wizards;
 
 
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.studio.ldapbrowser.common.jobs.RunnableContextJobAdapter;
 import org.apache.directory.studio.ldapbrowser.common.widgets.browser.BrowserCategory;
 import org.apache.directory.studio.ldapbrowser.common.widgets.browser.BrowserEntryPage;
 import org.apache.directory.studio.ldapbrowser.common.widgets.browser.BrowserSearchResultPage;
-import org.apache.directory.studio.ldapbrowser.core.events.EventRegistry;
 import org.apache.directory.studio.ldapbrowser.core.jobs.CreateEntryJob;
-import org.apache.directory.studio.ldapbrowser.core.model.DN;
 import org.apache.directory.studio.ldapbrowser.core.model.IAttribute;
 import org.apache.directory.studio.ldapbrowser.core.model.IBookmark;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
@@ -170,9 +169,8 @@
 
         if ( selectedConnection != null )
         {
-//            selectedConnection.suspend();
             DummyConnection prototypeConnection = new DummyConnection( selectedConnection.getSchema() ); 
-            prototypeEntry = new DummyEntry( new DN(), prototypeConnection );
+            prototypeEntry = new DummyEntry( new LdapDN(), prototypeConnection );
         }
     }
 

Modified: directory/studio/trunk/studio-ldifeditor/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldifeditor/META-INF/MANIFEST.MF?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldifeditor/META-INF/MANIFEST.MF (original)
+++ directory/studio/trunk/studio-ldifeditor/META-INF/MANIFEST.MF Sun Nov  4 11:10:19 2007
@@ -15,6 +15,7 @@
  org.eclipse.ui.views,
  org.eclipse.ui.forms,
  org.eclipse.jface.text,
+ org.apache.directory.studio.jars,
  org.apache.directory.studio.connection.core,
  org.apache.directory.studio.connection.ui,
  org.apache.directory.studio.ldapbrowser.core,

Modified: directory/studio/trunk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/dialogs/LdifEntryEditorDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/dialogs/LdifEntryEditorDialog.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/dialogs/LdifEntryEditorDialog.java (original)
+++ directory/studio/trunk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/dialogs/LdifEntryEditorDialog.java Sun Nov  4 11:10:19 2007
@@ -21,6 +21,8 @@
 package org.apache.directory.studio.ldifeditor.dialogs;
 
 
+import javax.naming.InvalidNameException;
+
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonConstants;
 import org.apache.directory.studio.ldapbrowser.common.widgets.entryeditor.EntryEditorWidget;
 import org.apache.directory.studio.ldapbrowser.common.widgets.entryeditor.EntryEditorWidgetActionGroup;
@@ -29,7 +31,6 @@
 import org.apache.directory.studio.ldapbrowser.common.widgets.entryeditor.EntryEditorWidgetUniversalListener;
 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.NameException;
 import org.apache.directory.studio.ldapbrowser.core.model.impl.DummyConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifChangeAddRecord;
 import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifContentRecord;
@@ -224,7 +225,7 @@
             }
 
         }
-        catch ( NameException e )
+        catch ( InvalidNameException e )
         {
             e.printStackTrace();
         }

Modified: directory/studio/trunk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/AbstractOpenValueEditorAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/AbstractOpenValueEditorAction.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/AbstractOpenValueEditorAction.java (original)
+++ directory/studio/trunk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/AbstractOpenValueEditorAction.java Sun Nov  4 11:10:19 2007
@@ -21,9 +21,11 @@
 package org.apache.directory.studio.ldifeditor.editor.actions;
 
 
-import org.apache.directory.studio.ldapbrowser.core.model.DN;
+import javax.naming.InvalidNameException;
+
+import org.apache.directory.shared.ldap.name.LdapDN;
+
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
-import org.apache.directory.studio.ldapbrowser.core.model.NameException;
 import org.apache.directory.studio.ldapbrowser.core.model.impl.Attribute;
 import org.apache.directory.studio.ldapbrowser.core.model.impl.DummyConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.impl.DummyEntry;
@@ -150,13 +152,13 @@
         {
             try
             {
-                DummyEntry dummyEntry = new DummyEntry( new DN( dn ), connection );
+                DummyEntry dummyEntry = new DummyEntry( new LdapDN( dn ), connection );
                 Attribute dummyAttribute = new Attribute( dummyEntry, description );
                 Value dummyValue = new Value( dummyAttribute, value );
 
                 rawValue = valueEditor.getRawValue( dummyValue );
             }
-            catch ( NameException e )
+            catch ( InvalidNameException e )
             {
                 e.printStackTrace();
             }

Modified: directory/studio/trunk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/EditLdifAttributeAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/EditLdifAttributeAction.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/EditLdifAttributeAction.java (original)
+++ directory/studio/trunk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/EditLdifAttributeAction.java Sun Nov  4 11:10:19 2007
@@ -21,12 +21,13 @@
 package org.apache.directory.studio.ldifeditor.editor.actions;
 
 
+import javax.naming.InvalidNameException;
+
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonConstants;
 import org.apache.directory.studio.ldapbrowser.common.wizards.AttributeWizard;
-import org.apache.directory.studio.ldapbrowser.core.model.DN;
 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.NameException;
 import org.apache.directory.studio.ldapbrowser.core.model.impl.DummyConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.impl.DummyEntry;
 import org.apache.directory.studio.ldapbrowser.core.model.ldif.LdifPart;
@@ -125,7 +126,7 @@
                 }
                 else if ( containers[0] instanceof LdifChangeModifyRecord )
                 {
-                    dummyEntry = new DummyEntry( new DN(), dummyConnection );
+                    dummyEntry = new DummyEntry( new LdapDN(), dummyConnection );
                 }
 
                 AttributeWizard wizard = new AttributeWizard( "Edit Attribute Description", true, false,
@@ -204,7 +205,7 @@
                     // ...
                 }
             }
-            catch ( NameException e )
+            catch ( InvalidNameException e )
             {
             }
         }

Modified: directory/studio/trunk/studio-valueeditors/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-valueeditors/META-INF/MANIFEST.MF?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-valueeditors/META-INF/MANIFEST.MF (original)
+++ directory/studio/trunk/studio-valueeditors/META-INF/MANIFEST.MF Sun Nov  4 11:10:19 2007
@@ -8,6 +8,7 @@
 Bundle-Localization: plugin
 Require-Bundle: org.eclipse.ui,
  org.eclipse.core.runtime,
+ org.apache.directory.studio.jars,
  org.apache.directory.studio.connection.core,
  org.apache.directory.studio.connection.ui,
  org.apache.directory.studio.ldapbrowser.core,

Modified: directory/studio/trunk/studio-valueeditors/src/main/java/org/apache/directory/studio/valueeditors/dn/DnDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-valueeditors/src/main/java/org/apache/directory/studio/valueeditors/dn/DnDialog.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-valueeditors/src/main/java/org/apache/directory/studio/valueeditors/dn/DnDialog.java (original)
+++ directory/studio/trunk/studio-valueeditors/src/main/java/org/apache/directory/studio/valueeditors/dn/DnDialog.java Sun Nov  4 11:10:19 2007
@@ -21,11 +21,11 @@
 package org.apache.directory.studio.valueeditors.dn;
 
 
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.studio.ldapbrowser.common.widgets.BaseWidgetUtils;
 import org.apache.directory.studio.ldapbrowser.common.widgets.WidgetModifyEvent;
 import org.apache.directory.studio.ldapbrowser.common.widgets.WidgetModifyListener;
 import org.apache.directory.studio.ldapbrowser.common.widgets.search.EntryWidget;
-import org.apache.directory.studio.ldapbrowser.core.model.DN;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.valueeditors.ValueEditorsActivator;
 import org.apache.directory.studio.valueeditors.ValueEditorsConstants;
@@ -55,7 +55,7 @@
     private IBrowserConnection connection;
 
     /** The dn. */
-    private DN dn;
+    private LdapDN dn;
 
 
     /**
@@ -65,7 +65,7 @@
      * @param connection the connection
      * @param dn the dn
      */
-    public DnDialog( Shell parentShell, IBrowserConnection connection, DN dn )
+    public DnDialog( Shell parentShell, IBrowserConnection connection, LdapDN dn )
     {
         super( parentShell );
         super.setShellStyle( super.getShellStyle() | SWT.RESIZE );
@@ -152,7 +152,7 @@
      * 
      * @return the dn
      */
-    public DN getDn()
+    public LdapDN getDn()
     {
         return dn;
     }

Modified: directory/studio/trunk/studio-valueeditors/src/main/java/org/apache/directory/studio/valueeditors/dn/DnValueEditor.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-valueeditors/src/main/java/org/apache/directory/studio/valueeditors/dn/DnValueEditor.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-valueeditors/src/main/java/org/apache/directory/studio/valueeditors/dn/DnValueEditor.java (original)
+++ directory/studio/trunk/studio-valueeditors/src/main/java/org/apache/directory/studio/valueeditors/dn/DnValueEditor.java Sun Nov  4 11:10:19 2007
@@ -21,12 +21,13 @@
 package org.apache.directory.studio.valueeditors.dn;
 
 
+import javax.naming.InvalidNameException;
+
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.studio.ldapbrowser.common.dialogs.TextDialog;
 import org.apache.directory.studio.ldapbrowser.core.model.AttributeHierarchy;
-import org.apache.directory.studio.ldapbrowser.core.model.DN;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.IValue;
-import org.apache.directory.studio.ldapbrowser.core.model.NameException;
 import org.apache.directory.studio.valueeditors.AbstractDialogStringValueEditor;
 import org.eclipse.swt.widgets.Shell;
 
@@ -52,12 +53,12 @@
         if ( value != null && value instanceof DnValueEditorRawValueWrapper )
         {
             DnValueEditorRawValueWrapper wrapper = ( DnValueEditorRawValueWrapper ) value;
-            DN dn;
+            LdapDN dn;
             try
             {
-                dn = wrapper.dn != null ? new DN( wrapper.dn ) : null;
+                dn = wrapper.dn != null ? new LdapDN( wrapper.dn ) : null;
             }
-            catch ( NameException e )
+            catch ( InvalidNameException e )
             {
                 dn = null;
             }

Modified: directory/studio/trunk/studio-valueeditors/src/main/java/org/apache/directory/studio/valueeditors/password/PasswordDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-valueeditors/src/main/java/org/apache/directory/studio/valueeditors/password/PasswordDialog.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-valueeditors/src/main/java/org/apache/directory/studio/valueeditors/password/PasswordDialog.java (original)
+++ directory/studio/trunk/studio-valueeditors/src/main/java/org/apache/directory/studio/valueeditors/password/PasswordDialog.java Sun Nov  4 11:10:19 2007
@@ -488,7 +488,7 @@
         {
             Connection connection = ( Connection ) entry.getBrowserConnection().getConnection().clone();
             connection.setName( null );
-            connection.setBindPrincipal( entry.getDn().toString() );
+            connection.setBindPrincipal( entry.getDn().getUpName() );
             connection.setBindPassword( testPasswordText.getText() );
             connection.setAuthMethod( AuthenticationMethod.SIMPLE );
 



Mime
View raw message