directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1643388 - /directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/
Date Fri, 05 Dec 2014 18:44:21 GMT
Author: elecharny
Date: Fri Dec  5 18:44:21 2014
New Revision: 1643388

URL: http://svn.apache.org/r1643388
Log:
Added the Kerberos and ChangePassword Address input box and controls

Modified:
    directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/KerberosServerPage.java
    directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/LdapLdapsServersPage.java
    directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/messages.properties
    directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/messages_de.properties
    directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/messages_fr.properties

Modified: directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/KerberosServerPage.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/KerberosServerPage.java?rev=1643388&r1=1643387&r2=1643388&view=diff
==============================================================================
--- directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/KerberosServerPage.java
(original)
+++ directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/KerberosServerPage.java
Fri Dec  5 18:44:21 2014
@@ -79,10 +79,16 @@ public class KerberosServerPage extends
     };
 
     // UI Controls
+    // The Kerberos transport
     private Button enableKerberosCheckbox;
     private Text kerberosPortText;
+    private Text kerberosAddressText;
+    
+    // The ChangePassword transport
     private Button enableChangePasswordCheckbox;
     private Text changePasswordPortText;
+    private Text changePasswordAddressText;
+    
     private Text primaryKdcRealmText;
     private Text kdcSearchBaseDnText;
     private CheckboxTableViewer encryptionTypesTableViewer;
@@ -97,38 +103,104 @@ public class KerberosServerPage extends
     private Text allowableClockSkewText;
 
     // UI Controls Listeners
+    /**
+     * The Kerberos checkbox listener
+     */
     private SelectionAdapter enableKerberosCheckboxListener = new SelectionAdapter()
     {
         public void widgetSelected( SelectionEvent e )
         {
-            enableKerberosServer( getDirectoryServiceBean(), enableKerberosCheckbox.getSelection()
);
+            boolean enabled = enableKerberosCheckbox.getSelection();
+            enableKerberosServer( getDirectoryServiceBean(), enabled );
 
-            setEnabled( kerberosPortText, enableKerberosCheckbox.getSelection() );
+            setEnabled( kerberosPortText, enabled );
+            setEnabled( kerberosAddressText, enabled );
         }
     };
+
+    
+    /**
+     * The Kerberos port listener
+     */
     private ModifyListener kerberosPortTextListener = new ModifyListener()
     {
         public void modifyText( ModifyEvent e )
         {
-            getKdcServerTransportBean().setSystemPort( Integer.parseInt( kerberosPortText.getText()
) );
+            try
+            {
+                int port = Integer.parseInt( kerberosPortText.getText() );
+                
+                getKdcServerTransportBean().setSystemPort( port );
+            }
+            catch ( NumberFormatException nfe )
+            {
+                System.out.println( "Wrong KDC TCP/UDP Port : it must be an integer" );
+            }
+        }
+    };
+
+    
+    /**
+     * The Kerberos address modify listener
+     */
+    private ModifyListener kerberosAddressTextListener = new ModifyListener()
+    {
+        public void modifyText( ModifyEvent e )
+        {
+            getKdcServerTransportBean().setTransportAddress( kerberosAddressText.getText()
);
         }
     };
+
+    
+    /**
+     * The ChangePassword checkbox listener
+     */
     private SelectionAdapter enableChangePasswordCheckboxListener = new SelectionAdapter()
     {
         public void widgetSelected( SelectionEvent e )
         {
-            getChangePasswordServerBean().setEnabled( enableChangePasswordCheckbox.getSelection()
);
-            setEnabled( changePasswordPortText, enableChangePasswordCheckbox.getSelection()
);
+            boolean enabled = enableChangePasswordCheckbox.getSelection();
+            
+            getChangePasswordServerBean().setEnabled( enabled );
+            setEnabled( changePasswordPortText, enabled );
+            setEnabled( changePasswordAddressText, enabled );
         }
     };
+    
+    
+    /**
+     * The ChangePassword port listener
+     */
     private ModifyListener changePasswordPortTextListener = new ModifyListener()
     {
         public void modifyText( ModifyEvent e )
         {
-            getChangePasswordServerTransportBean().setSystemPort(
-                Integer.parseInt( changePasswordPortText.getText() ) );
+            try
+            {
+                int port = Integer.parseInt( changePasswordPortText.getText() );
+                
+                getChangePasswordServerTransportBean().setSystemPort( port );
+            }
+            catch ( NumberFormatException nfe )
+            {
+                System.out.println( "Wrong ChangePassword TCP Port : it must be an integer"
);
+            }
         }
     };
