directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1074230 - in /directory/studio/trunk/plugins: connection.core/src/main/java/org/apache/directory/studio/connection/core/ ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ ldapbrowser.ui/src/main/java/org/apa...
Date Thu, 24 Feb 2011 17:42:10 GMT
Author: pamarcelot
Date: Thu Feb 24 17:42:09 2011
New Revision: 1074230

URL: http://svn.apache.org/viewvc?rev=1074230&view=rev
Log:
Moved and refactored the code for server type detection to a dedicated class, now returning
a ConnectionServerType enum instance.
Used this class during the Root DSE initialization to set the server type detected property.

Added:
    directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/ConnectionServerType.java
Removed:
    directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/DirectoryServerInfo.java
Modified:
    directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/DetectedConnectionProperties.java
    directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeRootDSERunnable.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_fr.properties

Added: directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/ConnectionServerType.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/ConnectionServerType.java?rev=1074230&view=auto
==============================================================================
--- directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/ConnectionServerType.java
(added)
+++ directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/ConnectionServerType.java
Thu Feb 24 17:42:09 2011
@@ -0,0 +1,47 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.studio.connection.core;
+
+
+/**
+ * This enum contains all detectable directory server types.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public enum ConnectionServerType
+{
+        APACHEDS,
+        IBM_DIRECTORY_SERVER,
+        IBM_SECUREWAY_DIRECTORY,
+        IBM_TIVOLI_DIRECTORY_SERVER,
+        MICROSOFT_ACTIVE_DIRECTORY_2000,
+        MICROSOFT_ACTIVE_DIRECTORY_2003,
+        NETSCAPE,
+        NOVELL,
+        OPENLDAP,
+        OPENLDAP_2_0,
+        OPENLDAP_2_1,
+        OPENLDAP_2_2,
+        OPENLDAP_2_3,
+        OPENLDAP_2_4,
+        SIEMENS_DIRX,
+        SUN_DIRECTORY_SERVER,
+        UNKNOWN;
+}
\ No newline at end of file

Modified: directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/DetectedConnectionProperties.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/DetectedConnectionProperties.java?rev=1074230&r1=1074229&r2=1074230&view=diff
==============================================================================
--- directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/DetectedConnectionProperties.java
(original)
+++ directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/DetectedConnectionProperties.java
Thu Feb 24 17:42:09 2011
@@ -71,114 +71,203 @@ public class DetectedConnectionPropertie
     }
 
 
-    public String getVendorName()
-    {
-        return connection.getConnectionParameter().getExtendedProperty( CONNECTION_PARAMETER_VENDOR_NAME
);
+    /**
+     * Gets the server type.
+     *
+     * @return the server type
+     */
+    public ConnectionServerType getServerType()
+    {
+        try
+        {
+            return ConnectionServerType.valueOf( connection.getConnectionParameter().getExtendedProperty(
+                CONNECTION_PARAMETER_SERVER_TYPE ) );
+        }
+        catch ( IllegalArgumentException e )
+        {
+            return ConnectionServerType.UNKNOWN;
+        }
     }
 
 
-    public void setVendorName( String vendorName )
+    /**
+     * Gets the supported controls.
+     *
+     * @return the supported controls
+     */
+    public List<String> getSupportedControls()
     {
-        connection.getConnectionParameter().setExtendedProperty( CONNECTION_PARAMETER_VENDOR_NAME,
vendorName );
+        return connection.getConnectionParameter().getExtendedListStringProperty(
+            CONNECTION_PARAMETER_SUPPORTED_CONTROLS );
     }
 
 
-    public String getVendorVersion()
+    /**
+     * Gets the supported extensions.
+     *
+     * @return the supported extensions
+     */
+    public List<String> getSupportedExtensions()
     {
-        return connection.getConnectionParameter().getExtendedProperty( CONNECTION_PARAMETER_VENDOR_VERSION
);
+        return connection.getConnectionParameter().getExtendedListStringProperty(
+            CONNECTION_PARAMETER_SUPPORTED_EXTENSIONS );
     }
 
 
-    public void setVendorVersion( String vendorVersion )
+    /**
+     * Gets the supported features.
+     *
+     * @return the supported features
+     */
+    public List<String> getSupportedFeatures()
     {
-        connection.getConnectionParameter().setExtendedProperty( CONNECTION_PARAMETER_VENDOR_VERSION,
vendorVersion );
+        return connection.getConnectionParameter().getExtendedListStringProperty(
+            CONNECTION_PARAMETER_SUPPORTED_FEATURES );
     }
 
 
