directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r591817 [1/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
Author: seelmann
Date: Sun Nov  4 11:10:19 2007
New Revision: 591817

URL: http://svn.apache.org/viewvc?rev=591817&view=rev
Log:
DIRSTUDIO-229: Replaced DN/RDN/RDNPart with LdapDN/Rdn/ATAV of shared-ldap

Removed:
    directory/studio/trunk/studio-ldapbrowser-core/src/test/java/org/apache/directory/studio/ldapbrowser/core/model/DnTest.java
Modified:
    directory/studio/trunk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/ExclusionDialog.java
    directory/studio/trunk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/SubtreeSpecificationDialog.java
    directory/studio/trunk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/SubtreeValueEditor.java
    directory/studio/trunk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/JNDIConnectionWrapper.java
    directory/studio/trunk/studio-ldapbrowser-common/META-INF/MANIFEST.MF
    directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/CopyAction.java
    directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/DeleteAction.java
    directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/PropertiesAction.java
    directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/RenameAction.java
    directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/MoveEntriesDialog.java
    directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/RenameEntryDialog.java
    directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dnd/EntryTransfer.java
    directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dnd/SearchTransfer.java
    directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dnd/ValuesTransfer.java
    directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/DnBuilderWidget.java
    directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserLabelProvider.java
    directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserSorter.java
    directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/connection/BrowserParameterPage.java
    directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetContentProvider.java
    directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/EntryWidget.java
    directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/SearchPageWrapper.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/BrowserConnectionManager.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/AttributeAddedEvent.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/AttributeDeletedEvent.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/AttributesInitializedEvent.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/ChildrenInitializedEvent.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/EmptyValueAddedEvent.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/EmptyValueDeletedEvent.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/EntryAddedEvent.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/EntryDeletedEvent.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/EntryMovedEvent.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/EntryRenamedEvent.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/ValueAddedEvent.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/ValueDeletedEvent.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/ValueModifiedEvent.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/ValueRenamedEvent.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/AbstractEclipseJob.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CopyEntriesJob.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CreateEntryJob.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CreateValuesJob.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/DeleteAttributesValueJob.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/DeleteEntriesJob.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportDsmlJob.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportLdifJob.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportLdifJob.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeAttributesJob.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeChildrenJob.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ModifyValueJob.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/MoveEntriesJob.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReadEntryJob.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReloadSchemasJob.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/RenameEntryJob.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/SearchJob.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/BookmarkParameter.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/DN.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IBookmark.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IBrowserConnection.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IEntry.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/ISearch.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/ISearchResult.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/NameException.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/RDN.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/RDNPart.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/SearchParameter.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/URL.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/AbstractEntry.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/AliasBaseEntry.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/BaseDNEntry.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Bookmark.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/BrowserConnection.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DelegateEntry.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DirectoryMetadataEntry.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DummyConnection.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DummyEntry.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Entry.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/ModificationLogger.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/OpenBrowserConnectionsJob.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/ReferralBaseEntry.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/RootDSE.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Search.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/SearchResult.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Value.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Schema.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/AttributeComparator.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/JNDIUtils.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/ModelConverter.java
    directory/studio/trunk/studio-ldapbrowser-ui/META-INF/MANIFEST.MF
    directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/CopyDnAction.java
    directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/CopyEntryAsCsvAction.java
    directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/CopyEntryAsLdifAction.java
    directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/CopyValueAction.java
    directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/LocateDnInDitAction.java
    directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/LocateInDitAction.java
    directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/MoveAction.java
    directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/EntryPropertyPage.java
    directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/entry/EntryEditorNavigationLocation.java
    directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorContentProvider.java
    directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorFilter.java
    directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorLabelProvider.java
    directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorSorter.java
    directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorUniversalListener.java
    directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/BatchOperationApplyOnWizardPage.java
    directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/BatchOperationWizard.java
    directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewBookmarkMainWizardPage.java
    directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewBookmarkWizard.java
    directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewEntryDnWizardPage.java
    directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewEntryTypeWizardPage.java
    directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewEntryWizard.java
    directory/studio/trunk/studio-ldifeditor/META-INF/MANIFEST.MF
    directory/studio/trunk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/dialogs/LdifEntryEditorDialog.java
    directory/studio/trunk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/AbstractOpenValueEditorAction.java
    directory/studio/trunk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/EditLdifAttributeAction.java
    directory/studio/trunk/studio-valueeditors/META-INF/MANIFEST.MF
    directory/studio/trunk/studio-valueeditors/src/main/java/org/apache/directory/studio/valueeditors/dn/DnDialog.java
    directory/studio/trunk/studio-valueeditors/src/main/java/org/apache/directory/studio/valueeditors/dn/DnValueEditor.java
    directory/studio/trunk/studio-valueeditors/src/main/java/org/apache/directory/studio/valueeditors/password/PasswordDialog.java

Modified: directory/studio/trunk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/ExclusionDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/ExclusionDialog.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/ExclusionDialog.java (original)
+++ directory/studio/trunk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/ExclusionDialog.java Sun Nov  4 11:10:19 2007
@@ -23,14 +23,15 @@
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
+import javax.naming.InvalidNameException;
+
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.studio.aciitemeditor.Activator;
 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.ldapbrowser.core.model.NameException;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.viewers.ArrayContentProvider;
@@ -59,12 +60,12 @@
     private IBrowserConnection connection;
 
     /** The base. */
-    private DN base;
+    private LdapDN base;
 
-    /** The initial typ. */
+    /** The initial type. */
     private String initialType;
 
-    /** The inital DN */
+    /** The initial DN */
     private String initalDN;
 
     /** The return type */
@@ -91,7 +92,7 @@
      * @param base the base DN
      * @param exclusion the exclusion string
      */
-    protected ExclusionDialog( Shell parentShell, IBrowserConnection connection, DN base, String exclusion )
+    protected ExclusionDialog( Shell parentShell, IBrowserConnection connection, LdapDN base, String exclusion )
     {
         super( parentShell );
         this.connection = connection;
@@ -173,10 +174,10 @@
         entryWidget.createWidget( composite );
         try
         {
-            DN dn = new DN( initalDN );
+            LdapDN dn = new LdapDN( initalDN );
             entryWidget.setInput( connection, dn, base );
         }
-        catch ( NameException e )
+        catch ( InvalidNameException e )
         {
         }
         entryWidget.addWidgetModifyListener( new WidgetModifyListener()
@@ -198,7 +199,7 @@
      */
     private void validate()
     {
-        boolean valid = entryWidget.getDn() != null && entryWidget.getDn().getRdns().length > 0;
+        boolean valid = entryWidget.getDn() != null && entryWidget.getDn().size() > 0;
 
         if ( getButton( IDialogConstants.OK_ID ) != null )
         {

Modified: directory/studio/trunk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/SubtreeSpecificationDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/SubtreeSpecificationDialog.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/SubtreeSpecificationDialog.java (original)
+++ directory/studio/trunk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/SubtreeSpecificationDialog.java Sun Nov  4 11:10:19 2007
@@ -36,9 +36,8 @@
 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.common.widgets.search.FilterWidget;
-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.NameException;
+import org.apache.directory.studio.ldapbrowser.core.utils.DnUtils;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.viewers.ArrayContentProvider;
@@ -80,7 +79,7 @@
     private IBrowserConnection connection;
 
     /** The subentry's DN */
-    private DN subentryDN;
+    private LdapDN subentryDN;
 
     /** Flag indicating if the refinement or filter widget should be visible */
     private boolean refinementOrFilterVisible;
@@ -122,7 +121,7 @@
      * @param refinementOrFilterVisible
      *      true if the refinement of filter widget should be visible
      */
-    SubtreeSpecificationDialog( Shell shell, IBrowserConnection connection, DN subentryDN,
+    SubtreeSpecificationDialog( Shell shell, IBrowserConnection connection, LdapDN subentryDN,
         String initialSubtreeSpecification, boolean refinementOrFilterVisible )
     {
         super( shell );
@@ -212,16 +211,8 @@
 
         BaseWidgetUtils.createLabel( composite, Messages.getString( "SubtreeValueEditor.label.base" ), 1 ); //$NON-NLS-1$
 
-        DN base = null;
-        DN suffix = null;
-        try
-        {
-            base = new DN( subtreeSpecification.getBase().toNormName() );
-            suffix = subentryDN != null ? subentryDN.getParentDn() : null;
-        }
-        catch ( NameException e )
-        {
-        }
+        LdapDN base = subtreeSpecification.getBase();
+        LdapDN suffix = subentryDN != null ? DnUtils.getParent( subentryDN ) : null;
         entryWidget = new EntryWidget( connection, base, suffix );
         entryWidget.createWidget( composite );
         entryWidget.addWidgetModifyListener( new WidgetModifyListener()
@@ -498,7 +489,7 @@
     {
         boolean valid = true;
 
-        DN base = entryWidget.getDn();
+        LdapDN base = entryWidget.getDn();
         valid &= base != null;
 
         String ss = buildSubreeSpecification();
@@ -538,7 +529,7 @@
         sb.append( "{" ); //$NON-NLS-1$
 
         // Adding base
-        DN base = entryWidget.getDn();
+        LdapDN base = entryWidget.getDn();
         if ( base != null && !SubtreeValueEditor.EMPTY.equals( base.toString() ) )
         {
             sb.append( " base \"" + base.toString() + "\"," ); //$NON-NLS-1$ //$NON-NLS-2$
@@ -660,18 +651,11 @@
      */
     private void addValueExclusionsTable()
     {
-        DN chopBase = null;
-        try
-        {
-            chopBase = new DN( subtreeSpecification.getBase().toNormName() );
-        }
-        catch ( NameException e )
-        {
-        }
-        if ( subentryDN != null && subentryDN.getParentDn() != null )
+        LdapDN chopBase = subtreeSpecification.getBase();
+        if ( subentryDN != null && DnUtils.getParent( subentryDN ) != null )
         {
-            DN suffix = subentryDN != null ? subentryDN.getParentDn() : null;
-            chopBase = new DN( chopBase, suffix );
+            LdapDN suffix = subentryDN != null ? DnUtils.getParent( subentryDN ) : null;
+            chopBase = DnUtils.composeDn( chopBase, suffix );
         }
 
         ExclusionDialog dialog = new ExclusionDialog( getShell(), connection, chopBase, "" ); //$NON-NLS-1$
@@ -694,18 +678,11 @@
         String oldValue = getSelectedValueExclusionsTable();
         if ( oldValue != null )
         {
-            DN chopBase = null;
-            try
-            {
-                chopBase = new DN( subtreeSpecification.getBase().toNormName() );
-            }
-            catch ( NameException e )
-            {
-            }
-            if ( subentryDN != null && subentryDN.getParentDn() != null )
+            LdapDN chopBase = subtreeSpecification.getBase();
+            if ( subentryDN != null && DnUtils.getParent( subentryDN ) != null )
             {
-                DN suffix = subentryDN != null ? subentryDN.getParentDn() : null;
-                chopBase = new DN( chopBase, suffix );
+                LdapDN suffix = subentryDN != null ? DnUtils.getParent( subentryDN ) : null;
+                chopBase = DnUtils.composeDn( chopBase, suffix );
             }
 
             ExclusionDialog dialog = new ExclusionDialog( getShell(), connection, chopBase, oldValue );

Modified: directory/studio/trunk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/SubtreeValueEditor.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/SubtreeValueEditor.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/SubtreeValueEditor.java (original)
+++ directory/studio/trunk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/SubtreeValueEditor.java Sun Nov  4 11:10:19 2007
@@ -21,8 +21,8 @@
 
 
 
+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.DN;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.IValue;
 import org.apache.directory.studio.valueeditors.AbstractDialogStringValueEditor;
@@ -94,7 +94,7 @@
         if ( o != null && o instanceof String )
         {
             IBrowserConnection connection = value.getAttribute().getEntry().getBrowserConnection();
-            DN dn = value.getAttribute().getEntry().getDn();
+            LdapDN dn = value.getAttribute().getEntry().getDn();
             return new SubtreeSpecificationValueWrapper( connection, dn, value.getStringValue() );
         }
 
@@ -115,7 +115,7 @@
         private IBrowserConnection connection;
 
         /** The subentry's DN */
-        private DN subentryDN;
+        private LdapDN subentryDN;
 
         /** The subtreeSpecification */
         private String subtreeSpecification;
@@ -131,7 +131,7 @@
          * @param subtreeSpecification
          *      the subtreeSpecification
          */
-        private SubtreeSpecificationValueWrapper( IBrowserConnection connection, DN subentryDN, String subtreeSpecification )
+        private SubtreeSpecificationValueWrapper( IBrowserConnection connection, LdapDN subentryDN, String subtreeSpecification )
         {
             this.connection = connection;
             this.subentryDN = subentryDN;

Modified: directory/studio/trunk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/JNDIConnectionWrapper.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/JNDIConnectionWrapper.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/JNDIConnectionWrapper.java (original)
+++ directory/studio/trunk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/JNDIConnectionWrapper.java Sun Nov  4 11:10:19 2007
@@ -249,7 +249,7 @@
             }
 
 
-            public Object getResult()
+            public NamingEnumeration<SearchResult> getResult()
             {
                 return namingEnumeration;
             }
@@ -280,7 +280,7 @@
         }
         else if ( runnable.getResult() != null && runnable.getResult() instanceof NamingEnumeration )
         {
-            return ( NamingEnumeration<SearchResult> ) runnable.getResult();
+            return runnable.getResult();
         }
         else
         {
@@ -292,7 +292,7 @@
     /**
      * Modify attributes.
      * 
-     * @param dn the dn
+     * @param dn the DN
      * @param modificationItems the modification items
      * @param controls the controls
      * @param monitor the progress monitor
@@ -332,7 +332,7 @@
             }
 
 
-            public Object getResult()
+            public NamingEnumeration<SearchResult> getResult()
             {
                 return null;
             }
@@ -413,7 +413,7 @@
             }
 
 
-            public Object getResult()
+            public NamingEnumeration<SearchResult> getResult()
             {
                 return null;
             }
@@ -485,7 +485,7 @@
             }
 
 
-            public Object getResult()
+            public NamingEnumeration<SearchResult> getResult()
             {
                 return null;
             }
@@ -554,7 +554,7 @@
             }
 
 
-            public Object getResult()
+            public NamingEnumeration<SearchResult> getResult()
             {
                 return null;
             }
@@ -667,7 +667,7 @@
             }
 
 
-            public Object getResult()
+            public NamingEnumeration<SearchResult> getResult()
             {
                 return null;
             }
@@ -771,7 +771,7 @@
                 }
 
 
-                public Object getResult()
+                public NamingEnumeration<SearchResult> getResult()
                 {
                     return null;
                 }
@@ -923,7 +923,7 @@
          * 
          * @return the result
          */
-        Object getResult();
+        NamingEnumeration<SearchResult> getResult();
 
 
         /**

Modified: directory/studio/trunk/studio-ldapbrowser-common/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-common/META-INF/MANIFEST.MF?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-common/META-INF/MANIFEST.MF (original)
+++ directory/studio/trunk/studio-ldapbrowser-common/META-INF/MANIFEST.MF Sun Nov  4 11:10:19 2007
@@ -11,6 +11,7 @@
  org.eclipse.jface.text,
  org.eclipse.ui.workbench.texteditor,
  org.eclipse.ui.editors,
+ 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-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/CopyAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/CopyAction.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/CopyAction.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/CopyAction.java Sun Nov  4 11:10:19 2007
@@ -123,7 +123,7 @@
             StringBuffer text = new StringBuffer();
             for ( int i = 0; i < entries.length; i++ )
             {
-                text.append( entries[i].getDn().toString() );
+                text.append( entries[i].getDn().getUpName() );
                 if ( i + 1 < entries.length )
                 {
                     text.append( BrowserCoreConstants.LINE_SEPARATOR );

Modified: directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/DeleteAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/DeleteAction.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/DeleteAction.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/DeleteAction.java Sun Nov  4 11:10:19 2007
@@ -31,6 +31,7 @@
 import java.util.Map;
 import java.util.Set;
 
+import org.apache.directory.shared.ldap.name.AttributeTypeAndValue;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreConstants;
 import org.apache.directory.studio.ldapbrowser.core.jobs.DeleteAttributesValueJob;
 import org.apache.directory.studio.ldapbrowser.core.jobs.DeleteEntriesJob;
@@ -40,7 +41,6 @@
 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.IValue;
-import org.apache.directory.studio.ldapbrowser.core.model.RDNPart;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.ObjectClassDescription;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.SchemaUtils;
 import org.eclipse.jface.dialogs.MessageDialog;
@@ -149,7 +149,7 @@
                     {
                         message.append( BrowserCoreConstants.LINE_SEPARATOR );
                         message.append( "  - " );
-                        message.append( entries[i].getDn() );
+                        message.append( entries[i].getDn().getUpName() );
                     }
                 }
                 else
@@ -569,11 +569,12 @@
             }
 
             // check if (part of) RDN is selected
-            RDNPart[] parts = this.getSelectedValues()[i].getAttribute().getEntry().getRdn().getParts();
-            for ( int p = 0; p < parts.length; p++ )
+            Iterator<AttributeTypeAndValue> atavIterator = this.getSelectedValues()[i].getAttribute().getEntry().getRdn().iterator();
+            while(atavIterator.hasNext())
             {
-                if ( getSelectedValues()[i].getAttribute().getDescription().equals( parts[p].getType() )
-                    && getSelectedValues()[i].getStringValue().equals( parts[p].getValue() ) )
+                AttributeTypeAndValue atav = atavIterator.next();
+                if ( getSelectedValues()[i].getAttribute().getDescription().equals( atav.getUpType() )
+                    && getSelectedValues()[i].getStringValue().equals( atav.getUpValue() ) )
                 {
                     throw new Exception();
                 }

Modified: directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/PropertiesAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/PropertiesAction.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/PropertiesAction.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/PropertiesAction.java Sun Nov  4 11:10:19 2007
@@ -133,13 +133,13 @@
         {
             element = ( IAdaptable ) getSelectedEntries()[0];
             pageId = "org.apache.directory.studio.ldapbrowser.ui.dialogs.properties.EntryPropertyPage";
-            title = getSelectedEntries()[0].getDn().toString();
+            title = getSelectedEntries()[0].getDn().getUpName();
         }
         else if ( getSelectedSearchResults().length == 1 )
         {
             element = ( IAdaptable ) getSelectedSearchResults()[0];
             pageId = "org.apache.directory.studio.ldapbrowser.ui.dialogs.properties.EntryPropertyPage";
-            title = getSelectedSearchResults()[0].getDn().toString();
+            title = getSelectedSearchResults()[0].getDn().getUpName();
         }
 
         if ( element != null )

Modified: directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/RenameAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/RenameAction.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/RenameAction.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/RenameAction.java Sun Nov  4 11:10:19 2007
@@ -21,12 +21,12 @@
 package org.apache.directory.studio.ldapbrowser.common.actions;
 
 
+import org.apache.directory.shared.ldap.name.Rdn;
 import org.apache.directory.studio.ldapbrowser.common.dialogs.RenameEntryDialog;
 import org.apache.directory.studio.ldapbrowser.core.jobs.RenameEntryJob;
 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.RDN;
 import org.apache.directory.studio.ldapbrowser.core.model.impl.RootDSE;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IInputValidator;
@@ -192,7 +192,7 @@
         RenameEntryDialog renameDialog = new RenameEntryDialog( getShell(), entry );
         if ( renameDialog.open() == Dialog.OK )
         {
-            RDN newRdn = renameDialog.getRdn();
+            Rdn newRdn = renameDialog.getRdn();
             boolean deleteOldRdn = renameDialog.isDeleteOldRdn();
             if ( newRdn != null && !newRdn.equals( entry.getRdn() ) )
             {

Modified: directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/MoveEntriesDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/MoveEntriesDialog.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/MoveEntriesDialog.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/MoveEntriesDialog.java Sun Nov  4 11:10:19 2007
@@ -21,12 +21,13 @@
 package org.apache.directory.studio.ldapbrowser.common.dialogs;
 
 
+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.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.model.DN;
 import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
+import org.apache.directory.studio.ldapbrowser.core.utils.DnUtils;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.swt.SWT;
@@ -62,7 +63,7 @@
     private Button okButton;
 
     /** The parent DN. */
-    private DN parentDn;
+    private LdapDN parentDn;
 
     /** The simulate move flag. */
     private boolean simulateMove;
@@ -144,7 +145,7 @@
         dnBuilderWidget = new DnBuilderWidget( false, true );
         dnBuilderWidget.addWidgetModifyListener( this );
         dnBuilderWidget.createContents( composite );
-        dnBuilderWidget.setInput( entries[0].getBrowserConnection(), null, null, entries[0].getDn().getParentDn() );
+        dnBuilderWidget.setInput( entries[0].getBrowserConnection(), null, null, DnUtils.getParent( entries[0].getDn() ) );
 
         simulateMoveButton = BaseWidgetUtils.createCheckbox( composite,
             "Simulate subtree moving by searching/adding/deleting recursively", 1 );
@@ -173,7 +174,7 @@
      * 
      * @return the parent dn
      */
-    public DN getParentDn()
+    public LdapDN getParentDn()
     {
         return parentDn;
     }

Modified: directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/RenameEntryDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/RenameEntryDialog.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/RenameEntryDialog.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/RenameEntryDialog.java Sun Nov  4 11:10:19 2007
@@ -21,13 +21,13 @@
 package org.apache.directory.studio.ldapbrowser.common.dialogs;
 
 
+import org.apache.directory.shared.ldap.name.Rdn;
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonActivator;
 import org.apache.directory.studio.ldapbrowser.common.widgets.BaseWidgetUtils;
 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.model.IEntry;
-import org.apache.directory.studio.ldapbrowser.core.model.RDN;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.swt.SWT;
@@ -69,7 +69,7 @@
     private Button okButton;
 
     /** The new rdn. */
-    private RDN rdn;
+    private Rdn rdn;
 
     /** The delete old rdn flag. */
     private boolean deleteOldRdn;
@@ -195,7 +195,7 @@
      * 
      * @return the rdn
      */
-    public RDN getRdn()
+    public Rdn getRdn()
     {
         return rdn;
     }

Modified: directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dnd/EntryTransfer.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dnd/EntryTransfer.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dnd/EntryTransfer.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dnd/EntryTransfer.java Sun Nov  4 11:10:19 2007
@@ -29,9 +29,9 @@
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCorePlugin;
 import org.apache.directory.studio.ldapbrowser.core.BrowserConnectionManager;
-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;
 
@@ -104,10 +104,10 @@
 
                 for ( int i = 0; i < entries.length; i++ )
                 {
-                    byte[] connectionId = entries[i].getBrowserConnection().getConnection().getId().getBytes();
+                    byte[] connectionId = entries[i].getBrowserConnection().getConnection().getId().getBytes( "UTF-8" );
                     writeOut.writeInt( connectionId.length );
                     writeOut.write( connectionId );
-                    byte[] dn = entries[i].getDn().toString().getBytes();
+                    byte[] dn = entries[i].getDn().getUpName().getBytes( "UTF-8" );
                     writeOut.writeInt( dn.length );
                     writeOut.write( dn );
                 }
@@ -161,7 +161,7 @@
                             byte[] connectionId = new byte[size];
                             readIn.read( connectionId );
                             connection = BrowserCorePlugin.getDefault().getConnectionManager().getBrowserConnectionById(
-                                new String( connectionId ) );
+                                new String( connectionId, "UTF-8" ) );
                         }
 
                         IEntry entry = null;
@@ -170,7 +170,7 @@
                             int size = readIn.readInt();
                             byte[] dn = new byte[size];
                             readIn.read( dn );
-                            entry = connection.getEntryFromCache( new DN( new String( dn ) ) );
+                            entry = connection.getEntryFromCache( new LdapDN( new String( dn, "UTF-8" ) ) );
                         }
                         else
                         {

Modified: directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dnd/SearchTransfer.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dnd/SearchTransfer.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dnd/SearchTransfer.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dnd/SearchTransfer.java Sun Nov  4 11:10:19 2007
@@ -102,10 +102,10 @@
 
                 for ( int i = 0; i < searches.length; i++ )
                 {
-                    byte[] connectionId = searches[i].getBrowserConnection().getConnection().getId().getBytes();
+                    byte[] connectionId = searches[i].getBrowserConnection().getConnection().getId().getBytes( "UTF-8" );
                     writeOut.writeInt( connectionId.length );
                     writeOut.write( connectionId );
-                    byte[] searchName = searches[i].getName().getBytes();
+                    byte[] searchName = searches[i].getName().getBytes( "UTF-8" );
                     writeOut.writeInt( searchName.length );
                     writeOut.write( searchName );
                 }
@@ -159,7 +159,7 @@
                             byte[] connectionId = new byte[size];
                             readIn.read( connectionId );
                             connection = BrowserCorePlugin.getDefault().getConnectionManager().getBrowserConnectionById(
-                                new String( connectionId ) );
+                                new String( connectionId, "UTF-8" ) );
                         }
 
                         ISearch search = null;
@@ -168,7 +168,7 @@
                             int size = readIn.readInt();
                             byte[] searchName = new byte[size];
                             readIn.read( searchName );
-                            search = connection.getSearchManager().getSearch( new String( searchName ) );
+                            search = connection.getSearchManager().getSearch( new String( searchName, "UTF-8" ) );
                         }
                         else
                         {

Modified: directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dnd/ValuesTransfer.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dnd/ValuesTransfer.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dnd/ValuesTransfer.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dnd/ValuesTransfer.java Sun Nov  4 11:10:19 2007
@@ -29,8 +29,8 @@
 import java.util.ArrayList;
 import java.util.List;
 
+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.IAttribute;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
@@ -103,18 +103,19 @@
 
                 for ( int i = 0; i < values.length; i++ )
                 {
-                    byte[] connectionId = values[i].getAttribute().getEntry().getBrowserConnection().getConnection().getId().getBytes();
+                    byte[] connectionId = values[i].getAttribute().getEntry().getBrowserConnection().getConnection()
+                        .getId().getBytes( "UTF-8" );
                     writeOut.writeInt( connectionId.length );
                     writeOut.write( connectionId );
-                    byte[] dn = values[i].getAttribute().getEntry().getDn().toString().getBytes();
+                    byte[] dn = values[i].getAttribute().getEntry().getDn().getUpName().getBytes( "UTF-8" );
                     writeOut.writeInt( dn.length );
                     writeOut.write( dn );
-                    byte[] attributeName = values[i].getAttribute().getDescription().getBytes();
+                    byte[] attributeName = values[i].getAttribute().getDescription().getBytes( "UTF-8" );
                     writeOut.writeInt( attributeName.length );
                     writeOut.write( attributeName );
                     if ( values[i].isString() )
                     {
-                        byte[] value = values[i].getStringValue().getBytes();
+                        byte[] value = values[i].getStringValue().getBytes( "UTF-8" );
                         writeOut.writeBoolean( true );
                         writeOut.writeInt( value.length );
                         writeOut.write( value );
@@ -175,7 +176,7 @@
                             byte[] connectionId = new byte[size];
                             readIn.read( connectionId );
                             connection = BrowserCorePlugin.getDefault().getConnectionManager().getBrowserConnectionById(
-                                new String( connectionId ) );
+                                new String( connectionId, "UTF-8" ) );
                         }
 
                         IEntry entry = null;
@@ -184,7 +185,7 @@
                             int size = readIn.readInt();
                             byte[] dn = new byte[size];
                             readIn.read( dn );
-                            entry = connection.getEntryFromCache( new DN( new String( dn ) ) );
+                            entry = connection.getEntryFromCache( new LdapDN( new String( dn, "UTF-8" ) ) );
                         }
                         else
                         {
@@ -197,7 +198,7 @@
                             int size = readIn.readInt();
                             byte[] attributeName = new byte[size];
                             readIn.read( attributeName );
-                            attribute = entry.getAttribute( new String( attributeName ) );
+                            attribute = entry.getAttribute( new String( attributeName, "UTF-8" ) );
                         }
                         else
                         {
@@ -211,7 +212,7 @@
                             int size = readIn.readInt();
                             byte[] val = new byte[size];
                             readIn.read( val );
-                            String test = new String( val );
+                            String test = new String( val, "UTF-8" );
 
                             IValue[] values = attribute.getValues();
                             for ( int i = 0; i < values.length; i++ )

Modified: directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/DnBuilderWidget.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/DnBuilderWidget.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/DnBuilderWidget.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/DnBuilderWidget.java Sun Nov  4 11:10:19 2007
@@ -23,12 +23,14 @@
 
 import java.util.ArrayList;
 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.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.ldapbrowser.core.model.RDN;
-import org.apache.directory.studio.ldapbrowser.core.model.RDNPart;
+import org.apache.directory.studio.ldapbrowser.core.utils.DnUtils;
 import org.eclipse.jface.fieldassist.ComboContentAdapter;
 import org.eclipse.jface.fieldassist.ContentProposalAdapter;
 import org.eclipse.jface.fieldassist.DecoratedField;
@@ -64,10 +66,10 @@
     private String[] attributeNames;
 
     /** The initial RDN. */
-    private RDN currentRdn;
+    private Rdn currentRdn;
 
     /** The initial parent DN. */
-    private DN currentParentDn;
+    private LdapDN currentParentDn;
 
     /** True if the RDN input elements should be shown. */
     private boolean showRDN;
@@ -79,7 +81,7 @@
     private Shell shell;
 
     /** The selected parent DN. */
-    private DN parentDn;
+    private LdapDN parentDn;
 
     /** The entry widget to enter/select the parent DN. */
     private EntryWidget parentEntryWidget;
@@ -88,7 +90,7 @@
     private Composite rdnComposite;
 
     /** The resulting RDN. */
-    private RDN rdn;
+    private Rdn rdn;
 
     /** The list of RdnLines. */
     private ArrayList<RdnLine> rdnLineList;
@@ -126,7 +128,7 @@
      * @param browserConnection the connection
      * @param parentDn the initial parent DN
      */
-    public void setInput( IBrowserConnection browserConnection, String[] attributeNames, RDN rdn, DN parentDn )
+    public void setInput( IBrowserConnection browserConnection, String[] attributeNames, Rdn rdn, LdapDN parentDn )
     {
         this.attributeNames = attributeNames;
         this.currentRdn = rdn;
@@ -137,12 +139,12 @@
             for ( int i = 0; i < rdnLineList.size(); i++ )
             {
                 RdnLine rdnLine = rdnLineList.get( i );
-                String oldName = rdnLine.rdnNameCombo.getText();
-                rdnLine.rdnNameCombo.setItems( attributeNames );
+                String oldName = rdnLine.rdnTypeCombo.getText();
+                rdnLine.rdnTypeCombo.setItems( attributeNames );
                 rdnLine.rdnNameCPA.setContentProposalProvider( new ListContentProposalProvider( attributeNames ) );
-                if ( Arrays.asList( rdnLine.rdnNameCombo.getItems() ).contains( oldName ) )
+                if ( Arrays.asList( rdnLine.rdnTypeCombo.getItems() ).contains( oldName ) )
                 {
-                    rdnLine.rdnNameCombo.setText( oldName );
+                    rdnLine.rdnTypeCombo.setText( oldName );
                 }
             }
         }
@@ -153,24 +155,26 @@
             {
                 deleteRdnLine( rdnComposite, 0 );
             }
-            if ( currentRdn == null || currentRdn.getParts().length == 0 )
+            if ( currentRdn == null || currentRdn.size() == 0 )
             {
                 addRdnLine( rdnComposite, 0 );
-                rdnLineList.get( 0 ).rdnNameCombo.setFocus();
+                rdnLineList.get( 0 ).rdnTypeCombo.setFocus();
             }
             else
             {
-                RDNPart[] parts = currentRdn.getParts();
-                for ( int i = 0; i < parts.length; i++ )
+                int i = 0;
+                Iterator<AttributeTypeAndValue> atavIterator = currentRdn.iterator();
+                while(atavIterator.hasNext())
                 {
+                    AttributeTypeAndValue atav = atavIterator.next();
                     addRdnLine( rdnComposite, i );
-                    rdnLineList.get( i ).rdnNameCombo.setText( parts[i].getType() );
-                    rdnLineList.get( i ).rdnValueText.setText( parts[i].getUnencodedValue() );
+                    rdnLineList.get( i ).rdnTypeCombo.setText( atav.getUpType() );
+                    rdnLineList.get( i ).rdnValueText.setText( ( String ) atav.getUpValue() );
                     if ( i == 0 )
                     {
-                        if ( "".equals( rdnLineList.get( i ).rdnNameCombo ) )
+                        if ( "".equals( rdnLineList.get( i ).rdnTypeCombo ) )
                         {
-                            rdnLineList.get( i ).rdnNameCombo.setFocus();
+                            rdnLineList.get( i ).rdnTypeCombo.setFocus();
                         }
                         else
                         {
@@ -178,6 +182,7 @@
                             rdnLineList.get( i ).rdnValueText.setFocus();
                         }
                     }
+                    i++;
                 }
             }
         }
@@ -196,7 +201,7 @@
      * 
      * @return the RDN
      */
-    public RDN getRdn()
+    public Rdn getRdn()
     {
         return rdn;
     }
@@ -207,7 +212,7 @@
      * 
      * @return the parent DN
      */
-    public DN getParentDn()
+    public LdapDN getParentDn()
     {
         return parentDn;
     }
@@ -297,12 +302,12 @@
             try
             {
                 // calculate RDN
-                String[] rdnNames = new String[rdnLineList.size()];
+                String[] rdnTypes = new String[rdnLineList.size()];
                 String[] rdnValues = new String[rdnLineList.size()];
                 for ( int i = 0; i < rdnLineList.size(); i++ )
                 {
                     RdnLine rdnLine = ( RdnLine ) rdnLineList.get( i );
-                    rdnNames[i] = rdnLine.rdnNameCombo.getText();
+                    rdnTypes[i] = rdnLine.rdnTypeCombo.getText();
                     rdnValues[i] = rdnLine.rdnValueText.getText();
 
                     if ( rdnLineList.size() > 1 )
@@ -314,7 +319,7 @@
                         rdnLine.rdnDeleteButton.setEnabled( false );
                     }
                 }
-                rdn = new RDN( rdnNames, rdnValues, false );
+                rdn = DnUtils.composeRdn( rdnTypes, rdnValues );
             }
             catch ( Exception e )
             {
@@ -329,7 +334,7 @@
             try
             {
                 // calculate DN
-                parentDn = new DN( parentEntryWidget.getDn() );
+                parentDn = new LdapDN( parentEntryWidget.getDn() );
             }
             catch ( Exception e )
             {
@@ -356,22 +361,23 @@
             }
             else
             {
-                DN dn;
+                LdapDN dn;
                 if ( showParent && showRDN )
                 {
-                    dn = new DN( rdn, parentDn );
+                    dn = DnUtils.composeDn( rdn, parentDn );
                 }
                 else if ( showParent )
                 {
-                    dn = new DN( parentDn );
+                    dn = parentDn;
                 }
                 else if ( showRDN )
                 {
-                    dn = new DN( rdn );
+                    dn = new LdapDN();
+                    dn.add( rdn );
                 }
                 else
                 {
-                    dn = new DN();
+                    dn = new LdapDN();
                 }
                 previewText.setText( dn.toString() );
             }
@@ -398,7 +404,7 @@
                 RdnLine oldRdnLine = rdnLines[i];
 
                 // remember values
-                String oldName = oldRdnLine.rdnNameCombo.getText();
+                String oldName = oldRdnLine.rdnTypeCombo.getText();
                 String oldValue = oldRdnLine.rdnValueText.getText();
 
                 // delete old
@@ -414,7 +420,7 @@
                 rdnLineList.add( newRdnLine );
 
                 // restore value
-                newRdnLine.rdnNameCombo.setText( oldName );
+                newRdnLine.rdnTypeCombo.setText( oldName );
                 newRdnLine.rdnValueText.setText( oldValue );
 
                 // check
@@ -464,9 +470,9 @@
         GridData gd = new GridData();
         gd.widthHint = 180;
         rdnLine.rdnNameComboField.getLayoutControl().setLayoutData( gd );
-        rdnLine.rdnNameCombo = ( Combo ) rdnLine.rdnNameComboField.getControl();
+        rdnLine.rdnTypeCombo = ( Combo ) rdnLine.rdnNameComboField.getControl();
 
-        rdnLine.rdnNameCPA = new ContentProposalAdapter( rdnLine.rdnNameCombo, new ComboContentAdapter(),
+        rdnLine.rdnNameCPA = new ContentProposalAdapter( rdnLine.rdnTypeCombo, new ComboContentAdapter(),
             new ListContentProposalProvider( attributeNames ), null, null );
         rdnLine.rdnNameCPA.setFilterStyle( ContentProposalAdapter.FILTER_NONE );
         rdnLine.rdnNameCPA.setProposalAcceptanceStyle( ContentProposalAdapter.PROPOSAL_REPLACE );
@@ -522,10 +528,10 @@
 
         if ( attributeNames != null )
         {
-            rdnLine.rdnNameCombo.setItems( attributeNames );
+            rdnLine.rdnTypeCombo.setItems( attributeNames );
         }
 
-        rdnLine.rdnNameCombo.addModifyListener( this );
+        rdnLine.rdnTypeCombo.addModifyListener( this );
         rdnLine.rdnValueText.addModifyListener( this );
 
         return rdnLine;
@@ -574,7 +580,7 @@
         private DecoratedField rdnNameComboField;
 
         /** The rdn name combo. */
-        private Combo rdnNameCombo;
+        private Combo rdnTypeCombo;
 
         /** The content proposal adapter */
         private ContentProposalAdapter rdnNameCPA;

Modified: directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserLabelProvider.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserLabelProvider.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserLabelProvider.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserLabelProvider.java Sun Nov  4 11:10:19 2007
@@ -21,6 +21,10 @@
 package org.apache.directory.studio.ldapbrowser.common.widgets.browser;
 
 
+import java.util.Iterator;
+
+import org.apache.directory.shared.ldap.name.AttributeTypeAndValue;
+import org.apache.directory.shared.ldap.name.Rdn;
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonActivator;
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonConstants;
 import org.apache.directory.studio.ldapbrowser.core.model.IBookmark;
@@ -28,8 +32,6 @@
 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.RDN;
-import org.apache.directory.studio.ldapbrowser.core.model.RDNPart;
 import org.apache.directory.studio.ldapbrowser.core.model.impl.AliasBaseEntry;
 import org.apache.directory.studio.ldapbrowser.core.model.impl.BaseDNEntry;
 import org.apache.directory.studio.ldapbrowser.core.model.impl.DirectoryMetadataEntry;
@@ -107,11 +109,11 @@
             }
             else if ( entry instanceof AliasBaseEntry )
             {
-                return entry.getDn().toString() + " " + append.toString();
+                return entry.getDn().getUpName() + " " + append.toString();
             }
             else if ( entry instanceof BaseDNEntry )
             {
-                return entry.getDn().toString() + " " + append.toString();
+                return entry.getDn().getUpName() + " " + append.toString();
             }
             else if ( entry.hasParententry() )
             {
@@ -119,16 +121,15 @@
                 String label = "";
                 if ( preferences.getEntryLabel() == BrowserCommonConstants.SHOW_DN )
                 {
-                    label = entry.getDn().toString();
+                    label = entry.getDn().getUpName();
                 }
                 else if ( preferences.getEntryLabel() == BrowserCommonConstants.SHOW_RDN )
                 {
-                    label = entry.getRdn().toString();
-
+                    label = entry.getRdn().getUpName();
                 }
                 else if ( preferences.getEntryLabel() == BrowserCommonConstants.SHOW_RDN_VALUE )
                 {
-                    label = entry.getRdn().getValue();
+                    label = ( String ) entry.getRdn().getUpValue();
                 }
 
                 label += append.toString();
@@ -142,7 +143,7 @@
             }
             else
             {
-                return entry.getDn() + append.toString();
+                return entry.getDn().getUpName() + append.toString();
             }
         }
         else if ( obj instanceof BrowserEntryPage )
@@ -193,15 +194,15 @@
                 }
                 else if ( preferences.getSearchResultLabel() == BrowserCommonConstants.SHOW_DN )
                 {
-                    label = sr.getEntry().getDn().toString();
+                    label = sr.getEntry().getDn().getUpName();
                 }
                 else if ( preferences.getSearchResultLabel() == BrowserCommonConstants.SHOW_RDN )
                 {
-                    label = sr.getEntry().getRdn().toString();
+                    label = sr.getEntry().getRdn().getUpName();
                 }
                 else if ( preferences.getSearchResultLabel() == BrowserCommonConstants.SHOW_RDN_VALUE )
                 {
-                    label = sr.getEntry().getRdn().getValue();
+                    label = ( String ) sr.getEntry().getRdn().getUpValue();
                 }
 
                 if ( preferences.isSearchResultAbbreviate()
@@ -214,7 +215,7 @@
             }
             else
             {
-                return sr.getEntry().getDn().toString();
+                return sr.getEntry().getDn().getUpName();
             }
 
         }
@@ -337,21 +338,21 @@
         }
         else
         {
-            RDN rdn = entry.getRdn();
-            RDNPart[] rdnParts = rdn.getParts();
-            for ( int i = 0; i < rdnParts.length; i++ )
-            {
-                RDNPart part = rdnParts[i];
-                if ( "cn".equals( part.getType() ) || "sn".equals( part.getType() ) || "uid".equals( part.getType() )
-                    || "userid".equals( part.getType() ) )
+            Rdn rdn = entry.getRdn();
+            Iterator<AttributeTypeAndValue> atavIterator = rdn.iterator();
+            while(atavIterator.hasNext())
+            {
+                AttributeTypeAndValue atav = atavIterator.next();
+                if ( "cn".equals( atav.getUpType() ) || "sn".equals( atav.getUpType() ) || "uid".equals( atav.getUpType() )
+                    || "userid".equals( atav.getUpType() ) )
                 {
                     return BrowserCommonActivator.getDefault().getImage( BrowserCommonConstants.IMG_ENTRY_PERSON );
                 }
-                else if ( "ou".equals( part.getType() ) || "o".equals( part.getType() ) )
+                else if ( "ou".equals( atav.getUpType() ) || "o".equals( atav.getUpType() ) )
                 {
                     return BrowserCommonActivator.getDefault().getImage( BrowserCommonConstants.IMG_ENTRY_ORG );
                 }
-                else if ( "dc".equals( part.getType() ) || "c".equals( part.getType() ) || "l".equals( part.getType() ) )
+                else if ( "dc".equals( atav.getUpType() ) || "c".equals( atav.getUpType() ) || "l".equals( atav.getUpType() ) )
                 {
                     return BrowserCommonActivator.getDefault().getImage( BrowserCommonConstants.IMG_ENTRY_DC );
                 }

Modified: directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserSorter.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserSorter.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserSorter.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserSorter.java Sun Nov  4 11:10:19 2007
@@ -23,10 +23,10 @@
 
 import java.math.BigInteger;
 
+import org.apache.directory.shared.ldap.name.Rdn;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreConstants;
 import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearchResult;
-import org.apache.directory.studio.ldapbrowser.core.model.RDN;
 import org.apache.directory.studio.ldapbrowser.core.model.impl.DirectoryMetadataEntry;
 import org.apache.directory.studio.ldapbrowser.core.model.impl.RootDSE;
 import org.eclipse.jface.viewers.TreeViewer;
@@ -259,8 +259,8 @@
      */
     private int compareRdns( IEntry entry1, IEntry entry2 )
     {
-        RDN rdn1 = entry1.getRdn();
-        RDN rdn2 = entry2.getRdn();
+        Rdn rdn1 = entry1.getRdn();
+        Rdn rdn2 = entry2.getRdn();
 
         if ( rdn1 == null && rdn2 == null )
         {
@@ -276,7 +276,7 @@
         }
         else
         {
-            return compare( rdn1.toString(), rdn2.toString() );
+            return compare( rdn1.getUpName(), rdn2.getUpName() );
         }
     }
 
@@ -291,9 +291,8 @@
      */
     private int compareRdnValues( IEntry entry1, IEntry entry2 )
     {
-
-        RDN rdn1 = entry1.getRdn();
-        RDN rdn2 = entry2.getRdn();
+        Rdn rdn1 = entry1.getRdn();
+        Rdn rdn2 = entry2.getRdn();
 
         if ( ( rdn1 == null || rdn1.getValue() == null || "".equals( rdn1.getValue() ) )
             && ( rdn2 == null || rdn2.getValue() == null || "".equals( rdn2.getValue() ) ) )
@@ -311,27 +310,29 @@
             return lessThan();
         }
 
-        else if ( rdn1.getValue().matches( "\\d*" ) && !rdn2.getValue().matches( "\\d*" ) )
+        String rdn1Value = ( String ) rdn1.getUpValue();
+        String rdn2Value = ( String ) rdn2.getUpValue();
+        if ( rdn1Value.matches( "\\d*" ) && !rdn2Value.matches( "\\d*" ) )
         {
             // return lessThan();
-            return compare( rdn1.getValue(), rdn2.getValue() );
+            return compare( rdn1Value, rdn2Value );
         }
-        else if ( !rdn1.getValue().matches( "\\d*" ) && rdn2.getValue().matches( "\\d*" ) )
+        else if ( !rdn1Value.matches( "\\d*" ) && rdn2Value.matches( "\\d*" ) )
         {
             // return greaterThan();
-            return compare( rdn1.getValue(), rdn2.getValue() );
+            return compare( rdn1Value, rdn2Value );
         }
-        else if ( rdn1.getValue().matches( "\\d*" ) && rdn2.getValue().matches( "\\d*" ) )
+        else if ( rdn2Value.matches( "\\d*" ) && rdn2Value.matches( "\\d*" ) )
         {
-            BigInteger bi1 = new BigInteger( rdn1.getValue() );
-            BigInteger bi2 = new BigInteger( rdn2.getValue() );
+            BigInteger bi1 = new BigInteger( rdn1Value );
+            BigInteger bi2 = new BigInteger( rdn2Value );
             return compare( bi1, bi2 );
             // return Integer.parseInt(rdn1.getValue()) -
             // Integer.parseInt(rdn2.getValue());
         }
         else
         {
-            return compare( rdn1.getValue(), rdn2.getValue() );
+            return compare( rdn1Value, rdn2Value );
         }
     }
 

Modified: directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/connection/BrowserParameterPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/connection/BrowserParameterPage.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/connection/BrowserParameterPage.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/connection/BrowserParameterPage.java Sun Nov  4 11:10:19 2007
@@ -21,6 +21,7 @@
 package org.apache.directory.studio.ldapbrowser.common.widgets.connection;
 
 
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.core.ConnectionParameter;
 import org.apache.directory.studio.connection.ui.AbstractConnectionParameterPage;
@@ -30,9 +31,7 @@
 import org.apache.directory.studio.ldapbrowser.common.widgets.search.LimitWidget;
 import org.apache.directory.studio.ldapbrowser.common.widgets.search.ReferralsHandlingWidget;
 import org.apache.directory.studio.ldapbrowser.core.jobs.FetchBaseDNsJob;
-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.NameException;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection.AliasDereferencingMethod;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection.ReferralHandlingMethod;
 import org.apache.directory.studio.ldapbrowser.core.model.impl.BrowserConnection;
@@ -297,11 +296,7 @@
         errorMessage = null;
         if ( !isAutoFetchBaseDns() )
         {
-            try
-            {
-                new DN( getBaseDN() );
-            }
-            catch ( NameException e )
+            if( !LdapDN.isValid( getBaseDN() ) )
             {
                 message = "Please enter a valid base DN.";
             }

Modified: directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetContentProvider.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetContentProvider.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetContentProvider.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetContentProvider.java Sun Nov  4 11:10:19 2007
@@ -81,12 +81,12 @@
             if ( newInput != null && newInput instanceof IEntry )
             {
                 IEntry entry = ( IEntry ) newInput;
-                dn = "DN: " + entry.getDn().toString();
+                dn = "DN: " + entry.getDn().getUpName();
             }
             else if ( newInput != null && newInput instanceof AttributeHierarchy )
             {
                 AttributeHierarchy ah = ( AttributeHierarchy ) newInput;
-                dn = "DN: " + ah.getAttribute().getEntry().getDn().toString();
+                dn = "DN: " + ah.getAttribute().getEntry().getDn().getUpName();
             }
             else
             {

Modified: directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/EntryWidget.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/EntryWidget.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/EntryWidget.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/EntryWidget.java Sun Nov  4 11:10:19 2007
@@ -21,6 +21,9 @@
 package org.apache.directory.studio.ldapbrowser.common.widgets.search;
 
 
+import javax.naming.InvalidNameException;
+
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonActivator;
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonConstants;
 import org.apache.directory.studio.ldapbrowser.common.dialogs.SelectEntryDialog;
@@ -29,10 +32,9 @@
 import org.apache.directory.studio.ldapbrowser.common.widgets.BrowserWidget;
 import org.apache.directory.studio.ldapbrowser.common.widgets.HistoryUtils;
 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.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.utils.DnUtils;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.ModifyEvent;
 import org.eclipse.swt.events.ModifyListener;
@@ -73,10 +75,10 @@
     private IBrowserConnection browserConnection;
 
     /** The selected DN. */
-    private DN dn;
+    private LdapDN dn;
 
     /** The suffix. */
-    private DN suffix;
+    private LdapDN suffix;
 
 
     /**
@@ -95,7 +97,7 @@
      * @param browserConnection the connection
      * @param dn the initial DN
      */
-    public EntryWidget( IBrowserConnection browserConnection, DN dn )
+    public EntryWidget( IBrowserConnection browserConnection, LdapDN dn )
     {
         this( browserConnection, dn, null );
     }
@@ -108,7 +110,7 @@
      * @param dn the initial DN
      * @param suffix the suffix
      */
-    public EntryWidget( IBrowserConnection browserConnection, DN dn, DN suffix )
+    public EntryWidget( IBrowserConnection browserConnection, LdapDN dn, LdapDN suffix )
     {
         this.browserConnection = browserConnection;
         this.dn = dn;
@@ -141,9 +143,9 @@
             {
                 try
                 {
-                    dn = new DN( dnCombo.getText() );
+                    dn = new LdapDN( dnCombo.getText() );
                 }
-                catch ( NameException e1 )
+                catch ( InvalidNameException e1 )
                 {
                     dn = null;
                 }
@@ -162,9 +164,9 @@
         {
             public void widgetSelected( SelectionEvent e )
             {
-                if ( dn != null && dn.getParentDn() != null )
+                if ( dn != null && DnUtils.getParent( dn ) != null )
                 {
-                    dn = dn.getParentDn();
+                    dn = DnUtils.getParent( dn );
                     dnChanged();
                     internalSetEnabled();
                     notifyListeners();
@@ -182,7 +184,7 @@
                 {
                     // get root entry
                     IEntry rootEntry = browserConnection.getRootDSE();
-                    if( suffix != null && suffix.getRdns().length > 0 )
+                    if( suffix != null && suffix.size() > 0 )
                     {
                         rootEntry = browserConnection.getEntryFromCache( suffix );
                         if ( rootEntry == null )
@@ -194,18 +196,18 @@
                     }
 
                     // calculate initial DN
-                    DN initialDN = dn;
-                    if( suffix != null && suffix.getRdns().length > 0 )
+                    LdapDN initialDN = dn;
+                    if( suffix != null && suffix.size() > 0 )
                     {
-                        if( initialDN != null && initialDN.getRdns().length > 0 )
+                        if( initialDN != null && initialDN.size() > 0 )
                         {
-                            initialDN = new DN( initialDN, suffix );
+                            initialDN = DnUtils.composeDn( initialDN, suffix );
                         }
                     }
 
                     // get initial entry
                     IEntry entry = rootEntry;
-                    if ( initialDN != null && initialDN.getRdns().length > 0 )
+                    if ( initialDN != null && initialDN.size() > 0 )
                     {
                         entry = browserConnection.getEntryFromCache( initialDN );
                         if ( entry == null )
@@ -226,9 +228,9 @@
                     if ( selectedEntry != null )
                     {
                         dn = selectedEntry.getDn();
-                        if( suffix != null && suffix.getRdns().length > 0 )
+                        if( suffix != null && suffix.size() > 0 )
                         {
-                            dn = dn.getLocalName( suffix );
+                            dn = DnUtils.getPrefixName( dn, suffix );
                         }
                         dnChanged();
                         internalSetEnabled();
@@ -250,7 +252,7 @@
     {
         if ( dnCombo != null && entryBrowseButton != null )
         {
-            dnCombo.setText( dn != null ? dn.toString() : "" );
+            dnCombo.setText( dn != null ? dn.getUpName() : "" );
         }
     }
 
@@ -278,7 +280,7 @@
      */
     private void internalSetEnabled()
     {
-        upButton.setEnabled( dn != null && dn.getParentDn() != null && dnCombo.isEnabled() );
+        upButton.setEnabled( dn != null && DnUtils.getParent( dn ) != null && dnCombo.isEnabled() );
         entryBrowseButton.setEnabled( browserConnection != null && dnCombo.isEnabled() );
     }
 
@@ -297,7 +299,7 @@
      *
      * @return the suffix DN or <code>null</code> if not set
      */
-    public DN getSuffix()
+    public LdapDN getSuffix()
     {
         return suffix;
     }
@@ -308,7 +310,7 @@
      *
      * @return the DN or <code>null</code> if the DN isn't valid
      */
-    public DN getDn()
+    public LdapDN getDn()
     {
         return dn;
     }
@@ -331,7 +333,7 @@
      * @param dn the DN
      * @param browserConnection the connection
      */
-    public void setInput( IBrowserConnection browserConnection, DN dn )
+    public void setInput( IBrowserConnection browserConnection, LdapDN dn )
     {
         setInput( browserConnection, dn, null );
     }
@@ -344,7 +346,7 @@
      * @param dn the DN
      * @param suffix the suffix
      */
-    public void setInput( IBrowserConnection browserConnection, DN dn, DN suffix )
+    public void setInput( IBrowserConnection browserConnection, LdapDN dn, LdapDN suffix )
     {
         if ( this.browserConnection != browserConnection || this.dn != dn || this.suffix != suffix )
         {

Modified: directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/SearchPageWrapper.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/SearchPageWrapper.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/SearchPageWrapper.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/SearchPageWrapper.java Sun Nov  4 11:10:19 2007
@@ -25,13 +25,13 @@
 import java.util.Arrays;
 import java.util.List;
 
+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.BrowserWidget;
 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.jobs.SearchJob;
 import org.apache.directory.studio.ldapbrowser.core.model.Control;
-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.ISearch;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection.AliasDereferencingMethod;
@@ -573,7 +573,7 @@
         if ( search.getBrowserConnection() != null )
         {
             IBrowserConnection browserConnection = search.getBrowserConnection();
-            DN searchBase = search.getSearchBase();
+            LdapDN searchBase = search.getSearchBase();
 
             if ( browserConnectionWidget != null )
             {



Mime
View raw message