+
+    
+    /**
+     * The ChangePassword address modify listener
+     */
+    private ModifyListener changePasswordAddressTextListener = new ModifyListener()
+    {
+        public void modifyText( ModifyEvent e )
+        {
+            getChangePasswordServerTransportBean().setTransportAddress( changePasswordAddressText.getText()
);
+        }
+    };
+
+    
     private ModifyListener primaryKdcRealmTextListener = new ModifyListener()
     {
         public void modifyText( ModifyEvent e )
@@ -335,6 +407,12 @@ public class KerberosServerPage extends
         kerberosPortText = createPortText( toolkit, composite );
         createDefaultValueLabel( toolkit, composite, "60088" ); //$NON-NLS-1$
 
+        // Kerberos Server Address Text
+        toolkit.createLabel( composite, TABULATION );
+        toolkit.createLabel( composite, Messages.getString( "KerberosServerPage.Address"
) ); //$NON-NLS-1$
+        kerberosAddressText = createAddressText( toolkit, composite );
+        createDefaultValueLabel( toolkit, composite, DEFAULT_ADDRESS ); //$NON-NLS-1$
+
         // Enable Change Password Server Checkbox
         enableChangePasswordCheckbox = toolkit.createButton( composite,
             Messages.getString( "KerberosServerPage.EnableKerberosChangePassword" ), //$NON-NLS-1$
@@ -347,6 +425,12 @@ public class KerberosServerPage extends
         toolkit.createLabel( composite, Messages.getString( "KerberosServerPage.Port" ) );
//$NON-NLS-1$
         changePasswordPortText = createPortText( toolkit, composite );
         createDefaultValueLabel( toolkit, composite, "60464" ); //$NON-NLS-1$
+
+        // Change Password Server Address Text
+        toolkit.createLabel( composite, TABULATION );
+        toolkit.createLabel( composite, Messages.getString( "KerberosServerPage.Address"
) ); //$NON-NLS-1$
+        changePasswordAddressText = createAddressText( toolkit, composite );
+        createDefaultValueLabel( toolkit, composite, DEFAULT_ADDRESS ); //$NON-NLS-1$
     }
 
 
@@ -494,13 +578,13 @@ public class KerberosServerPage extends
             KdcServerBean kdcServerBean = getKdcServerBean();
             setSelection( enableKerberosCheckbox, kdcServerBean.isEnabled() );
             setEnabled( kerberosPortText, enableKerberosCheckbox.getSelection() );
-            setText( kerberosPortText, "" + getKdcServerTransportBean().getSystemPort() );
//$NON-NLS-1$
+            setText( kerberosPortText, Integer.toString( getKdcServerTransportBean().getSystemPort()
) );
 
             // Change Password Checkbox
             ChangePasswordServerBean changePasswordServerBean = getChangePasswordServerBean();
             setSelection( enableChangePasswordCheckbox, changePasswordServerBean.isEnabled()
);
             setEnabled( changePasswordPortText, enableChangePasswordCheckbox.getSelection()
);
-            setText( changePasswordPortText, "" + getChangePasswordServerTransportBean().getSystemPort()
); //$NON-NLS-1$
+            setText( changePasswordPortText, Integer.toString( getChangePasswordServerTransportBean().getSystemPort()
) );
 
             // Kerberos Settings
             setText( primaryKdcRealmText, kdcServerBean.getKrbPrimaryRealm() );
@@ -527,9 +611,9 @@ public class KerberosServerPage extends
             setSelection( requirePreAuthByEncryptedTimestampCheckbox, kdcServerBean.isKrbPaEncTimestampRequired()
);
             setSelection( allowPostdatedTicketsCheckbox, kdcServerBean.isKrbPostdatedAllowed()
);
             setSelection( allowRenewableTicketsCheckbox, kdcServerBean.isKrbRenewableAllowed()
);
-            setText( maximumRenewableLifetimeText, kdcServerBean.getKrbMaximumRenewableLifetime()
+ "" ); //$NON-NLS-1$
-            setText( maximumTicketLifetimeText, kdcServerBean.getKrbMaximumTicketLifetime()
+ "" ); //$NON-NLS-1$
-            setText( allowableClockSkewText, kdcServerBean.getKrbAllowableClockSkew() + ""
); //$NON-NLS-1$
+            setText( maximumRenewableLifetimeText, Long.toString( kdcServerBean.getKrbMaximumRenewableLifetime()
) );
+            setText( maximumTicketLifetimeText, Long.toString( kdcServerBean.getKrbMaximumTicketLifetime()
) );
+            setText( allowableClockSkewText, Long.toString( kdcServerBean.getKrbAllowableClockSkew()
) );
 
             addListeners();
         }