-    public Object getServerType()
+    /**
+     * Gets the supported LDAP versions.
+     *
+     * @return the supported LDAP versions
+     */
+    public List<String> getSupportedLdapVersions()
     {
-        return connection.getConnectionParameter().getExtendedProperty( CONNECTION_PARAMETER_SERVER_TYPE
);
+        return connection.getConnectionParameter().getExtendedListStringProperty(
+            CONNECTION_PARAMETER_SUPPORTED_LDAP_VERSIONS );
     }
 
 
-    public void setServerType( Object serverType )
+    /**
+     * Gets the supported SASL mechanisms.
+     *
+     * @return the supported SASL mechanisms
+     */
+    public List<String> getSupportedSaslMechanisms()
     {
-        connection.getConnectionParameter().setExtendedProperty( CONNECTION_PARAMETER_SERVER_TYPE,
-            serverType.toString() );
+        return connection.getConnectionParameter().getExtendedListStringProperty(
+            CONNECTION_PARAMETER_SUPPORTED_SASL_MECHANISMS );
     }
 
 
-    public List<String> getSupportedLdapVersions()
+    /**
+     * Gets the vendor name.
+     *
+     * @return the vendor name
+     */
+    public String getVendorName()
     {
-        return connection.getConnectionParameter().getExtendedListStringProperty(
-            CONNECTION_PARAMETER_SUPPORTED_LDAP_VERSIONS );
+        return connection.getConnectionParameter().getExtendedProperty( CONNECTION_PARAMETER_VENDOR_NAME
);
     }
 
 
-    public void setSupportedLdapVersions( List<String> supportedLdapVersions )
+    /**
+     * Gets the vendor version.
+     *
+     * @return the vendor version
+     */
+    public String getVendorVersion()
     {
-        connection.getConnectionParameter().setExtendedListStringProperty(
-            CONNECTION_PARAMETER_SUPPORTED_LDAP_VERSIONS,
-            supportedLdapVersions );
+        return connection.getConnectionParameter().getExtendedProperty( CONNECTION_PARAMETER_VENDOR_VERSION
);
     }
 
 
-    public List<String> getSupportedSaslMechanisms()
+    /**
+     * Sets the server type.
+     *
+     * @param serverType the server type
+     */
+    public void setServerType( Object serverType )
     {
-        return connection.getConnectionParameter().getExtendedListStringProperty(
-            CONNECTION_PARAMETER_SUPPORTED_SASL_MECHANISMS );
+        connection.getConnectionParameter().setExtendedProperty( CONNECTION_PARAMETER_SERVER_TYPE,
+            serverType.toString() );
     }
 
 
-    public void setSupportedSaslMechanisms( List<String> supportedSaslMechanisms )
+    /**
+     * Sets the supported controls.
+     *
+     * @param supportedControls the supported controls
+     */
+    public void setSupportedControls( List<String> supportedControls )
     {
         connection.getConnectionParameter().setExtendedListStringProperty(
-            CONNECTION_PARAMETER_SUPPORTED_SASL_MECHANISMS,
-            supportedSaslMechanisms );
+            CONNECTION_PARAMETER_SUPPORTED_CONTROLS,
+            supportedControls );
     }
 
 
-    public List<String> getSupportedControls()
+    /**
+     * Sets the supported extensions.
+     *
+     * @param supportedExtensions the supported extensions
+     */
+    public void setSupportedExtensions( List<String> supportedExtensions )
     {
-        return connection.getConnectionParameter().getExtendedListStringProperty(
-            CONNECTION_PARAMETER_SUPPORTED_CONTROLS );
+        connection.getConnectionParameter().setExtendedListStringProperty(
+            CONNECTION_PARAMETER_SUPPORTED_EXTENSIONS,
+            supportedExtensions );
     }
 
 
-    public void setSupportedControls( List<String> supportedControls )
+    /**
+     * Sets the supported features.
+     *
+     * @param supportedFeatures the supported features
+     */
+    public void setSupportedFeatures( List<String> supportedFeatures )
     {
         connection.getConnectionParameter().setExtendedListStringProperty(
-            CONNECTION_PARAMETER_SUPPORTED_CONTROLS,
-            supportedControls );
+            CONNECTION_PARAMETER_SUPPORTED_FEATURES,
+            supportedFeatures );
     }
 
 
