diff --git a/installation/resource/installer/install.xml b/installation/resource/installer/install.xml index 13505bb4c5bd96a530243488a00935ca113dbf03..b79f740893111ee77ecae6d201b52f33932b3ebc 100644 --- a/installation/resource/installer/install.xml +++ b/installation/resource/installer/install.xml @@ -77,6 +77,13 @@ <name>IS_STANDARD_TECHNOLOGIES</name> <value>true</value> </condition> + <condition type="java" id="presentKeyStoreFile"> + <java> + <class>ch.systemsx.cisd.openbis.installer.izpack.GlobalInstallationContext</class> + <field>presentKeyStoreFile</field> + </java> + <returnvalue type="boolean">true</returnvalue> + </condition> </conditions> <!-- The panels section. We indicate here which panels we want to use. The order will be respected. --> @@ -97,12 +104,15 @@ </panel> <panel classname="com.izforge.izpack.panels.userinput.UserInputPanel" id="UserInputPanel.KEY_STORE" > - <validator classname="ch.systemsx.cisd.openbis.installer.izpack.KeyStoreValidator" /> <actions> - <action stage="preactivate" classname="ch.systemsx.cisd.openbis.installer.izpack.KeystoreAction" /> + <action stage="postvalidate" classname="ch.systemsx.cisd.openbis.installer.izpack.KeystoreAction" /> </actions> </panel> + <panel classname="com.izforge.izpack.panels.userinput.UserInputPanel" id="UserInputPanel.KEY_STORE_PASSWORDS" condition="presentKeyStoreFile"> + <validator classname="ch.systemsx.cisd.openbis.installer.izpack.KeyStoreValidator" /> + </panel> + <panel classname="com.izforge.izpack.panels.userinput.UserInputPanel" id="UserInputPanel.TECHNOLOGIES" condition="isStandardTechnologies"> <actions> <action stage="preactivate" classname="ch.systemsx.cisd.openbis.installer.izpack.SetTechnologyCheckBoxesAction" /> @@ -125,9 +135,8 @@ <panel classname="com.izforge.izpack.panels.packs.PacksPanel"/> <panel classname="com.izforge.izpack.panels.install.InstallPanel"> - <validator classname="ch.systemsx.cisd.openbis.installer.izpack.KeyStoreValidator" /> <actions> - <action stage="prevalidate" classname="ch.systemsx.cisd.openbis.installer.izpack.ExecuteSetupScriptsAction" /> + <action stage="postvalidate" classname="ch.systemsx.cisd.openbis.installer.izpack.ExecuteSetupScriptsAction" /> <action stage="postvalidate" classname="ch.systemsx.cisd.openbis.installer.izpack.OpenGettingStartedPageAction" /> </actions> </panel> diff --git a/installation/resource/installer/userInputSpec.xml b/installation/resource/installer/userInputSpec.xml index e9f7ac1f08eb26701d04dd79c8b75985a07c86b7..dc3e886bdb5395326f140fdad19c8b169288c969 100644 --- a/installation/resource/installer/userInputSpec.xml +++ b/installation/resource/installer/userInputSpec.xml @@ -16,10 +16,11 @@ <spec txt="Key store" size="20" set="" mustExist="true" allowEmptyValue="true" /> </field> - <field type="space"/> + </panel> + + <panel id="UserInputPanel.KEY_STORE_PASSWORDS"> + <field type="title" txt="Key Store Passwords" bold="true" size="2" /> - <field type="staticText" align="left" - txt="Passwords are needed to be changed only if a new key store with different passwords has been selected." /> <field type="password" align="left" variable="KEY_STORE_PASSWORD"> <spec> <pwd txt="Key store password" size="20" set="" /> 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 aba7590105318f1b9770bd2768f260ccb12bf3e9..9e0c175c6ce980e41a975c90936f7258b51c837a 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 @@ -70,6 +70,8 @@ public class GlobalInstallationContext public static boolean noPsqlToolsOnPath = (false == PostgresInstallationDetectorUtils .areCommandLineToolsOnPath()); + public static boolean presentKeyStoreFile = false; + public static File installDir; public static void initialize(AutomatedInstallData data) diff --git a/installation/source/java/ch/systemsx/cisd/openbis/installer/izpack/KeystoreAction.java b/installation/source/java/ch/systemsx/cisd/openbis/installer/izpack/KeystoreAction.java index 21e44642d2134834786e7649c172493255fd8f5a..0c6d613a8e8e8a98d191083e2504c6673a3970e9 100644 --- a/installation/source/java/ch/systemsx/cisd/openbis/installer/izpack/KeystoreAction.java +++ b/installation/source/java/ch/systemsx/cisd/openbis/installer/izpack/KeystoreAction.java @@ -45,6 +45,10 @@ public class KeystoreAction implements PanelAction getDssServiceProperty(Utils.DSS_KEYSTORE_PASSWORD_KEY, DEFAULT_PASSWORD)); data.setVariable(GlobalInstallationContext.KEY_PASSWORD_VARNAME, getDssServiceProperty(Utils.DSS_KEYSTORE_KEY_PASSWORD_KEY, DEFAULT_KEY_PASSWORD)); + String keyStoreFilePath = + data.getVariable(GlobalInstallationContext.KEY_STORE_FILE_VARNAME); + GlobalInstallationContext.presentKeyStoreFile = + keyStoreFilePath != null && keyStoreFilePath.length() > 0; } public String getDssServiceProperty(String propertyKey, String defaultValue)