directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1221357 - in /directory/studio/trunk/plugins: apacheds/src/main/java/org/apache/directory/studio/apacheds/actions/ connection.core/src/main/java/org/apache/directory/studio/connection/core/ connection.core/src/main/java/org/apache/director...
Date Tue, 20 Dec 2011 17:21:19 GMT
Author: pamarcelot
Date: Tue Dec 20 17:21:18 2011
New Revision: 1221357

URL: http://svn.apache.org/viewvc?rev=1221357&view=rev
Log:
Fixed a bug where preferences changes in the Connection Core plugin were not saved to disk
(and therefore lost between application launches).
Set the 'Apache Directory LDAP API' (which now works good enough to be a replacement for JNDI)
as the default network provider.
Added a new Combo widget to the 'Connections' preference page to choose the preferred default
network provider (for newly created connections)

Modified:
    directory/studio/trunk/plugins/apacheds/src/main/java/org/apache/directory/studio/apacheds/actions/CreateConnectionActionHelper.java
    directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/ConnectionCoreConstants.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/ConnectionCorePreferencesInitializer.java
    directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/ConnectionIO.java
    directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/preferences/ConnectionsPreferencePage.java
    directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/NetworkParameterPage.java
    directory/studio/trunk/plugins/ldapservers.apacheds.v153/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v153/CreateConnectionAction.java
    directory/studio/trunk/plugins/ldapservers.apacheds.v154/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v154/CreateConnectionAction.java
    directory/studio/trunk/plugins/ldapservers.apacheds.v155/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v155/CreateConnectionAction.java
    directory/studio/trunk/plugins/ldapservers.apacheds.v156/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v156/CreateConnectionAction.java
    directory/studio/trunk/plugins/ldapservers.apacheds.v157/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v157/CreateConnectionAction.java
    directory/studio/trunk/plugins/ldapservers.apacheds.v200/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v200/CreateConnectionAction.java

Modified: directory/studio/trunk/plugins/apacheds/src/main/java/org/apache/directory/studio/apacheds/actions/CreateConnectionActionHelper.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds/src/main/java/org/apache/directory/studio/apacheds/actions/CreateConnectionActionHelper.java?rev=1221357&r1=1221356&r2=1221357&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds/src/main/java/org/apache/directory/studio/apacheds/actions/CreateConnectionActionHelper.java
(original)
+++ directory/studio/trunk/plugins/apacheds/src/main/java/org/apache/directory/studio/apacheds/actions/CreateConnectionActionHelper.java
Tue Dec 20 17:21:18 2011
@@ -134,7 +134,7 @@ public class CreateConnectionActionHelpe
         connectionParameter.setName( serverName );
         
         // Network Provider
-        connectionParameter.setNetworkProvider( NetworkProvider.JNDI );
+        connectionParameter.setNetworkProvider( ConnectionCorePlugin.getDefault().getDefaultNetworkProvider()
);
         
         // Creating the connection
         Connection connection = new Connection( connectionParameter );

Modified: directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/ConnectionCoreConstants.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/ConnectionCoreConstants.java?rev=1221357&r1=1221356&r2=1221357&view=diff
==============================================================================
--- directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/ConnectionCoreConstants.java
(original)
+++ directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/ConnectionCoreConstants.java
Tue Dec 20 17:21:18 2011
@@ -83,4 +83,13 @@ public final class ConnectionCoreConstan
     /** The constant used to identify the KRB5 login module class name */
     public static final String PREFERENCE_KRB5_LOGIN_MODULE = "krb5LoginModule"; //$NON-NLS-1$
 
+    /** The constant used to identify the default network provider setting */
+    public static final String PREFERENCE_DEFAULT_NETWORK_PROVIDER = "defaultNetworkProvider";
//$NON-NLS-1$
+
+    /** The constant used to identify the default network provider setting */
+    public static final int PREFERENCE_NETWORK_PROVIDER_JNDI = 0;
+
+    /** The constant used to identify the default network provider setting */
+    public static final int PREFERENCE_NETWORK_PROVIDER_APACHE_DIRECTORY_LDAP_API = 1;
+
 }

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=1221357&r1=1221356&r2=1221357&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 Dec 20 17:21:18 2011
@@ -26,6 +26,7 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.PropertyResourceBundle;
 
