directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r1074647 - in /directory/studio/branches/akarasulu: ./ plugins/apacheds.configuration.v2/ plugins/connection.core/ plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/ plugins/ldapbrowser.core/src/main/java/org...
Date Fri, 25 Feb 2011 17:42:50 GMT
Author: akarasulu
Date: Fri Feb 25 17:42:50 2011
New Revision: 1074647

URL: http://svn.apache.org/viewvc?rev=1074647&view=rev
Log:
merging in changes from trunk

Added:
    directory/studio/branches/akarasulu/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/ConnectionActionFilterAdapter.java
      - copied unchanged from r1074646, directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/ConnectionActionFilterAdapter.java
    directory/studio/branches/akarasulu/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/ConnectionServerType.java
      - copied unchanged from r1074646, directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/ConnectionServerType.java
    directory/studio/branches/akarasulu/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/DetectedConnectionProperties.java
      - copied unchanged from r1074646, directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/DetectedConnectionProperties.java
    directory/studio/branches/akarasulu/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ServerTypeDetector.java
      - copied unchanged from r1074646, directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ServerTypeDetector.java
Removed:
    directory/studio/branches/akarasulu/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/DirectoryServerInfo.java
Modified:
    directory/studio/branches/akarasulu/   (props changed)
    directory/studio/branches/akarasulu/plugins/apacheds.configuration.v2/plugin.xml
    directory/studio/branches/akarasulu/plugins/connection.core/pom.xml
    directory/studio/branches/akarasulu/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/Connection.java
    directory/studio/branches/akarasulu/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/ConnectionParameter.java
    directory/studio/branches/akarasulu/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeRootDSERunnable.java
    directory/studio/branches/akarasulu/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/RootDSEPropertyPage.java
    directory/studio/branches/akarasulu/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/messages.properties
    directory/studio/branches/akarasulu/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/messages_fr.properties
    directory/studio/branches/akarasulu/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/model/LdapServer.java

Propchange: directory/studio/branches/akarasulu/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Feb 25 17:42:50 2011
@@ -1,4 +1,4 @@
 /directory/studio/branches/milestones:1072812-1074645
 /directory/studio/branches/shared-trunk-merge:1004968-1005876
 /directory/studio/branches/studio-connection-refactoring:1022102-1030058
-/directory/studio/trunk:1066125-1067996,1068027-1072726,1072812-1073550
+/directory/studio/trunk:1066125-1067996,1068027-1072726,1072812-1074646

Modified: directory/studio/branches/akarasulu/plugins/apacheds.configuration.v2/plugin.xml
URL: http://svn.apache.org/viewvc/directory/studio/branches/akarasulu/plugins/apacheds.configuration.v2/plugin.xml?rev=1074647&r1=1074646&r2=1074647&view=diff
==============================================================================
--- directory/studio/branches/akarasulu/plugins/apacheds.configuration.v2/plugin.xml (original)
+++ directory/studio/branches/akarasulu/plugins/apacheds.configuration.v2/plugin.xml Fri Feb
25 17:42:50 2011
@@ -52,12 +52,18 @@
                id="%OpenConfigurationAction_id"
                label="%OpenConfigurationAction_label">
          </action>
-         <!--<visibility>
+         <visibility>
+            <and>
                <objectState
-                     name="name"
-                     value="value">
-               </objectState>
-         </visibility>-->
+         	      name="vendorName"
+         	      value="Apache Software Foundation">
+         	   </objectState>
+               <objectState
+         	      name="vendorVersion"
+         	      value="1.5.8">
+         	   </objectState>
+         	</and>
+         </visibility>
       </objectContribution>
    </extension>
    <extension
@@ -75,4 +81,5 @@
             name="%NewWizards_NewApacheDSConfigurationFileWizard_name"
             project="false"/>
    </extension>
+
 </plugin>

