directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1199687 - /directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/LdapLdapsServersPage.java
Date Wed, 09 Nov 2011 10:29:25 GMT
Author: pamarcelot
Date: Wed Nov  9 10:29:25 2011
New Revision: 1199687

URL: http://svn.apache.org/viewvc?rev=1199687&view=rev
Log:
Added the bindings to the UI for the LDAP Server's Limits (Time & Size).

Modified:
    directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/LdapLdapsServersPage.java

Modified: directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/LdapLdapsServersPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/LdapLdapsServersPage.java?rev=1199687&r1=1199686&r2=1199687&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/LdapLdapsServersPage.java
(original)
+++ directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/LdapLdapsServersPage.java
Wed Nov  9 10:29:25 2011
@@ -86,7 +86,7 @@ public class LdapLdapsServersPage extend
     private Text saslPrincipalText;
     private Text saslSearchBaseDnText;
 
-    // UI Control Listeners
+    // UI Controls Listeners
     private SelectionAdapter enableLdapCheckboxListener = new SelectionAdapter()
     {
         public void widgetSelected( SelectionEvent e )
@@ -142,9 +142,7 @@ public class LdapLdapsServersPage extend
             }
             catch ( LdapInvalidDnException e1 )
             {
-                // TODO Auto-generated catch block
-                e1.printStackTrace();
-
+                // Stay silent
             }
         }
     };
@@ -213,6 +211,20 @@ public class LdapLdapsServersPage extend
                 authMechNtlmText.getText() );
         }
     };
+    private ModifyListener maxTimeLimitTextListener = new ModifyListener()
+    {
+        public void modifyText( ModifyEvent e )
+        {
+            getLdapServerBean().setLdapServerMaxTimeLimit( Integer.parseInt( maxTimeLimitText.getText()
) );
+        }
+    };
+    private ModifyListener maxSizeLimitTextListener = new ModifyListener()
+    {
+        public void modifyText( ModifyEvent e )
+        {
+            getLdapServerBean().setLdapServerMaxSizeLimit( Integer.parseInt( maxSizeLimitText.getText()
) );
+        }
+    };
 
 
     /**
@@ -481,9 +493,11 @@ public class LdapLdapsServersPage extend
 
         // Max Time Limit Text
         addDirtyListener( maxTimeLimitText );
+        addModifyListener( maxTimeLimitText, maxTimeLimitTextListener );
 
         // Max Size Limit Text
         addDirtyListener( maxSizeLimitText );
+        addModifyListener( maxSizeLimitText, maxSizeLimitTextListener );
 
         // Auth Mechanisms Simple Checkbox
         addDirtyListener( authMechSimpleCheckbox );
@@ -548,9 +562,11 @@ public class LdapLdapsServersPage extend
 
         // Max Time Limit Text
         removeDirtyListener( maxTimeLimitText );
+        removeModifyListener( maxTimeLimitText, maxTimeLimitTextListener );
 
         // Max Size Limit Text
         removeDirtyListener( maxSizeLimitText );
+        removeModifyListener( maxSizeLimitText, maxSizeLimitTextListener );
 
         // Auth Mechanisms Simple Checkbox
         removeDirtyListener( authMechSimpleCheckbox );
@@ -650,6 +666,10 @@ public class LdapLdapsServersPage extend
             }
         }
 
+        // Limits
+        setText( maxTimeLimitText, "" + ldapServerBean.getLdapServerMaxTimeLimit() );
+        setText( maxSizeLimitText, "" + ldapServerBean.getLdapServerMaxSizeLimit() );
+
         addListeners();
     }
 



Mime
View raw message