+import org.apache.directory.studio.connection.core.ConnectionParameter.NetworkProvider;
 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;
@@ -582,4 +583,37 @@ public class ConnectionCorePlugin extend
         return defaultKrb5LoginModule;
     }
 
+
+    /**
+     * Gets the default network provider from the preferences store.
+     *
+     * @return the default network provider
+     */
+    public NetworkProvider getDefaultNetworkProvider()
+    {
+        return getNetworkProvider( getPluginPreferences().getInt(
+            ConnectionCoreConstants.PREFERENCE_DEFAULT_NETWORK_PROVIDER ) );
+    }
+
+
+    /**
+     * Gets the network provider associated with the value.
+     *
+     * @param networkProviderValue the network provider value
+     *
+     * @return the network provider
+     */
+    public NetworkProvider getNetworkProvider( int networkProviderValue )
+    {
+        if ( networkProviderValue == ConnectionCoreConstants.PREFERENCE_NETWORK_PROVIDER_APACHE_DIRECTORY_LDAP_API
)
+        {
+            return NetworkProvider.APACHE_DIRECTORY_LDAP_API;
+        }
+        else if ( networkProviderValue == ConnectionCoreConstants.PREFERENCE_NETWORK_PROVIDER_JNDI
)
+        {
+            return NetworkProvider.JNDI;
+        }
+
+        return NetworkProvider.APACHE_DIRECTORY_LDAP_API;
+    }
 }

Modified: directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/ConnectionCorePreferencesInitializer.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/ConnectionCorePreferencesInitializer.java?rev=1221357&r1=1221356&r2=1221357&view=diff
==============================================================================
--- directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/ConnectionCorePreferencesInitializer.java
(original)
+++ directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/ConnectionCorePreferencesInitializer.java
Tue Dec 20 17:21:18 2011
@@ -46,6 +46,8 @@ public class ConnectionCorePreferencesIn
         String defaultKrb5LoginModule = ConnectionCorePlugin.getDefault().getDefaultKrb5LoginModule();
         preferences.setDefault( ConnectionCoreConstants.PREFERENCE_KRB5_LOGIN_MODULE, defaultKrb5LoginModule
);
         preferences.setDefault( ConnectionCoreConstants.PREFERENCE_USE_KRB5_SYSTEM_PROPERTIES,
false );
+        preferences.setDefault( ConnectionCoreConstants.PREFERENCE_DEFAULT_NETWORK_PROVIDER,
+            ConnectionCoreConstants.PREFERENCE_NETWORK_PROVIDER_APACHE_DIRECTORY_LDAP_API
);
 
         // Modification Logs
         preferences.setDefault( ConnectionCoreConstants.PREFERENCE_MODIFICATIONLOGS_ENABLE,
true );

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=1221357&r1=1221356&r2=1221357&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 Dec 20 17:21:18 2011
@@ -31,6 +31,7 @@ import java.util.Set;
 
 import org.apache.directory.shared.ldap.model.constants.SaslQoP;
 import org.apache.directory.shared.ldap.model.constants.SaslSecurityStrength;
+import org.apache.directory.studio.connection.core.ConnectionCorePlugin;
 import org.apache.directory.studio.connection.core.ConnectionFolder;
 import org.apache.directory.studio.connection.core.ConnectionParameter;
 import org.apache.directory.studio.connection.core.ConnectionParameter.AuthenticationMethod;
@@ -215,7 +216,7 @@ public class ConnectionIO
         }
         else
         {
-            connection.setNetworkProvider( NetworkProvider.JNDI );
+            connection.setNetworkProvider( ConnectionCorePlugin.getDefault().getDefaultNetworkProvider()
);
         }
 
         // Auth Method

