public boolean run(InstallData installData, Properties properties) { String strTargetPath = properties.getProperty(InstallData.INSTALL_PATH); if (strTargetPath == null || "".equals(strTargetPath.trim())) { System.err.println("Missing mandatory target path!"); return false; } else { try { strTargetPath = variableSubstitutor.substitute(strTargetPath); } catch (Exception e) { // ignore } installData.setInstallPath(strTargetPath); return true; } }
/** * Runs the panel using the supplied properties. * * @param installData the installation data * @param properties the properties * @return {@code true} if the installation is successful, otherwise {@code false} */ @Override public boolean run(InstallData installData, Properties properties) { String path = properties.getProperty(InstallData.INSTALL_PATH); path = installData.getVariables().replace(path); installData.setInstallPath(path); return true; }
private void handleInstallPath(InstallData installData, String path) { // Allow for variable substitution of the installpath value path = installData.getVariables().replace(path); installData.setInstallPath(path); } }
/** * Runs the panel in an interactive console. * * @param installData the installation data * @param console the console * @return {@code true} if the panel ran successfully, otherwise {@code false} */ @Override public boolean run(InstallData installData, Console console) { printHeadLine(installData, console); String path = TargetPanelHelper.getPath(installData); installData.setInstallPath(path); return true; }
@Override public boolean run(InstallData installData, Properties properties) { boolean result = false; String path = properties.getProperty(InstallData.INSTALL_PATH); if (path == null || "".equals(path.trim())) { System.err.println("Missing mandatory target path!"); } else if (TargetPanelHelper.isIncompatibleInstallation(path, installData.getInfo().isReadInstallationInformation())) { System.err.println(getIncompatibleInstallationMsg(installData)); } else { path = installData.getVariables().replace(path); installData.setInstallPath(path); result = true; } return result; }
private void handleInstallPath(InstallData installData, String path) { // Allow for variable substitution of the installpath value path = installData.getVariables().replace(path); if (TargetPanelHelper.isIncompatibleInstallation(path, installData.getInfo().isReadInstallationInformation())) { throw new InstallerException(installData.getMessages().get("TargetPanel.incompatibleInstallation")); } installData.setInstallPath(path); } }
continue; installData.setInstallPath(normalizedPath); return promptEndPanel(installData, console);