-    public List<String> getSupportedExtensions()
+    /**
+     * Sets the supported LDAP versions.
+     *
+     * @param supportedLdapVersions the supported LDAP versions
+     */
+    public void setSupportedLdapVersions( List<String> supportedLdapVersions )
     {
-        return connection.getConnectionParameter().getExtendedListStringProperty(
-            CONNECTION_PARAMETER_SUPPORTED_EXTENSIONS );
+        connection.getConnectionParameter().setExtendedListStringProperty(
+            CONNECTION_PARAMETER_SUPPORTED_LDAP_VERSIONS,
+            supportedLdapVersions );
     }
 
 
-    public void setSupportedExtensions( List<String> supportedExtensions )
+    /**
+     * Sets the supported SASL mechanisms.
+     *
+     * @param supportedSaslMechanisms
+     *      the supported SASL mechanisms
+     */
+    public void setSupportedSaslMechanisms( List<String> supportedSaslMechanisms )
     {
         connection.getConnectionParameter().setExtendedListStringProperty(
-            CONNECTION_PARAMETER_SUPPORTED_EXTENSIONS,
-            supportedExtensions );
+            CONNECTION_PARAMETER_SUPPORTED_SASL_MECHANISMS,
+            supportedSaslMechanisms );
     }
 
 
-    public List<String> getSupportedFeatures()
+    /**
+     * Sets the vendor name.
+     *
+     * @param vendorName the vendor name
+     */
+    public void setVendorName( String vendorName )
     {
-        return connection.getConnectionParameter().getExtendedListStringProperty(
-            CONNECTION_PARAMETER_SUPPORTED_FEATURES );
+        connection.getConnectionParameter().setExtendedProperty( CONNECTION_PARAMETER_VENDOR_NAME,
vendorName );
     }
 
 
-    public void setSupportedFeatures( List<String> supportedFeatures )
+    /**
+     * Sets the vendor version.
+     *
+     * @param vendorVersion the vendor version
+     */
+    public void setVendorVersion( String vendorVersion )
     {
-        connection.getConnectionParameter().setExtendedListStringProperty(
-            CONNECTION_PARAMETER_SUPPORTED_FEATURES,
-            supportedFeatures );
+        connection.getConnectionParameter().setExtendedProperty( CONNECTION_PARAMETER_VENDOR_VERSION,
vendorVersion );
     }
 }

Modified: directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeRootDSERunnable.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeRootDSERunnable.java?rev=1074230&r1=1074229&r2=1074230&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeRootDSERunnable.java
(original)
+++ directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeRootDSERunnable.java
Thu Feb 24 17:42:09 2011
@@ -34,10 +34,10 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.apache.directory.studio.common.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.connection.core.Connection;
-import org.apache.directory.studio.connection.core.ConnectionCorePlugin;
-import org.apache.directory.studio.connection.core.DetectedConnectionProperties;
 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.ConnectionCorePlugin;
+import org.apache.directory.studio.connection.core.DetectedConnectionProperties;
 import org.apache.directory.studio.connection.core.jobs.StudioConnectionBulkRunnableWithProgress;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
 import org.apache.directory.studio.ldapbrowser.core.events.AttributesInitializedEvent;
@@ -312,6 +312,8 @@ public class InitializeRootDSERunnable i
             .getAttribute( "supportedExtension" ).getStringValues() ) );
         detectedConnectionProperties.setSupportedFeatures( Arrays.asList( browserConnection.getRootDSE()
             .getAttribute( "supportedFeatures" ).getStringValues() ) );
+        detectedConnectionProperties
+            .setServerType( ServerTypeDetector.detectServerType( browserConnection.getRootDSE()
) );
 
         ConnectionCorePlugin.getDefault().getConnectionManager()
             .connectionUpdated( browserConnection.getConnection() );

Modified: directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/RootDSEPropertyPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/RootDSEPropertyPage.java?rev=1074230&r1=1074229&r2=1074230&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/RootDSEPropertyPage.java
(original)
+++ directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/RootDSEPropertyPage.java
Thu Feb 24 17:42:09 2011
@@ -24,12 +24,12 @@ package org.apache.directory.studio.ldap
 import org.apache.commons.lang.StringUtils;
 import org.apache.directory.studio.common.ui.widgets.BaseWidgetUtils;
 import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.connection.core.ConnectionServerType;
 import org.apache.directory.studio.connection.core.Utils;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreConstants;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCorePlugin;