Modified: directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/preferences/ConnectionsPreferencePage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/preferences/ConnectionsPreferencePage.java?rev=1221357&r1=1221356&r2=1221357&view=diff
==============================================================================
--- directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/preferences/ConnectionsPreferencePage.java
(original)
+++ directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/preferences/ConnectionsPreferencePage.java
Tue Dec 20 17:21:18 2011
@@ -24,6 +24,7 @@ package org.apache.directory.studio.conn
 import org.apache.directory.studio.common.ui.widgets.BaseWidgetUtils;
 import org.apache.directory.studio.connection.core.ConnectionCoreConstants;
 import org.apache.directory.studio.connection.core.ConnectionCorePlugin;
+import org.apache.directory.studio.connection.core.ConnectionParameter.NetworkProvider;
 import org.apache.directory.studio.connection.ui.ConnectionUIPlugin;
 import org.eclipse.core.runtime.Preferences;
 import org.eclipse.jface.preference.PreferencePage;
@@ -31,6 +32,7 @@ import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Group;
@@ -48,6 +50,7 @@ import org.eclipse.ui.IWorkbenchPreferen
 public class ConnectionsPreferencePage extends PreferencePage implements IWorkbenchPreferencePage
 {
 
+    private Combo networkProviderCombo;
     private Text ldapContextFactoryText;
     private Button useKrb5SystemPropertiesButton;
     private Label krb5LoginModuleNoteLabel;
@@ -84,6 +87,16 @@ public class ConnectionsPreferencePage e
         BaseWidgetUtils.createSpacer( composite, 1 );
         BaseWidgetUtils.createSpacer( composite, 1 );
 
+        Group defaultNetworkProviderGroup = BaseWidgetUtils.createGroup(
+            BaseWidgetUtils.createColumnContainer( composite, 1, 1 ), "Default Network Provider",
1 );
+        NetworkProvider defaultNetworkProvider = ConnectionCorePlugin.getDefault().getDefaultNetworkProvider();
+        String[] networkProviders = new String[]
+            { "Apache Directory LDAP Client API", "JNDI (Java Naming and Directory Interface)"
};
+        networkProviderCombo = BaseWidgetUtils.createReadonlyCombo( defaultNetworkProviderGroup,
+            networkProviders, 0, 2 );
+        networkProviderCombo.select( defaultNetworkProvider == NetworkProvider.APACHE_DIRECTORY_LDAP_API
? 0
+            : 1 );
+
         Group ldapContextFactoryGroup = BaseWidgetUtils.createGroup( BaseWidgetUtils.createColumnContainer(
composite,
             1, 1 ), Messages.getString( "ConnectionsPreferencePage.ContextFactory" ), 1 );
//$NON-NLS-1$
         Preferences preferences = ConnectionCorePlugin.getDefault().getPluginPreferences();
@@ -144,12 +157,19 @@ public class ConnectionsPreferencePage e
      */
     protected void performDefaults()
     {
+        NetworkProvider defaultdDefaultNetworkProvider = ConnectionCorePlugin.getDefault().getNetworkProvider(
+            ConnectionCorePlugin.getDefault().getPluginPreferences()
+                .getDefaultInt( ConnectionCoreConstants.PREFERENCE_DEFAULT_NETWORK_PROVIDER
) );
+        networkProviderCombo.select( defaultdDefaultNetworkProvider == NetworkProvider.APACHE_DIRECTORY_LDAP_API
? 0
+            : 1 );
+        
         ldapContextFactoryText.setText( ConnectionCorePlugin.getDefault().getPluginPreferences().getDefaultString(
             ConnectionCoreConstants.PREFERENCE_LDAP_CONTEXT_FACTORY ) );
         krb5LoginModuleText.setText( ConnectionCorePlugin.getDefault().getPluginPreferences().getDefaultString(
             ConnectionCoreConstants.PREFERENCE_KRB5_LOGIN_MODULE ) );
         useKrb5SystemPropertiesButton.setSelection( ConnectionCorePlugin.getDefault().getPluginPreferences()
             .getDefaultBoolean( ConnectionCoreConstants.PREFERENCE_USE_KRB5_SYSTEM_PROPERTIES
) );
+
         super.performDefaults();
     }
 
@@ -159,6 +179,9 @@ public class ConnectionsPreferencePage e
      */
     public boolean performOk()
     {
+        ConnectionCorePlugin.getDefault().getPluginPreferences()
+            .setValue( ConnectionCoreConstants.PREFERENCE_DEFAULT_NETWORK_PROVIDER,
+                getNetworkProviderValue() );
         ConnectionCorePlugin.getDefault().getPluginPreferences().setValue(
             ConnectionCoreConstants.PREFERENCE_LDAP_CONTEXT_FACTORY, ldapContextFactoryText.getText()
);
         ConnectionCorePlugin.getDefault().getPluginPreferences().setValue(
@@ -166,7 +189,26 @@ public class ConnectionsPreferencePage e
         ConnectionCorePlugin.getDefault().getPluginPreferences()
             .setValue( ConnectionCoreConstants.PREFERENCE_USE_KRB5_SYSTEM_PROPERTIES,
                 useKrb5SystemPropertiesButton.getSelection() );
+        
+        ConnectionCorePlugin.getDefault().savePluginPreferences();
+
         return true;
     }
 
+
+    /**
+     * Gets the encyrption method.
+     * 
+     * @return the encyrption method
+     */
+    private int getNetworkProviderValue()
+    {
+        switch ( networkProviderCombo.getSelectionIndex() )
+        {
+            case 1:
+                return ConnectionCoreConstants.PREFERENCE_NETWORK_PROVIDER_JNDI;
+            default:
+                return ConnectionCoreConstants.PREFERENCE_NETWORK_PROVIDER_APACHE_DIRECTORY_LDAP_API;
+        }
+    }
 }

Modified: directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/NetworkParameterPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/NetworkParameterPage.java?rev=1221357&r1=1221356&r2=1221357&view=diff
==============================================================================
--- directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/NetworkParameterPage.java
(original)
+++ directory/studio/trunk/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/NetworkParameterPage.java
Tue Dec 20 17:21:18 2011
@@ -171,9 +171,9 @@ public class NetworkParameterPage extend
         switch ( networkProviderCombo.getSelectionIndex() )
         {
             case 1:
-                return ConnectionParameter.NetworkProvider.APACHE_DIRECTORY_LDAP_API;
-            default:
                 return ConnectionParameter.NetworkProvider.JNDI;
+            default:
+                return ConnectionParameter.NetworkProvider.APACHE_DIRECTORY_LDAP_API;
         }
     }
 
