directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From szoer...@apache.org
Subject svn commit: r821519 - in /directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties: RootDSEPropertyPage.java messages.properties
Date Sun, 04 Oct 2009 11:53:06 GMT
Author: szoerner
Date: Sun Oct  4 11:53:06 2009
New Revision: 821519

URL: http://svn.apache.org/viewvc?rev=821519&view=rev
Log:
Some changes to fix DIRSTUDIO-550. Older versions of IBM LDAP server supported as well.

Modified:
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/RootDSEPropertyPage.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/messages.properties

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/RootDSEPropertyPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/RootDSEPropertyPage.java?rev=821519&r1=821518&r2=821519&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/RootDSEPropertyPage.java
(original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/RootDSEPropertyPage.java
Sun Oct  4 11:53:06 2009
@@ -202,30 +202,65 @@
         if ( vnAttribute != null && vnAttribute.getStringValues().length > 0 &&
vvAttribute != null
             && vvAttribute.getStringValues().length > 0 )
         {
-            if ( vnAttribute.getStringValues()[0].indexOf( "Apache Software Foundation" )
> -1 ) //$NON-NLS-1$
+
+            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 ( vnAttribute.getStringValues()[0].indexOf( "Novell" ) > -1 //$NON-NLS-1$
-                || vvAttribute.getStringValues()[0].indexOf( "eDirectory" ) > -1 ) //$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 ( vnAttribute.getStringValues()[0].indexOf( "Sun" ) > -1 //$NON-NLS-1$
-                || vvAttribute.getStringValues()[0].indexOf( "Sun" ) > -1 ) //$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 ( vnAttribute.getStringValues()[0].indexOf( "Netscape" ) > -1 //$NON-NLS-1$
-                || vvAttribute.getStringValues()[0].indexOf( "Netscape" ) > -1 ) //$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$
             }
-            if ( vnAttribute.getStringValues()[0].indexOf( "International Business Machines"
) > -1 //$NON-NLS-1$
-                && ( ( vvAttribute.getStringValues()[0].indexOf( "6.0" ) > -1
) || ( vvAttribute.getStringValues()[0] //$NON-NLS-1$
-                    .indexOf( "5.2" ) > -1 ) ) ) //$NON-NLS-1$
-            {
-                result = Messages.getString( "RootDSEPropertyPage.IBMTivoli" ); //$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$
+                    }
+                }
             }
         }
 

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/messages.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/messages.properties?rev=821519&r1=821518&r2=821519&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/messages.properties
(original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/messages.properties
Sun Oct  4 11:53:06 2009
@@ -67,6 +67,8 @@
 RootDSEPropertyPage.Extensions=Extensions
 RootDSEPropertyPage.Features=Features
 RootDSEPropertyPage.IBMTivoli=IBM Tivoli Directory Server
+RootDSEPropertyPage.IBMDirectory=IBM Directory Server
+RootDSEPropertyPage.IBMSecureWay=IBM SecureWay Directory
 RootDSEPropertyPage.Info=Info
 RootDSEPropertyPage.MSAD2000=Microsoft Active Directory 2000
 RootDSEPropertyPage.MSAD2003=Microsoft Active Directory 2003



Mime
View raw message