Modified: directory/studio/branches/akarasulu/plugins/connection.core/pom.xml
URL: http://svn.apache.org/viewvc/directory/studio/branches/akarasulu/plugins/connection.core/pom.xml?rev=1074647&r1=1074646&r2=1074647&view=diff
==============================================================================
--- directory/studio/branches/akarasulu/plugins/connection.core/pom.xml (original)
+++ directory/studio/branches/akarasulu/plugins/connection.core/pom.xml Fri Feb 25 17:42:50
2011
@@ -118,7 +118,8 @@
  org.apache.httpcomponents.httpclient;bundle-version="${org.apache.httpcomponents.version}",
  org.apache.mina.core;bundle-version="${org.apache.mina.core.version}",
  org.dom4j.dom4j;bundle-version="${org.dom4j.version}",
- org.eclipse.core.runtime</Require-Bundle>
+ org.eclipse.core.runtime,
+ org.eclipse.ui</Require-Bundle>
             <Export-Package>org.apache.directory.studio.connection.core.*</Export-Package>
             <Import-Package>!</Import-Package>
             <Private-Package>!</Private-Package>
@@ -207,6 +208,11 @@
     
 	<!-- Eclipse plugins dependencies -->
     <dependency>
+      <groupId>org.eclipse.ui</groupId>
+      <artifactId>workbench</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
       <groupId>org.eclipse</groupId>
       <artifactId>osgi</artifactId>
       <scope>provided</scope>

Modified: directory/studio/branches/akarasulu/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/Connection.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/akarasulu/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/Connection.java?rev=1074647&r1=1074646&r2=1074647&view=diff
==============================================================================
--- directory/studio/branches/akarasulu/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/Connection.java
(original)
+++ directory/studio/branches/akarasulu/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/Connection.java
Fri Feb 25 17:42:50 2011
@@ -21,15 +21,20 @@
 package org.apache.directory.studio.connection.core;
 
 
+import org.apache.directory.shared.ldap.model.constants.SaslQoP;
+import org.apache.directory.shared.ldap.model.constants.SaslSecurityStrength;
 import org.apache.directory.shared.ldap.model.filter.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.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.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;
+import org.eclipse.ui.IActionFilter;
 
 
 /**
@@ -167,11 +172,15 @@ public class Connection implements Conne
         }
     }
 
+    /** The connection parameter */
     private ConnectionParameter connectionParameter;
 
     /** The connection wrapper */
     private ConnectionWrapper connectionWrapper;
 