@@ -235,9 +235,8 @@ public class NetworkParameterPage extend
             { Messages.getString( "NetworkParameterPage.NoEncryption" ), //$NON-NLS-1$
                 Messages.getString( "NetworkParameterPage.UseSSLEncryption" ), //$NON-NLS-1$
                 Messages.getString( "NetworkParameterPage.UseStartTLS" ) }; //$NON-NLS-1$
-        int index = 0;
         BaseWidgetUtils.createLabel( groupComposite, Messages.getString( "NetworkParameterPage.EncryptionMethod"
), 1 ); //$NON-NLS-1$
-        encryptionMethodCombo = BaseWidgetUtils.createReadonlyCombo( groupComposite, encMethods,
index, 2 );
+        encryptionMethodCombo = BaseWidgetUtils.createReadonlyCombo( groupComposite, encMethods,
0, 2 );
 
         boolean validateCertificates = ConnectionCorePlugin.getDefault().getPluginPreferences().getBoolean(
             ConnectionCoreConstants.PREFERENCE_VALIDATE_CERTIFICATES );
@@ -249,9 +248,12 @@ public class NetworkParameterPage extend
         }
 
         String[] networkProviders = new String[]
-            { "JNDI (Java Naming and Directory Interface)", "Apache Directory LDAP Client
API" }; //$NON-NLS-1$
-        BaseWidgetUtils.createLabel( groupComposite, "Provider:", 1 ); //$NON-NLS-1$
-        networkProviderCombo = BaseWidgetUtils.createReadonlyCombo( groupComposite, networkProviders,
index, 2 );
+            { "Apache Directory LDAP Client API", "JNDI (Java Naming and Directory Interface)"
};
+        BaseWidgetUtils.createLabel( groupComposite, "Provider:", 1 );
+        networkProviderCombo = BaseWidgetUtils.createReadonlyCombo( groupComposite, networkProviders,
0, 2 );
+        networkProviderCombo
+            .select( ConnectionCorePlugin.getDefault().getDefaultNetworkProvider() == NetworkProvider.APACHE_DIRECTORY_LDAP_API
? 0
+                : 1 );
 
         BaseWidgetUtils.createSpacer( groupComposite, 2 );
         checkConnectionButton = new Button( groupComposite, SWT.PUSH );
@@ -314,8 +316,8 @@ public class NetworkParameterPage extend
         int encryptionMethodIndex = parameter.getEncryptionMethod() == EncryptionMethod.LDAPS
? 1
             : parameter.getEncryptionMethod() == EncryptionMethod.START_TLS ? 2 : 0;
         encryptionMethodCombo.select( encryptionMethodIndex );
-        int networkProviderIndex = parameter.getNetworkProvider() == NetworkProvider.JNDI
? 0 : 1;
-        networkProviderCombo.select( networkProviderIndex );
+        networkProviderCombo.select( parameter.getNetworkProvider() == NetworkProvider.APACHE_DIRECTORY_LDAP_API
? 0
+            : 1 );
         readOnlyConnectionCheckbox.setSelection( parameter.isReadOnly() );
     }
 