-import org.apache.directory.studio.ldapbrowser.core.model.IAttribute;
+import org.apache.directory.studio.ldapbrowser.core.jobs.ServerTypeDetector;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
-import org.apache.directory.studio.ldapbrowser.core.model.IRootDSE;
 import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.layout.GridLayout;
@@ -124,25 +124,61 @@ public class RootDSEPropertyPage extends
         if ( connection != null && connection.getRootDSE() != null )
         {
             // Try to detect LDAP server from RootDSE
-            IRootDSE rootDSE = connection.getRootDSE();
-            String type = detectOpenLDAP( rootDSE );
-            if ( type == null )
+            ConnectionServerType serverType = ServerTypeDetector.detectServerType( connection.getRootDSE()
);
+            if ( serverType != null )
             {
-                type = detectSiemensDirX( rootDSE );
-                if ( type == null )
+                switch ( serverType )
                 {
-                    type = detectActiveDirectory( rootDSE );
-                    if ( type == null )
-                    {
-                        type = detectByVendorName( rootDSE );
-                    }
+                    case APACHEDS:
+                        typeText.setText( Messages.getString( "RootDSEPropertyPage.ApacheDirectoryServer"
) ); //$NON-NLS-1$
+                        break;
+                    case IBM_DIRECTORY_SERVER:
+                        typeText.setText( Messages.getString( "RootDSEPropertyPage.IBMDirectory"
) ); //$NON-NLS-1$
+                        break;
+                    case IBM_SECUREWAY_DIRECTORY:
+                        typeText.setText( Messages.getString( "RootDSEPropertyPage.IBMSecureWay"
) ); //$NON-NLS-1$
+                        break;
+                    case IBM_TIVOLI_DIRECTORY_SERVER:
+                        typeText.setText( Messages.getString( "RootDSEPropertyPage.IBMTivoli"
) ); //$NON-NLS-1$
+                        break;
+                    case MICROSOFT_ACTIVE_DIRECTORY_2000:
+                        typeText.setText( Messages.getString( "RootDSEPropertyPage.MSAD2000"
) ); //$NON-NLS-1$
+                        break;
+                    case MICROSOFT_ACTIVE_DIRECTORY_2003:
+                        typeText.setText( Messages.getString( "RootDSEPropertyPage.MSAD2003"
) ); //$NON-NLS-1$
+                        break;
+                    case NETSCAPE:
+                        typeText.setText( Messages.getString( "RootDSEPropertyPage.NetscapeDirectoryServer"
) ); //$NON-NLS-1$
+                        break;
+                    case NOVELL:
+                        typeText.setText( Messages.getString( "RootDSEPropertyPage.NovellEDirectory"
) ); //$NON-NLS-1$
+                        break;
+                    case OPENLDAP:
+                        typeText.setText( Messages.getString( "RootDSEPropertyPage.OpenLDAP"
) ); //$NON-NLS-1$
+                        break;
+                    case OPENLDAP_2_0:
+                        typeText.setText( Messages.getString( "RootDSEPropertyPage.OpenLDAP20"
) ); //$NON-NLS-1$
+                        break;
+                    case OPENLDAP_2_1:
+                        typeText.setText( Messages.getString( "RootDSEPropertyPage.OpenLDAP21"
) ); //$NON-NLS-1$
+                        break;
+                    case OPENLDAP_2_2:
+                        typeText.setText( Messages.getString( "RootDSEPropertyPage.OpenLDAP22"
) ); //$NON-NLS-1$
+                        break;
+                    case OPENLDAP_2_3:
+                        typeText.setText( Messages.getString( "RootDSEPropertyPage.OpenLDAP23"
) ); //$NON-NLS-1$
+                        break;
+                    case OPENLDAP_2_4:
+                        typeText.setText( Messages.getString( "RootDSEPropertyPage.OpenLDAP24"
) ); //$NON-NLS-1$
+                        break;
+                    case SIEMENS_DIRX:
+                        typeText.setText( Messages.getString( "RootDSEPropertyPage.SiemensDirX"
) ); //$NON-NLS-1$
+                        break;
+                    case SUN_DIRECTORY_SERVER:
+                        typeText.setText( Messages.getString( "RootDSEPropertyPage.SunDirectoryServer"
) ); //$NON-NLS-1$
+                        break;
                 }
             }
-
-            if ( type != null )
-            {
-                typeText.setText( type );
-            }
         }
         addInfo( connection, infoComposite, "vendorName", Messages.getString( "RootDSEPropertyPage.VendorName"
) ); //$NON-NLS-1$ //$NON-NLS-2$
         addInfo( connection, infoComposite, "vendorVersion", Messages.getString( "RootDSEPropertyPage.VendorVersion"
) ); //$NON-NLS-1$ //$NON-NLS-2$
@@ -185,228 +221,6 @@ public class RootDSEPropertyPage extends
     }
 
 
