directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1030132 [1/2] - in /directory/studio/trunk: ./ plugins/connection.core/ plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/ plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io...
Date Tue, 02 Nov 2010 17:22:24 GMT
Author: pamarcelot
Date: Tue Nov  2 17:22:19 2010
New Revision: 1030132

URL: http://svn.apache.org/viewvc?rev=1030132&view=rev
Log:
Merged the 'connection-refactoring' branch.

Added:
    directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/DirectoryServerInfo.java
      - copied unchanged from r1030058, directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/DirectoryServerInfo.java
    directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/AbstractStudioNamingEnumeration.java
      - copied unchanged from r1030058, directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/AbstractStudioNamingEnumeration.java
    directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/ConnectionWrapperUtils.java
      - copied unchanged from r1030058, directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/ConnectionWrapperUtils.java
    directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/StudioNamingEnumeration.java
      - copied unchanged from r1030058, directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/StudioNamingEnumeration.java
    directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/StudioTrustManager.java
      - copied unchanged from r1030058, directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/StudioTrustManager.java
    directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/api/
      - copied from r1030058, directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/api/
    directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/api/CursorStudioNamingEnumeration.java
      - copied unchanged from r1030058, directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/api/CursorStudioNamingEnumeration.java
    directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/api/DirectoryApiConnectionWrapper.java
      - copied unchanged from r1030058, directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/api/DirectoryApiConnectionWrapper.java
    directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/JndiStudioNamingEnumeration.java
      - copied unchanged from r1030058, directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/JndiStudioNamingEnumeration.java
Removed:
    directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/StudioNamingEnumeration.java
    directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/StudioTrustManager.java
    directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/ldapbrowser/
Modified:
    directory/studio/trunk/   (props changed)
    directory/studio/trunk/plugins/connection.core/pom.xml
    directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/Connection.java
    directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/ConnectionCorePlugin.java
    directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/ConnectionParameter.java
    directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/IJndiLogger.java
    directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/IReferralHandler.java
    directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/ConnectionIO.java
    directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/ConnectionWrapper.java
    directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/JNDIConnectionWrapper.java
    directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/LdifModificationLogger.java
    directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/LdifSearchLogger.java
    directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/ReferralsInfo.java
    directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/StudioSSLSocketFactory.java
    directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/jobs/CheckBindRunnable.java
    directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/jobs/CheckNetworkParameterRunnable.java
    directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/jobs/CloseConnectionsRunnable.java
    directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/jobs/OpenConnectionsRunnable.java
    directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/jobs/StudioConnectionJob.java
    directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/ConnectionUIReferralHandler.java
    directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/RunnableContextRunner.java
    directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/UIAuthHandler.java
    directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/actions/CloseConnectionAction.java
    directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/actions/NewConnectionFolderAction.java
    directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/actions/OpenConnectionAction.java
    directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/dialogs/CredentialsDialog.java
    directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/dialogs/SelectReferralConnectionDialog.java
    directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/messages.properties
    directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/messages_de.properties
    directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/messages_fr.properties
    directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ConnectionLabelProvider.java
    directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/NetworkParameterPage.java
    directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserContentProvider.java
    directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/BrowserConnectionListener.java
    directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CopyEntriesRunnable.java
    directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CreateEntryRunnable.java
    directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/DeleteEntriesRunnable.java
    directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportDsmlRunnable.java
    directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportLdifRunnable.java
    directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportDsmlRunnable.java
    directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportLdifRunnable.java
    directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/RenameEntryRunnable.java
    directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/SearchRunnable.java
    directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/ContinuedSearchResultEntry.java
    directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DelegateEntry.java
    directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/SearchContinuation.java
    directory/studio/trunk/plugins/ldapbrowser.ui/resources/icons/entry_alias.png
    directory/studio/trunk/plugins/ldapbrowser.ui/resources/icons/entry_ref.png
    directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/ImportExportAction.java
    directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/RootDSEPropertyPage.java
    directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/messages.properties
    directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/messages_de.properties
    directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/messages_fr.properties
    directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/ConnectionViewUniversalListener.java
    directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/BatchOperationWizard.java
    directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/ExportConnectionsWizard.java
    directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/messages.properties
    directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/ApacheDsSchemaConnector.java
    directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/GenericSchemaConnector.java

Propchange: directory/studio/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Nov  2 17:22:19 2010
@@ -1 +1,2 @@
 /directory/studio/branches/shared-trunk-merge:1004968-1005876
+/directory/studio/branches/studio-connection-refactoring:1022102-1030058

Modified: directory/studio/trunk/plugins/connection.core/pom.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/connection.core/pom.xml?rev=1030132&r1=1030131&r2=1030132&view=diff
==============================================================================
--- directory/studio/trunk/plugins/connection.core/pom.xml (original)
+++ directory/studio/trunk/plugins/connection.core/pom.xml Tue Nov  2 17:22:19 2010
@@ -110,6 +110,7 @@
  org.apache.commons.io;bundle-version="${org.apache.commons.io.version}",
  org.apache.commons.lang;bundle-version="${org.apache.commons.lang.version}",
  org.apache.directory.shared.ldap;bundle-version="${org.apache.directory.shared.validversion}",
+ org.apache.directory.shared.ldapclientapi;bundle-version="${org.apache.directory.shared.validversion}",
  org.apache.directory.studio.common.core,
  org.apache.directory.studio.ldifparser,
  org.apache.httpcomponents.httpclient;bundle-version="${org.apache.httpcomponents.version}",
@@ -166,11 +167,21 @@
     </dependency>
     <dependency>
       <groupId>org.apache.directory.studio</groupId>
+      <artifactId>org.apache.directory.shared.ldapclientapi</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.directory.studio</groupId>
       <artifactId>org.apache.httpcomponents.httpclient</artifactId>
       <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.directory.studio</groupId>
+      <artifactId>org.apache.mina.core</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.directory.studio</groupId>
       <artifactId>org.dom4j.dom4j</artifactId>
       <scope>provided</scope>
     </dependency>

Modified: directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/Connection.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/Connection.java?rev=1030132&r1=1030131&r2=1030132&view=diff
==============================================================================
--- directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/Connection.java (original)
+++ directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/Connection.java Tue Nov  2 17:22:19 2010
@@ -24,7 +24,10 @@ package org.apache.directory.studio.conn
 import org.apache.directory.shared.ldap.util.LdapURL;
 import org.apache.directory.studio.connection.core.ConnectionParameter.AuthenticationMethod;
 import org.apache.directory.studio.connection.core.ConnectionParameter.EncryptionMethod;
+import org.apache.directory.studio.connection.core.ConnectionParameter.NetworkProvider;
 import org.apache.directory.studio.connection.core.event.ConnectionEventRegistry;
+import org.apache.directory.studio.connection.core.io.ConnectionWrapper;
+import org.apache.directory.studio.connection.core.io.api.DirectoryApiConnectionWrapper;
 import org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper;
 import org.eclipse.core.runtime.IAdaptable;
 