@@ -530,14 +532,19 @@ public class NetworkParameterPage extend
 
         // encryption method, none if unknown or absent 
         String networkProvider = ldapUrl.getExtensionValue( X_NETWORK_PROVIDER );
-        if ( StringUtils.isNotEmpty( encryption ) && X_NETWORK_PROVIDER_JNDI.equalsIgnoreCase(
networkProvider ) )
+        if ( StringUtils.isNotEmpty( networkProvider )
+            && X_NETWORK_PROVIDER_APACHE_DIRECTORY_LDAP_API.equalsIgnoreCase( networkProvider
) )
+        {
+            parameter.setNetworkProvider( ConnectionParameter.NetworkProvider.APACHE_DIRECTORY_LDAP_API
);
+        }
+        else if ( StringUtils.isNotEmpty( networkProvider )
+            && X_NETWORK_PROVIDER_JNDI.equalsIgnoreCase( networkProvider ) )
         {
             parameter.setNetworkProvider( ConnectionParameter.NetworkProvider.JNDI );
         }
-        else if ( StringUtils.isNotEmpty( encryption )
-            && X_NETWORK_PROVIDER_APACHE_DIRECTORY_LDAP_API.equalsIgnoreCase( networkProvider
) )
+        else
         {
-            parameter.setNetworkProvider( ConnectionParameter.NetworkProvider.APACHE_DIRECTORY_LDAP_API
);
+            parameter.setNetworkProvider( ConnectionCorePlugin.getDefault().getDefaultNetworkProvider()
);
         }
     }
 }

Modified: directory/studio/trunk/plugins/ldapservers.apacheds.v153/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v153/CreateConnectionAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapservers.apacheds.v153/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v153/CreateConnectionAction.java?rev=1221357&r1=1221356&r2=1221357&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapservers.apacheds.v153/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v153/CreateConnectionAction.java
(original)
+++ directory/studio/trunk/plugins/ldapservers.apacheds.v153/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v153/CreateConnectionAction.java
Tue Dec 20 17:21:18 2011
@@ -23,6 +23,7 @@ package org.apache.directory.studio.ldap
 
 import org.apache.directory.studio.apacheds.configuration.model.v153.ServerConfigurationV153;
 import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.connection.core.ConnectionCorePlugin;
 import org.apache.directory.studio.connection.core.ConnectionParameter;
 import org.apache.directory.studio.connection.core.ConnectionParameter.AuthenticationMethod;
 import org.apache.directory.studio.connection.core.ConnectionParameter.EncryptionMethod;
@@ -176,9 +177,9 @@ public class CreateConnectionAction impl
 
         // Name
         connectionParameter.setName( server.getName() );
-        
+
         // Network Provider
-        connectionParameter.setNetworkProvider( NetworkProvider.JNDI );
+        connectionParameter.setNetworkProvider( ConnectionCorePlugin.getDefault().getDefaultNetworkProvider()
);
 
         // Creating the connection
         CreateConnectionActionHelper.createLdapBrowserConnection( server, new Connection(
connectionParameter ) );