-    /** 
-     * Check various LDAP servers via vendorName attribute.
-     * 
-     * @param rootDSE
-     */
-    private String detectByVendorName( IRootDSE rootDSE )
-    {
-        String result = null;
-
-        IAttribute vnAttribute = rootDSE.getAttribute( "vendorName" ); //$NON-NLS-1$
-        IAttribute vvAttribute = rootDSE.getAttribute( "vendorVersion" ); //$NON-NLS-1$
-
-        if ( vnAttribute != null && vnAttribute.getStringValues().length > 0 &&
vvAttribute != null
-            && vvAttribute.getStringValues().length > 0 )
-        {
-
-            String vendorName = vnAttribute.getStringValues()[0];
-            String vendorVersion = vvAttribute.getStringValues()[0];
-
-            if ( vendorName.indexOf( "Apache Software Foundation" ) > -1 ) //$NON-NLS-1$
-            {
-                result = Messages.getString( "RootDSEPropertyPage.ApacheDirectoryServer"
); //$NON-NLS-1$
-            }
-            if ( vendorName.indexOf( "Novell" ) > -1 //$NON-NLS-1$
-                || vendorVersion.indexOf( "eDirectory" ) > -1 ) //$NON-NLS-1$
-            {
-                result = Messages.getString( "RootDSEPropertyPage.NovellEDirectory" ); //$NON-NLS-1$
-            }
-            if ( vendorName.indexOf( "Sun" ) > -1 //$NON-NLS-1$
-                || vendorVersion.indexOf( "Sun" ) > -1 ) //$NON-NLS-1$
-            {
-                result = Messages.getString( "RootDSEPropertyPage.SunDirectoryServer" );
//$NON-NLS-1$
-            }
-            if ( vendorName.indexOf( "Netscape" ) > -1 //$NON-NLS-1$
-                || vendorVersion.indexOf( "Netscape" ) > -1 ) //$NON-NLS-1$
-            {
-                result = Messages.getString( "RootDSEPropertyPage.NetscapeDirectoryServer"
); //$NON-NLS-1$
-            }
-
-            // IBM
-            if ( vendorName.indexOf( "International Business Machines" ) > -1 ) { //$NON-NLS-1$
-
-                // IBM SecureWay Directory
-                String[] iswVersions =
-                    { "3.2", "3.2.1", "3.2.2" }; //$NON-NLS-1$
-                for ( String version : iswVersions )
-                {
-                    if ( vendorVersion.indexOf( version ) > -1 )
-                    {
-                        result = Messages.getString( "RootDSEPropertyPage.IBMSecureWay" );
//$NON-NLS-1$
-                    }
-                }
-
-                // IBM Directory Server
-                String[] idsVersions =
-                    { "4.1", "5.1" }; //$NON-NLS-1$
-                for ( String version : idsVersions )
-                {
-                    if ( vendorVersion.indexOf( version ) > -1 )
-                    {
-                        result = Messages.getString( "RootDSEPropertyPage.IBMDirectory" );
//$NON-NLS-1$
-                    }
-                }
-
-                // IBM Tivoli Directory Server
-                String[] tdsVersions =
-                    { "5.2", "6.0", "6.1", "6.2" }; //$NON-NLS-1$
-                for ( String version : tdsVersions )
-                {
-                    if ( vendorVersion.indexOf( version ) > -1 )
-                    {
-                        result = Messages.getString( "RootDSEPropertyPage.IBMTivoli" ); //$NON-NLS-1$
-                    }
-                }
-            }
-        }
-
-        return result;
-    }
-
-
-    /**
-     * Tries to detect a Microsoft Active Directory.
-     * 
-     * @param rootDSE
-     * @return name of directory type, or null if no Active Directory server server was detected
-     */
-    private String detectActiveDirectory( IRootDSE rootDSE )
-    {
-        String result = null;
-
-        // check active directory
-        IAttribute rdncAttribute = rootDSE.getAttribute( "rootDomainNamingContext" ); //$NON-NLS-1$
-        if ( rdncAttribute != null )
-        {
-            IAttribute ffAttribute = rootDSE.getAttribute( "forestFunctionality" ); //$NON-NLS-1$
-            if ( ffAttribute != null )
-            {
-                result = Messages.getString( "RootDSEPropertyPage.MSAD2003" ); //$NON-NLS-1$
-            }
-            else
-            {
-                result = Messages.getString( "RootDSEPropertyPage.MSAD2000" ); //$NON-NLS-1$
-            }
-        }
-
-        return result;
-    }
-
-
-    /**
-     * Tries to detect a Siemens DirX server.
-     * 
-     * @param rootDSE 
-     * @return name of directory type, or null if no DirX server server was detected
-     */
-    private String detectSiemensDirX( IRootDSE rootDSE )
-    {
-        String result = null;
-
-        IAttribute ssseAttribute = rootDSE.getAttribute( "subSchemaSubentry" ); //$NON-NLS-1$
-        if ( ssseAttribute != null )
-        {
-            for ( int i = 0; i < ssseAttribute.getStringValues().length; i++ )
-            {
-                if ( "cn=LDAPGlobalSchemaSubentry".equals( ssseAttribute.getStringValues()[i]
) ) //$NON-NLS-1$
-                {
-                    result = Messages.getString( "RootDSEPropertyPage.SiemesDirX" ); //$NON-NLS-1$
-                }
-            }
-        }
-
-        return result;
-    }
-
-
-    /**
-     * Tries to detect an OpenLDAP server
-     * 
-     * @param rootDSE
-     * @return name (and sometimes version) of directory type, or null if no OpenLDAP server
was detected
-     */
-    private String detectOpenLDAP( IRootDSE rootDSE )
-    {
-        String result = null;
-        boolean typeDetected = false;
-
-        // check OpenLDAP
-        IAttribute ocAttribute = rootDSE.getAttribute( "objectClass" ); //$NON-NLS-1$
-        if ( ocAttribute != null )
-        {
-            for ( int i = 0; i < ocAttribute.getStringValues().length; i++ )
-            {
-                if ( "OpenLDAProotDSE".equals( ocAttribute.getStringValues()[i] ) ) //$NON-NLS-1$
-                {
-                    IAttribute ccAttribute = rootDSE.getAttribute( "configContext" ); //$NON-NLS-1$
-                    if ( ccAttribute != null )
-                    {
-                        result = Messages.getString( "RootDSEPropertyPage.openLDAP23" );
//$NON-NLS-1$
-                        typeDetected = true;
-                    }
-                    if ( !typeDetected )
-                    {
-                        IAttribute scAttribute = rootDSE.getAttribute( "supportedControl"
); //$NON-NLS-1$
-                        if ( scAttribute != null )
-                        {
-                            for ( int sci = 0; sci < scAttribute.getStringValues().length;
sci++ )
-                            {
-                                // if("1.2.840.113556.1.4.319".equals(scAttribute.getStringValues()[sci]))
-                                // {
-                                if ( "2.16.840.1.113730.3.4.18".equals( scAttribute.getStringValues()[sci]
) ) //$NON-NLS-1$
-                                {
-                                    result = Messages.getString( "RootDSEPropertyPage.OpenLDAP22"
); //$NON-NLS-1$
-                                    typeDetected = true;
-                                }
-                            }
-                        }
-
-                    }
-                    if ( !typeDetected )
-                    {
-                        IAttribute seAttribute = rootDSE.getAttribute( "supportedExtension"
); //$NON-NLS-1$
-                        if ( seAttribute != null )
-                        {
-                            for ( int sei = 0; sei < seAttribute.getStringValues().length;
sei++ )
-                            {
-                                if ( "1.3.6.1.4.1.4203.1.11.3".equals( seAttribute.getStringValues()[sei]
) ) //$NON-NLS-1$
-                                {
-                                    result = Messages.getString( "RootDSEPropertyPage.OpenLDAP21"
); //$NON-NLS-1$
-                                    typeDetected = true;
-                                }
-                            }
-                        }
-                    }
-                    if ( !typeDetected )
-                    {
-                        IAttribute sfAttribute = rootDSE.getAttribute( "supportedFeatures"
); //$NON-NLS-1$
-                        if ( sfAttribute != null )
-                        {
-                            for ( int sfi = 0; sfi < sfAttribute.getStringValues().length;
sfi++ )
-                            {
-                                if ( "1.3.6.1.4.1.4203.1.5.4".equals( sfAttribute.getStringValues()[sfi]
) ) //$NON-NLS-1$
-                                {
-                                    result = Messages.getString( "RootDSEPropertyPage.OpenLDAP20"
); //$NON-NLS-1$
-                                    typeDetected = true;
-                                }
-                            }
-                        }
-                    }
-                    if ( !typeDetected )
-                    {
-                        result = Messages.getString( "RootDSEPropertyPage.OpenLDAP" ); //$NON-NLS-1$
-                        typeDetected = true;
-                    }
-                }
-            }
-        }
-
-        return result;
-    }
-
-
     /**
      * Adds text fields to the composite. The text fields contain
      * the OID values of the given attribute and the OID description.

Modified: directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/messages.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/messages.properties?rev=1074230&r1=1074229&r2=1074230&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/messages.properties
(original)
+++ directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/messages.properties
Thu Feb 24 17:42:09 2011
@@ -78,8 +78,9 @@ RootDSEPropertyPage.OpenLDAP=OpenLDAP
 RootDSEPropertyPage.OpenLDAP20=OpenLDAP 2.0
 RootDSEPropertyPage.OpenLDAP21=OpenLDAP 2.1
 RootDSEPropertyPage.OpenLDAP22=OpenLDAP 2.2
-RootDSEPropertyPage.openLDAP23=OpenLDAP 2.3
-RootDSEPropertyPage.SiemesDirX=Siemens DirX
+RootDSEPropertyPage.OpenLDAP23=OpenLDAP 2.3
+RootDSEPropertyPage.OpenLDAP24=OpenLDAP 2.4
+RootDSEPropertyPage.SiemensDirX=Siemens DirX
 RootDSEPropertyPage.SunDirectoryServer=Sun Directory Server
 RootDSEPropertyPage.SupportedLDAPVersion=Supported LDAP Versions:
 RootDSEPropertyPage.SupportedSASL=Supported SASL Mechanisms:

Modified: directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/messages_fr.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/messages_fr.properties?rev=1074230&r1=1074229&r2=1074230&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/messages_fr.properties
(original)
+++ directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/messages_fr.properties
Thu Feb 24 17:42:09 2011
@@ -60,25 +60,12 @@ EntryPropertyPage.NumberOfValues=Nombre 
 EntryPropertyPage.Refresh=Rafra\u00EEchir
 EntryPropertyPage.SizingInformation=Information de taille
 EntryPropertyPage.URL=URL:
-RootDSEPropertyPage.ApacheDirectoryServer=Apache Directory Server
 RootDSEPropertyPage.Controls=Controls
 RootDSEPropertyPage.Dash=-
 RootDSEPropertyPage.DirectoryType=Type d'annuaire:
 RootDSEPropertyPage.Extensions=Extensions
 RootDSEPropertyPage.Features=Features
-RootDSEPropertyPage.IBMTivoli=IBM Tivoli Directory Server
 RootDSEPropertyPage.Info=Info
-RootDSEPropertyPage.MSAD2000=Microsoft Active Directory 2000
-RootDSEPropertyPage.MSAD2003=Microsoft Active Directory 2003
-RootDSEPropertyPage.NetscapeDirectoryServer=Netscape Directory Server
-RootDSEPropertyPage.NovellEDirectory=Novell eDirectory
-RootDSEPropertyPage.OpenLDAP=OpenLDAP
-RootDSEPropertyPage.OpenLDAP20=OpenLDAP 2.0
-RootDSEPropertyPage.OpenLDAP21=OpenLDAP 2.1
-RootDSEPropertyPage.OpenLDAP22=OpenLDAP 2.2
-RootDSEPropertyPage.openLDAP23=OpenLDAP 2.3
-RootDSEPropertyPage.SiemesDirX=Siemens DirX
-RootDSEPropertyPage.SunDirectoryServer=Sun Directory Server
 RootDSEPropertyPage.SupportedLDAPVersion=Version LDAP support\u00E9es:
 RootDSEPropertyPage.SupportedSASL=M\u00E9canismes SASL support\u00E9s:
 RootDSEPropertyPage.VendorName=Nom du distributeur:



Mime
View raw message