directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r591817 [3/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-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IBrowserConnection.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IBrowserConnection.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IBrowserConnection.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IBrowserConnection.java Sun Nov  4 11:10:19 2007
@@ -23,6 +23,7 @@
 
 import java.io.Serializable;
 
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.core.ConnectionPropertyPageProvider;
 import org.apache.directory.studio.ldapbrowser.core.BookmarkManager;
@@ -226,7 +227,7 @@
      * 
      * @return the manually defined base ND
      */
-    public abstract DN getBaseDN();
+    public abstract LdapDN getBaseDN();
 
 
     /**
@@ -234,7 +235,7 @@
      * 
      * @param baseDN the new base DN
      */
-    public abstract void setBaseDN( DN baseDN );
+    public abstract void setBaseDN( LdapDN baseDN );
 
 
     /**
@@ -356,7 +357,7 @@
      * 
      * @return the entry from cache or null if the entry isn't cached
      */
-    public abstract IEntry getEntryFromCache( DN dn );
+    public abstract IEntry getEntryFromCache( LdapDN dn );
 
 
     /**

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IEntry.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IEntry.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IEntry.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IEntry.java Sun Nov  4 11:10:19 2007
@@ -23,6 +23,8 @@
 
 import java.io.Serializable;
 
+import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.Rdn;
 import org.apache.directory.studio.connection.core.ConnectionPropertyPageProvider;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.Subschema;
 import org.apache.directory.studio.ldapbrowser.core.propertypageproviders.EntryPropertyPageProvider;
@@ -190,15 +192,15 @@
      * 
      * @return the DN of this entry, never null.
      */
-    public abstract DN getDn();
-
-
+    public abstract LdapDN getDn();
+    
+    
     /**
      * Gets the RDN of this entry, never null.
      * 
      * @return the RDN of this entry, never null.
      */
-    public abstract RDN getRdn();
+    public abstract Rdn getRdn();
 
 
     /**

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/ISearch.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/ISearch.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/ISearch.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/ISearch.java Sun Nov  4 11:10:19 2007
@@ -23,6 +23,7 @@
 
 import java.io.Serializable;
 
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.studio.connection.core.ConnectionPropertyPageProvider;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection.AliasDereferencingMethod;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection.ReferralHandlingMethod;
@@ -41,7 +42,7 @@
 {
 
     /** Constant for empty search base */
-    public static final DN EMPTY_SEARCH_BASE = new DN(); //$NON-NLS-1$
+    public static final LdapDN EMPTY_SEARCH_BASE = new LdapDN(); //$NON-NLS-1$
 
     /** The returning attribute shortcut for all user attributes '*' */
     public static final String ALL_USER_ATTRIBUTES = "*"; //$NON-NLS-1$
@@ -269,7 +270,7 @@
      * 
      * @return the search base
      */
-    public abstract DN getSearchBase();
+    public abstract LdapDN getSearchBase();
 
 
     /**
@@ -280,7 +281,7 @@
      * 
      * @param searchBase the search base
      */
-    public abstract void setSearchBase( DN searchBase );
+    public abstract void setSearchBase( LdapDN searchBase );
 
 
     /**

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/ISearchResult.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/ISearchResult.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/ISearchResult.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/ISearchResult.java Sun Nov  4 11:10:19 2007
@@ -23,6 +23,7 @@
 
 import java.io.Serializable;
 
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.studio.connection.core.ConnectionPropertyPageProvider;
 import org.apache.directory.studio.ldapbrowser.core.propertypageproviders.EntryPropertyPageProvider;
 import org.eclipse.core.runtime.IAdaptable;
@@ -43,7 +44,7 @@
      * 
      * @return the DN of the search result entry.
      */
-    public DN getDn();
+    public LdapDN getDn();
 
 
     /**

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/NameException.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/NameException.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/NameException.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/NameException.java Sun Nov  4 11:10:19 2007
@@ -20,13 +20,27 @@
 
 package org.apache.directory.studio.ldapbrowser.core.model;
 
-// TODO: replace by NamingException or InvalidNameException
+
+/**
+ * @deprecated This class will be removed in the next version. The DN/RDN/RDNPart 
+ * classes are replaced with the shared-ldap LdapDN/Rdn/ATAV. This class just 
+ * remains to provide backward compatibility of the old browserconnections.xml
+ * file that stores searches and bookmarks.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public class NameException extends Exception
 {
 
     private static final long serialVersionUID = 1L;
 
 
+    /**
+     * Creates a new instance of NameException.
+     * 
+     * @param message the message
+     */
     public NameException( String message )
     {
         super( message );

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/RDN.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/RDN.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/RDN.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/RDN.java Sun Nov  4 11:10:19 2007
@@ -34,6 +34,11 @@
 /**
  * A RDN represents a LDAP relative distinguished name.
  *
+ * @deprecated This class will be removed in the next version. The DN/RDN/RDNPart 
+ * classes are replaced with the shared-ldap LdapDN/Rdn/ATAV. This class just 
+ * remains to provide backward compatibility of the old browserconnections.xml
+ * file that stores searches and bookmarks.
+ * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/RDNPart.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/RDNPart.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/RDNPart.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/RDNPart.java Sun Nov  4 11:10:19 2007
@@ -30,6 +30,11 @@
 /**
  * A RDNPart represents a attribute type-value-pair, used in RDN. 
  * 
+ * @deprecated This class will be removed in the next version. The DN/RDN/RDNPart 
+ * classes are replaced with the shared-ldap LdapDN/Rdn/ATAV. This class just 
+ * remains to provide backward compatibility of the old browserconnections.xml
+ * file that stores searches and bookmarks.
+ * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/SearchParameter.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/SearchParameter.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/SearchParameter.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/SearchParameter.java Sun Nov  4 11:10:19 2007
@@ -23,6 +23,9 @@
 
 import java.io.Serializable;
 
+import javax.naming.InvalidNameException;
+
+import org.apache.directory.shared.ldap.name.LdapDN;
 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.ISearch.SearchScope;
@@ -45,7 +48,7 @@
     private String name;
 
     /** The search base. */
-    private DN searchBase;
+    private LdapDN searchBase;
 
     /** The filter. */
     private String filter;
@@ -282,7 +285,7 @@
      * 
      * @return the search base
      */
-    public DN getSearchBase()
+    public LdapDN getSearchBase()
     {
         return searchBase;
     }
@@ -293,13 +296,36 @@
      * 
      * @param searchBase the search base
      */
-    public void setSearchBase( DN searchBase )
+    public void setSearchBase( LdapDN searchBase )
     {
         assert searchBase != null;
         this.searchBase = searchBase;
     }
 
 
+    /**
+     * Sets the search base, a null search base is not allowed.
+     * 
+     * @deprecated This method will be removed in the next version. The DN/RDN/RDNPart 
+     * classes are replaced with the shared-ldap LdapDN/Rdn/ATAV. This method just 
+     * remains to provide backward compatibility of the old browserconnections.xml
+     * file that stores searches and bookmarks.
+     * 
+     * @param searchBase the search base
+     */
+    public void setSearchBase( DN searchBase )
+    {
+        assert searchBase != null;
+        try
+        {
+            setSearchBase( new LdapDN( searchBase.toString() ) );
+        }
+        catch ( InvalidNameException e )
+        {
+        }
+    }
+    
+    
     /**
      * Gets the time limit in milliseconds, 0 means no limit.
      * 

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/URL.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/URL.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/URL.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/URL.java Sun Nov  4 11:10:19 2007
@@ -24,6 +24,9 @@
 import java.io.UnsupportedEncodingException;
 import java.net.URLDecoder;
 
+import javax.naming.InvalidNameException;
+
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.studio.connection.core.ConnectionParameter.EncryptionMethod;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearch.SearchScope;
@@ -107,7 +110,7 @@
      * @param connection the connection
      * @param dn the DN
      */
-    public URL( IBrowserConnection connection, DN dn )
+    public URL( IBrowserConnection connection, LdapDN dn )
     {
         this( connection );
 
@@ -116,7 +119,7 @@
             throw new IllegalArgumentException( BrowserCoreMessages.model__empty_url );
         }
 
-        this.dn = dn.toString();
+        this.dn = dn.getUpName();
     }
 
 
@@ -485,7 +488,7 @@
      * @return the dn
      * @throws NoSuchFieldException if not has dn
      */
-    public DN getDn() throws NoSuchFieldException
+    public LdapDN getDn() throws NoSuchFieldException
     {
         if ( dn == null )
         {
@@ -494,9 +497,9 @@
 
         try
         {
-            return new DN( dn );
+            return new LdapDN( dn );
         }
-        catch ( NameException e )
+        catch ( InvalidNameException e )
         {
             throw new NoSuchFieldException( BrowserCoreMessages.model__url_no_dn );
         }

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/AbstractEntry.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/AbstractEntry.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/AbstractEntry.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/AbstractEntry.java Sun Nov  4 11:10:19 2007
@@ -28,6 +28,7 @@
 import java.util.List;
 import java.util.Map;
 
+import org.apache.directory.shared.ldap.name.Rdn;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
 import org.apache.directory.studio.ldapbrowser.core.events.AttributeAddedEvent;
@@ -44,7 +45,6 @@
 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;
-import org.apache.directory.studio.ldapbrowser.core.model.RDN;
 import org.apache.directory.studio.ldapbrowser.core.model.URL;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.AttributeTypeDescription;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.ObjectClassDescription;
@@ -101,7 +101,7 @@
      * 
      * @param newRdn the new RDN
      */
-    protected abstract void setRdn( RDN newRdn );
+    protected abstract void setRdn( Rdn newRdn );
 
 
     /**
@@ -405,9 +405,10 @@
     /**
      * {@inheritDoc}
      */
-    public RDN getRdn()
+    public Rdn getRdn()
     {
-        return getDn().getRdn();
+        Rdn rdn = getDn().getRdn();
+        return rdn == null ? new Rdn() : rdn;
     }
 
 
@@ -737,7 +738,7 @@
      */
     public String toString()
     {
-        return getDn().toString();
+        return getDn().getUpName();
     }
 
 

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/AliasBaseEntry.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/AliasBaseEntry.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/AliasBaseEntry.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/AliasBaseEntry.java Sun Nov  4 11:10:19 2007
@@ -21,7 +21,7 @@
 package org.apache.directory.studio.ldapbrowser.core.model.impl;
 
 
-import org.apache.directory.studio.ldapbrowser.core.model.DN;
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 
 
@@ -49,7 +49,7 @@
      * @param connection the connection of the alias
      * @param dn the DN of the alias target
      */
-    public AliasBaseEntry( IBrowserConnection connection, DN dn )
+    public AliasBaseEntry( IBrowserConnection connection, LdapDN dn )
     {
         super( connection, dn );
     }

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/BaseDNEntry.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/BaseDNEntry.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/BaseDNEntry.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/BaseDNEntry.java Sun Nov  4 11:10:19 2007
@@ -21,10 +21,10 @@
 package org.apache.directory.studio.ldapbrowser.core.model.impl;
 
 
-import org.apache.directory.studio.ldapbrowser.core.model.DN;
+import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.Rdn;
 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.RDN;
 
 
 /**
@@ -39,7 +39,7 @@
     private static final long serialVersionUID = -5444229580355372176L;
 
     /** The base DN. */
-    protected DN baseDn;
+    protected LdapDN baseDn;
 
     /** The browser connection. */
     protected IBrowserConnection browserConnection;
@@ -56,7 +56,7 @@
      * @param baseDn the base DN
      * @param browserConnection the browser connection
      */
-    public BaseDNEntry( DN baseDn, IBrowserConnection browserConnection )
+    public BaseDNEntry( LdapDN baseDn, IBrowserConnection browserConnection )
     {
         assert baseDn != null;
         assert browserConnection != null;
@@ -70,7 +70,7 @@
     /**
      * @see org.apache.directory.studio.ldapbrowser.core.model.IEntry#getDn()
      */
-    public DN getDn()
+    public LdapDN getDn()
     {
         return baseDn;
     }
@@ -97,7 +97,7 @@
     /**
      * @see org.apache.directory.studio.ldapbrowser.core.model.impl.AbstractEntry#setRdn(org.apache.directory.studio.ldapbrowser.core.model.RDN)
      */
-    protected void setRdn( RDN newRdn )
+    protected void setRdn( Rdn newRdn )
     {
     }
 

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Bookmark.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Bookmark.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Bookmark.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Bookmark.java Sun Nov  4 11:10:19 2007
@@ -21,12 +21,12 @@
 package org.apache.directory.studio.ldapbrowser.core.model.impl;
 
 
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.ldapbrowser.core.events.BookmarkUpdateEvent;
 import org.apache.directory.studio.ldapbrowser.core.events.EventRegistry;
 import org.apache.directory.studio.ldapbrowser.core.internal.search.LdapSearchPageScoreComputer;
 import org.apache.directory.studio.ldapbrowser.core.model.BookmarkParameter;
-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;
@@ -84,7 +84,7 @@
      * @param dn the target DN
      * @param name the symbolic name
      */
-    public Bookmark( IBrowserConnection connection, DN dn, String name )
+    public Bookmark( IBrowserConnection connection, LdapDN dn, String name )
     {
         this.connection = connection;
         this.bookmarkParameter = new BookmarkParameter( dn, name );
@@ -95,7 +95,7 @@
     /**
      * {@inheritDoc}
      */
-    public DN getDn()
+    public LdapDN getDn()
     {
         return this.bookmarkParameter.getDn();
     }
@@ -104,7 +104,7 @@
     /**
      * {@inheritDoc}
      */
-    public void setDn( DN dn )
+    public void setDn( LdapDN dn )
     {
         this.bookmarkParameter.setDn( dn );
         this.fireBookmarkUpdated( BookmarkUpdateEvent.Detail.BOOKMARK_UPDATED );

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/BrowserConnection.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/BrowserConnection.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/BrowserConnection.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/BrowserConnection.java Sun Nov  4 11:10:19 2007
@@ -25,6 +25,9 @@
 import java.util.HashMap;
 import java.util.Map;
 
+import javax.naming.InvalidNameException;
+
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.core.ConnectionCorePlugin;
 import org.apache.directory.studio.connection.core.ConnectionFolder;
@@ -35,13 +38,12 @@
 import org.apache.directory.studio.ldapbrowser.core.events.BrowserConnectionUpdateEvent;
 import org.apache.directory.studio.ldapbrowser.core.events.EventRegistry;
 import org.apache.directory.studio.ldapbrowser.core.internal.search.LdapSearchPageScoreComputer;
-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.IRootDSE;
-import org.apache.directory.studio.ldapbrowser.core.model.NameException;
 import org.apache.directory.studio.ldapbrowser.core.model.URL;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.Schema;
+import org.apache.directory.studio.ldapbrowser.core.utils.DnUtils;
 import org.eclipse.search.ui.ISearchPageScoreComputer;
 
 
@@ -162,11 +164,12 @@
     /**
      * {@inheritDoc}
      */
-    public IEntry getEntryFromCache( DN dn )
+    public IEntry getEntryFromCache( LdapDN dn )
     {
-        if ( dnToEntryCache != null && dnToEntryCache.containsKey( dn.toOidString( getSchema() ) ) )
+        String oidDn = DnUtils.getNormalizedOidString( dn, getSchema() );
+        if ( dnToEntryCache != null && dnToEntryCache.containsKey( oidDn ) )
         {
-            return dnToEntryCache.get( dn.toOidString( getSchema() ) );
+            return dnToEntryCache.get( oidDn );
         }
         if ( getRootDSE().getDn().equals( dn ) )
         {
@@ -198,13 +201,13 @@
     /**
      * {@inheritDoc}
      */
-    public DN getBaseDN()
+    public LdapDN getBaseDN()
     {
         try
         {
-            return new DN( connection.getConnectionParameter().getExtendedProperty( CONNECTION_PARAMETER_BASE_DN ) );
+            return new LdapDN( connection.getConnectionParameter().getExtendedProperty( CONNECTION_PARAMETER_BASE_DN ) );
         }
-        catch ( NameException e )
+        catch ( InvalidNameException e )
         {
             return null;
         }
@@ -214,7 +217,7 @@
     /**
      * {@inheritDoc}
      */
-    public void setBaseDN( DN baseDN )
+    public void setBaseDN( LdapDN baseDN )
     {
         connection.getConnectionParameter().setExtendedProperty( CONNECTION_PARAMETER_BASE_DN, baseDN.toString() );
         ConnectionEventRegistry.fireConnectionUpdated( connection, this );
@@ -389,9 +392,9 @@
     /**
      * {@inheritDoc}
      */
-    public void cacheEntry( IEntry entry )
+    public synchronized void cacheEntry( IEntry entry )
     {
-        dnToEntryCache.put( entry.getDn().toOidString( getSchema() ), entry );
+        dnToEntryCache.put( DnUtils.getNormalizedOidString( entry.getDn(), getSchema() ), entry );
     }
 
 
@@ -400,16 +403,16 @@
      * 
      * @param entry the entry to remove from cache
      */
-    protected void uncacheEntry( IEntry entry )
+    protected synchronized void uncacheEntry( IEntry entry )
     {
-        dnToEntryCache.remove( entry.getDn().toOidString( getSchema() ) );
+        dnToEntryCache.remove( DnUtils.getNormalizedOidString( entry.getDn(), getSchema() ) );
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void uncacheEntryRecursive( IEntry entry )
+    public synchronized void uncacheEntryRecursive( IEntry entry )
     {
         IEntry[] children = entry.getChildren();
         if ( entry.getChildren() != null )
@@ -428,9 +431,9 @@
      * 
      * @param dn the DN of the entry to remove from cache
      */
-    protected void uncacheEntry( DN dn )
+    protected synchronized void uncacheEntry( LdapDN dn )
     {
-        dnToEntryCache.remove( dn.toOidString( getSchema() ) );
+        dnToEntryCache.remove( DnUtils.getNormalizedOidString( dn, getSchema() ) );
     }
 
 

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DelegateEntry.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DelegateEntry.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DelegateEntry.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DelegateEntry.java Sun Nov  4 11:10:19 2007
@@ -21,6 +21,8 @@
 package org.apache.directory.studio.ldapbrowser.core.model.impl;
 
 
+import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.Rdn;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCorePlugin;
 import org.apache.directory.studio.ldapbrowser.core.events.AttributeAddedEvent;
 import org.apache.directory.studio.ldapbrowser.core.events.AttributeDeletedEvent;
@@ -37,11 +39,9 @@
 import org.apache.directory.studio.ldapbrowser.core.events.ValueRenamedEvent;
 import org.apache.directory.studio.ldapbrowser.core.internal.search.LdapSearchPageScoreComputer;
 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.IAttribute;
 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.RDN;
 import org.apache.directory.studio.ldapbrowser.core.model.URL;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.Subschema;
 import org.eclipse.search.ui.ISearchPageScoreComputer;
@@ -64,7 +64,7 @@
     private String connectionId;
 
     /** The DN. */
-    private DN dn;
+    private LdapDN dn;
 
     /** The entry does not exist flag. */
     private boolean entryDoesNotExist;
@@ -84,7 +84,7 @@
      * @param connection the connection of the delegate
      * @param dn the DN of the delegate
      */
-    public DelegateEntry( IBrowserConnection connection, DN dn )
+    public DelegateEntry( IBrowserConnection connection, LdapDN dn )
     {
         this.connectionId = connection.getConnection().getId();
         this.dn = dn;
@@ -141,7 +141,7 @@
     /**
      * {@inheritDoc}
      */
-    public DN getDn()
+    public LdapDN getDn()
     {
         if ( getDelegate() != null )
         {
@@ -341,7 +341,7 @@
     /**
      * {@inheritDoc}
      */
-    public RDN getRdn()
+    public Rdn getRdn()
     {
         if ( getDelegate() != null )
         {
@@ -349,7 +349,8 @@
         }
         else
         {
-            return dn.getRdn();
+            Rdn rdn = dn.getRdn();
+            return rdn == null ? new Rdn() : rdn;
         }
     }
 

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DirectoryMetadataEntry.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DirectoryMetadataEntry.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DirectoryMetadataEntry.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DirectoryMetadataEntry.java Sun Nov  4 11:10:19 2007
@@ -21,7 +21,7 @@
 package org.apache.directory.studio.ldapbrowser.core.model.impl;
 
 
-import org.apache.directory.studio.ldapbrowser.core.model.DN;
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 
 
@@ -52,7 +52,7 @@
      * @param dn the DN
      * @param browserConnection the browser connection
      */
-    public DirectoryMetadataEntry( DN dn, IBrowserConnection browserConnection )
+    public DirectoryMetadataEntry( LdapDN dn, IBrowserConnection browserConnection )
     {
         super();
         this.baseDn = dn;

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DummyConnection.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DummyConnection.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DummyConnection.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DummyConnection.java Sun Nov  4 11:10:19 2007
@@ -21,10 +21,10 @@
 package org.apache.directory.studio.ldapbrowser.core.model.impl;
 
 
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.ldapbrowser.core.BookmarkManager;
 import org.apache.directory.studio.ldapbrowser.core.SearchManager;
-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.IRootDSE;
@@ -62,9 +62,9 @@
     /** 
      * {@inheritDoc}
      */
-    public DN getBaseDN()
+    public LdapDN getBaseDN()
     {
-        return new DN();
+        return LdapDN.EMPTY_LDAPDN;
     }
 
 
@@ -98,7 +98,7 @@
     /** 
      * {@inheritDoc}
      */
-    public IEntry getEntryFromCache( DN dn )
+    public IEntry getEntryFromCache( LdapDN dn )
     {
         return null;
     }
@@ -152,7 +152,7 @@
     /** 
      * {@inheritDoc}
      */
-    public void setBaseDN( DN baseDN )
+    public void setBaseDN( LdapDN baseDN )
     {
     }
 

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DummyEntry.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DummyEntry.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DummyEntry.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DummyEntry.java Sun Nov  4 11:10:19 2007
@@ -28,17 +28,17 @@
 import java.util.List;
 import java.util.Map;
 
+import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.Rdn;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCorePlugin;
 import org.apache.directory.studio.ldapbrowser.core.events.AttributeAddedEvent;
 import org.apache.directory.studio.ldapbrowser.core.events.AttributeDeletedEvent;
 import org.apache.directory.studio.ldapbrowser.core.events.EventRegistry;
 import org.apache.directory.studio.ldapbrowser.core.model.AttributeDescription;
 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.IAttribute;
 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.RDN;
 import org.apache.directory.studio.ldapbrowser.core.model.URL;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.ObjectClassDescription;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.Subschema;
@@ -63,7 +63,7 @@
     private static final long serialVersionUID = 4833907766031149971L;
 
     /** The DN. */
-    private DN dn;
+    private LdapDN dn;
 
     /** The dummy connection. */
     private DummyConnection dummyConnection;
@@ -86,7 +86,7 @@
      * @param dn the DN
      * @param browserConnection the browser connection
      */
-    public DummyEntry( DN dn, IBrowserConnection browserConnection )
+    public DummyEntry( LdapDN dn, IBrowserConnection browserConnection )
     {
         if ( browserConnection instanceof DummyConnection )
         {
@@ -107,7 +107,7 @@
      * 
      * @param dn the new DN
      */
-    public void setDn( DN dn )
+    public void setDn( LdapDN dn )
     {
         this.dn = dn;
     }
@@ -209,7 +209,7 @@
     /**
      * {@inheritDoc}
      */
-    public DN getDn()
+    public LdapDN getDn()
     {
         return dn;
     }
@@ -236,9 +236,10 @@
     /**
      * {@inheritDoc}
      */
-    public RDN getRdn()
+    public Rdn getRdn()
     {
-        return dn.getRdn();
+        Rdn rdn = dn.getRdn();
+        return rdn == null ? new Rdn() : rdn;
     }
 
 

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Entry.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Entry.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Entry.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Entry.java Sun Nov  4 11:10:19 2007
@@ -21,10 +21,11 @@
 package org.apache.directory.studio.ldapbrowser.core.model.impl;
 
 
-import org.apache.directory.studio.ldapbrowser.core.model.DN;
+import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.Rdn;
 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.RDN;
+import org.apache.directory.studio.ldapbrowser.core.utils.DnUtils;
 
 
 /**
@@ -39,7 +40,7 @@
     private static final long serialVersionUID = -4718107307581983276L;
 
     /** The RDN. */
-    protected RDN rdn;
+    protected Rdn rdn;
 
     /** The parent entry. */
     protected IEntry parent;
@@ -56,7 +57,7 @@
      * @param parent the parent entry
      * @param rdn the RDN
      */
-    public Entry( IEntry parent, RDN rdn )
+    public Entry( IEntry parent, Rdn rdn )
     {
         assert parent != null;
         assert rdn != null;
@@ -70,7 +71,7 @@
     /**
      * @see org.apache.directory.studio.ldapbrowser.core.model.impl.AbstractEntry#getRdn()
      */
-    public RDN getRdn()
+    public Rdn getRdn()
     {
         // performance opt.
         return rdn;
@@ -80,9 +81,9 @@
     /**
      * @see org.apache.directory.studio.ldapbrowser.core.model.IEntry#getDn()
      */
-    public DN getDn()
+    public LdapDN getDn()
     {
-        DN dn = new DN( new RDN( rdn ), parent.getDn() );
+        LdapDN dn = DnUtils.composeDn( rdn, parent.getDn() );
         return dn;
     }
 
@@ -108,7 +109,7 @@
     /**
      * @see org.apache.directory.studio.ldapbrowser.core.model.impl.AbstractEntry#setRdn(org.apache.directory.studio.ldapbrowser.core.model.RDN)
      */
-    protected void setRdn( RDN newRdn )
+    protected void setRdn( Rdn newRdn )
     {
         this.rdn = newRdn;
     }

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/ModificationLogger.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/ModificationLogger.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/ModificationLogger.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/ModificationLogger.java Sun Nov  4 11:10:19 2007
@@ -34,6 +34,7 @@
 import java.util.logging.LogRecord;
 import java.util.logging.Logger;
 
+import javax.naming.InvalidNameException;
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
 import javax.naming.directory.Attribute;
@@ -42,12 +43,11 @@
 import javax.naming.directory.ModificationItem;
 import javax.naming.ldap.Control;
 
+import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.Rdn;
 import org.apache.directory.studio.connection.core.IModificationLogger;
 import org.apache.directory.studio.ldapbrowser.core.BrowserConnectionManager;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreConstants;
-import org.apache.directory.studio.ldapbrowser.core.model.DN;
-import org.apache.directory.studio.ldapbrowser.core.model.NameException;
-import org.apache.directory.studio.ldapbrowser.core.model.RDN;
 import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifChangeAddRecord;
 import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifChangeDeleteRecord;
 import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifChangeModDnRecord;
@@ -60,6 +60,7 @@
 import org.apache.directory.studio.ldapbrowser.core.model.ldif.lines.LdifNewrdnLine;
 import org.apache.directory.studio.ldapbrowser.core.model.ldif.lines.LdifNewsuperiorLine;
 import org.apache.directory.studio.ldapbrowser.core.model.ldif.lines.LdifSepLine;
+import org.apache.directory.studio.ldapbrowser.core.utils.DnUtils;
 
 
 /**
@@ -316,21 +317,21 @@
     {
         try
         {
-            DN dn = new DN( newDn );
-            RDN newrdn = dn.getRdn();
-            DN newsuperior = dn.getParentDn();
+            LdapDN dn = new LdapDN( newDn );
+            Rdn newrdn = dn.getRdn();
+            LdapDN newsuperior = DnUtils.getParent( dn );
 
             LdifChangeModDnRecord record = LdifChangeModDnRecord.create( oldDn );
             //record.addControl( controlLine );
-            record.setNewrdn( LdifNewrdnLine.create( newrdn.toString() ) );
+            record.setNewrdn( LdifNewrdnLine.create( newrdn.getUpName() ) );
             record.setDeloldrdn( deleteOldRdn ? LdifDeloldrdnLine.create1() : LdifDeloldrdnLine.create0() );
-            record.setNewsuperior( LdifNewsuperiorLine.create( newsuperior.toString() ) );
+            record.setNewsuperior( LdifNewsuperiorLine.create( newsuperior.getUpName() ) );
             record.finish( LdifSepLine.create() );
 
             String formattedString = record.toFormattedString();
             log( formattedString, ex );
         }
-        catch ( NameException e )
+        catch ( InvalidNameException e )
         {
         }
     }

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/OpenBrowserConnectionsJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/OpenBrowserConnectionsJob.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/OpenBrowserConnectionsJob.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/OpenBrowserConnectionsJob.java Sun Nov  4 11:10:19 2007
@@ -21,6 +21,7 @@
 package org.apache.directory.studio.ldapbrowser.core.model.impl;
 
 
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.core.StudioProgressMonitor;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
@@ -28,7 +29,6 @@
 import org.apache.directory.studio.ldapbrowser.core.jobs.InitializeAttributesJob;
 import org.apache.directory.studio.ldapbrowser.core.jobs.ReloadSchemasJob;
 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.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.IRootDSE;
@@ -144,7 +144,7 @@
                 {
                     // check if schema is up-to-date
                     SearchParameter sp = new SearchParameter();
-                    sp.setSearchBase( new DN( rootDSE.getAttribute( IRootDSE.ROOTDSE_ATTRIBUTE_SUBSCHEMASUBENTRY )
+                    sp.setSearchBase( new LdapDN( rootDSE.getAttribute( IRootDSE.ROOTDSE_ATTRIBUTE_SUBSCHEMASUBENTRY )
                         .getStringValue() ) );
                     sp.setFilter( Schema.SCHEMA_FILTER );
                     sp.setScope( SearchScope.OBJECT );

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/ReferralBaseEntry.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/ReferralBaseEntry.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/ReferralBaseEntry.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/ReferralBaseEntry.java Sun Nov  4 11:10:19 2007
@@ -21,7 +21,7 @@
 package org.apache.directory.studio.ldapbrowser.core.model.impl;
 
 
-import org.apache.directory.studio.ldapbrowser.core.model.DN;
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 
 
@@ -49,7 +49,7 @@
      * @param connection the connection of the referral target
      * @param dn the DN of the referral target
      */
-    public ReferralBaseEntry( IBrowserConnection connection, DN dn )
+    public ReferralBaseEntry( IBrowserConnection connection, LdapDN dn )
     {
         super( connection, dn );
     }

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/RootDSE.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/RootDSE.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/RootDSE.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/RootDSE.java Sun Nov  4 11:10:19 2007
@@ -23,7 +23,7 @@
 
 import java.util.Arrays;
 
-import org.apache.directory.studio.ldapbrowser.core.model.DN;
+import org.apache.directory.shared.ldap.name.LdapDN;
 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;
@@ -54,7 +54,7 @@
      */
     public RootDSE( IBrowserConnection browserConnection )
     {
-        super( new DN(), browserConnection );
+        super( LdapDN.EMPTY_LDAPDN, browserConnection );
     }
 
 

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Search.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Search.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Search.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Search.java Sun Nov  4 11:10:19 2007
@@ -24,12 +24,12 @@
 import java.text.SimpleDateFormat;
 import java.util.Date;
 
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.ldapbrowser.core.events.EventRegistry;
 import org.apache.directory.studio.ldapbrowser.core.events.SearchUpdateEvent;
 import org.apache.directory.studio.ldapbrowser.core.internal.search.LdapSearchPageScoreComputer;
 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.ISearchResult;
@@ -141,7 +141,7 @@
      * @param controls
      *                the controls
      */
-    public Search( String searchName, IBrowserConnection conn, DN searchBase, String filter,
+    public Search( String searchName, IBrowserConnection conn, LdapDN searchBase, String filter,
         String[] returningAttributes, SearchScope scope, int countLimit, int timeLimit,
         AliasDereferencingMethod aliasesDereferencingMethod, ReferralHandlingMethod referralsHandlingMethod,
         boolean initHasChildrenFlag, boolean initAliasAndReferralsFlag, Control[] controls )
@@ -332,7 +332,7 @@
     /**
      * {@inheritDoc}
      */
-    public DN getSearchBase()
+    public LdapDN getSearchBase()
     {
         return searchParameter.getSearchBase();
     }
@@ -341,7 +341,7 @@
     /**
      * {@inheritDoc}
      */
-    public void setSearchBase( DN searchBase )
+    public void setSearchBase( LdapDN searchBase )
     {
         searchParameter.setSearchBase( searchBase );
         fireSearchUpdated( SearchUpdateEvent.EventDetail.SEARCH_PARAMETER_UPDATED );

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/SearchResult.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/SearchResult.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/SearchResult.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/SearchResult.java Sun Nov  4 11:10:19 2007
@@ -23,10 +23,10 @@
 
 import java.util.ArrayList;
 
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.ldapbrowser.core.internal.search.LdapSearchPageScoreComputer;
 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.IAttribute;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
@@ -74,7 +74,7 @@
     /**
      * {@inheritDoc}
      */
-    public DN getDn()
+    public LdapDN getDn()
     {
         return entry.getDn();
     }

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Value.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Value.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Value.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Value.java Sun Nov  4 11:10:19 2007
@@ -21,13 +21,15 @@
 package org.apache.directory.studio.ldapbrowser.core.model.impl;
 
 
+import java.util.Iterator;
+
+import org.apache.directory.shared.ldap.name.AttributeTypeAndValue;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.ldapbrowser.core.internal.search.LdapSearchPageScoreComputer;
 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;
 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.utils.LdifUtils;
 import org.apache.directory.studio.ldapbrowser.core.utils.Utils;
 import org.eclipse.search.ui.ISearchPageScoreComputer;
@@ -304,11 +306,12 @@
      */
     public boolean isRdnPart()
     {
-        RDNPart[] parts = getAttribute().getEntry().getRdn().getParts();
-        for ( int p = 0; p < parts.length; p++ )
+        Iterator<AttributeTypeAndValue> atavIterator = getAttribute().getEntry().getRdn().iterator();
+        while(atavIterator.hasNext())
         {
-            if ( getAttribute().getDescription().equals( parts[p].getType() )
-                && getStringValue().equals( parts[p].getValue() ) )
+            AttributeTypeAndValue atav = atavIterator.next();
+            if ( getAttribute().getDescription().equals( atav.getUpType() )
+                && getStringValue().equals( atav.getUpValue() ) )
             {
                 return true;
             }

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Schema.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Schema.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Schema.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Schema.java Sun Nov  4 11:10:19 2007
@@ -37,8 +37,8 @@
 import java.util.Map;
 import java.util.Set;
 
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.studio.ldapbrowser.core.model.AttributeDescription;
-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.ldif.LdifEnumeration;
 import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifContainer;
@@ -100,7 +100,7 @@
 
     private LdifContentRecord schemaRecord;
 
-    private DN dn;
+    private LdapDN dn;
 
     private String[] objectClasses;
 
@@ -204,7 +204,7 @@
     {
 
         this.setSchemaRecord( schemaRecord );
-        this.setDn( new DN( schemaRecord.getDnLine().getValueAsString() ) );
+        this.setDn( new LdapDN( schemaRecord.getDnLine().getValueAsString() ) );
 
         LdifAttrValLine[] lines = schemaRecord.getAttrVals();
         for ( int i = 0; i < lines.length; i++ )
@@ -299,13 +299,13 @@
      * 
      * @return the dn of the schema record, may be null
      */
-    public DN getDn()
+    public LdapDN getDn()
     {
         return dn;
     }
 
 
-    public void setDn( DN dn )
+    public void setDn( LdapDN dn )
     {
         this.dn = dn;
     }
@@ -732,7 +732,6 @@
      */
     public AttributeTypeDescription getAttributeTypeDescription( String description )
     {
-
         AttributeDescription ad = new AttributeDescription( description );
         String attributeType = ad.getParsedAttributeType();
 

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/AttributeComparator.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/AttributeComparator.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/AttributeComparator.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/AttributeComparator.java Sun Nov  4 11:10:19 2007
@@ -23,8 +23,8 @@
 
 import java.util.Comparator;
 
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreConstants;
-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;
@@ -41,7 +41,7 @@
 
     public AttributeComparator( IBrowserConnection connection )
     {
-        this.dummyEntry = new DummyEntry( new DN(), connection );
+        this.dummyEntry = new DummyEntry( LdapDN.EMPTY_LDAPDN, connection );
     }
 
 

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/JNDIUtils.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/JNDIUtils.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/JNDIUtils.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/JNDIUtils.java Sun Nov  4 11:10:19 2007
@@ -20,6 +20,7 @@
 
 package org.apache.directory.studio.ldapbrowser.core.utils;
 
+
 import java.net.ConnectException;
 import java.net.NoRouteToHostException;
 import java.net.SocketException;
@@ -30,37 +31,45 @@
 import javax.naming.NamingException;
 import javax.naming.ReferralException;
 
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreConstants;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
 import org.apache.directory.studio.ldapbrowser.core.model.ConnectionException;
-import org.apache.directory.studio.ldapbrowser.core.model.DN;
-import org.apache.directory.studio.ldapbrowser.core.model.NameException;
 import org.apache.directory.studio.ldapbrowser.core.model.SearchParameter;
 
 
-
-
+/**
+ * Utility class for JNDI specific stuff.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public class JNDIUtils
 {
 
-    public static DN getDn( javax.naming.directory.SearchResult sr ) throws NamingException,
-        NameException, NoSuchFieldException
+    /**
+     * Gets the LdapDN from a JNDI SearchResult object.
+     *
+     * @param sr the JNDI search result
+     * @return the LdapDN 
+     * @throws NamingException
+     */
+    public static LdapDN getDn( javax.naming.directory.SearchResult sr ) throws NamingException
     {
         String dn = sr.getNameInNamespace();
-        dn = unescapeJndiName( dn );
-        return new DN( dn );
+        LdapDN ldapDn = new LdapDN( unescapeJndiName( dn ) );
+        return ldapDn;
     }
 
 
     /**
      * Correct some JNDI encodings...
      * 
-     * @param name
-     * @return
+     * @param name the DN
+     * @return the modified DN
      */
     public static String unescapeJndiName( String name )
     {
-
         if ( name.startsWith( "\"" ) && name.endsWith( "\"" ) ) { //$NON-NLS-1$ //$NON-NLS-2$
             name = name.substring( 1, name.length() - 1 );
         }
@@ -78,17 +87,25 @@
     }
 
 
+    /**
+     * Creates a connection exception.
+     * 
+     * @param searchParameter the search parameter
+     * @param e the exception
+     * 
+     * @return the connection exception
+     */
     public static ConnectionException createConnectionException( SearchParameter searchParameter, Throwable e )
     {
         ConnectionException connectionException = null;
         ConnectionException lastException = null;
-    
+
         do
         {
             String message = e.getMessage() != null ? e.getMessage() : e.getClass().getName();
             int ldapStatusCode = -1;
             String[] referrals = null;
-    
+
             // get LDAP status code
             // [LDAP: error code 21 - telephoneNumber: value #0 invalid per
             // syntax]
@@ -103,7 +120,7 @@
                 {
                 }
             }
-    
+
             // special causes
             // java_io_IOException=I/O exception occurred: {0}
             // java_io_EOFException=End of file encountered: {0}
@@ -131,15 +148,14 @@
             }
             if ( e instanceof ReferralException )
             {
-    
                 message = "Referrals: "; //$NON-NLS-1$
                 ReferralException re;
-                ArrayList referralsList = new ArrayList();
-    
+                ArrayList<Object> referralsList = new ArrayList<Object>();
+
                 re = ( ReferralException ) e;
                 message += BrowserCoreConstants.LINE_SEPARATOR + re.getReferralInfo();
                 referralsList.add( re.getReferralInfo() );
-    
+
                 while ( re.skipReferral() )
                 {
                     try
@@ -161,15 +177,15 @@
                         }
                     }
                 }
-    
-                referrals = ( String[] ) referralsList.toArray( new String[referralsList.size()] );
+
+                referrals = referralsList.toArray( new String[referralsList.size()] );
             }
-    
+
             ConnectionException ce;
             if ( referrals != null )
             {
-                ce = new org.apache.directory.studio.ldapbrowser.core.model.ReferralException(
-                    searchParameter, referrals, ldapStatusCode, message, e );
+                ce = new org.apache.directory.studio.ldapbrowser.core.model.ReferralException( searchParameter,
+                    referrals, ldapStatusCode, message, e );
             }
             else
             {
@@ -184,14 +200,14 @@
             {
                 connectionException = lastException;
             }
-    
+
             // next cause
             e = e.getCause();
         }
         while ( e != null );
-    
+
         return connectionException;
-    
+
     }
 
 }

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/ModelConverter.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/ModelConverter.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/ModelConverter.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/ModelConverter.java Sun Nov  4 11:10:19 2007
@@ -24,13 +24,14 @@
 /**
  * Utilities to convert between models
  */
+import javax.naming.InvalidNameException;
+
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.studio.ldapbrowser.core.events.EventRegistry;
-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;
 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.impl.Attribute;
 import org.apache.directory.studio.ldapbrowser.core.model.impl.DummyEntry;
 import org.apache.directory.studio.ldapbrowser.core.model.impl.Value;
@@ -59,10 +60,10 @@
      *
      * @return the resulting dummy entry
      *
-     * @throws NameException the name exception
+     * @throws InvalidNameException
      */
     public static DummyEntry ldifContentRecordToEntry( LdifContentRecord ldifContentRecord, IBrowserConnection connection )
-        throws NameException
+        throws InvalidNameException
     {
         return createIntern( ldifContentRecord, connection );
     }
@@ -76,10 +77,10 @@
      *
      * @return the resulting dummy entry
      *
-     * @throws NameException the name exception
+     * @throws InvalidNameException
      */
     public static DummyEntry ldifChangeAddRecordToEntry( LdifChangeAddRecord ldifChangeAddRecord, IBrowserConnection connection )
-        throws NameException
+        throws InvalidNameException
     {
         return createIntern( ldifChangeAddRecord, connection );
     }
@@ -93,15 +94,15 @@
      *
      * @return the dummy entry
      *
-     * @throws NameException the name exception
+     * @throws InvalidNameException
      */
-    private static DummyEntry createIntern( LdifRecord ldifRecord, IBrowserConnection connection ) throws NameException
+    private static DummyEntry createIntern( LdifRecord ldifRecord, IBrowserConnection connection ) throws InvalidNameException
     {
         LdifPart[] parts = ldifRecord.getParts();
 
         EventRegistry.suspendEventFireingInCurrentThread();
 
-        DummyEntry entry = new DummyEntry( new DN( ldifRecord.getDnLine().getValueAsString() ), connection );
+        DummyEntry entry = new DummyEntry( new LdapDN( ldifRecord.getDnLine().getValueAsString() ), connection );
 
         for ( int i = 0; i < parts.length; i++ )
         {
@@ -161,7 +162,7 @@
 
         // LdifChangeAddRecord record =
         // LdifChangeAddRecord.create(entry.getDn().toString());
-        LdifChangeAddRecord record = new LdifChangeAddRecord( LdifDnLine.create( entry.getDn().toString() ) );
+        LdifChangeAddRecord record = new LdifChangeAddRecord( LdifDnLine.create( entry.getDn().getUpName() ) );
         if ( mustCreateChangeTypeLine )
         {
             addControls( record, entry );
@@ -211,7 +212,7 @@
     public static LdifContentRecord entryToLdifContentRecord( IEntry entry )
     {
 
-        LdifContentRecord record = LdifContentRecord.create( entry.getDn().toString() );
+        LdifContentRecord record = LdifContentRecord.create( entry.getDn().getUpName() );
 
         IAttribute[] attributes = entry.getAttributes();
         for ( int i = 0; i < attributes.length; i++ )
@@ -277,9 +278,9 @@
     }
 
 
-    public static LdifDnLine dnToLdifDnLine( DN dn )
+    public static LdifDnLine dnToLdifDnLine( LdapDN dn )
     {
-        LdifDnLine line = LdifDnLine.create( dn.toString() );
+        LdifDnLine line = LdifDnLine.create( dn.getUpName() );
         return line;
     }
 

Modified: directory/studio/trunk/studio-ldapbrowser-ui/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/META-INF/MANIFEST.MF?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/META-INF/MANIFEST.MF (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/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-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/CopyDnAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/CopyDnAction.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/CopyDnAction.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/CopyDnAction.java Sun Nov  4 11:10:19 2007
@@ -55,27 +55,27 @@
         String dn = null;
         if ( getSelectedEntries().length > 0 )
         {
-            dn = getSelectedEntries()[0].getDn().toString();
+            dn = getSelectedEntries()[0].getDn().getUpName();
         }
         else if ( getSelectedAttributes().length > 0 )
         {
-            dn = getSelectedAttributes()[0].getEntry().getDn().toString();
+            dn = getSelectedAttributes()[0].getEntry().getDn().getUpName();
         }
         else if ( getSelectedAttributeHierarchies().length > 0 )
         {
-            dn = getSelectedAttributeHierarchies()[0].getAttribute().getEntry().getDn().toString();
+            dn = getSelectedAttributeHierarchies()[0].getAttribute().getEntry().getDn().getUpName();
         }
         else if ( getSelectedValues().length > 0 )
         {
-            dn = getSelectedValues()[0].getAttribute().getEntry().getDn().toString();
+            dn = getSelectedValues()[0].getAttribute().getEntry().getDn().getUpName();
         }
         else if ( getSelectedSearchResults().length > 0 )
         {
-            dn = getSelectedSearchResults()[0].getDn().toString();
+            dn = getSelectedSearchResults()[0].getDn().getUpName();
         }
         else if ( getSelectedBookmarks().length > 0 )
         {
-            dn = getSelectedBookmarks()[0].getDn().toString();
+            dn = getSelectedBookmarks()[0].getDn().getUpName();
         }
 
         if ( dn != null )

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/CopyEntryAsCsvAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/CopyEntryAsCsvAction.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/CopyEntryAsCsvAction.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/CopyEntryAsCsvAction.java Sun Nov  4 11:10:19 2007
@@ -265,7 +265,7 @@
                     BrowserUIConstants.PREFERENCE_SEARCHRESULTEDITOR_SHOW_DN ) )
             {
                 text.append( quoteCharacter );
-                text.append( entries[e].getDn().toString() );
+                text.append( entries[e].getDn().getUpName() );
                 text.append( quoteCharacter );
                 text.append( attributeDelimiter );
 

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/CopyEntryAsLdifAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/CopyEntryAsLdifAction.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/CopyEntryAsLdifAction.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/CopyEntryAsLdifAction.java Sun Nov  4 11:10:19 2007
@@ -27,9 +27,9 @@
 import java.util.List;
 import java.util.Set;
 
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreConstants;
 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.IEntry;
 import org.apache.directory.studio.ldapbrowser.core.model.IValue;
@@ -176,7 +176,7 @@
      * @param text
      *      the StringBuffer to serialize to
      */
-    protected void serializeDn( DN dn, StringBuffer text )
+    protected void serializeDn( LdapDN dn, StringBuffer text )
     {
         text.append( ModelConverter.dnToLdifDnLine( dn ).toFormattedString() );
     }

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/CopyValueAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/CopyValueAction.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/CopyValueAction.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/CopyValueAction.java Sun Nov  4 11:10:19 2007
@@ -26,10 +26,10 @@
 import java.util.LinkedHashSet;
 import java.util.Set;
 
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.studio.ldapbrowser.common.actions.BrowserAction;
 import org.apache.directory.studio.ldapbrowser.common.actions.CopyAction;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreConstants;
-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.IValue;
 import org.apache.directory.studio.ldapbrowser.core.utils.LdifUtils;
@@ -200,19 +200,19 @@
         }
         else if ( getSelectedSearchResults().length > 0 )
         {
-            DN dn = getSelectedSearchResults()[0].getDn();
+            LdapDN dn = getSelectedSearchResults()[0].getDn();
 
             if ( mode == MODE_UTF8 )
             {
-                text.append( LdifUtils.utf8decode( dn.toString().getBytes() ) );
+                text.append( dn.getUpName() );
             }
             else if ( mode == MODE_BASE64 )
             {
-                text.append( LdifUtils.base64encode( dn.toString().getBytes() ) );
+                text.append( LdifUtils.base64encode( LdifUtils.utf8encode( dn.getUpName() ) ) );
             }
             else if ( mode == MODE_HEX )
             {
-                text.append( LdifUtils.hexEncode( dn.toString().getBytes() ) );
+                text.append( LdifUtils.hexEncode( LdifUtils.utf8encode( dn.getUpName() ) ) );
             }
             else if ( mode == MODE_LDIF )
             {

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/LocateDnInDitAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/LocateDnInDitAction.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/LocateDnInDitAction.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/LocateDnInDitAction.java Sun Nov  4 11:10:19 2007
@@ -21,13 +21,13 @@
 package org.apache.directory.studio.ldapbrowser.ui.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.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.ui.BrowserUIConstants;
 import org.apache.directory.studio.ldapbrowser.ui.BrowserUIPlugin;
-
 import org.eclipse.jface.resource.ImageDescriptor;
 
 
@@ -83,13 +83,13 @@
             try
             {
                 IValue value = getSelectedAttributeHierarchies()[0].getAttribute().getValues()[0];
-                if ( value.isString() && new DN( value.getStringValue() ) != null )
+                if ( value.isString() && LdapDN.isValid( value.getStringValue() ) )
                 {
-                    return new ConnectionAndDn( value.getAttribute().getEntry().getBrowserConnection(), new DN( value
+                    return new ConnectionAndDn( value.getAttribute().getEntry().getBrowserConnection(), new LdapDN( value
                         .getStringValue() ) );
                 }
             }
-            catch ( NameException e )
+            catch ( InvalidNameException e )
             {
                 // no valid DN
             }
@@ -100,13 +100,13 @@
             try
             {
                 IValue value = getSelectedValues()[0];
-                if ( value.isString() && new DN( value.getStringValue() ) != null )
+                if ( value.isString() && LdapDN.isValid( value.getStringValue() ) )
                 {
-                    return new ConnectionAndDn( value.getAttribute().getEntry().getBrowserConnection(), new DN( value
+                    return new ConnectionAndDn( value.getAttribute().getEntry().getBrowserConnection(), new LdapDN( value
                         .getStringValue() ) );
                 }
             }
-            catch ( NameException e )
+            catch ( InvalidNameException e )
             {
                 // no valid DN
             }

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/LocateInDitAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/LocateInDitAction.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/LocateInDitAction.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/LocateInDitAction.java Sun Nov  4 11:10:19 2007
@@ -21,14 +21,13 @@
 package org.apache.directory.studio.ldapbrowser.ui.actions;
 
 
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.studio.ldapbrowser.common.actions.BrowserAction;
 import org.apache.directory.studio.ldapbrowser.common.jobs.RunnableContextJobAdapter;
 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.ui.views.browser.BrowserView;
-
 import org.eclipse.ui.IViewPart;
 import org.eclipse.ui.IWorkbenchPage;
 import org.eclipse.ui.PartInitException;
@@ -52,7 +51,7 @@
         if ( connectionAndDn != null )
         {
             IBrowserConnection connection = connectionAndDn.connection;
-            DN dn = connectionAndDn.dn;
+            LdapDN dn = connectionAndDn.dn;
 
             IEntry entry = connection.getEntryFromCache( dn );
             if ( entry == null )
@@ -126,7 +125,7 @@
         private IBrowserConnection connection;
 
         /** The DN */
-        private DN dn;
+        private LdapDN dn;
 
 
         /**
@@ -135,7 +134,7 @@
          * @param connection the connection
          * @param dn the DN
          */
-        protected ConnectionAndDn( IBrowserConnection connection, DN dn )
+        protected ConnectionAndDn( IBrowserConnection connection, LdapDN dn )
         {
             this.connection = connection;
             this.dn = dn;

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/MoveAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/MoveAction.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/MoveAction.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/MoveAction.java Sun Nov  4 11:10:19 2007
@@ -23,10 +23,10 @@
 
 import java.util.LinkedHashSet;
 
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.studio.ldapbrowser.common.actions.BrowserAction;
 import org.apache.directory.studio.ldapbrowser.common.dialogs.MoveEntriesDialog;
 import org.apache.directory.studio.ldapbrowser.core.jobs.MoveEntriesJob;
-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.IEntry;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearch;
@@ -197,7 +197,7 @@
         MoveEntriesDialog moveDialog = new MoveEntriesDialog( getShell(), entries );
         if ( moveDialog.open() == Dialog.OK )
         {
-            DN newParentDn = moveDialog.getParentDn();
+            LdapDN newParentDn = moveDialog.getParentDn();
             if ( newParentDn != null /* && !newRdn.equals(entry.getRdn()) */)
             {
                 IEntry newParentEntry = entries[0].getBrowserConnection().getEntryFromCache( newParentDn );

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/EntryPropertyPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/EntryPropertyPage.java?rev=591817&r1=591816&r2=591817&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/EntryPropertyPage.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/EntryPropertyPage.java Sun Nov  4 11:10:19 2007
@@ -30,7 +30,6 @@
 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.utils.Utils;
-
 import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionEvent;
@@ -247,9 +246,9 @@
         if ( !this.dnText.isDisposed() )
         {
 
-            this.setMessage( "Entry " + entry.getDn() );
+            this.setMessage( "Entry " + entry.getDn().getUpName() );
 
-            this.dnText.setText( entry.getDn().toString() );
+            this.dnText.setText( entry.getDn().getUpName() );
             this.urlText.setText( entry.getUrl().toString() );
             this.ctText.setText( getNonNullStringValue( entry
                 .getAttribute( IAttribute.OPERATIONAL_ATTRIBUTE_CREATE_TIMESTAMP ) ) );



Mime
View raw message