From 6eee23a8aed2d60244f76d5adcce71954d9b1366 Mon Sep 17 00:00:00 2001
From: felmer <felmer>
Date: Mon, 4 Jun 2012 10:09:39 +0000
Subject: [PATCH] SP-71, BIS-52: bug concerning updating using console fixed.

SVN: 25524
---
 .../izpack/SetEnableTechnologiesVariableAction.java    | 10 ++++++++++
 .../izpack/SetTechnologyCheckBoxesAction.java          |  2 +-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/installation/source/java/ch/systemsx/cisd/openbis/installer/izpack/SetEnableTechnologiesVariableAction.java b/installation/source/java/ch/systemsx/cisd/openbis/installer/izpack/SetEnableTechnologiesVariableAction.java
index 6587eed7de5..95c3dce1def 100644
--- a/installation/source/java/ch/systemsx/cisd/openbis/installer/izpack/SetEnableTechnologiesVariableAction.java
+++ b/installation/source/java/ch/systemsx/cisd/openbis/installer/izpack/SetEnableTechnologiesVariableAction.java
@@ -45,6 +45,8 @@ public class SetEnableTechnologiesVariableAction implements PanelAction
     static final String DISABLED_TECHNOLOGIES_VARNAME = "DISABLED_TECHNOLOGIES";
     static final String DISABLED_CORE_PLUGINS_KEY = "disabled-core-plugins";
 
+    private final SetTechnologyCheckBoxesAction technologyCheckBoxesAction = new SetTechnologyCheckBoxesAction();
+    
     @Override
     public void initialize(PanelActionConfiguration configuration)
     {
@@ -53,6 +55,13 @@ public class SetEnableTechnologiesVariableAction implements PanelAction
     @Override
     public void executeAction(AutomatedInstallData data, AbstractUIHandler handler)
     {
+        // The technologyCheckBoxesAction is a 'preactivate' action to populate the technology check
+        // boxes.
+        // But in case of console installation the 'preactivate' action isn't execute. We can
+        // execute it here without any check whether we are console or GUI based installation
+        // because the GUI sets the technology flags and naothing will be populated from existing
+        // service.properties.
+       technologyCheckBoxesAction.executeAction(data, handler);
         boolean isFirstTimeInstallation = GlobalInstallationContext.isFirstTimeInstallation;
         File installDir = GlobalInstallationContext.installDir;
         updateEnabledTechnologyProperty(data, isFirstTimeInstallation, installDir);
@@ -165,6 +174,7 @@ public class SetEnableTechnologiesVariableAction implements PanelAction
                 builder.append(technology.toLowerCase());
             }
         }
+        System.out.println("disabled technologies:"+builder);
         return builder.toString();
     }
 
diff --git a/installation/source/java/ch/systemsx/cisd/openbis/installer/izpack/SetTechnologyCheckBoxesAction.java b/installation/source/java/ch/systemsx/cisd/openbis/installer/izpack/SetTechnologyCheckBoxesAction.java
index 7bb507556b7..b38f539e1e4 100644
--- a/installation/source/java/ch/systemsx/cisd/openbis/installer/izpack/SetTechnologyCheckBoxesAction.java
+++ b/installation/source/java/ch/systemsx/cisd/openbis/installer/izpack/SetTechnologyCheckBoxesAction.java
@@ -28,7 +28,7 @@ import com.izforge.izpack.data.PanelAction;
 /**
  * Action which sets the variables which are the values of check boxes on the technology page. If
  * the variable is already set nothing is done. Otherwise the behavior depends on whether this is
- * installation or upgrading. In case of installation the flag will be <code>true</code>. In case of
+ * installation or upgrading. In case of installation the flag will be <code>false</code>. In case of
  * upgrading <code>service.properties</code> file of AS is scanned in order to check whether a certain
  * technology is enabled or not.
  * 
-- 
GitLab