Modified: directory/studio/trunk/plugins/ldapservers.apacheds.v154/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v154/CreateConnectionAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapservers.apacheds.v154/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v154/CreateConnectionAction.java?rev=1221357&r1=1221356&r2=1221357&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapservers.apacheds.v154/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v154/CreateConnectionAction.java
(original)
+++ directory/studio/trunk/plugins/ldapservers.apacheds.v154/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v154/CreateConnectionAction.java
Tue Dec 20 17:21:18 2011
@@ -23,6 +23,7 @@ package org.apache.directory.studio.ldap
 
 import org.apache.directory.studio.apacheds.configuration.model.v154.ServerConfigurationV154;
 import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.connection.core.ConnectionCorePlugin;
 import org.apache.directory.studio.connection.core.ConnectionParameter;
 import org.apache.directory.studio.connection.core.ConnectionParameter.AuthenticationMethod;
 import org.apache.directory.studio.connection.core.ConnectionParameter.EncryptionMethod;
@@ -176,9 +177,9 @@ public class CreateConnectionAction impl
 
         // Name
         connectionParameter.setName( server.getName() );
-        
+
         // Network Provider
-        connectionParameter.setNetworkProvider( NetworkProvider.JNDI );
+        connectionParameter.setNetworkProvider( ConnectionCorePlugin.getDefault().getDefaultNetworkProvider()
);
 
         // Creating the connection
         CreateConnectionActionHelper.createLdapBrowserConnection( server, new Connection(
connectionParameter ) );

Modified: directory/studio/trunk/plugins/ldapservers.apacheds.v155/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v155/CreateConnectionAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapservers.apacheds.v155/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v155/CreateConnectionAction.java?rev=1221357&r1=1221356&r2=1221357&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapservers.apacheds.v155/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v155/CreateConnectionAction.java
(original)
+++ directory/studio/trunk/plugins/ldapservers.apacheds.v155/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v155/CreateConnectionAction.java
Tue Dec 20 17:21:18 2011
@@ -23,6 +23,7 @@ package org.apache.directory.studio.ldap
 
 import org.apache.directory.studio.apacheds.configuration.model.v155.ServerConfigurationV155;
 import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.connection.core.ConnectionCorePlugin;
 import org.apache.directory.studio.connection.core.ConnectionParameter;
 import org.apache.directory.studio.connection.core.ConnectionParameter.AuthenticationMethod;
 import org.apache.directory.studio.connection.core.ConnectionParameter.EncryptionMethod;
@@ -176,9 +177,9 @@ public class CreateConnectionAction impl
 
         // Name
         connectionParameter.setName( server.getName() );
-        
+
         // Network Provider
-        connectionParameter.setNetworkProvider( NetworkProvider.JNDI );
+        connectionParameter.setNetworkProvider( ConnectionCorePlugin.getDefault().getDefaultNetworkProvider()
);
 
         // Creating the connection
         CreateConnectionActionHelper.createLdapBrowserConnection( server, new Connection(
connectionParameter ) );

Modified: directory/studio/trunk/plugins/ldapservers.apacheds.v156/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v156/CreateConnectionAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapservers.apacheds.v156/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v156/CreateConnectionAction.java?rev=1221357&r1=1221356&r2=1221357&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapservers.apacheds.v156/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v156/CreateConnectionAction.java
(original)
+++ directory/studio/trunk/plugins/ldapservers.apacheds.v156/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v156/CreateConnectionAction.java
Tue Dec 20 17:21:18 2011
@@ -23,6 +23,7 @@ package org.apache.directory.studio.ldap
 
 import org.apache.directory.studio.apacheds.configuration.model.v156.ServerConfigurationV156;
 import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.connection.core.ConnectionCorePlugin;
 import org.apache.directory.studio.connection.core.ConnectionParameter;
 import org.apache.directory.studio.connection.core.ConnectionParameter.AuthenticationMethod;
 import org.apache.directory.studio.connection.core.ConnectionParameter.EncryptionMethod;