@@ -549,6 +633,10 @@ public class KerberosServerPage extends
         addDirtyListener( kerberosPortText );
         addModifyListener( kerberosPortText, kerberosPortTextListener );
 
+        // Kerberos Server Address Text
+        addDirtyListener( kerberosAddressText );
+        addModifyListener( kerberosAddressText, kerberosAddressTextListener );
+
         // Enable Change Password Server Checkbox
         addDirtyListener( enableChangePasswordCheckbox );
         addSelectionListener( enableChangePasswordCheckbox, enableChangePasswordCheckboxListener
);
@@ -557,6 +645,10 @@ public class KerberosServerPage extends
         addDirtyListener( changePasswordPortText );
         addModifyListener( changePasswordPortText, changePasswordPortTextListener );
 
+        // Change Password Server Address Text
+        addDirtyListener( changePasswordAddressText );
+        addModifyListener( changePasswordAddressText, changePasswordAddressTextListener );
+
         // Primary KDC Text
         addDirtyListener( primaryKdcRealmText );
         addModifyListener( primaryKdcRealmText, primaryKdcRealmTextListener );
@@ -620,6 +712,10 @@ public class KerberosServerPage extends
         removeDirtyListener( kerberosPortText );
         removeModifyListener( kerberosPortText, kerberosPortTextListener );
 
+        // Kerberos Server Address Text
+        removeDirtyListener( kerberosAddressText );
+        removeModifyListener( kerberosAddressText, kerberosAddressTextListener );
+
         // Enable Change Password Server Checkbox
         removeDirtyListener( enableChangePasswordCheckbox );
         removeSelectionListener( enableChangePasswordCheckbox, enableChangePasswordCheckboxListener
);
@@ -628,6 +724,10 @@ public class KerberosServerPage extends
         removeDirtyListener( changePasswordPortText );
         removeModifyListener( changePasswordPortText, changePasswordPortTextListener );
 
+        // Change Password Server Address Text
+        removeDirtyListener( changePasswordAddressText );
+        removeModifyListener( changePasswordAddressText, changePasswordAddressTextListener
);
+
         // Primary KDC Text
         removeDirtyListener( primaryKdcRealmText );
         removeModifyListener( primaryKdcRealmText, primaryKdcRealmTextListener );

Modified: directory/studio/branches/studio-tycho/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/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/LdapLdapsServersPage.java?rev=1643388&r1=1643387&r2=1643388&view=diff
==============================================================================
--- directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/LdapLdapsServersPage.java
(original)
+++ directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/LdapLdapsServersPage.java
Fri Dec  5 18:44:21 2014
@@ -1923,10 +1923,10 @@ public class LdapLdapsServersPage extend
             ciphersSuiteTableViewer.refresh();
 
             // Replication Pinger Sleep
-            setText( replicationPingerSleepText, "" + ldapServerBean.getReplPingerSleep()
); //$NON-NLS-1$
+            setText( replicationPingerSleepText, Integer.toString( ldapServerBean.getReplPingerSleep()
) );
 
             // Disk Synchronization Delay
-            setText( diskSynchronizationDelayText, "" + getDirectoryServiceBean().getDsSyncPeriodMillis()
); //$NON-NLS-1$
+            setText( diskSynchronizationDelayText, Long.toString( getDirectoryServiceBean().getDsSyncPeriodMillis()
) );
 
             addListeners();
         }

Modified: directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/messages.properties
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/messages.properties?rev=1643388&r1=1643387&r2=1643388&view=diff
==============================================================================
--- directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/messages.properties
(original)
+++ directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/messages.properties
Fri Dec  5 18:44:21 2014
@@ -21,6 +21,7 @@ ErrorPage.CouldNotOpenEditor=Could not o
 ErrorPage.Details=Details
 ErrorPage.ErrorOpeningEditor=Error opening the editor
 