+    /** The detected connection properties */
+    private DetectedConnectionProperties detectedConnectionProperties;
+
 
     /**
      * Creates a new instance of Connection.
@@ -181,6 +190,7 @@ public class Connection implements Conne
     public Connection( ConnectionParameter connectionParameter )
     {
         this.connectionParameter = connectionParameter;
+        detectedConnectionProperties = new DetectedConnectionProperties( this );
     }
 
 
@@ -276,6 +286,28 @@ public class Connection implements Conne
 
 
     /**
+     * Gets the detected connection properties.
+     *
+     * @return the detected connection properties
+     */
+    public DetectedConnectionProperties getDetectedConnectionProperties()
+    {
+        return detectedConnectionProperties;
+    }
+
+
+    /**
+     * Sets the detected connection properties.
+     *
+     * @param detectedConnectionProperties  the detected connection properties
+     */
+    public void setDetectedConnectionProperties( DetectedConnectionProperties detectedConnectionProperties
)
+    {
+        this.detectedConnectionProperties = detectedConnectionProperties;
+    }
+
+
+    /**
      * Gets the auth method.
      * 
      * @return the auth method
@@ -386,6 +418,105 @@ public class Connection implements Conne
 
 
     /**
+     * Gets the SASL quality of protection.
+     * 
+     * @return the SASL quality of protection
+     */
+    public SaslQoP getSaslQop()
+    {
+        return connectionParameter.getSaslQop();
+    }
+
+
+    /**
+     * Gets the SASL security strength.
+     * 
+     * @return the SASL security strength
+     */
+    public SaslSecurityStrength getSaslSecurityStrength()
+    {
+        return connectionParameter.getSaslSecurityStrength();
+    }
+
+
+    /**
+     * Checks if is SASL mutual authentication.
+     * 
+     * @return true, if is SASL mutual authentication
+     */
+    public boolean isSaslMutualAuthentication()
+    {
+        return connectionParameter.isSaslMutualAuthentication();
+    }
+
+
+    /**
+     * Gets the Kerberos credential configuration.
+     * 
+     * @return the Kerberos credential configuration
+     */
+    public Krb5CredentialConfiguration getKrb5CredentialConfiguration()
+    {
+        return connectionParameter.getKrb5CredentialConfiguration();
+    }
+
+
+    /**
+     * Gets the Kerberos configuration.
+     * 
+     * @return the Kerberos configuration
+     */
+    public Krb5Configuration getKrb5Configuration()
+    {
+        return connectionParameter.getKrb5Configuration();
+    }
+
+
+    /**
+     * Gets the Kerberos configuration file.
+     * 
+     * @return the Kerberos configuration file
+     */
+    public String getKrb5ConfigurationFile()
+    {
+        return connectionParameter.getKrb5ConfigurationFile();
+    }
+
+
+    /**
+     * Gets the Kerberos realm.
+     * 
+     * @return the Kerberos realm
+     */
+    public String getKrb5Realm()
+    {
+        return connectionParameter.getKrb5Realm();
+    }
+
+
+    /**
+     * Gets the Kerberos KDC host.
+     * 
+     * @return the Kerberos KDC host
+     */
+    public String getKrb5KdcHost()
+    {
+        return connectionParameter.getKrb5KdcHost();
+    }
+
+
+    /**
+     * Gets the Kerberos KDC port.
+     * 
+     * @return the Kerberos KDCport
+     */
+    public int getKrb5KdcPort()
+    {
+        return connectionParameter.getKrb5KdcPort();
+    }
+
+
+    /**
      * Checks if this connection is read only.
      * 
      * @return true, if this connection is read only
@@ -518,6 +649,10 @@ public class Connection implements Conne
         {
             return this;
         }
+        else if ( adapter.isAssignableFrom( IActionFilter.class ) )
+        {
+            return ConnectionActionFilterAdapter.getInstance();
+        }
 
         return null;
     }

Modified: directory/studio/branches/akarasulu/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/ConnectionParameter.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/akarasulu/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/ConnectionParameter.java?rev=1074647&r1=1074646&r2=1074647&view=diff
==============================================================================
--- directory/studio/branches/akarasulu/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/ConnectionParameter.java
(original)
+++ directory/studio/branches/akarasulu/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/ConnectionParameter.java
Fri Feb 25 17:42:50 2011
@@ -21,7 +21,10 @@
 package org.apache.directory.studio.connection.core;
 
 
+import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import java.util.UUID;
 
@@ -459,9 +462,9 @@ public class ConnectionParameter
 
 
     /**
-     * Gets the SASL qualitiy of protection.
+     * Gets the SASL quality of protection.
      * 
-     * @return the SASL qualitiy of protection
+     * @return the SASL quality of protection
      */
     public SaslQoP getSaslQop()
     {
@@ -704,6 +707,52 @@ public class ConnectionParameter
 
 
     /**
+     * Sets the extended list string property.
+     * 
+     * @param key the key
+     * @param value the value
+     */
+    public void setExtendedListStringProperty( String key, List<String> value )
+    {
+        StringBuilder sb = new StringBuilder();
+        if ( ( value != null ) && ( !value.isEmpty() ) )
+        {
+            for ( String string : value )
+            {
+                sb.append( string );
+                sb.append( ';' );
+            }
+            sb.deleteCharAt( sb.length() - 1 );
+        }
+
+        extendedProperties.put( key, sb.toString() );
+    }
+
+
+    /**
+     * Gets the extended list string property.
+     * 
+     * @param key the key
+     * 
+     * @return the extended list string property or <code>null</code> if the
property doesn't exist
+     */
+    public List<String> getExtendedListStringProperty( String key )
+    {
+        String s = extendedProperties.get( key );
+        if ( s != null )
+        {
+            String[] array = s.split( ";" );
+            if ( ( array != null ) && ( array.length > 0 ) )
+            {
+                return new ArrayList<String>( Arrays.asList( array ) );
+            }
+        }
+
+        return null;
+    }
+
+
+    /**
      * Sets the extended int property.
      * 
      * @param key the key

Modified: directory/studio/branches/akarasulu/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeRootDSERunnable.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/akarasulu/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeRootDSERunnable.java?rev=1074647&r1=1074646&r2=1074647&view=diff
==============================================================================
--- directory/studio/branches/akarasulu/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeRootDSERunnable.java
(original)
+++ directory/studio/branches/akarasulu/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeRootDSERunnable.java
Fri Feb 25 17:42:50 2011
@@ -22,6 +22,7 @@ package org.apache.directory.studio.ldap
 
 
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
@@ -35,6 +36,8 @@ import org.apache.directory.studio.commo
 import org.apache.directory.studio.connection.core.Connection;
 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;
@@ -295,6 +298,25 @@ public class InitializeRootDSERunnable i
         browserConnection.getRootDSE().setChildrenInitialized( true );
         browserConnection.getRootDSE().setHasChildrenHint( true );
         browserConnection.getRootDSE().setDirectoryEntry( true );
+
+        // Set detected connection properties
+        DetectedConnectionProperties detectedConnectionProperties = browserConnection.getConnection()
+            .getDetectedConnectionProperties();
+        detectedConnectionProperties.setVendorName( browserConnection.getRootDSE().getAttribute(
"vendorName" )
+            .getStringValue() );
+        detectedConnectionProperties.setVendorVersion( browserConnection.getRootDSE().getAttribute(
"vendorVersion" )
+            .getStringValue() );
+        detectedConnectionProperties.setSupportedControls( Arrays.asList( browserConnection.getRootDSE()
+            .getAttribute( "supportedControl" ).getStringValues() ) );
+        detectedConnectionProperties.setSupportedExtensions( Arrays.asList( browserConnection.getRootDSE()
+            .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/branches/akarasulu/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/RootDSEPropertyPage.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/akarasulu/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/RootDSEPropertyPage.java?rev=1074647&r1=1074646&r2=1074647&view=diff
==============================================================================
--- directory/studio/branches/akarasulu/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/RootDSEPropertyPage.java
(original)
+++ directory/studio/branches/akarasulu/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/RootDSEPropertyPage.java
Fri Feb 25 17:42:50 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;
@@ -50,7 +50,6 @@ import org.eclipse.ui.dialogs.PropertyPa
  */
 public class RootDSEPropertyPage extends PropertyPage implements IWorkbenchPropertyPage
 {
-
     /** The tab folder. */
     private TabFolder tabFolder;
 
@@ -125,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$
@@ -186,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/branches/akarasulu/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/messages.properties
URL: http://svn.apache.org/viewvc/directory/studio/branches/akarasulu/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/messages.properties?rev=1074647&r1=1074646&r2=1074647&view=diff
==============================================================================
--- directory/studio/branches/akarasulu/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/messages.properties
(original)
+++ directory/studio/branches/akarasulu/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/messages.properties
Fri Feb 25 17:42:50 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/branches/akarasulu/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/branches/akarasulu/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/messages_fr.properties?rev=1074647&r1=1074646&r2=1074647&view=diff
==============================================================================
--- directory/studio/branches/akarasulu/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/messages_fr.properties
(original)
+++ directory/studio/branches/akarasulu/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/messages_fr.properties
Fri Feb 25 17:42:50 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:

Modified: directory/studio/branches/akarasulu/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/model/LdapServer.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/akarasulu/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/model/LdapServer.java?rev=1074647&r1=1074646&r2=1074647&view=diff
==============================================================================
--- directory/studio/branches/akarasulu/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/model/LdapServer.java
(original)
+++ directory/studio/branches/akarasulu/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/model/LdapServer.java
Fri Feb 25 17:42:50 2011
@@ -304,7 +304,7 @@ public class LdapServer implements IAdap
      */
     public Object getAdapter( Class adapter )
     {
-        if ( adapter.isAssignableFrom(  IActionFilter.class ))
+        if ( adapter.isAssignableFrom( IActionFilter.class ) )
         {
             return LdapServerActionFilterAdapter.getInstance();
         }



Mime
View raw message