directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r658679 - in /directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor: ServerConfigurationEditor.java v152/AuthenticationPage.java
Date Wed, 21 May 2008 13:28:37 GMT
Author: pamarcelot
Date: Wed May 21 06:28:37 2008
New Revision: 658679

URL: http://svn.apache.org/viewvc?rev=658679&view=rev
Log:
o Fixed a bug in the Authentication Page.
o Updated the ServerConfiguration Editor to use the Authentication Page.

Modified:
    directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/ServerConfigurationEditor.java
    directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v152/AuthenticationPage.java

Modified: directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/ServerConfigurationEditor.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/ServerConfigurationEditor.java?rev=658679&r1=658678&r2=658679&view=diff
==============================================================================
--- directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/ServerConfigurationEditor.java
(original)
+++ directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/ServerConfigurationEditor.java
Wed May 21 06:28:37 2008
@@ -91,6 +91,7 @@
 
     // The Pages
     private SaveableFormPage generalPage;
+    private SaveableFormPage authenticationPage;
     private SaveableFormPage partitionsPage;
     private SaveableFormPage interceptorsPage;
     private SaveableFormPage extendedOperationsPage;
@@ -225,8 +226,8 @@
                         generalPage = new org.apache.directory.studio.apacheds.configuration.editor.v152.GeneralPage(
                             this );
                         addPage( generalPage );
-                        
-                        SaveableFormPage authenticationPage = new org.apache.directory.studio.apacheds.configuration.editor.v152.AuthenticationPage(
+
+                        authenticationPage = new org.apache.directory.studio.apacheds.configuration.editor.v152.AuthenticationPage(
                             this );
                         addPage( authenticationPage );
 
@@ -278,7 +279,6 @@
                         break;
                 }
             }
-
         }
         catch ( PartInitException e )
         {
@@ -294,10 +294,10 @@
      */
     public void doSave( IProgressMonitor monitor )
     {
-        monitor.beginTask( "Saving the Server Configuration", 5 );
+        monitor.beginTask( "Saving the Server Configuration", IProgressMonitor.UNKNOWN );
 
         // Saving the editor pages
-        saveEditorPages( monitor );
+        saveEditorPages();
 
         try
         {
@@ -338,7 +338,6 @@
                 success = doSaveAs( monitor );
             }
 
-            monitor.worked( 1 );
             setDirty( !success );
             monitor.done();
         }
@@ -362,30 +361,33 @@
      * @param monitor
      *      the monitor to use
      */
-    private void saveEditorPages( IProgressMonitor monitor )
+    private void saveEditorPages()
     {
-        generalPage.save();
-        if ( monitor != null )
-        {
-            monitor.worked( 1 );
-        }
-
-        partitionsPage.save();
-        if ( monitor != null )
-        {
-            monitor.worked( 1 );
-        }
-
-        interceptorsPage.save();
-        if ( monitor != null )
-        {
-            monitor.worked( 1 );
-        }
-
-        extendedOperationsPage.save();
-        if ( monitor != null )
+        if ( serverConfiguration != null )
         {
-            monitor.worked( 1 );
+            switch ( serverConfiguration.getVersion() )
+            {
+                case VERSION_1_5_2:
+                    generalPage.save();
+                    authenticationPage.save();
+                    partitionsPage.save();
+                    interceptorsPage.save();
+                    extendedOperationsPage.save();
+                    break;
+                case VERSION_1_5_1:
+                    generalPage.save();
+                    partitionsPage.save();
+                    interceptorsPage.save();
+                    extendedOperationsPage.save();
+                    break;
+                case VERSION_1_5_0:
+                    generalPage.save();
+                    authenticationPage.save();
+                    partitionsPage.save();
+                    interceptorsPage.save();
+                    extendedOperationsPage.save();
+                    break;
+            }
         }
     }
 
@@ -435,10 +437,9 @@
                 {
                     try
                     {
-                        monitor.beginTask( "Saving the Server Configuration", 5 );
-                        saveEditorPages( monitor );
+                        monitor.beginTask( "Saving the Server Configuration", IProgressMonitor.UNKNOWN
);
+                        saveEditorPages();
                         boolean success = doSaveAs( monitor );
-                        monitor.worked( 1 );
                         setDirty( !success );
                         monitor.done();
                     }
@@ -509,7 +510,7 @@
             FileEditorInput fei = new FileEditorInput( file );
 
             // Saving the file to disk
-            saveEditorPages( monitor );
+            saveEditorPages();
             saveConfiguration( fei, monitor );
 
             // Setting the new input to the editor
@@ -560,7 +561,7 @@
             }
 
             // Saving the file to disk
-            saveEditorPages( monitor );
+            saveEditorPages();
             saveConfiguration( path );
 
             // Creating the new input for the editor

Modified: directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v152/AuthenticationPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v152/AuthenticationPage.java?rev=658679&r1=658678&r2=658679&view=diff
==============================================================================
--- directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v152/AuthenticationPage.java
(original)
+++ directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v152/AuthenticationPage.java
Wed May 21 06:28:37 2008
@@ -524,7 +524,7 @@
 
         // SASL Quality Of Protection
         List<SaslQualityOfProtectionEnum> saslQoPList = new ArrayList<SaslQualityOfProtectionEnum>();
-        for ( Object qop : supportedMechanismsTableViewer.getCheckedElements() )
+        for ( Object qop : saslQualityOfProtectionTableViewer.getCheckedElements() )
         {
             saslQoPList.add( ( SaslQualityOfProtectionEnum ) qop );
         }



Mime
View raw message