directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r613676 - in /directory/studio/trunk: studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/ studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/ studio-connection-ui/src/main/java...
Date Sun, 20 Jan 2008 21:04:33 GMT
Author: seelmann
Date: Sun Jan 20 13:04:31 2008
New Revision: 613676

URL: http://svn.apache.org/viewvc?rev=613676&view=rev
Log:
DIRSTUDIO-142: Fixed problem with empty SASL Realm

Modified:
    directory/studio/trunk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/JNDIConnectionWrapper.java
    directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/AbstractConnectionParameterPage.java
    directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/properties/ConnectionPropertyPage.java
    directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/AuthenticationParameterPage.java
    directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/NetworkParameterPage.java
    directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/connection/BrowserParameterPage.java

Modified: directory/studio/trunk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/JNDIConnectionWrapper.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/JNDIConnectionWrapper.java?rev=613676&r1=613675&r2=613676&view=diff
==============================================================================
--- directory/studio/trunk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/JNDIConnectionWrapper.java
(original)
+++ directory/studio/trunk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/JNDIConnectionWrapper.java
Sun Jan 20 13:04:31 2008
@@ -45,6 +45,7 @@
 import javax.net.ssl.HostnameVerifier;
 import javax.net.ssl.SSLSession;
 
+import org.apache.commons.lang.StringUtils;
 import org.apache.directory.shared.ldap.codec.util.LdapURL;
 import org.apache.directory.shared.ldap.codec.util.LdapURLEncodingException;
 import org.apache.directory.shared.ldap.name.LdapDN;
@@ -875,7 +876,8 @@
                         context.addToEnvironment( Context.SECURITY_CREDENTIALS, bindCredentials
);
                         context.addToEnvironment( Context.SECURITY_AUTHENTICATION, authMethod
);
 
-                        if ( connection.getConnectionParameter().getAuthMethod() == ConnectionParameter.AuthenticationMethod.SASL_DIGEST_MD5
)
+                        if ( connection.getConnectionParameter().getAuthMethod() == ConnectionParameter.AuthenticationMethod.SASL_DIGEST_MD5
+                            && StringUtils.isNotEmpty( saslRealm ) )
                         {
                             context.addToEnvironment( "java.naming.security.sasl.realm",
saslRealm );
                         }

Modified: directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/AbstractConnectionParameterPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/AbstractConnectionParameterPage.java?rev=613676&r1=613675&r2=613676&view=diff
==============================================================================
--- directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/AbstractConnectionParameterPage.java
(original)
+++ directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/AbstractConnectionParameterPage.java
Sun Jan 20 13:04:31 2008
@@ -58,6 +58,7 @@
     /** The error message. */
     protected String errorMessage;
 
+    /** The info message. */
     protected String infoMessage;
 
     /** The connection parameter. */
@@ -203,6 +204,9 @@
     }
 
 
+    /**
+     * @see org.apache.directory.studio.connection.ui.ConnectionParameterPage#getInfoMessage()
+     */
     public String getInfoMessage()
     {
         return infoMessage;

Modified: directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/properties/ConnectionPropertyPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/properties/ConnectionPropertyPage.java?rev=613676&r1=613675&r2=613676&view=diff
==============================================================================
--- directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/properties/ConnectionPropertyPage.java
(original)
+++ directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/properties/ConnectionPropertyPage.java
Sun Jan 20 13:04:31 2008
@@ -117,21 +117,45 @@
     {
         int index = tabFolder.getSelectionIndex();
         ConnectionParameterPage page = index >= 0 ? pages[tabFolder.getSelectionIndex()]
: null;
-        if( page != null && !page.isValid() ) 
+        if ( page != null
+            && ( page.getMessage() != null || page.getInfoMessage() != null || page.getErrorMessage()
!= null ) ) 
         {
-            setMessage( page.getMessage() );
+            if ( page.getMessage() != null )
+            {
+                setMessage( page.getMessage() );
+            }
+            else if ( page.getInfoMessage() != null )
+            {
+                setMessage( page.getInfoMessage() );
+            }
+            else
+            {
+                setMessage( null );
+            }
             setErrorMessage( page.getErrorMessage() );
-            setValid( false );
+            setValid( page.isValid() );
         }
         else
         {
             for ( int i = 0; i < pages.length; i++ )
             {
-                if ( !pages[i].isValid() )
+                if ( pages[i].getMessage() != null || pages[i].getInfoMessage() != null
+                    || pages[i].getErrorMessage() != null )
                 {
-                    setMessage( pages[i].getMessage() );
+                    if ( page.getMessage() != null )
+                    {
+                        setMessage( page.getMessage() );
+                    }
+                    else if ( page.getInfoMessage() != null )
+                    {
+                        setMessage( page.getInfoMessage() );
+                    }
+                    else
+                    {
+                        setMessage( null );
+                    }
                     setErrorMessage( pages[i].getErrorMessage() );
-                    setValid( false );
+                    setValid( pages[i].isValid() );
                     return;
                 }
             }
@@ -139,7 +163,6 @@
             setMessage( null );
             setErrorMessage( null );
             setValid( true );
-            
         }
     }
 

Modified: directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/AuthenticationParameterPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/AuthenticationParameterPage.java?rev=613676&r1=613675&r2=613676&view=diff
==============================================================================
--- directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/AuthenticationParameterPage.java
(original)
+++ directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/AuthenticationParameterPage.java
Sun Jan 20 13:04:31 2008
@@ -214,6 +214,7 @@
 
         // validate input fields
         message = null;
+        infoMessage = null;
         errorMessage = null;
         if ( isPrincipalPasswordEnabled() )
         {
@@ -231,8 +232,7 @@
         {
             if ( "".equals( saslRealmText.getText() ) )
             {
-                message = message != null ? message + "\n" : "";
-                message += "Please enter a SASL Realm otherwise any available SASL realm
is chosen";
+                infoMessage = "Please enter an SASL Realm otherwise any available SASL realm
is choosen";
             }
         }
     }

Modified: directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/NetworkParameterPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/NetworkParameterPage.java?rev=613676&r1=613675&r2=613676&view=diff
==============================================================================
--- directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/NetworkParameterPage.java
(original)
+++ directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/NetworkParameterPage.java
Sun Jan 20 13:04:31 2008
@@ -205,6 +205,7 @@
 
         // validate input fields
         message = null;
+        infoMessage = null;
         errorMessage = null;
         if ( "".equals( portCombo.getText() ) )
         {

Modified: directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/connection/BrowserParameterPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/connection/BrowserParameterPage.java?rev=613676&r1=613675&r2=613676&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/connection/BrowserParameterPage.java
(original)
+++ directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/connection/BrowserParameterPage.java
Sun Jan 20 13:04:31 2008
@@ -234,6 +234,7 @@
 
         // validate input fields
         message = null;
+        infoMessage = null;
         errorMessage = null;
         if ( !isAutoFetchBaseDns() )
         {



Mime
View raw message