@@ -36,7 +39,6 @@ import org.eclipse.core.runtime.IAdaptab
  */
 public class Connection implements ConnectionPropertyPageProvider, IAdaptable
 {
-
     /**
      * Enum for alias dereferencing method.
      * 
@@ -44,7 +46,6 @@ public class Connection implements Conne
      */
     public static enum AliasDereferencingMethod
     {
-
         /** Never. */
         NEVER(0),
 
@@ -109,7 +110,6 @@ public class Connection implements Conne
      */
     public static enum ReferralHandlingMethod
     {
-
         /** Ignore. */
         IGNORE(0),
 
@@ -170,7 +170,8 @@ public class Connection implements Conne
 
     private ConnectionParameter connectionParameter;
 
-    private JNDIConnectionWrapper jndiConnectionWrapper;
+    /** The connection wrapper */
+    private ConnectionWrapper connectionWrapper;
 
 
     /**
@@ -190,7 +191,7 @@ public class Connection implements Conne
     public Object clone()
     {
         ConnectionParameter cp = new ConnectionParameter( getName(), getHost(), getPort(), getEncryptionMethod(),
-            getAuthMethod(), getBindPrincipal(), getBindPassword(), getSaslRealm(), isReadOnly(),
+            getNetworkProvider(), getAuthMethod(), getBindPrincipal(), getBindPassword(), getSaslRealm(), isReadOnly(),
             getConnectionParameter().getExtendedProperties() );
 
         Connection clone = new Connection( cp );
@@ -200,17 +201,55 @@ public class Connection implements Conne
 
 
     /**
-     * Gets the JNDI connection wrapper.
+     * Gets the connection wrapper.
      * 
-     * @return the JNDI connection wrapper
+     * @return the connection wrapper
+     */
+    public ConnectionWrapper getConnectionWrapper()
+    {
+        switch ( connectionParameter.getNetworkProvider() )
+        {
+            case JNDI:
+                return getJndiConnectionWrapper();
+            case APACHE_DIRECTORY_LDAP_API:
+                return getDirectoryApiConnectionWrapper();
+        }
+
+        return null;
+    }
+
+
+    /**
+     * Gets a JNDI connection wrapper.
+     *
+     * @return
+     *      a JNDI connection wrapper
+     */
+    private JNDIConnectionWrapper getJndiConnectionWrapper()
+    {
+        if ( ( connectionWrapper == null ) || !( connectionWrapper instanceof JNDIConnectionWrapper ) )
+        {
+            connectionWrapper = new JNDIConnectionWrapper( this );
+        }
+
+        return ( JNDIConnectionWrapper ) connectionWrapper;
+    }
+
+
+    /**
+     * Gets a Directory API connection wrapper.
+     *
+     * @return
+     *      a Directory API connection wrapper
      */
-    public JNDIConnectionWrapper getJNDIConnectionWrapper()
+    private DirectoryApiConnectionWrapper getDirectoryApiConnectionWrapper()
     {
-        if ( jndiConnectionWrapper == null )
+        if ( ( connectionWrapper == null ) || !( connectionWrapper instanceof DirectoryApiConnectionWrapper ) )
         {
-            jndiConnectionWrapper = new JNDIConnectionWrapper( this );
+            connectionWrapper = new DirectoryApiConnectionWrapper( this );
         }
-        return jndiConnectionWrapper;
+
+        return ( DirectoryApiConnectionWrapper ) connectionWrapper;
     }
 
 
@@ -282,6 +321,17 @@ public class Connection implements Conne
 
 
     /**
+     * Gets the network provider.
+     * 
+     * @return the network provider
+     */
+    public NetworkProvider getNetworkProvider()
+    {
+        return connectionParameter.getNetworkProvider();
+    }
+
+
+    /**
      * Gets the id.
      * 
      * @return the id

Modified: directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/ConnectionCorePlugin.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/ConnectionCorePlugin.java?rev=1030132&r1=1030131&r2=1030132&view=diff
==============================================================================
--- directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/ConnectionCorePlugin.java (original)
+++ directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/ConnectionCorePlugin.java Tue Nov  2 17:22:19 2010
@@ -26,7 +26,6 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.PropertyResourceBundle;
 
-import org.apache.directory.shared.ldap.util.LdapURL;
 import org.apache.directory.studio.connection.core.event.CoreEventRunner;
 import org.apache.directory.studio.connection.core.event.EventRunner;
 import org.apache.directory.studio.connection.core.io.jndi.LdifModificationLogger;
@@ -154,7 +153,7 @@ public class ConnectionCorePlugin extend
             Connection[] connections = connectionManager.getConnections();
             for ( int i = 0; i < connections.length; i++ )
             {
-                connections[i].getJNDIConnectionWrapper().disconnect();
+                connections[i].getConnectionWrapper().disconnect();
             }
             connectionManager = null;
         }
@@ -309,7 +308,7 @@ public class ConnectionCorePlugin extend
             // that just cancels referral chasing
             referralHandler = new IReferralHandler()
             {
-                public Connection getReferralConnection( List<LdapURL> referralUrls )
+                public Connection getReferralConnection( List<String> referralUrls )
                 {
                     // null cancels referral chasing
                     return null;

Modified: directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/ConnectionParameter.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/ConnectionParameter.java?rev=1030132&r1=1030131&r2=1030132&view=diff
==============================================================================
--- directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/ConnectionParameter.java (original)
+++ directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/ConnectionParameter.java Tue Nov  2 17:22:19 2010
@@ -34,7 +34,6 @@ import java.util.UUID;
  */
 public class ConnectionParameter
 {
-
     /**
      * Enum for the used encryption method.
      * 
@@ -42,7 +41,6 @@ public class ConnectionParameter
      */
     public enum EncryptionMethod
     {
-
         /** No encryption. */
         NONE,
 
@@ -54,13 +52,26 @@ public class ConnectionParameter
     }
 
     /**
+     * Enum for the network provider.
+     * 
+     * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+     */
+    public enum NetworkProvider
+    {
+        /** No encryption. */
+        JNDI,
+
+        /** SSL encryption. */
+        APACHE_DIRECTORY_LDAP_API
+    }
+
+    /**
      * Enum for the used authentication method.
      * 
      * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
      */
     public enum AuthenticationMethod
     {
-
         /** No authentication, anonymous bind. */
         NONE,
 
@@ -113,6 +124,9 @@ public class ConnectionParameter
     /** The encryption method. */
     private EncryptionMethod encryptionMethod;
 
+    /** The network provider. */
+    private NetworkProvider networkProvider;
+
     /** The authentication method. */
     private AuthenticationMethod authMethod;
 
@@ -183,14 +197,15 @@ public class ConnectionParameter
      * @param extendedProperties the extended properties
      */
     public ConnectionParameter( String name, String host, int port, EncryptionMethod encryptionMethod,
-        AuthenticationMethod authMethod, String bindPrincipal, String bindPassword, String saslRealm,
-        boolean isReadOnly, Map<String, String> extendedProperties )
+        NetworkProvider networkProvider, AuthenticationMethod authMethod, String bindPrincipal, String bindPassword,
+        String saslRealm, boolean isReadOnly, Map<String, String> extendedProperties )
     {
         this.id = createId();
         this.name = name;
         this.host = host;
         this.port = port;
         this.encryptionMethod = encryptionMethod;
+        this.networkProvider = networkProvider;
         this.authMethod = authMethod;
         this.bindPrincipal = bindPrincipal;
         this.bindPassword = bindPassword;
@@ -337,6 +352,28 @@ public class ConnectionParameter
 
 
     /**
+     * Gets the network provider.
+     *
+     * @return the network provider
+     */
+    public NetworkProvider getNetworkProvider()
+    {
+        return networkProvider;
+    }
+
+
+    /**
+     * Sets the network provider.
+     *
+     * @param networkProvider the network provider
+     */
+    public void setNetworkProvider( NetworkProvider networkProvider )
+    {
+        this.networkProvider = networkProvider;
+    }
+
+
+    /**
      * Gets the id.
      * 
      * @return the id

Modified: directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/IJndiLogger.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/IJndiLogger.java?rev=1030132&r1=1030131&r2=1030132&view=diff
==============================================================================
--- directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/IJndiLogger.java (original)
+++ directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/IJndiLogger.java Tue Nov  2 17:22:19 2010
@@ -26,6 +26,7 @@ import javax.naming.directory.Modificati
 import javax.naming.directory.SearchControls;
 import javax.naming.ldap.Control;
 
+import org.apache.directory.shared.ldap.message.Referral;
 import org.apache.directory.studio.connection.core.Connection.AliasDereferencingMethod;
 import org.apache.directory.studio.connection.core.io.jndi.ReferralsInfo;
 import org.apache.directory.studio.connection.core.io.jndi.StudioSearchResult;
@@ -178,7 +179,7 @@ public interface IJndiLogger
      * @param requestNum the request number
      * @param the naming exception if an error occurred, null otherwise
      */
-    public void logSearchResultReference( Connection connection, ReferralsInfo.Referral referral,
+    public void logSearchResultReference( Connection connection, Referral referral,
         ReferralsInfo referralsInfo, long requestNum, NamingException namingException );
 
 

Modified: directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/IReferralHandler.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/IReferralHandler.java?rev=1030132&r1=1030131&r2=1030132&view=diff
==============================================================================
--- directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/IReferralHandler.java (original)
+++ directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/IReferralHandler.java Tue Nov  2 17:22:19 2010
@@ -23,8 +23,6 @@ package org.apache.directory.studio.conn
 
 import java.util.List;
 
-import org.apache.directory.shared.ldap.util.LdapURL;
-
 
 /**
  * Callback interface to request the target connection 
@@ -44,6 +42,6 @@ public interface IReferralHandler
      * @param referralURLs the referral URLs
      * @return the target connection, null to cancel referral chasing
      */
-    public Connection getReferralConnection( List<LdapURL> referralUrls );
+    public Connection getReferralConnection( List<String> referralUrls );
 
 }

Modified: directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/ConnectionIO.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/ConnectionIO.java?rev=1030132&r1=1030131&r2=1030132&view=diff
==============================================================================
--- directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/ConnectionIO.java (original)
+++ directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/ConnectionIO.java Tue Nov  2 17:22:19 2010
@@ -35,6 +35,7 @@ import org.apache.directory.studio.conne
 import org.apache.directory.studio.connection.core.ConnectionParameter.EncryptionMethod;
 import org.apache.directory.studio.connection.core.ConnectionParameter.Krb5Configuration;
 import org.apache.directory.studio.connection.core.ConnectionParameter.Krb5CredentialConfiguration;
+import org.apache.directory.studio.connection.core.ConnectionParameter.NetworkProvider;
 import org.apache.directory.studio.connection.core.ConnectionParameter.SaslQop;
 import org.apache.directory.studio.connection.core.ConnectionParameter.SaslSecurityStrength;
 import org.dom4j.Attribute;
@@ -62,6 +63,7 @@ public class ConnectionIO
     private static final String HOST_TAG = "host"; //$NON-NLS-1$
     private static final String PORT_TAG = "port"; //$NON-NLS-1$
     private static final String ENCRYPTION_METHOD_TAG = "encryptionMethod"; //$NON-NLS-1$
+    private static final String NETWORK_PROVIDER_TAG = "networkProvider"; //$NON-NLS-1$
     private static final String AUTH_METHOD_TAG = "authMethod"; //$NON-NLS-1$
     private static final String BIND_PRINCIPAL_TAG = "bindPrincipal"; //$NON-NLS-1$
     private static final String BIND_PASSWORD_TAG = "bindPassword"; //$NON-NLS-1$
@@ -195,6 +197,26 @@ public class ConnectionIO
             }
         }
 
+        // Network Provider
+        Attribute networkProviderAttribute = element.attribute( NETWORK_PROVIDER_TAG );
+        if ( networkProviderAttribute != null )
+        {
+            try
+            {
+                connection.setNetworkProvider( NetworkProvider.valueOf( networkProviderAttribute.getValue() ) );
+            }
+            catch ( IllegalArgumentException e )
+            {
+                throw new ConnectionIOException( "Unable to parse 'Network Provider' of connection '" //$NON-NLS-1$
+                    + connection.getName() + "' as int value. Network Provider value :" //$NON-NLS-1$
+                    + networkProviderAttribute.getValue() );
+            }
+        }
+        else
+        {
+            connection.setNetworkProvider( NetworkProvider.JNDI );
+        }
+
         // Auth Method
         Attribute authMethodAttribute = element.attribute( AUTH_METHOD_TAG );
         if ( authMethodAttribute != null )
@@ -380,6 +402,9 @@ public class ConnectionIO
         // Encryption Method
         connectionElement.addAttribute( ENCRYPTION_METHOD_TAG, connection.getEncryptionMethod().toString() );
 
+        // Network Parameter
+        connectionElement.addAttribute( NETWORK_PROVIDER_TAG, connection.getNetworkProvider().toString() );
+
         // Auth Method
         connectionElement.addAttribute( AUTH_METHOD_TAG, connection.getAuthMethod().toString() );
 

Modified: directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/ConnectionWrapper.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/ConnectionWrapper.java?rev=1030132&r1=1030131&r2=1030132&view=diff
==============================================================================
--- directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/ConnectionWrapper.java (original)
+++ directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/ConnectionWrapper.java Tue Nov  2 17:22:19 2010
@@ -20,7 +20,18 @@
 package org.apache.directory.studio.connection.core.io;
 
 
+import java.util.Collection;
+
+import javax.naming.directory.Attributes;
+import javax.naming.directory.ModificationItem;
+import javax.naming.directory.SearchControls;
+import javax.naming.ldap.Control;
+
 import org.apache.directory.studio.common.core.jobs.StudioProgressMonitor;
+import org.apache.directory.studio.connection.core.Connection.AliasDereferencingMethod;
+import org.apache.directory.studio.connection.core.Connection.ReferralHandlingMethod;
+import org.apache.directory.studio.connection.core.io.jndi.ReferralsInfo;
+import org.apache.directory.studio.connection.core.io.jndi.JndiStudioNamingEnumeration;
 
 
 /**
@@ -66,4 +77,83 @@ public interface ConnectionWrapper
      */
     public boolean isConnected();
 
+
+    /**
+     * Sets the binary attributes.
+     * 
+     * @param binaryAttributes the binary attributes
+     */
+    public void setBinaryAttributes( Collection<String> binaryAttributes );
+
+
+    /**
+     * Search.
+     * 
+     * @param searchBase the search base
+     * @param filter the filter
+     * @param searchControls the controls
+     * @param aliasesDereferencingMethod the aliases dereferencing method
+     * @param referralsHandlingMethod the referrals handling method
+     * @param controls the LDAP controls
+     * @param monitor the progress monitor
+     * @param referralsInfo the referrals info
+     * 
+     * @return the naming enumeration or null if an exception occurs.
+     */
+    public StudioNamingEnumeration search( final String searchBase, final String filter,
+        final SearchControls searchControls, final AliasDereferencingMethod aliasesDereferencingMethod,
+        final ReferralHandlingMethod referralsHandlingMethod, final Control[] controls,
+        final StudioProgressMonitor monitor, final ReferralsInfo referralsInfo );
+
+
+    /**
+     * Modifies attributes of an entry.
+     * 
+     * @param dn the DN
+     * @param modificationItems the modification items
+     * @param controls the controls
+     * @param monitor the progress monitor
+     * @param referralsInfo the referrals info
+     */
+    public void modifyEntry( final String dn, final ModificationItem[] modificationItems, final Control[] controls,
+        final StudioProgressMonitor monitor, final ReferralsInfo referralsInfo );
+
+
+    /**
+     * Renames an entry.
+     * 
+     * @param oldDn the old DN
+     * @param newDn the new DN
+     * @param deleteOldRdn true to delete the old RDN
+     * @param controls the controls
+     * @param monitor the progress monitor
+     * @param referralsInfo the referrals info
+     */
+    public void renameEntry( final String oldDn, final String newDn, final boolean deleteOldRdn,
+        final Control[] controls, final StudioProgressMonitor monitor, final ReferralsInfo referralsInfo );
+
+
+    /**
+     * Creates an entry.
+     * 
+     * @param dn the entry's DN
+     * @param attributes the entry's attributes
+     * @param controls the controls
+     * @param monitor the progress monitor
+     * @param referralsInfo the referrals info
+     */
+    public void createEntry( final String dn, final Attributes attributes, final Control[] controls,
+        final StudioProgressMonitor monitor, final ReferralsInfo referralsInfo );
+
+
+    /**
+     * Deletes an entry.
+     * 
+     * @param dn the DN of the entry to delete
+     * @param controls the controls
+     * @param monitor the progress monitor
+     * @param referralsInfo the referrals info
+     */
+    public void deleteEntry( final String dn, final Control[] controls, final StudioProgressMonitor monitor,
+        final ReferralsInfo referralsInfo );
 }

Modified: directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/JNDIConnectionWrapper.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/JNDIConnectionWrapper.java?rev=1030132&r1=1030131&r2=1030132&view=diff
==============================================================================
--- directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/JNDIConnectionWrapper.java (original)
+++ directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/JNDIConnectionWrapper.java Tue Nov  2 17:22:19 2010
@@ -23,6 +23,7 @@ package org.apache.directory.studio.conn
 import java.io.File;
 import java.io.IOException;
 import java.security.PrivilegedAction;
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.Hashtable;
@@ -66,8 +67,8 @@ import javax.security.auth.login.LoginEx
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.lang.StringUtils;
 import org.apache.directory.shared.ldap.codec.util.LdapURLEncodingException;
-import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
-import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.message.Referral;
+import org.apache.directory.shared.ldap.message.ReferralImpl;
 import org.apache.directory.shared.ldap.util.LdapURL;
 import org.apache.directory.studio.common.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.connection.core.Connection;
@@ -78,15 +79,12 @@ import org.apache.directory.studio.conne
 import org.apache.directory.studio.connection.core.ConnectionParameter;
 import org.apache.directory.studio.connection.core.ConnectionParameter.AuthenticationMethod;
 import org.apache.directory.studio.connection.core.IAuthHandler;
-import org.apache.directory.studio.connection.core.IConnectionListener;
 import org.apache.directory.studio.connection.core.ICredentials;
 import org.apache.directory.studio.connection.core.IJndiLogger;
-import org.apache.directory.studio.connection.core.IReferralHandler;
 import org.apache.directory.studio.connection.core.Messages;
 import org.apache.directory.studio.connection.core.Utils;
-import org.apache.directory.studio.connection.core.event.ConnectionEventRegistry;
 import org.apache.directory.studio.connection.core.io.ConnectionWrapper;
-import org.apache.directory.studio.connection.core.io.jndi.ReferralsInfo.Referral;
+import org.apache.directory.studio.connection.core.io.ConnectionWrapperUtils;
 import org.eclipse.core.runtime.Preferences;
 import org.eclipse.osgi.util.NLS;
 
@@ -105,7 +103,6 @@ import org.eclipse.osgi.util.NLS;
  */
 public class JNDIConnectionWrapper implements ConnectionWrapper
 {
-
     private static final String JAVA_NAMING_LDAP_DELETE_RDN = "java.naming.ldap.deleteRDN"; //$NON-NLS-1$
 
     private static final String AUTHMETHOD_NONE = "none"; //$NON-NLS-1$
@@ -327,7 +324,7 @@ public class JNDIConnectionWrapper imple
      * 
      * @return the naming enumeration or null if an exception occurs.
      */
-    public StudioNamingEnumeration search( final String searchBase, final String filter,
+    public JndiStudioNamingEnumeration search( final String searchBase, final String filter,
         final SearchControls searchControls, final AliasDereferencingMethod aliasesDereferencingMethod,
         final ReferralHandlingMethod referralsHandlingMethod, final Control[] controls,
         final StudioProgressMonitor monitor, final ReferralsInfo referralsInfo )
@@ -355,19 +352,20 @@ public class JNDIConnectionWrapper imple
                     // perform the search
                     NamingEnumeration<SearchResult> result = searchCtx.search( JNDIConnectionWrapper
                         .getSaveJndiName( searchBase ), filter, searchControls );
-                    namingEnumeration = new StudioNamingEnumeration( connection, searchCtx, result, null, searchBase,
+                    namingEnumeration = new JndiStudioNamingEnumeration( connection, searchCtx, result, null,
+                        searchBase,
                         filter, searchControls, aliasesDereferencingMethod, referralsHandlingMethod, controls,
                         requestNum, monitor, referralsInfo );
                 }
                 catch ( PartialResultException e )
                 {
-                    namingEnumeration = new StudioNamingEnumeration( connection, searchCtx, null, e, searchBase,
+                    namingEnumeration = new JndiStudioNamingEnumeration( connection, searchCtx, null, e, searchBase,
                         filter, searchControls, aliasesDereferencingMethod, referralsHandlingMethod, controls,
                         requestNum, monitor, referralsInfo );
                 }
                 catch ( ReferralException e )
                 {
-                    namingEnumeration = new StudioNamingEnumeration( connection, searchCtx, null, e, searchBase,
+                    namingEnumeration = new JndiStudioNamingEnumeration( connection, searchCtx, null, e, searchBase,
                         filter, searchControls, aliasesDereferencingMethod, referralsHandlingMethod, controls,
                         requestNum, monitor, referralsInfo );
                 }
@@ -441,7 +439,7 @@ public class JNDIConnectionWrapper imple
         {
             public void run()
             {
-                boolean logModifycation = true;
+                boolean logModification = true;
                 try
                 {
                     // create modify context
@@ -455,18 +453,21 @@ public class JNDIConnectionWrapper imple
                 }
                 catch ( ReferralException re )
                 {
-                    logModifycation = false;
+                    logModification = false;
                     try
                     {
                         ReferralsInfo newReferralsInfo = handleReferralException( re, referralsInfo );
                         Referral referral = newReferralsInfo.getNextReferral();
                         if ( referral != null )
                         {
-                            Connection referralConnection = getReferralConnection( referral, monitor, this );
+                            Connection referralConnection = ConnectionWrapperUtils.getReferralConnection( referral,
+                                monitor, this );
                             if ( referralConnection != null )
                             {
-                                String referralDn = referral.getLdapURLs().get( 0 ).getDn().getName();
-                                referralConnection.getJNDIConnectionWrapper().modifyEntry( referralDn,
+                                List<String> urls = new ArrayList<String>( referral.getLdapUrls() );
+
+                                String referralDn = new LdapURL( urls.get( 0 ) ).getDn().getName();
+                                referralConnection.getConnectionWrapper().modifyEntry( referralDn,
                                     modificationItems, controls, monitor, newReferralsInfo );
                             }
                             else
@@ -481,13 +482,17 @@ public class JNDIConnectionWrapper imple
                     {
                         namingException = ne;
                     }
+                    catch ( LdapURLEncodingException e )
+                    {
+                        namingException = new NamingException( e.getMessage() );
+                    }
                 }
                 catch ( NamingException ne )
                 {
                     namingException = ne;
                 }
 
-                if ( logModifycation )
+                if ( logModification )
                 {
                     for ( IJndiLogger logger : getJndiLoggers() )
                     {
@@ -540,7 +545,7 @@ public class JNDIConnectionWrapper imple
         {
             public void run()
             {
-                boolean logModifycation = true;
+                boolean logModification = true;
                 try
                 {
                     // create modify context
@@ -564,17 +569,18 @@ public class JNDIConnectionWrapper imple
                 }
                 catch ( ReferralException re )
                 {
-                    logModifycation = false;
+                    logModification = false;
                     try
                     {
                         ReferralsInfo newReferralsInfo = handleReferralException( re, referralsInfo );
                         Referral referral = newReferralsInfo.getNextReferral();
                         if ( referral != null )
                         {
-                            Connection referralConnection = getReferralConnection( referral, monitor, this );
+                            Connection referralConnection = ConnectionWrapperUtils.getReferralConnection( referral,
+                                monitor, this );
                             if ( referralConnection != null )
                             {
-                                referralConnection.getJNDIConnectionWrapper().renameEntry( oldDn, newDn, deleteOldRdn,
+                                referralConnection.getConnectionWrapper().renameEntry( oldDn, newDn, deleteOldRdn,
                                     controls, monitor, newReferralsInfo );
                             }
                             else
@@ -593,7 +599,7 @@ public class JNDIConnectionWrapper imple
                     namingException = ne;
                 }
 
-                if ( logModifycation )
+                if ( logModification )
                 {
                     for ( IJndiLogger logger : getJndiLoggers() )
                     {
@@ -645,7 +651,7 @@ public class JNDIConnectionWrapper imple
         {
             public void run()
             {
-                boolean logModifycation = true;
+                boolean logModification = true;
                 try
                 {
                     // create modify context
@@ -659,18 +665,21 @@ public class JNDIConnectionWrapper imple
                 }
                 catch ( ReferralException re )
                 {
-                    logModifycation = false;
+                    logModification = false;
                     try
                     {
                         ReferralsInfo newReferralsInfo = handleReferralException( re, referralsInfo );
                         Referral referral = newReferralsInfo.getNextReferral();
                         if ( referral != null )
                         {
-                            Connection referralConnection = getReferralConnection( referral, monitor, this );
+                            Connection referralConnection = ConnectionWrapperUtils.getReferralConnection( referral,
+                                monitor, this );
                             if ( referralConnection != null )
                             {
-                                String referralDn = referral.getLdapURLs().get( 0 ).getDn().getName();
-                                referralConnection.getJNDIConnectionWrapper().createEntry( referralDn, attributes,
+                                List<String> urls = new ArrayList<String>( referral.getLdapUrls() );
+
+                                String referralDn = new LdapURL( urls.get( 0 ) ).getDn().getName();
+                                referralConnection.getConnectionWrapper().createEntry( referralDn, attributes,
                                     controls, monitor, newReferralsInfo );
                             }
                             else
@@ -683,13 +692,17 @@ public class JNDIConnectionWrapper imple
                     {
                         namingException = ne;
                     }
+                    catch ( LdapURLEncodingException e )
+                    {
+                        namingException = new NamingException( e.getMessage() );
+                    }
                 }
                 catch ( NamingException ne )
                 {
                     namingException = ne;
                 }
 
-                if ( logModifycation )
+                if ( logModification )
                 {
                     for ( IJndiLogger logger : getJndiLoggers() )
                     {
@@ -740,7 +753,7 @@ public class JNDIConnectionWrapper imple
         {
             public void run()
             {
-                boolean logModifycation = true;
+                boolean logModification = true;
                 try
                 {
                     // create modify context
@@ -754,18 +767,21 @@ public class JNDIConnectionWrapper imple
                 }
                 catch ( ReferralException re )
                 {
-                    logModifycation = false;
+                    logModification = false;
                     try
                     {
                         ReferralsInfo newReferralsInfo = handleReferralException( re, referralsInfo );
                         Referral referral = newReferralsInfo.getNextReferral();
                         if ( referral != null )
                         {
-                            Connection referralConnection = getReferralConnection( referral, monitor, this );
+                            Connection referralConnection = ConnectionWrapperUtils.getReferralConnection( referral,
+                                monitor, this );
                             if ( referralConnection != null )
                             {
-                                String referralDn = referral.getLdapURLs().get( 0 ).getDn().getName();
-                                referralConnection.getJNDIConnectionWrapper().deleteEntry( referralDn, controls,
+                                List<String> urls = new ArrayList<String>( referral.getLdapUrls() );
+
+                                String referralDn = new LdapURL( urls.get( 0 ) ).getDn().getName();
+                                referralConnection.getConnectionWrapper().deleteEntry( referralDn, controls,
                                     monitor, newReferralsInfo );
                             }
                             else
@@ -778,13 +794,17 @@ public class JNDIConnectionWrapper imple
                     {
                         namingException = ne;
                     }
+                    catch ( LdapURLEncodingException e )
+                    {
+                        namingException = new NamingException( e.getMessage() );
+                    }
                 }
                 catch ( NamingException ne )
                 {
                     namingException = ne;
                 }
 
-                if ( logModifycation )
+                if ( logModification )
                 {
                     for ( IJndiLogger logger : getJndiLoggers() )
                     {
@@ -1357,7 +1377,7 @@ public class JNDIConnectionWrapper imple
 
     abstract class InnerRunnable implements Runnable
     {
-        protected StudioNamingEnumeration namingEnumeration = null;
+        protected JndiStudioNamingEnumeration namingEnumeration = null;
         protected NamingException namingException = null;
         protected boolean canceled = false;
 
@@ -1378,7 +1398,7 @@ public class JNDIConnectionWrapper imple
          * 
          * @return the result
          */
-        public StudioNamingEnumeration getResult()
+        public JndiStudioNamingEnumeration getResult()
         {
             return namingEnumeration;
         }
@@ -1492,39 +1512,6 @@ public class JNDIConnectionWrapper imple
 
 
     /**
-     * Gets the referral connection from the given URL.
-     * 
-     * @param url the URL
-     * @param monitor the progress monitor
-     * @param source the source
-     * 
-     * @return the referral connection
-     */
-    static Connection getReferralConnection( Referral referral, StudioProgressMonitor monitor, Object source )
-    {
-        Connection referralConnection = null;
-        IReferralHandler referralHandler = ConnectionCorePlugin.getDefault().getReferralHandler();
-        if ( referralHandler != null )
-        {
-            referralConnection = referralHandler.getReferralConnection( referral.getLdapURLs() );
-
-            // open connection if not yet open
-            if ( referralConnection != null && !referralConnection.getJNDIConnectionWrapper().isConnected() )
-            {
-                referralConnection.getJNDIConnectionWrapper().connect( monitor );
-                referralConnection.getJNDIConnectionWrapper().bind( monitor );
-                for ( IConnectionListener listener : ConnectionCorePlugin.getDefault().getConnectionListeners() )
-                {
-                    listener.connectionOpened( referralConnection, monitor );
-                }
-                ConnectionEventRegistry.fireConnectionOpened( referralConnection, source );
-            }
-        }
-        return referralConnection;
-    }
-
-
-    /**
      * Retrieves all referrals from the ReferralException and
      * creates or updates the ReferralsInfo.
      * 
@@ -1582,27 +1569,16 @@ public class JNDIConnectionWrapper imple
     private static Referral handleReferralException( ReferralException referralException,
         ReferralsInfo initialReferralsInfo, Referral referral ) throws NamingException
     {
-        try
-        {
-            String info = ( String ) referralException.getReferralInfo();
-            String name = referralException.getRemainingName().toString();
-            LdapURL url = new LdapURL( info );
-            DN dn = new DN( name );
+        String info = ( String ) referralException.getReferralInfo();
 
-            if ( referral == null )
-            {
-                referral = initialReferralsInfo.new Referral( dn );
-                initialReferralsInfo.addReferral( referral );
-            }
-            referral.addUrl( url );
-        }
-        catch ( LdapURLEncodingException e )
-        {
-        }
-        catch ( LdapInvalidDnException e )
+        if ( referral == null )
         {
+            referral = new ReferralImpl();
+            initialReferralsInfo.addReferral( referral );
         }
 
+        referral.addLdapUrl( info );
+
         return referral;
     }
 

Modified: directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/LdifModificationLogger.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/LdifModificationLogger.java?rev=1030132&r1=1030131&r2=1030132&view=diff
==============================================================================
--- directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/LdifModificationLogger.java (original)
+++ directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/LdifModificationLogger.java Tue Nov  2 17:22:19 2010
@@ -48,6 +48,7 @@ import javax.naming.directory.SearchCont
 import javax.naming.ldap.Control;
 
 import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
+import org.apache.directory.shared.ldap.message.Referral;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.name.RDN;
 import org.apache.directory.studio.connection.core.Connection;
@@ -465,7 +466,7 @@ public class LdifModificationLogger impl
     /**
      * {@inheritDoc}
      */
-    public void logSearchResultReference( Connection connection, ReferralsInfo.Referral referral,
+    public void logSearchResultReference( Connection connection, Referral referral,
         ReferralsInfo referralsInfo, long requestNum, NamingException ex )
     {
         // don't log searches 

Modified: directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/LdifSearchLogger.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/LdifSearchLogger.java?rev=1030132&r1=1030131&r2=1030132&view=diff
==============================================================================
--- directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/LdifSearchLogger.java (original)
+++ directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/LdifSearchLogger.java Tue Nov  2 17:22:19 2010
@@ -47,14 +47,15 @@ import javax.naming.directory.SearchCont
 import javax.naming.ldap.Control;
 
 import org.apache.commons.lang.StringUtils;
+import org.apache.directory.shared.ldap.message.Referral;
 import org.apache.directory.shared.ldap.util.LdapURL;
 import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.connection.core.Connection.AliasDereferencingMethod;
 import org.apache.directory.studio.connection.core.ConnectionCoreConstants;
 import org.apache.directory.studio.connection.core.ConnectionCorePlugin;
 import org.apache.directory.studio.connection.core.ConnectionManager;
 import org.apache.directory.studio.connection.core.IJndiLogger;
 import org.apache.directory.studio.connection.core.Utils;
-import org.apache.directory.studio.connection.core.Connection.AliasDereferencingMethod;
 import org.apache.directory.studio.ldifparser.LdifFormatParameters;
 import org.apache.directory.studio.ldifparser.model.container.LdifContentRecord;
 import org.apache.directory.studio.ldifparser.model.lines.LdifAttrValLine;
@@ -410,7 +411,7 @@ public class LdifSearchLogger implements
     /**
      * {@inheritDoc}
      */
-    public void logSearchResultReference( Connection connection, ReferralsInfo.Referral referral,
+    public void logSearchResultReference( Connection connection, Referral referral,
         ReferralsInfo referralsInfo, long requestNum, NamingException ex )
     {
         if ( !isSearchResultEntryLogEnabled() )
@@ -419,7 +420,7 @@ public class LdifSearchLogger implements
         }
 
         Collection<LdifLineBase> lines = new ArrayList<LdifLineBase>();
-        lines.add( LdifCommentLine.create( "# reference : " + ( referral != null ? referral.getLdapURLs() : "null" ) ) ); //$NON-NLS-1$ //$NON-NLS-2$
+        lines.add( LdifCommentLine.create( "# reference : " + ( referral != null ? referral.getLdapUrls() : "null" ) ) ); //$NON-NLS-1$ //$NON-NLS-2$
         lines.add( LdifSepLine.create() );
 
         String formattedString = ""; //$NON-NLS-1$

Modified: directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/ReferralsInfo.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/ReferralsInfo.java?rev=1030132&r1=1030131&r2=1030132&view=diff
==============================================================================
--- directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/ReferralsInfo.java (original)
+++ directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/ReferralsInfo.java Tue Nov  2 17:22:19 2010
@@ -20,18 +20,13 @@
 package org.apache.directory.studio.connection.core.io.jndi;
 
 
-import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.LinkedList;
-import java.util.List;
 import java.util.Set;
 
 import javax.naming.LinkLoopException;
 
-import org.apache.directory.shared.ldap.name.DN;
-import org.apache.directory.shared.ldap.util.LdapURL;
-import org.apache.directory.studio.connection.core.Messages;
-import org.eclipse.osgi.util.NLS;
+import org.apache.directory.shared.ldap.message.Referral;
 
 
 /**
@@ -44,7 +39,7 @@ public class ReferralsInfo
 {
     private LinkedList<Referral> referralsToProcess = new LinkedList<Referral>();
 
-    private Set<LdapURL> processedUrls = new HashSet<LdapURL>();
+    private Set<String> processedUrls = new HashSet<String>();
 
 
     /**
@@ -73,7 +68,7 @@ public class ReferralsInfo
         if ( !referralsToProcess.isEmpty() )
         {
             Referral referral = referralsToProcess.removeFirst();
-            for ( LdapURL url : referral.urls )
+            for ( String url : referral.getLdapUrls() )
             {
                 processedUrls.add( url );
             }
@@ -95,58 +90,4 @@ public class ReferralsInfo
     {
         return !referralsToProcess.isEmpty();
     }
-
-    public class Referral
-    {
-        private List<LdapURL> urls = new ArrayList<LdapURL>();
-        private DN dn;
-
-
-        public Referral( DN dn )
-        {
-            this.dn = dn;
-        }
-
-
-        /**
-         * Gets the list of {@link LdapURL}.
-         * 
-         * @return the list of {@link LdapURL}
-         */
-        public List<LdapURL> getLdapURLs()
-        {
-            return urls;
-        }
-
-
-        /**
-         * Gets the DN.
-         * 
-         * @return the DN
-         */
-        public DN getDn()
-        {
-            return dn;
-        }
-
-
-        /**
-         * Adds the URL.
-         * 
-         * @param url the URL
-         * 
-         * @throws LinkLoopException if a loop was encountered.
-         */
-        public void addUrl( LdapURL url ) throws LinkLoopException
-        {
-            if ( processedUrls.contains( url ) )
-            {
-                throw new LinkLoopException( NLS.bind( Messages.error__loop_detected, url ) );
-            }
-
-            urls.add( url );
-        }
-
-    }
-
 }

Modified: directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/StudioSSLSocketFactory.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/StudioSSLSocketFactory.java?rev=1030132&r1=1030131&r2=1030132&view=diff
==============================================================================
--- directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/StudioSSLSocketFactory.java (original)
+++ directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/StudioSSLSocketFactory.java Tue Nov  2 17:22:19 2010
@@ -33,6 +33,8 @@ import javax.net.ssl.TrustManager;
 import javax.net.ssl.TrustManagerFactory;
 import javax.net.ssl.X509TrustManager;
 
+import org.apache.directory.studio.connection.core.io.StudioTrustManager;
+
 
 /**
  * A {@link SSLSocketFactory} that uses a custom {@link TrustManager} ({@link StudioTrustManager}).

Modified: directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/jobs/CheckBindRunnable.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/jobs/CheckBindRunnable.java?rev=1030132&r1=1030131&r2=1030132&view=diff
==============================================================================
--- directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/jobs/CheckBindRunnable.java (original)
+++ directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/jobs/CheckBindRunnable.java Tue Nov  2 17:22:19 2010
@@ -77,9 +77,9 @@ public class CheckBindRunnable implement
         monitor.reportProgress( " " ); //$NON-NLS-1$
         monitor.worked( 1 );
 
-        connection.getJNDIConnectionWrapper().connect( monitor );
-        connection.getJNDIConnectionWrapper().bind( monitor );
-        connection.getJNDIConnectionWrapper().disconnect();
+        connection.getConnectionWrapper().connect( monitor );
+        connection.getConnectionWrapper().bind( monitor );
+        connection.getConnectionWrapper().disconnect();
     }
 
 

Modified: directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/jobs/CheckNetworkParameterRunnable.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/jobs/CheckNetworkParameterRunnable.java?rev=1030132&r1=1030131&r2=1030132&view=diff
==============================================================================
--- directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/jobs/CheckNetworkParameterRunnable.java (original)
+++ directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/jobs/CheckNetworkParameterRunnable.java Tue Nov  2 17:22:19 2010
@@ -78,8 +78,8 @@ public class CheckNetworkParameterRunnab
         monitor.reportProgress( " " ); //$NON-NLS-1$
         monitor.worked( 1 );
 
-        connection.getJNDIConnectionWrapper().connect( monitor );
-        connection.getJNDIConnectionWrapper().disconnect();
+        connection.getConnectionWrapper().connect( monitor );
+        connection.getConnectionWrapper().disconnect();
     }
 
 

Modified: directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/jobs/CloseConnectionsRunnable.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/jobs/CloseConnectionsRunnable.java?rev=1030132&r1=1030131&r2=1030132&view=diff
==============================================================================
--- directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/jobs/CloseConnectionsRunnable.java (original)
+++ directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/jobs/CloseConnectionsRunnable.java Tue Nov  2 17:22:19 2010
@@ -116,14 +116,14 @@ public class CloseConnectionsRunnable im
 
         for ( Connection connection : connections )
         {
-            if ( connection.getJNDIConnectionWrapper().isConnected() )
+            if ( connection.getConnectionWrapper().isConnected() )
             {
                 monitor.setTaskName( Messages.bind( Messages.jobs__close_connections_task, new String[]
                     { connection.getName() } ) );
                 monitor.worked( 1 );
 
-                connection.getJNDIConnectionWrapper().unbind();
-                connection.getJNDIConnectionWrapper().disconnect();
+                connection.getConnectionWrapper().unbind();
+                connection.getConnectionWrapper().disconnect();
             }
         }
     }
@@ -136,7 +136,7 @@ public class CloseConnectionsRunnable im
     {
         for ( Connection connection : connections )
         {
-            if ( !connection.getJNDIConnectionWrapper().isConnected() )
+            if ( !connection.getConnectionWrapper().isConnected() )
             {
                 for ( IConnectionListener listener : ConnectionCorePlugin.getDefault().getConnectionListeners() )
                 {
@@ -147,7 +147,7 @@ public class CloseConnectionsRunnable im
 
         for ( Connection connection : connections )
         {
-            if ( !connection.getJNDIConnectionWrapper().isConnected() )
+            if ( !connection.getConnectionWrapper().isConnected() )
             {
                 ConnectionEventRegistry.fireConnectionClosed( connection, this );
             }

Modified: directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/jobs/OpenConnectionsRunnable.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/jobs/OpenConnectionsRunnable.java?rev=1030132&r1=1030131&r2=1030132&view=diff
==============================================================================
--- directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/jobs/OpenConnectionsRunnable.java (original)
+++ directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/jobs/OpenConnectionsRunnable.java Tue Nov  2 17:22:19 2010
@@ -102,16 +102,16 @@ public class OpenConnectionsRunnable imp
 
         for ( Connection connection : connections )
         {
-            if ( !connection.getJNDIConnectionWrapper().isConnected() )
+            if ( !connection.getConnectionWrapper().isConnected() )
             {
                 monitor.setTaskName( Messages.bind( Messages.jobs__open_connections_task, new String[]
                     { connection.getName() } ) );
                 monitor.worked( 1 );
 
-                connection.getJNDIConnectionWrapper().connect( monitor );
-                if ( connection.getJNDIConnectionWrapper().isConnected() )
+                connection.getConnectionWrapper().connect( monitor );
+                if ( connection.getConnectionWrapper().isConnected() )
                 {
-                    connection.getJNDIConnectionWrapper().bind( monitor );
+                    connection.getConnectionWrapper().bind( monitor );
                 }
             }
         }
@@ -125,7 +125,7 @@ public class OpenConnectionsRunnable imp
     {
         for ( Connection connection : connections )
         {
-            if ( connection.getJNDIConnectionWrapper().isConnected() )
+            if ( connection.getConnectionWrapper().isConnected() )
             {
                 for ( IConnectionListener listener : ConnectionCorePlugin.getDefault().getConnectionListeners() )
                 {
@@ -136,7 +136,7 @@ public class OpenConnectionsRunnable imp
 
         for ( Connection connection : connections )
         {
-            if ( connection.getJNDIConnectionWrapper().isConnected() )
+            if ( connection.getConnectionWrapper().isConnected() )
             {
                 ConnectionEventRegistry.fireConnectionOpened( connection, this );
             }

Modified: directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/jobs/StudioConnectionJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/jobs/StudioConnectionJob.java?rev=1030132&r1=1030131&r2=1030132&view=diff
==============================================================================
--- directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/jobs/StudioConnectionJob.java (original)
+++ directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/jobs/StudioConnectionJob.java Tue Nov  2 17:22:19 2010
@@ -67,19 +67,19 @@ public class StudioConnectionJob extends
             {
                 for ( Connection connection : connections )
                 {
-                    if ( connection != null && !connection.getJNDIConnectionWrapper().isConnected() )
+                    if ( connection != null && !connection.getConnectionWrapper().isConnected() )
                     {
                         monitor.setTaskName( Messages.bind( Messages.jobs__open_connections_task, new String[]
                             { connection.getName() } ) );
                         monitor.worked( 1 );
 
-                        connection.getJNDIConnectionWrapper().connect( monitor );
-                        if ( connection.getJNDIConnectionWrapper().isConnected() )
+                        connection.getConnectionWrapper().connect( monitor );
+                        if ( connection.getConnectionWrapper().isConnected() )
                         {
-                            connection.getJNDIConnectionWrapper().bind( monitor );
+                            connection.getConnectionWrapper().bind( monitor );
                         }
 
-                        if ( connection.getJNDIConnectionWrapper().isConnected() )
+                        if ( connection.getConnectionWrapper().isConnected() )
                         {
                             for ( IConnectionListener listener : ConnectionCorePlugin.getDefault()
                                 .getConnectionListeners() )

Modified: directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/ConnectionUIReferralHandler.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/ConnectionUIReferralHandler.java?rev=1030132&r1=1030131&r2=1030132&view=diff
==============================================================================
--- directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/ConnectionUIReferralHandler.java (original)
+++ directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/ConnectionUIReferralHandler.java Tue Nov  2 17:22:19 2010
@@ -25,6 +25,7 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.directory.shared.ldap.codec.util.LdapURLEncodingException;
 import org.apache.directory.shared.ldap.util.LdapURL;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.core.ConnectionCorePlugin;
@@ -64,37 +65,40 @@ public class ConnectionUIReferralHandler
     /**
      * {@inheritDoc}
      */
-    public Connection getReferralConnection( final List<LdapURL> referralUrls )
+    public Connection getReferralConnection( final List<String> referralUrls )
     {
-        // check cache
-        for ( LdapURL url : referralUrls )
+        final Connection[] referralConnections = new Connection[1];
+        try
         {
-            String normalizedUrl = Utils.getSimpleNormalizedUrl( url );
-
-            if ( referralUrlToReferralConnectionCache.containsKey( normalizedUrl ) )
+            // check cache
+            for ( String url : referralUrls )
             {
-                // check if referral connection exists in connection manager
-                Connection referralConnection = referralUrlToReferralConnectionCache.get( normalizedUrl );
-                Connection[] connections = ConnectionCorePlugin.getDefault().getConnectionManager().getConnections();
-                for ( int i = 0; i < connections.length; i++ )
+                String normalizedUrl = Utils.getSimpleNormalizedUrl( new LdapURL( url ) );
+
+                if ( referralUrlToReferralConnectionCache.containsKey( normalizedUrl ) )
                 {
-                    Connection connection = connections[i];
-                    if ( referralConnection == connection )
+                    // check if referral connection exists in connection manager
+                    Connection referralConnection = referralUrlToReferralConnectionCache.get( normalizedUrl );
+                    Connection[] connections = ConnectionCorePlugin.getDefault().getConnectionManager()
+                        .getConnections();
+                    for ( int i = 0; i < connections.length; i++ )
                     {
-                        return referralConnection;
+                        Connection connection = connections[i];
+                        if ( referralConnection == connection )
+                        {
+                            return referralConnection;
+                        }
                     }
-                }
 
-                // referral connection doesn't exist in connection manager, remove it from cache
-                referralUrlToReferralConnectionCache.remove( normalizedUrl );
+                    // referral connection doesn't exist in connection manager, remove it from cache
+                    referralUrlToReferralConnectionCache.remove( normalizedUrl );
+                }
             }
-        }
 
-        // open dialog
-        final Connection[] referralConnections = new Connection[1];
-        PlatformUI.getWorkbench().getDisplay().syncExec( new Runnable()
-        {
-            public void run()
+            // open dialog
+            PlatformUI.getWorkbench().getDisplay().syncExec( new Runnable()
+            {
+                public void run()
             {
                 SelectReferralConnectionDialog dialog = new SelectReferralConnectionDialog( PlatformUI.getWorkbench()
                     .getDisplay().getActiveShell(), referralUrls );
@@ -104,17 +108,22 @@ public class ConnectionUIReferralHandler
                     referralConnections[0] = connection;
                 }
             }
-        } );
+            } );
 
-        // put to cache
-        if ( referralConnections[0] != null )
-        {
-            for ( LdapURL url : referralUrls )
+            // put to cache
+            if ( referralConnections[0] != null )
             {
-                String normalizedUrl = Utils.getSimpleNormalizedUrl( url );
-                referralUrlToReferralConnectionCache.put( normalizedUrl, referralConnections[0] );
+                for ( String url : referralUrls )
+                {
+                    String normalizedUrl = Utils.getSimpleNormalizedUrl( new LdapURL( url ) );
+                    referralUrlToReferralConnectionCache.put( normalizedUrl, referralConnections[0] );
+                }
             }
         }
+        catch ( LdapURLEncodingException e )
+        {
+            // Will never occur
+        }
 
         return referralConnections[0];
     }

Modified: directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/RunnableContextRunner.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/RunnableContextRunner.java?rev=1030132&r1=1030131&r2=1030132&view=diff
==============================================================================
--- directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/RunnableContextRunner.java (original)
+++ directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/RunnableContextRunner.java Tue Nov  2 17:22:19 2010
@@ -74,19 +74,19 @@ public class RunnableContextRunner
                 {
                     for ( Connection connection : connections )
                     {
-                        if ( connection != null && !connection.getJNDIConnectionWrapper().isConnected() )
+                        if ( connection != null && !connection.getConnectionWrapper().isConnected() )
                         {
                             spm[0].setTaskName( Messages.bind( Messages.jobs__open_connections_task, new String[]
                                 { connection.getName() } ) );
                             spm[0].worked( 1 );
 
-                            connection.getJNDIConnectionWrapper().connect( spm[0] );
-                            if ( connection.getJNDIConnectionWrapper().isConnected() )
+                            connection.getConnectionWrapper().connect( spm[0] );
+                            if ( connection.getConnectionWrapper().isConnected() )
                             {
-                                connection.getJNDIConnectionWrapper().bind( spm[0] );
+                                connection.getConnectionWrapper().bind( spm[0] );
                             }
 
-                            if ( connection.getJNDIConnectionWrapper().isConnected() )
+                            if ( connection.getConnectionWrapper().isConnected() )
                             {
                                 for ( IConnectionListener listener : ConnectionCorePlugin.getDefault()
                                     .getConnectionListeners() )

Modified: directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/UIAuthHandler.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/UIAuthHandler.java?rev=1030132&r1=1030131&r2=1030132&view=diff
==============================================================================
--- directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/UIAuthHandler.java (original)
+++ directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/UIAuthHandler.java Tue Nov  2 17:22:19 2010
@@ -63,10 +63,10 @@ public class UIAuthHandler implements IA
                 {
                     CredentialsDialog dialog = new CredentialsDialog(
                         PlatformUI.getWorkbench().getDisplay().getActiveShell(),
-                        NLS
-                            .bind(
-                                Messages.getString( "UIAuthHandler.EnterPasswordFor" ), new String[] { connectionParameter.getName() } ), //$NON-NLS-1$
-                        Messages.getString( "UIAuthHandler.PleaseEnterPasswordOfUser" ) + connectionParameter.getBindPrincipal() + ":", "", null ); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
+                        NLS.bind(
+                            Messages.getString( "UIAuthHandler.EnterPasswordFor" ), new String[] { connectionParameter.getName() } ), //$NON-NLS-1$
+                        NLS.bind(
+                            Messages.getString( "UIAuthHandler.PleaseEnterPasswordOfUser" ), connectionParameter.getBindPrincipal() ), "", null ); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
                     if ( dialog.open() == CredentialsDialog.OK )
                     {
                         pw[0] = dialog.getValue();

Modified: directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/actions/CloseConnectionAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/actions/CloseConnectionAction.java?rev=1030132&r1=1030131&r2=1030132&view=diff
==============================================================================
--- directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/actions/CloseConnectionAction.java (original)
+++ directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/actions/CloseConnectionAction.java Tue Nov  2 17:22:19 2010
@@ -89,7 +89,7 @@ public class CloseConnectionAction exten
         boolean canClose = false;
         for ( int i = 0; i < getSelectedConnections().length; i++ )
         {
-            if ( getSelectedConnections()[i].getJNDIConnectionWrapper().isConnected() )
+            if ( getSelectedConnections()[i].getConnectionWrapper().isConnected() )
             {
                 canClose = true;
                 break;

Modified: directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/actions/NewConnectionFolderAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/actions/NewConnectionFolderAction.java?rev=1030132&r1=1030131&r2=1030132&view=diff
==============================================================================
--- directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/actions/NewConnectionFolderAction.java (original)
+++ directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/actions/NewConnectionFolderAction.java Tue Nov  2 17:22:19 2010
@@ -55,7 +55,7 @@ public class NewConnectionFolderAction e
         ConnectionFolderDialog dialog = new ConnectionFolderDialog(
             PlatformUI.getWorkbench().getDisplay().getActiveShell(),
             Messages.getString( "NewConnectionFolderAction.NewConnectionFolder" ), Messages.getString( "NewConnectionFolderAction.NeterNameNewFolder" ), "", null ); //$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$
-        if ( dialog.open() == CredentialsDialog.OK )
+        if ( dialog.open() == ConnectionFolderDialog.OK )
         {
             String name = dialog.getValue();
             ConnectionFolder folder = new ConnectionFolder( name );

Modified: directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/actions/OpenConnectionAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/actions/OpenConnectionAction.java?rev=1030132&r1=1030131&r2=1030132&view=diff
==============================================================================
--- directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/actions/OpenConnectionAction.java (original)
+++ directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/actions/OpenConnectionAction.java Tue Nov  2 17:22:19 2010
@@ -88,7 +88,7 @@ public class OpenConnectionAction extend
         boolean canOpen = false;
         for ( int i = 0; i < getSelectedConnections().length; i++ )
         {
-            if ( !getSelectedConnections()[i].getJNDIConnectionWrapper().isConnected() )
+            if ( !getSelectedConnections()[i].getConnectionWrapper().isConnected() )
             {
                 canOpen = true;
                 break;

Modified: directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/dialogs/CredentialsDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/dialogs/CredentialsDialog.java?rev=1030132&r1=1030131&r2=1030132&view=diff
==============================================================================
--- directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/dialogs/CredentialsDialog.java (original)
+++ directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/dialogs/CredentialsDialog.java Tue Nov  2 17:22:19 2010
@@ -58,8 +58,7 @@ public class CredentialsDialog extends I
     protected Control createDialogArea( Composite parent )
     {
         Composite composite = ( Composite ) super.createDialogArea( parent );
-        super.getText().setEchoChar( '*' );
+        super.getText().setEchoChar( '\u2022' );
         return composite;
     }
-
 }

Modified: directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/dialogs/SelectReferralConnectionDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/dialogs/SelectReferralConnectionDialog.java?rev=1030132&r1=1030131&r2=1030132&view=diff
==============================================================================
--- directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/dialogs/SelectReferralConnectionDialog.java (original)
+++ directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/dialogs/SelectReferralConnectionDialog.java Tue Nov  2 17:22:19 2010
@@ -23,6 +23,7 @@ package org.apache.directory.studio.conn
 
 import java.util.List;
 
+import org.apache.directory.shared.ldap.codec.util.LdapURLEncodingException;
 import org.apache.directory.shared.ldap.util.LdapURL;
 import org.apache.directory.studio.common.ui.widgets.BaseWidgetUtils;
 import org.apache.directory.studio.connection.core.Connection;
@@ -59,7 +60,7 @@ public class SelectReferralConnectionDia
 
     private String title;
 
-    private List<LdapURL> referralUrls;
+    private List<String> referralUrls;
 
     private Connection selectedConnection;
 
@@ -78,7 +79,7 @@ public class SelectReferralConnectionDia
      * @param parentShell the parent shell
      * @param referralUrl the referral URL
      */
-    public SelectReferralConnectionDialog( Shell parentShell, List<LdapURL> referralUrls )
+    public SelectReferralConnectionDialog( Shell parentShell, List<String> referralUrls )
     {
         super( parentShell );
         super.setShellStyle( super.getShellStyle() | SWT.RESIZE );
@@ -166,9 +167,9 @@ public class SelectReferralConnectionDia
 
         BaseWidgetUtils.createWrappedLabeledText( composite, Messages
             .getString( "SelectReferralConnectionDialog.SelectConnectionToHandleReferral" ), 1 ); //$NON-NLS-1$
-        for ( LdapURL url : referralUrls )
+        for ( String url : referralUrls )
         {
-            BaseWidgetUtils.createWrappedLabeledText( composite, " - " + url.toString(), 1 ); //$NON-NLS-1$
+            BaseWidgetUtils.createWrappedLabeledText( composite, " - " + url, 1 ); //$NON-NLS-1$
         }
 
         // create configuration
@@ -231,13 +232,21 @@ public class SelectReferralConnectionDia
                 Connection connection = connections[i];
                 LdapURL connectionUrl = connection.getUrl();
                 String normalizedConnectionUrl = Utils.getSimpleNormalizedUrl( connectionUrl );
-                for ( LdapURL url : referralUrls )
+                for ( String url : referralUrls )
                 {
-                    if ( url != null && Utils.getSimpleNormalizedUrl( url ).equals( normalizedConnectionUrl ) )
+                    try
                     {
-                        mainWidget.getViewer().reveal( connection );
-                        mainWidget.getViewer().setSelection( new StructuredSelection( connection ), true );
-                        break;
+                        if ( url != null
+                            && Utils.getSimpleNormalizedUrl( new LdapURL( url ) ).equals( normalizedConnectionUrl ) )
+                        {
+                            mainWidget.getViewer().reveal( connection );
+                            mainWidget.getViewer().setSelection( new StructuredSelection( connection ), true );
+                            break;
+                        }
+                    }
+                    catch ( LdapURLEncodingException e )
+                    {
+                        // Will never occur
                     }
                 }
             }



Mime
View raw message