@@ -176,9 +177,9 @@ public class CreateConnectionAction impl
 
         // Name
         connectionParameter.setName( server.getName() );
-        
+
         // Network Provider
-        connectionParameter.setNetworkProvider( NetworkProvider.JNDI );
+        connectionParameter.setNetworkProvider( ConnectionCorePlugin.getDefault().getDefaultNetworkProvider()
);
 
         // Creating the connection
         CreateConnectionActionHelper.createLdapBrowserConnection( server, new Connection(
connectionParameter ) );

Modified: directory/studio/trunk/plugins/ldapservers.apacheds.v157/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v157/CreateConnectionAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapservers.apacheds.v157/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v157/CreateConnectionAction.java?rev=1221357&r1=1221356&r2=1221357&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapservers.apacheds.v157/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v157/CreateConnectionAction.java
(original)
+++ directory/studio/trunk/plugins/ldapservers.apacheds.v157/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v157/CreateConnectionAction.java
Tue Dec 20 17:21:18 2011
@@ -23,6 +23,7 @@ package org.apache.directory.studio.ldap
 
 import org.apache.directory.studio.apacheds.configuration.model.v157.ServerConfigurationV157;
 import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.connection.core.ConnectionCorePlugin;
 import org.apache.directory.studio.connection.core.ConnectionParameter;
 import org.apache.directory.studio.connection.core.ConnectionParameter.AuthenticationMethod;
 import org.apache.directory.studio.connection.core.ConnectionParameter.EncryptionMethod;
@@ -176,9 +177,9 @@ public class CreateConnectionAction impl
 
         // Name
         connectionParameter.setName( server.getName() );
-        
+
         // Network Provider
-        connectionParameter.setNetworkProvider( NetworkProvider.JNDI );
+        connectionParameter.setNetworkProvider( ConnectionCorePlugin.getDefault().getDefaultNetworkProvider()
);
 
         // Creating the connection
         CreateConnectionActionHelper.createLdapBrowserConnection( server, new Connection(
connectionParameter ) );

Modified: directory/studio/trunk/plugins/ldapservers.apacheds.v200/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v200/CreateConnectionAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapservers.apacheds.v200/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v200/CreateConnectionAction.java?rev=1221357&r1=1221356&r2=1221357&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapservers.apacheds.v200/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v200/CreateConnectionAction.java
(original)
+++ directory/studio/trunk/plugins/ldapservers.apacheds.v200/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v200/CreateConnectionAction.java
Tue Dec 20 17:21:18 2011
@@ -23,6 +23,7 @@ package org.apache.directory.studio.ldap
 
 import org.apache.directory.server.config.beans.ConfigBean;
 import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.connection.core.ConnectionCorePlugin;
 import org.apache.directory.studio.connection.core.ConnectionParameter;
 import org.apache.directory.studio.connection.core.ConnectionParameter.AuthenticationMethod;
 import org.apache.directory.studio.connection.core.ConnectionParameter.EncryptionMethod;
@@ -103,7 +104,8 @@ public class CreateConnectionAction impl
                 }
 
                 // Checking is LDAP and/or LDAPS is/are enabled
-                if ( ( ApacheDS200LdapServerAdapter.isEnableLdap( configuration ) ) || (
ApacheDS200LdapServerAdapter.isEnableLdaps( configuration ) ) )
+                if ( ( ApacheDS200LdapServerAdapter.isEnableLdap( configuration ) )
+                    || ( ApacheDS200LdapServerAdapter.isEnableLdaps( configuration ) ) )
                 {
                     // Creating the connection using the helper class
                     createConnection( server, configuration );
@@ -178,14 +180,13 @@ public class CreateConnectionAction impl
         connectionParameter.setName( server.getName() );
 
         // Network Provider
-        connectionParameter.setNetworkProvider( NetworkProvider.JNDI );
+        connectionParameter.setNetworkProvider( ConnectionCorePlugin.getDefault().getDefaultNetworkProvider()
);
 
         // Creating the connection
         CreateConnectionActionHelper.createLdapBrowserConnection( server, new Connection(
connectionParameter ) );
     }
 
 
-
     /**
      * {@inheritDoc}
      */



Mime
View raw message