+KerberosServerPage.Address=Address:
 KerberosServerPage.AllowableClockSkew=Allowable Clock Skew (ms):
 KerberosServerPage.AllowEmptyAddresses=Allow Empty Addresses
 KerberosServerPage.AllowForwadableAddresses=Allow Forwardable Addresses
@@ -37,7 +38,7 @@ KerberosServerPage.MaxRenewableLifetime=
 KerberosServerPage.MaxTicketLifetime=Max. Ticket Lifetime (ms):
 KerberosServerPage.Port=Port:
 KerberosServerPage.PrimaryKdcRealm=Primary KDC Realm:
-KerberosServerPage.RequirePreAuthentication=Require Pre-Authentication\nBy Encrypted TimeStamp
+KerberosServerPage.RequirePreAuthentication=Require Pre-Authentication By Encrypted TimeStamp
 KerberosServerPage.SearchBaseDn=Search Base Dn:
 KerberosServerPage.TicketSettings=Ticket Settings
 KerberosServerPage.VerifyBodyChecksum=Verify Body Checksum

Modified: directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/messages_de.properties
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/messages_de.properties?rev=1643388&r1=1643387&r2=1643388&view=diff
==============================================================================
--- directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/messages_de.properties
(original)
+++ directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/messages_de.properties
Fri Dec  5 18:44:21 2014
@@ -21,6 +21,7 @@ ErrorPage.CouldNotOpenEditor=Der Editor
 ErrorPage.Details=Details
 ErrorPage.ErrorOpeningEditor=Fehler beim \u00D6ffnen des Editors
 
+KerberosServerPage.Address=Adressen:
 KerberosServerPage.AllowableClockSkew=Erlaubter Zeitversatz (ms):
 KerberosServerPage.AllowEmptyAddresses=Leere Adressen erlauben
 KerberosServerPage.AllowForwadableAddresses=Weiterreichbare Adressen erlauben
@@ -37,7 +38,7 @@ KerberosServerPage.MaxRenewableLifetime=
 KerberosServerPage.MaxTicketLifetime=Max. Ticket Lebenszeit (ms):
 KerberosServerPage.Port=Port:
 KerberosServerPage.PrimaryKdcRealm=Prim\u00E4re KDC Dom\u00E4ne:
-KerberosServerPage.RequirePreAuthentication=Vorauthentifizierung mit\n verschl\u00FCsseltem
Zeitstempel
+KerberosServerPage.RequirePreAuthentication=Vorauthentifizierung mit verschl\u00FCsseltem
Zeitstempel
 KerberosServerPage.SearchBaseDn=Suchbasis DN:
 KerberosServerPage.TicketSettings=Ticket Einstellungen
 KerberosServerPage.VerifyBodyChecksum=Ticket Checksumme verifizieren

Modified: directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/messages_fr.properties
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/messages_fr.properties?rev=1643388&r1=1643387&r2=1643388&view=diff
==============================================================================
--- directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/messages_fr.properties
(original)
+++ directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/messages_fr.properties
Fri Dec  5 18:44:21 2014
@@ -21,6 +21,7 @@ ErrorPage.CouldNotOpenEditor=Impossible
 ErrorPage.Details=Détails
 ErrorPage.ErrorOpeningEditor=Erreur à l'ouverture de l'éditeur
 
+KerberosServerPage.Address=Adresse:
 KerberosServerPage.AllowableClockSkew=Désynchronisation d'horloge autorisée (ms):
 KerberosServerPage.AllowEmptyAddresses=Autoriser les adresses vides
 KerberosServerPage.AllowForwadableAddresses=Autoriser le renvoi d'adresses
@@ -37,7 +38,7 @@ KerberosServerPage.MaxRenewableLifetime=
 KerberosServerPage.MaxTicketLifetime=Durée de vie maximale d'un ticket (ms):
 KerberosServerPage.Port=Port:
 KerberosServerPage.PrimaryKdcRealm=KDC Realm primaire:
-KerberosServerPage.RequirePreAuthentication=Pré-Authentification obligatoire\npar horodatage
encrypté
+KerberosServerPage.RequirePreAuthentication=Pré-Authentification obligatoire par horodatage
encrypté
 KerberosServerPage.SearchBaseDn=DN de base de recherche:
 KerberosServerPage.TicketSettings=Réglages de ticket
 KerberosServerPage.VerifyBodyChecksum=Vérifier la somme de contrôle du corps



Mime
View raw message