From 6245245e3f68d4707fcc889f5a83e09d7f8827a5 Mon Sep 17 00:00:00 2001
From: juanf <juanf>
Date: Mon, 3 Oct 2016 12:46:35 +0000
Subject: [PATCH] SSDM-4098 : Microscopy, Flow Cytometry and Shared plugins for
 openBIS installer (installer)

SVN: 37139
---
 installation/resource/installer/userInputSpec.xml     |  6 ++++++
 installation/resource/tarball/console.properties      |  6 ++++++
 .../installer/izpack/GlobalInstallationContext.java   |  9 ++++++++-
 .../izpack/SetEnableTechnologiesVariableAction.java   | 11 ++++++++++-
 4 files changed, 30 insertions(+), 2 deletions(-)

diff --git a/installation/resource/installer/userInputSpec.xml b/installation/resource/installer/userInputSpec.xml
index c84ea9630ca..8d6af8a1ef1 100644
--- a/installation/resource/installer/userInputSpec.xml
+++ b/installation/resource/installer/userInputSpec.xml
@@ -65,6 +65,12 @@
     <field type="check" variable="ELN-LIMS">
       <spec txt="ELN/LIMS" true="true" false="false"/>
     </field>
+    <field type="check" variable="MICROSCOPY">
+      <spec txt="Microscopy" true="true" false="false"/>
+    </field>
+    <field type="check" variable="FLOW">
+      <spec txt="Flow Cytometry" true="true" false="false"/>
+    </field>
     
     <field type="space"/>
     <field type="staticText" align="left"
diff --git a/installation/resource/tarball/console.properties b/installation/resource/tarball/console.properties
index 24920bfaeda..0238ecf5a15 100644
--- a/installation/resource/tarball/console.properties
+++ b/installation/resource/tarball/console.properties
@@ -47,6 +47,12 @@ KEY_PASSWORD = changeit
 # Standard technology ELN-LIMS is disabled by default
 #ELN-LIMS = true
 
+# Standard technology MICROSCOPY is disabled by default
+#MICROSCOPY = true
+
+# Standard technology FLOW CYTOMETRY is disabled by default
+#FLOW = true
+
 # Full ELN/LIMS master data is enabled by default. This setting is meaningful only if ELN-LIMS is enabled
 #ELN-LIMS-MASTER-DATA = false
 
diff --git a/installation/source/java/ch/systemsx/cisd/openbis/installer/izpack/GlobalInstallationContext.java b/installation/source/java/ch/systemsx/cisd/openbis/installer/izpack/GlobalInstallationContext.java
index 8ab2f70e141..8ee2a703c08 100644
--- a/installation/source/java/ch/systemsx/cisd/openbis/installer/izpack/GlobalInstallationContext.java
+++ b/installation/source/java/ch/systemsx/cisd/openbis/installer/izpack/GlobalInstallationContext.java
@@ -52,10 +52,17 @@ public class GlobalInstallationContext
 
     public static final String TECHNOLOGY_ELN_LIMS = "ELN-LIMS";
 
+    public static final String TECHNOLOGY_MICROSCOPY = "MICROSCOPY";
+
+    public static final String TECHNOLOGY_FLOW_CYTOMETRY = "FLOW";
+
+    public static final String TECHNOLOGY_SHARED_MICROSCOPY_FLOW_CYTOMETRY = "SHARED";
+
     public static final String PATHINFO_DB_ENABLED = "PATHINFO_DB_ENABLED";
 
     public static final String[] TECHNOLOGIES =
-            { TECHNOLOGY_PROTEOMICS, TECHNOLOGY_SCREENING, TECHNOLOGY_ILLUMINA_NGS, TECHNOLOGY_ELN_LIMS };
+            { TECHNOLOGY_PROTEOMICS, TECHNOLOGY_SCREENING, TECHNOLOGY_ILLUMINA_NGS, TECHNOLOGY_ELN_LIMS, TECHNOLOGY_MICROSCOPY,
+                    TECHNOLOGY_FLOW_CYTOMETRY };
 
     /**
      * set to true if the installation process is trying to update an existing openBIS installation.
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 dcb7bfcfc7a..1a247d1f54d 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
@@ -37,7 +37,7 @@ import ch.systemsx.cisd.common.shared.basic.string.CommaSeparatedListBuilder;
  */
 public class SetEnableTechnologiesVariableAction implements PanelAction
 {
-    private static final String[] MODULES = {"dropbox-monitor", "dataset-uploader", "dataset-file-search"};
+    private static final String[] MODULES = { "dropbox-monitor", "dataset-uploader", "dataset-file-search" };
 
     static final String ENABLED_TECHNOLOGIES_VARNAME = "ENABLED_TECHNOLOGIES";
 
@@ -106,8 +106,17 @@ public class SetEnableTechnologiesVariableAction implements PanelAction
             if (Boolean.TRUE.toString().equalsIgnoreCase(technologyFlag))
             {
                 builder.append(lowerCasedTechnology);
+
+                if (technology == GlobalInstallationContext.TECHNOLOGY_MICROSCOPY ||
+                        technology == GlobalInstallationContext.TECHNOLOGY_FLOW_CYTOMETRY)
+                {
+                    String lowerCasedTechnologyShared = GlobalInstallationContext.TECHNOLOGY_SHARED_MICROSCOPY_FLOW_CYTOMETRY.toLowerCase();
+                    builder.append(lowerCasedTechnologyShared);
+                    allTechnologies.add(lowerCasedTechnologyShared);
+                }
             }
         }
+
         Properties properties = Utils.tryToGetProperties(configFile);
         if (properties != null)
         {
-- 
GitLab