diff --git a/install/.classpath b/install/.classpath index 949d240292..e6d43632b6 100644 --- a/install/.classpath +++ b/install/.classpath @@ -2,16 +2,6 @@ - - - - - - - - - - diff --git a/install/Adempiere/RUN_setup.sh b/install/Adempiere/RUN_setup.sh index 3b534c6448..f3a82743bd 100644 --- a/install/Adempiere/RUN_setup.sh +++ b/install/Adempiere/RUN_setup.sh @@ -18,24 +18,11 @@ fi echo =================================== echo Setup Dialog echo =================================== -CP=lib/CInstall.jar:lib/Adempiere.jar:lib/CCTools.jar:lib/oracle.jar:lib/jboss.jar:lib/postgresql.jar: -# Trace Level Parameter, e.g. ARGS=ALL -ARGS=CONFIG - -# To test the OCI driver, add -DTestOCI=Y to the command - example: -# $JAVA -classpath $CP -DADEMPIERE_HOME=$ADEMPIERE_HOME -DTestOCI=Y org.compiere.install.Setup $ARGS - -# $JAVA -classpath $CP -DADEMPIERE_HOME=$ADEMPIERE_HOME org.compiere.install.Setup $ARGS # OSGi: -$JAVA -jar osgi/org.eclipse.osgi_3.5.0.v20090520.jar -clean -console -application org.adempiere.Install +$JAVA -jar osgi/org.eclipse.osgi_3.6.0.v20100517.jar -clean -console -install osgi -configuration osgi/client -application org.adempiere.Install -#echo =================================== -#echo Setup Adempiere Server Environment -#echo =================================== -#$JAVA -classpath $CP -DADEMPIERE_HOME=$ADEMPIERE_HOME -Dant.home="." org.apache.tools.ant.launch.Launcher setup - echo =================================== echo Make .sh executable & set Env echo =================================== @@ -43,15 +30,10 @@ chmod -R a+x *.sh find . -name '*.sh' -exec chmod a+x '{}' \; # Sign database build -cd utils -#. ./RUN_SignDatabaseBuild.sh +# cd utils +#. ./RUN_SignDatabaseBuild.sh . ./RUN_UnixEnv.sh -#echo ================================ -#echo Test local Connection -#echo ================================ -#%JAVA% -classpath lib/Adempiere.jar:lib/AdempiereCLib.jar org.compiere.install.ConnectTest localhost - echo . echo For problems, check log file in base directory diff --git a/install/Adempiere/build.xml b/install/Adempiere/build.xml index 14d438ce77..95800fa1c6 100644 --- a/install/Adempiere/build.xml +++ b/install/Adempiere/build.xml @@ -33,8 +33,6 @@ - - @@ -42,20 +40,12 @@ - - - - - - - - @@ -120,449 +110,13 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/install/META-INF/MANIFEST.MF b/install/META-INF/MANIFEST.MF index 9c8fe61a5d..3c8e575150 100644 --- a/install/META-INF/MANIFEST.MF +++ b/install/META-INF/MANIFEST.MF @@ -3,18 +3,10 @@ Bundle-ManifestVersion: 2 Bundle-Name: install Bundle-SymbolicName: org.adempiere.install;singleton:=true Bundle-Version: 0.0.0.1 -Bundle-ClassPath: install.jar, - lib/ant.jar, - lib/ant-commons-net.jar, - lib/ant-launcher.jar, - lib/commons-net-1.4.0.jar, - lib/ocrs12.jar, - lib/ojdbc14.jar -Export-Package: images, - org.compiere.install +Bundle-ClassPath: install.jar +Export-Package: org.compiere.install Require-Bundle: org.eclipse.core.runtime;bundle-version="3.5.0", org.adempiere.base;bundle-version="0.0.0", org.adempiere.client;bundle-version="0.0.0", org.adempiere.tools;bundle-version="0.0.0" -Bundle-Activator: org.compiere.install.Activator Bundle-RequiredExecutionEnvironment: JavaSE-1.6 diff --git a/install/build.properties b/install/build.properties index 184f62f994..dfe14ae5b3 100644 --- a/install/build.properties +++ b/install/build.properties @@ -1,4 +1,5 @@ source.install.jar = src/ +output.install.jar = build/ bin.includes = META-INF/,\ install.jar,\ plugin.xml diff --git a/install/build.xml b/install/build.xml index 739b2af31d..1282fd54a4 100644 --- a/install/build.xml +++ b/install/build.xml @@ -21,7 +21,6 @@ - @@ -54,71 +53,12 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -182,33 +108,34 @@ - - AdempiereHome - + + + - - - - - - + + + - - + + + + + + + + @@ -237,37 +164,13 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - + + + + + diff --git a/install/src/org/compiere/install/ConfigJBoss.java b/install/src/org/compiere/install/ConfigAppServer.java similarity index 64% rename from install/src/org/compiere/install/ConfigJBoss.java rename to install/src/org/compiere/install/ConfigAppServer.java index b00518a215..d5c65285ad 100644 --- a/install/src/org/compiere/install/ConfigJBoss.java +++ b/install/src/org/compiere/install/ConfigAppServer.java @@ -16,57 +16,38 @@ *****************************************************************************/ package org.compiere.install; -import java.io.File; import java.net.InetAddress; /** - * JBoss 4.0.2 Apps Server Configuration - * - * @author Jorg Janke + * Apps Server Configuration + * + * @author hengsin * @version $Id: ConfigJBoss.java,v 1.3 2006/07/30 00:57:42 jjanke Exp $ */ -public class ConfigJBoss extends Config +public class ConfigAppServer extends Config { /** * ConfigJBoss * @param data configuration */ - public ConfigJBoss (ConfigurationData data) + public ConfigAppServer(ConfigurationData data) { super (data); } // ConfigJBoss - + /** * Initialize */ public void init() { - p_data.setAppsServerDeployDir(getDeployDir()); - p_data.setAppsServerDeployDir(false); - // - p_data.setAppsServerJNPPort("1099"); - p_data.setAppsServerJNPPort(true); p_data.setAppsServerWebPort("80"); p_data.setAppsServerWebPort(true); p_data.setAppsServerSSLPort("443"); p_data.setAppsServerSSLPort(true); } // init - /** - * Get Deployment Dir - * @return deployment dir - */ - private String getDeployDir() - { - return p_data.getAdempiereHome() - + File.separator + "jboss" - + File.separator + "server" - + File.separator + "adempiere" - + File.separator + "deploy"; - } // getDeployDir - /** * Test * @return error message or null if OK @@ -79,7 +60,7 @@ public class ConfigJBoss extends Config && server.toLowerCase().indexOf("localhost") == -1 && !server.equals("127.0.0.1"); InetAddress appsServer = null; - String error = "Not correct: AppsServer = " + server; + String error = "Not correct: AppsServer = " + server; try { if (pass) @@ -92,60 +73,33 @@ public class ConfigJBoss extends Config } if (getPanel() != null) signalOK(getPanel().okAppsServer, "ErrorAppsServer", - pass, true, error); + pass, true, error); if (!pass) return error; log.info("OK: AppsServer = " + appsServer); setProperty(ConfigurationData.ADEMPIERE_APPS_SERVER, appsServer.getHostName()); - setProperty(ConfigurationData.ADEMPIERE_APPS_TYPE, p_data.getAppsServerType()); - - // Deployment Dir - p_data.setAppsServerDeployDir(getDeployDir()); - File deploy = new File (p_data.getAppsServerDeployDir()); - pass = deploy.exists(); - error = "Not found: " + deploy; - if (getPanel() != null) - signalOK(getPanel().okDeployDir, "ErrorDeployDir", - pass, true, error); - if (!pass) - return error; - setProperty(ConfigurationData.ADEMPIERE_APPS_DEPLOY, p_data.getAppsServerDeployDir()); - log.info("OK: Deploy Directory = " + deploy); - - // JNP Port - int JNPPort = p_data.getAppsServerJNPPort(); - pass = !p_data.testPort (appsServer, JNPPort, false) - && p_data.testServerPort(JNPPort); - error = "Not correct: JNP Port = " + JNPPort; - if (getPanel() != null) - signalOK(getPanel().okJNPPort, "ErrorJNPPort", - pass, true, error); - if (!pass) - return error; - log.info("OK: JNPPort = " + JNPPort); - setProperty(ConfigurationData.ADEMPIERE_JNP_PORT, String.valueOf(JNPPort)); // Web Port int WebPort = p_data.getAppsServerWebPort(); - pass = !p_data.testPort ("http", appsServer.getHostName(), WebPort, "/") + pass = !p_data.testPort ("http", appsServer.getHostName(), WebPort, "/") && p_data.testServerPort(WebPort); error = "Not correct: Web Port = " + WebPort; if (getPanel() != null) signalOK(getPanel().okWebPort, "ErrorWebPort", - pass, true, error); + pass, true, error); if (!pass) return error; log.info("OK: Web Port = " + WebPort); setProperty(ConfigurationData.ADEMPIERE_WEB_PORT, String.valueOf(WebPort)); - + // SSL Port int sslPort = p_data.getAppsServerSSLPort(); - pass = !p_data.testPort ("https", appsServer.getHostName(), sslPort, "/") + pass = !p_data.testPort ("https", appsServer.getHostName(), sslPort, "/") && p_data.testServerPort(sslPort); error = "Not correct: SSL Port = " + sslPort; if (getPanel() != null) signalOK(getPanel().okSSLPort, "ErrorWebPort", - pass, true, error); + pass, true, error); if (!pass) return error; log.info("OK: SSL Port = " + sslPort); @@ -153,5 +107,5 @@ public class ConfigJBoss extends Config // return null; } // test - + } // ConfigJBoss diff --git a/install/src/org/compiere/install/ConfigGlassfish.java b/install/src/org/compiere/install/ConfigGlassfish.java deleted file mode 100644 index c7ca3b6c8a..0000000000 --- a/install/src/org/compiere/install/ConfigGlassfish.java +++ /dev/null @@ -1,153 +0,0 @@ -/********************************************************************** -* This file is part of Adempiere ERP Bazaar * -* http://www.adempiere.org * -* * -* Copyright (C) Praneet Tiwari. * -* Copyright (C) Contributors * -* * -* This program is free software; you can redistribute it and/or * -* modify it under the terms of the GNU General Public License * -* as published by the Free Software Foundation; either version 2 * -* of the License, or (at your option) any later version. * -* * -* This program is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -* GNU General Public License for more details. * -* * -* You should have received a copy of the GNU General Public License * -* along with this program; if not, write to the Free Software * -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * -* MA 02110-1301, USA. * -* * -* Contributors: * -* - Trifon Trifonov (trifonnt@users.sourceforge.net) * -* * -* Sponsors: * -* - D3 Soft (http://www.d3-soft.com) * -***********************************************************************/ - -package org.compiere.install; - -import java.io.File; -import java.net.InetAddress; - -/** - * GlassFish v2UR1 Apps Server Configuration - * - * @author Praneet Tiwari - * @author Trifon Trifonov - * @version $Id: $ - */ - -public class ConfigGlassfish extends Config { - - /** - * ConfigGlassfish - * @param data configuration - */ - public ConfigGlassfish (ConfigurationData data) - { - super (data); - } // ConfigGlassfish - - /** - * Initialize - */ - public void init() - { - p_data.setAppsServerDeployDir(getDeployDir()); - p_data.setAppsServerDeployDir(false); - // - p_data.setAppsServerJNPPort("3700"); - p_data.setAppsServerJNPPort(true); - p_data.setAppsServerWebPort("8080"); - p_data.setAppsServerWebPort(true); - p_data.setAppsServerSSLPort("443"); - p_data.setAppsServerSSLPort(true); - } // init - - /** - * Get Deployment Dir - * @return deployment dir - */ - private String getDeployDir() - { - // TODO - check deployment directory - return p_data.getAdempiereHome() + File.separator + "glassfish"; - /*Commented for now - + File.separator + "glassfish" - + File.separator + "domains" - + File.separator + "domain1" ; - * */ - } // getDeployDir - - /** - * Test - * @return error message or null if OK - */ - public String test() - { - // AppsServer - String server = p_data.getAppsServer(); - boolean pass = server != null && server.length() > 0 - && server.toLowerCase().indexOf("localhost") == -1 - && !server.equals("127.0.0.1"); - InetAddress appsServer = null; - String error = "Not correct: AppsServer = " + server; - try - { - if (pass) - appsServer = InetAddress.getByName(server); - } - catch (Exception e) - { - error += " - " + e.getMessage(); - pass = false; - } - if (getPanel() != null) - signalOK(getPanel().okAppsServer, "ErrorAppsServer", - pass, true, error); - if (!pass) - return error; - log.info("OK: AppsServer = " + appsServer); - setProperty(ConfigurationData.ADEMPIERE_APPS_SERVER, appsServer.getHostName()); - setProperty(ConfigurationData.ADEMPIERE_APPS_TYPE, p_data.getAppsServerType()); - - setProperty(ConfigurationData.ADEMPIERE_APPS_DEPLOY, p_data.getAppsServerDeployDir()); - - // JNP Port - int JNPPort = p_data.getAppsServerJNPPort(); - setProperty(ConfigurationData.ADEMPIERE_JNP_PORT, String.valueOf(JNPPort)); - - // Web Port - int WebPort = p_data.getAppsServerWebPort(); - pass = !p_data.testPort ("http", appsServer.getHostName(), WebPort, "/") - && p_data.testServerPort(WebPort); - error = "Not correct: Web Port = " + WebPort; - if (getPanel() != null) - signalOK(getPanel().okWebPort, "ErrorWebPort", - pass, true, error); - if (!pass) - return error; - log.info("OK: Web Port = " + WebPort); - setProperty(ConfigurationData.ADEMPIERE_WEB_PORT, String.valueOf(WebPort)); - - // SSL Port - int sslPort = p_data.getAppsServerSSLPort(); - pass = !p_data.testPort ("https", appsServer.getHostName(), sslPort, "/") - && p_data.testServerPort(sslPort); - error = "Not correct: SSL Port = " + sslPort; - if (getPanel() != null) - signalOK(getPanel().okSSLPort, "ErrorWebPort", - pass, true, error); - if (!pass) - return error; - log.info("OK: SSL Port = " + sslPort); - setProperty(ConfigurationData.ADEMPIERE_SSL_PORT, String.valueOf(sslPort)); - // - return null; - } // test - -} // ConfigGlassfish - diff --git a/install/src/org/compiere/install/ConfigurationData.java b/install/src/org/compiere/install/ConfigurationData.java index ebe8e33ae8..b8b210562a 100644 --- a/install/src/org/compiere/install/ConfigurationData.java +++ b/install/src/org/compiere/install/ConfigurationData.java @@ -52,7 +52,7 @@ import org.compiere.util.Ini; /** * Configuration Data - * + * * @author Jorg Janke * @version $Id: ConfigurationData.java,v 1.4 2006/07/30 00:57:42 jjanke Exp $ */ @@ -75,14 +75,14 @@ public class ConfigurationData /** Adempiere Home */ private File m_adempiereHome; - + /** Static Logger */ static CLogger log = CLogger.getCLogger (ConfigurationData.class); /** Properties File name */ public static final String ADEMPIERE_ENV_FILE = "AdempiereEnv.properties"; - + /** Adempiere Home */ public static final String ADEMPIERE_HOME = "ADEMPIERE_HOME"; /** */ @@ -108,7 +108,7 @@ public class ConfigurationData public static final String ADEMPIERE_SSL_PORT = "ADEMPIERE_SSL_PORT"; /** */ public static final String ADEMPIERE_WEB_ALIAS = "ADEMPIERE_WEB_ALIAS"; - + /** */ public static final String ADEMPIERE_KEYSTORE = "ADEMPIERE_KEYSTORE"; /** */ @@ -117,17 +117,17 @@ public class ConfigurationData public static final String ADEMPIERE_KEYSTORECODEALIAS = "ADEMPIERE_KEYSTORECODEALIAS"; /** */ public static final String ADEMPIERE_KEYSTOREWEBALIAS = "ADEMPIERE_KEYSTOREWEBALIAS"; - + public static final String ADEMPIERE_CERT_CN = "ADEMPIERE_CERT_CN"; - + public static final String ADEMPIERE_CERT_ORG = "ADEMPIERE_CERT_ORG"; - + public static final String ADEMPIERE_CERT_ORG_UNIT = "ADEMPIERE_CERT_ORG_UNIT"; - + public static final String ADEMPIERE_CERT_LOCATION = "ADEMPIERE_CERT_LOCATION"; - + public static final String ADEMPIERE_CERT_STATE = "ADEMPIERE_CERT_STATE"; - + public static final String ADEMPIERE_CERT_COUNTRY = "ADEMPIERE_CERT_COUNTRY"; /** DB Type */ @@ -173,8 +173,8 @@ public class ConfigurationData /** */ public static final String ADEMPIERE_WEBSTORES = "ADEMPIERE_WEBSTORES"; - - + + private void updateProperty(String property, String value) { if (value == null) value = ""; String currentValue = (String)p_properties.get(property); @@ -183,7 +183,7 @@ public class ConfigurationData else if (!currentValue.equals(value)) p_properties.put(property, value); } - + /** * Load Configuration Data * @return true if loaded @@ -194,7 +194,7 @@ public class ConfigurationData String adempiereHome = System.getProperty(ADEMPIERE_HOME); if (adempiereHome == null || adempiereHome.length() == 0) adempiereHome = System.getProperty("user.dir"); - + boolean envLoaded = false; String fileName = adempiereHome + File.separator + ADEMPIERE_ENV_FILE; File env = new File (fileName); @@ -213,7 +213,7 @@ public class ConfigurationData log.info(env.toString()); if (p_properties.size() > 5) envLoaded = true; - + Properties loaded = new Properties(); loaded.putAll(p_properties); // @@ -231,14 +231,8 @@ public class ConfigurationData } setKeyStore(s); // - int appServerIndex = setAppsServerType((String)p_properties.get(ADEMPIERE_APPS_TYPE)); - initAppsServer(appServerIndex); if (loaded.containsKey(ADEMPIERE_APPS_SERVER)) setAppsServer((String)loaded.get(ADEMPIERE_APPS_SERVER)); - if (loaded.containsKey(ADEMPIERE_APPS_DEPLOY)) - setAppsServerDeployDir((String)loaded.get(ADEMPIERE_APPS_DEPLOY)); - if (loaded.containsKey(ADEMPIERE_JNP_PORT)) - setAppsServerJNPPort((String)loaded.get(ADEMPIERE_JNP_PORT)); if (loaded.containsKey(ADEMPIERE_WEB_PORT)) setAppsServerWebPort((String)loaded.get(ADEMPIERE_WEB_PORT)); if (loaded.containsKey(ADEMPIERE_SSL_PORT)) @@ -281,7 +275,7 @@ public class ConfigurationData { log.severe("Cannot get local host name"); } - + // No environment file found - defaults // envLoaded = false; if (!envLoaded) @@ -329,9 +323,9 @@ public class ConfigurationData // Web Alias if (!p_properties.containsKey(ADEMPIERE_WEB_ALIAS) && localhost != null) p_properties.setProperty(ADEMPIERE_WEB_ALIAS, localhost.getCanonicalHostName()); - + // (String)p_properties.get(ADEMPIERE_DB_URL) // derived - + // Keystore Alias if (!p_properties.containsKey(ADEMPIERE_KEYSTORECODEALIAS)) p_properties.setProperty(ADEMPIERE_KEYSTORECODEALIAS, "adempiere"); @@ -340,8 +334,8 @@ public class ConfigurationData return true; } // load - - + + public String resolveDatabaseName(String connectionName) { int index = p_panel.fDatabaseType.getSelectedIndex(); if (index < 0 || index >= DBTYPE.length) @@ -365,7 +359,7 @@ public class ConfigurationData log.severe(error); return false; } - + error = testAdempiere(); if (error != null) { @@ -381,7 +375,7 @@ public class ConfigurationData log.warning(error); return false; } - + if (p_panel != null) p_panel.setStatusBar(p_panel.lDatabaseServer.getText()); error = testDatabase(); @@ -399,10 +393,10 @@ public class ConfigurationData log.warning(error); return false; } - + return true; } // test - + /** * Test Adempiere and set AdempiereHome @@ -415,27 +409,27 @@ public class ConfigurationData boolean pass =m_adempiereHome.exists(); String error = "Not found: AdempiereHome = " + m_adempiereHome; if (p_panel != null) - p_panel.signalOK(p_panel.okAdempiereHome, "ErrorAdempiereHome", + p_panel.signalOK(p_panel.okAdempiereHome, "ErrorAdempiereHome", pass, true, error); if (!pass) return error; log.info("OK: AdempiereHome = " + m_adempiereHome); p_properties.setProperty(ADEMPIERE_HOME, m_adempiereHome.getAbsolutePath()); System.setProperty(ADEMPIERE_HOME, m_adempiereHome.getAbsolutePath()); - + // KeyStore String fileName = KeyStoreMgt.getKeystoreFileName(m_adempiereHome.getAbsolutePath()); p_properties.setProperty(ADEMPIERE_KEYSTORE, fileName); - + // KeyStore Password - String pw = p_panel != null + String pw = p_panel != null ? new String(p_panel.fKeyStore.getPassword()) : (String)p_properties.get(ADEMPIERE_KEYSTOREPASS); pass = pw != null && pw.length() > 0; error = "Invalid Key Store Password = " + pw; if (p_panel != null) - p_panel.signalOK(p_panel.okKeyStore, "KeyStorePassword", - pass, true, error); + p_panel.signalOK(p_panel.okKeyStore, "KeyStorePassword", + pass, true, error); if (!pass) return error; p_properties.setProperty(ADEMPIERE_KEYSTOREPASS, pw); @@ -448,20 +442,20 @@ public class ConfigurationData ks.setLocation((String)p_properties.getProperty(ADEMPIERE_CERT_LOCATION)); ks.setState((String)p_properties.getProperty(ADEMPIERE_CERT_STATE)); ks.setCountry((String)p_properties.getProperty(ADEMPIERE_CERT_COUNTRY)); - error = p_panel != null + error = p_panel != null ? ks.verify((JFrame)SwingUtilities.getWindowAncestor(p_panel)) : ks.verify(null); pass = error == null; if (p_panel != null) - p_panel.signalOK(p_panel.okKeyStore, "KeyStorePassword", + p_panel.signalOK(p_panel.okKeyStore, "KeyStorePassword", pass, true, error); if (!pass) return error; log.info("OK: KeyStore = " + fileName); return null; } // testAdempiere - - + + /************************************************************************** * Test (optional) Mail * @return error message or null, if OK @@ -473,7 +467,7 @@ public class ConfigurationData ? p_panel.fMailServer.getText() : (String)p_properties.get(ADEMPIERE_MAIL_SERVER); boolean pass = server != null && server.length() > 0 - && server.toLowerCase().indexOf("localhost") == -1 + && server.toLowerCase().indexOf("localhost") == -1 && !server.equals("127.0.0.1"); String error = "Error Mail Server = " + server; InetAddress mailServer = null; @@ -498,7 +492,7 @@ public class ConfigurationData p_properties.setProperty(ADEMPIERE_MAIL_SERVER, mailServer.getHostName()); // Mail User - String mailUser = p_panel != null + String mailUser = p_panel != null ? p_panel.fMailUser.getText() : (String)p_properties.get(ADEMPIERE_MAIL_USER); String mailPassword = p_panel != null @@ -508,7 +502,7 @@ public class ConfigurationData // log.config("Mail User = " + mailUser + "/" + mailPassword); // Mail Address - String adminEMailString = p_panel != null + String adminEMailString = p_panel != null ? p_panel.fAdminEMail.getText() : (String)p_properties.get(ADEMPIERE_ADMIN_EMAIL); InternetAddress adminEMail = null; @@ -528,7 +522,7 @@ public class ConfigurationData pass = testMailServer(mailServer, adminEMail, mailUser, mailPassword); } if (p_panel != null) - p_panel.signalOK(p_panel.okMailUser, "ErrorMail", + p_panel.signalOK(p_panel.okMailUser, "ErrorMail", pass, false, error); if (pass) { @@ -548,7 +542,7 @@ public class ConfigurationData } return null; } // testMail - + /** * Test Mail * @param mailServer mail server @@ -598,7 +592,7 @@ public class ConfigurationData EMail email = new EMail (new Properties(), mailServer.getHostName (), adminEMail.toString (), adminEMail.toString(), - "Adempiere Server Setup Test", + "Adempiere Server Setup Test", "Test: " + getProperties()); email.createAuthenticator (mailUser, mailPassword); if (EMail.SENT_OK.equals (email.send ())) @@ -673,8 +667,8 @@ public class ConfigurationData } return true; } // testMailServer - - + + /************************************************************************** * Test Apps Server Port (client perspective) * @param protocol protocol (http, ..) @@ -693,7 +687,7 @@ public class ConfigurationData } catch (MalformedURLException ex) { - log.severe("No URL for Protocol=" + protocol + log.severe("No URL for Protocol=" + protocol + ", Server=" + server + ": " + ex.getMessage()); return false; @@ -763,7 +757,7 @@ public class ConfigurationData } if (!shouldBeUsed) log.warning("Open Socket " + host + ":" + port + " - " + pingSocket); - + log.fine(host + ":" + port + " - " + pingSocket); if (pingSocket == null) return false; @@ -779,7 +773,7 @@ public class ConfigurationData return true; } // testPort - + /************************************************************************** * Save Settings * @return true if saved @@ -792,7 +786,7 @@ public class ConfigurationData p_properties.setProperty("ADEMPIERE_DB_VERSION", Adempiere.DB_VERSION); log.finest(p_properties.toString()); - + // Before we save, load Ini Ini.setClient(false); String fileName = m_adempiereHome.getAbsolutePath() + File.separator + Ini.ADEMPIERE_PROPERTY_FILE; @@ -811,8 +805,8 @@ public class ConfigurationData { log.severe("Cannot save Properties to " + fileName + " - " + e.toString()); if (p_panel != null) - JOptionPane.showConfirmDialog(p_panel, - ConfigurationPanel.res.getString("ErrorSave"), + JOptionPane.showConfirmDialog(p_panel, + ConfigurationPanel.res.getString("ErrorSave"), ConfigurationPanel.res.getString("AdempiereServerSetup"), JOptionPane.DEFAULT_OPTION, JOptionPane.ERROR_MESSAGE); else @@ -823,8 +817,8 @@ public class ConfigurationData { log.severe("Cannot save Properties to " + fileName + " - " + t.toString()); if (p_panel != null) - JOptionPane.showConfirmDialog(p_panel, - ConfigurationPanel.res.getString("ErrorSave"), + JOptionPane.showConfirmDialog(p_panel, + ConfigurationPanel.res.getString("ErrorSave"), ConfigurationPanel.res.getString("AdempiereServerSetup"), JOptionPane.DEFAULT_OPTION, JOptionPane.ERROR_MESSAGE); else @@ -834,10 +828,10 @@ public class ConfigurationData log.info(fileName); return saveIni(); } // save - + /** * Synchronize and save Connection Info in Ini - * @return true + * @return true */ private boolean saveIni() { @@ -854,7 +848,6 @@ public class ConfigurationData getDatabaseServer(), getDatabasePort(), getDatabaseName(), getDatabaseUser(), getDatabasePassword()); cc.setAppsHost(getAppsServer()); - cc.setAppsPort(getAppsServerJNPPort()); cc.setConnectionProfile(CConnection.PROFILE_LAN); } catch(Exception e) @@ -871,8 +864,8 @@ public class ConfigurationData Ini.saveProperties(false); return true; } // saveIni - - + + /** * Get Properties * @return properties @@ -881,14 +874,14 @@ public class ConfigurationData { return p_properties; } // getProperties - + /** * Get Adempiere Home * @return adempiere home */ public String getAdempiereHome() { - return p_panel != null + return p_panel != null ? p_panel.fAdempiereHome.getText() : (String)p_properties.get(ADEMPIERE_HOME); } // getAdempiereHome @@ -904,7 +897,7 @@ public class ConfigurationData else updateProperty(ADEMPIERE_HOME, adempiereHome); } // setAdempiereHome - + /** * Get Key Store * @return password @@ -928,8 +921,8 @@ public class ConfigurationData else updateProperty(ADEMPIERE_KEYSTOREPASS, password); } // setKeyStore - - + + /************************************************************************** * Java Settings *************************************************************************/ @@ -945,10 +938,11 @@ public class ConfigurationData /** Java VM Types */ static String[] JAVATYPE = new String[] {JAVATYPE_SUN, JAVATYPE_OPENJDK, JAVATYPE_MAC, JAVATYPE_IBM}; - + /** Virtual machine Configurations */ private Config[] m_javaConfig = new Config[] {new ConfigVMSun(this), new ConfigVMOpenJDK(this), new ConfigVMMac(this), null}; + private ConfigAppServer m_appsConfig = new ConfigAppServer(this); /** * Init Database @@ -958,7 +952,7 @@ public class ConfigurationData int index = (p_panel != null ? p_panel.fJavaType.getSelectedIndex() : 0); initJava(index); } // initDatabase - + private void initJava(int index) { if (index < 0 || index >= JAVATYPE.length) @@ -972,14 +966,14 @@ public class ConfigurationData else m_javaConfig[index].init(); } - + /** * Test Java * @return error message or null of OK */ public String testJava() { - int index = p_panel != null + int index = p_panel != null ? p_panel.fJavaType.getSelectedIndex() : setJavaType((String)p_properties.get(JAVA_TYPE)); if (index < 0 || index >= JAVATYPE.length) @@ -988,7 +982,7 @@ public class ConfigurationData return "JavaType Config class missing: " + index; return m_javaConfig[index].test(); } // testJava - + /** * Set Java Type * @param javaType The javaType to set. @@ -1013,7 +1007,7 @@ public class ConfigurationData p_panel.fJavaType.setSelectedIndex(index); else updateProperty(JAVA_TYPE, javaType); - + return index; } // setJavaType @@ -1048,110 +1042,30 @@ public class ConfigurationData else updateProperty(JAVA_HOME, javaHome); } - - /************************************************************************** - * Apps Server Settings - *************************************************************************/ - - /** JBoss (default) */ - protected static String APPSTYPE_JBOSS = "jboss"; - /** GlassFish */ - protected static String APPSTYPE_GLASSFISH = "glassfish"; - /** Application Server Type */ - static String[] APPSTYPE = new String[] - { APPSTYPE_JBOSS - , APPSTYPE_GLASSFISH - }; - /** Database Configs */ - private Config[] m_appsConfig = new Config[] - { new ConfigJBoss(this) - , new ConfigGlassfish( this ) - }; /** * Init Apps Server */ public void initAppsServer() { - int index = (p_panel != null ? p_panel.fAppsType.getSelectedIndex() : 0); - initAppsServer(index); + m_appsConfig.init(); } // initAppsServer - - private void initAppsServer(int index) - { - if (index < 0 || index >= APPSTYPE.length) - log.warning("AppsServerType Index invalid: " + index); - else if (m_appsConfig[index] == null) - { - log.warning("AppsServerType Config missing: " + APPSTYPE[index]); - p_panel.fAppsType.setSelectedIndex(0); - } - else - m_appsConfig[index].init(); - } - + /** * Test Apps Server * @return error message or null of OK */ public String testAppsServer() { - int index = p_panel != null - ? p_panel.fAppsType.getSelectedIndex() - : setAppsServerType((String)p_properties.get(ADEMPIERE_APPS_TYPE)); - if (index < 0 || index >= APPSTYPE.length) - return "AppsServerType Index invalid: " + index; - else if (m_appsConfig[index] == null) - return "AppsServerType Config class missing: " + index; - return m_appsConfig[index].test(); + return m_appsConfig.test(); } // testAppsServer - - - /** - * Set Apps Server Type - * @param appsType The appsType to set. - */ - public int setAppsServerType (String appsType) - { - int index = -1; - for (int i = 0; i < APPSTYPE.length; i++) - { - if (APPSTYPE[i].equals(appsType)) - { - index = i; - break; - } - } - if (index == -1) - { - index = 0; - log.warning("Invalid AppsType=" + appsType); - } - if (p_panel != null) - p_panel.fAppsType.setSelectedIndex(index); - else - updateProperty(ADEMPIERE_APPS_TYPE, appsType); - - return index; - } // setAppsServerType - - /** - * Get Apps Server Type - * @return Apps Server Type - */ - public String getAppsServerType () - { - return p_panel != null - ? (String)p_panel.fAppsType.getSelectedItem() - : (String)p_properties.get(ADEMPIERE_APPS_TYPE); - } // setDatabaseType /** * @return Returns the appsServer. */ public String getAppsServer () { - return p_panel != null + return p_panel != null ? p_panel.fAppsServer.getText() : (String)p_properties.get(ADEMPIERE_APPS_SERVER); } @@ -1165,74 +1079,7 @@ public class ConfigurationData else updateProperty(ADEMPIERE_APPS_SERVER, appsServer); } - - /** - * @return Returns the appsServerDeployDir. - */ - public String getAppsServerDeployDir () - { - return p_panel != null - ? p_panel.fDeployDir.getText() - : (String)p_properties.get(ADEMPIERE_APPS_DEPLOY); - } - /** - * @param appsServerDeployDir The appsServerDeployDir to set. - */ - public void setAppsServerDeployDir (String appsServerDeployDir) - { - if (p_panel != null) - p_panel.fDeployDir.setText(appsServerDeployDir); - else - updateProperty(ADEMPIERE_APPS_DEPLOY, appsServerDeployDir); - } - /** - * @param enable if true enable entry - */ - public void setAppsServerDeployDir (boolean enable) - { - if (p_panel != null) - { - p_panel.fDeployDir.setEnabled(enable); - p_panel.bDeployDir.setEnabled(enable); - } - } - /** - * @return Returns the appsServerJNPPort. - */ - public int getAppsServerJNPPort () - { - String port = p_panel != null - ? p_panel.fJNPPort.getText() - : (String)p_properties.get(ADEMPIERE_JNP_PORT); - try - { - return Integer.parseInt(port); - } - catch (Exception e) - { - setAppsServerJNPPort("0"); - } - return 0; - } - /** - * @param appsServerJNPPort The appsServerJNPPort to set. - */ - public void setAppsServerJNPPort (String appsServerJNPPort) - { - if (p_panel != null) - p_panel.fJNPPort.setText(appsServerJNPPort); - else - updateProperty(ADEMPIERE_JNP_PORT, appsServerJNPPort); - } - /** - * @param enable if enable JNP entry - */ - public void setAppsServerJNPPort (boolean enable) - { - if (p_panel != null) - p_panel.fJNPPort.setEnabled(enable); - } /** * @return Returns the appsServerSSLPort. */ @@ -1305,36 +1152,36 @@ public class ConfigurationData if (p_panel != null) p_panel.fWebPort.setEnabled(enable); } - - + + /************************************************************************** * Database Settings *************************************************************************/ - + /** Oracle directory */ private static String DBTYPE_ORACLE = "oracle"; /** Oracle XP */ private static String DBTYPE_ORACLEXE = "oracleXE"; - + /** PostgreSQL */ private static String DBTYPE_POSTGRESQL = "postgresql"; - + /** Database Types */ static String[] DBTYPE = new String[] { DBTYPE_ORACLEXE, - DBTYPE_ORACLE, + DBTYPE_ORACLE, //begin e-evolution vpj-cd 02/07/2005 PostgreSQL - DBTYPE_POSTGRESQL + DBTYPE_POSTGRESQL }; //end e-evolution vpj-cd 02/07/2005 PostgreSQL - + /** Database Configs */ private Config[] m_databaseConfig = new Config[] { - new ConfigOracle(this,true), - new ConfigOracle(this,false), + new ConfigOracle(this,true), + new ConfigOracle(this,false), //begin e-evolution vpj-cd 02/07/2005 PostgreSQL - new ConfigPostgreSQL(this) + new ConfigPostgreSQL(this) // end e-evolution vpj-cd 02/07/2005 PostgreSQL }; @@ -1347,7 +1194,7 @@ public class ConfigurationData int index = (p_panel != null ? p_panel.fDatabaseType.getSelectedIndex() : 0); initDatabase(selected, index); } // initDatabase - + private void initDatabase(String selected, int index) { if (index < 0 || index >= DBTYPE.length) @@ -1361,26 +1208,26 @@ public class ConfigurationData else { m_databaseConfig[index].init(); - - if (p_panel != null) + + if (p_panel != null) { String[] databases = m_databaseConfig[index].discoverDatabases(selected); DefaultComboBoxModel model = new DefaultComboBoxModel(databases); - p_panel.fDatabaseDiscovered.setModel(model); + p_panel.fDatabaseDiscovered.setModel(model); p_panel.fDatabaseDiscovered.setEnabled(databases.length != 0); if (databases.length > 0) p_panel.fDatabaseName.setText(databases[0]); } } } - + /** * Test Database * @return error message or null of OK */ public String testDatabase() { - int index = p_panel != null + int index = p_panel != null ? p_panel.fDatabaseType.getSelectedIndex() : setDatabaseType((String)p_properties.get(ADEMPIERE_DB_TYPE)); if (index < 0 || index >= DBTYPE.length) @@ -1389,8 +1236,8 @@ public class ConfigurationData return "DatabaseType Config class missing: " + index; return m_databaseConfig[index].test(); } // testDatabase - - + + /** * Set Database Type * @param databaseType The databaseType to set. @@ -1415,10 +1262,10 @@ public class ConfigurationData p_panel.fDatabaseType.setSelectedIndex(index); else updateProperty(ADEMPIERE_DB_TYPE, databaseType); - + return index; } // setDatabaseType - + /** * @return Returns the databaseType. */ @@ -1443,7 +1290,7 @@ public class ConfigurationData if (p_panel != null) p_panel.fDatabaseDiscovered.setSelectedItem(databaseDiscovered); } - + /** * @return Returns the databaseName. */ @@ -1463,7 +1310,7 @@ public class ConfigurationData else updateProperty(ADEMPIERE_DB_NAME, databaseName); } - + /** * @return Returns the database User Password. */ @@ -1594,5 +1441,5 @@ public class ConfigurationData else updateProperty(ADEMPIERE_DB_USER, databaseUser); } - + } // ConfigurationData diff --git a/install/src/org/compiere/install/ConfigurationPanel.java b/install/src/org/compiere/install/ConfigurationPanel.java index 03013bcd5d..ee50c5646e 100644 --- a/install/src/org/compiere/install/ConfigurationPanel.java +++ b/install/src/org/compiere/install/ConfigurationPanel.java @@ -38,7 +38,6 @@ import javax.swing.border.TitledBorder; import org.adempiere.base.Core; import org.apache.tools.ant.Main; -import org.compiere.Adempiere; import org.compiere.swing.CButton; import org.compiere.swing.CCheckBox; import org.compiere.swing.CComboBox; @@ -48,9 +47,6 @@ import org.compiere.swing.CPassword; import org.compiere.swing.CTextField; import org.compiere.util.CLogger; -import com.sfcommerce.jpaymentcomponent.ssl.Client; - - /** * Configuration Panel * @@ -60,7 +56,7 @@ import com.sfcommerce.jpaymentcomponent.ssl.Client; public class ConfigurationPanel extends CPanel implements ActionListener { /** - * + * */ private static final long serialVersionUID = -5113669370606054608L; @@ -93,8 +89,6 @@ public class ConfigurationPanel extends CPanel implements ActionListener /** Translation */ static ResourceBundle res = ResourceBundle.getBundle("org.compiere.install.SetupRes"); - /** Setup Frame */ - private Setup m_setup = null; /** Status Bar */ private JLabel m_statusBar; /** Configuration Data */ @@ -123,20 +117,10 @@ public class ConfigurationPanel extends CPanel implements ActionListener private CLabel lKeyStore = new CLabel(); CPassword fKeyStore = new CPassword(); CCheckBox okKeyStore = new CCheckBox(); - // Apps Server - Type + // Apps Server - Type CLabel lAppsServer = new CLabel(); CTextField fAppsServer = new CTextField(FIELDLENGTH); CCheckBox okAppsServer = new CCheckBox(); - private CLabel lAppsType = new CLabel(); - CComboBox fAppsType = new CComboBox(ConfigurationData.APPSTYPE); - // Deployment Directory - JNP - private CLabel lDeployDir = new CLabel(); - CTextField fDeployDir = new CTextField(FIELDLENGTH); - CCheckBox okDeployDir = new CCheckBox(); - CButton bDeployDir = new CButton(iOpen); - private CLabel lJNPPort = new CLabel(); - CTextField fJNPPort = new CTextField(FIELDLENGTH); - CCheckBox okJNPPort = new CCheckBox(); // Web Ports private CLabel lWebPort = new CLabel(); CTextField fWebPort = new CTextField(FIELDLENGTH); @@ -181,7 +165,7 @@ public class ConfigurationPanel extends CPanel implements ActionListener private CButton bHelp = new CButton(iHelp); private CButton bTest = new CButton(); private CButton bSave = new CButton(iSave); - + /** * Static Layout Init @@ -192,7 +176,7 @@ public class ConfigurationPanel extends CPanel implements ActionListener this.setLayout(gridBagLayout); Insets bInsets = new Insets(0, 5, 0, 5); TitledBorder titledBorder = new TitledBorder("dummy"); - + // Java lJavaHome.setToolTipText(res.getString("JavaHomeInfo")); lJavaHome.setText(res.getString("JavaHome")); @@ -203,7 +187,7 @@ public class ConfigurationPanel extends CPanel implements ActionListener lJavaType.setToolTipText(res.getString("JavaTypeInfo")); lJavaType.setText(res.getString("JavaType")); fJavaType.setPreferredSize(fJavaHome.getPreferredSize()); - + JLabel sectionLabel = new JLabel("Java"); sectionLabel.setForeground(titledBorder.getTitleColor()); JSeparator separator = new JSeparator(); @@ -211,7 +195,7 @@ public class ConfigurationPanel extends CPanel implements ActionListener ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(15, 5, 0, 10), 0, 0)); this.add(separator, new GridBagConstraints(0, 1, 7, 1, 1.0, 0.0 ,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 5, 0, 10), 0, 0)); - + this.add(lJavaHome, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0 ,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 2, 5), 0, 0)); this.add(fJavaHome, new GridBagConstraints(1, 2, 1, 1, 0.5, 0.0 @@ -235,7 +219,7 @@ public class ConfigurationPanel extends CPanel implements ActionListener lKeyStore.setToolTipText(res.getString("KeyStorePasswordInfo")); fKeyStore.setText(""); okKeyStore.setEnabled(false); - + sectionLabel = new JLabel("Adempiere"); sectionLabel.setForeground(titledBorder.getTitleColor()); separator = new JSeparator(); @@ -263,9 +247,6 @@ public class ConfigurationPanel extends CPanel implements ActionListener lAppsServer.setFont(lAppsServer.getFont().deriveFont(Font.BOLD)); fAppsServer.setText("."); okAppsServer.setEnabled(false); - lAppsType.setToolTipText(res.getString("AppsTypeInfo")); - lAppsType.setText(res.getString("AppsType")); - fAppsType.setPreferredSize(fAppsServer.getPreferredSize()); sectionLabel = new JLabel(res.getString("AppsServer")); sectionLabel.setForeground(titledBorder.getTitleColor()); separator = new JSeparator(); @@ -279,35 +260,6 @@ public class ConfigurationPanel extends CPanel implements ActionListener ,GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(5, 5, 2, 0), 0, 0)); this.add(okAppsServer, new GridBagConstraints(2, 8, 1, 1, 0.0, 0.0 ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 0, 2, 5), 0, 0)); - this.add(lAppsType, new GridBagConstraints(4, 8, 1, 1, 0.0, 0.0 - ,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 2, 5), 0, 0)); - this.add(fAppsType, new GridBagConstraints(5, 8, 1, 1, 0.0, 0.0 - ,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 2, 0), 0, 0)); - // Deployment - JNP - lDeployDir.setToolTipText(res.getString("DeployDirInfo")); - lDeployDir.setText(res.getString("DeployDir")); - fDeployDir.setText("."); - okDeployDir.setEnabled(false); - bDeployDir.setMargin(bInsets); - bDeployDir.setToolTipText(res.getString("DeployDirInfo")); - lJNPPort.setToolTipText(res.getString("JNPPortInfo")); - lJNPPort.setText(res.getString("JNPPort")); - fJNPPort.setText("."); - okJNPPort.setEnabled(false); - this.add(lDeployDir, new GridBagConstraints(0, 9, 1, 1, 0.0, 0.0 - ,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(2, 5, 2, 5), 0, 0)); - this.add(fDeployDir, new GridBagConstraints(1, 9, 1, 1, 0.5, 0.0 - ,GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(2, 5, 2, 0), 0, 0)); - this.add(okDeployDir, new GridBagConstraints(2, 9, 1, 1, 0.0, 0.0 - ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(2, 0, 2, 5), 0, 0)); - this.add(bDeployDir, new GridBagConstraints(3, 9, 1, 1, 0.0, 0.0 - ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); - this.add(lJNPPort, new GridBagConstraints(4, 9, 1, 1, 0.0, 0.0 - ,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(2, 5, 2, 5), 0, 0)); - this.add(fJNPPort, new GridBagConstraints(5, 9, 1, 1, 0.5, 0.0 - ,GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(2, 5, 2, 0), 0, 0)); - this.add(okJNPPort, new GridBagConstraints(6, 9, 1, 1, 0.0, 0.0 - ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(2, 0, 2, 5), 0, 0)); // Web Ports lWebPort.setToolTipText(res.getString("WebPortInfo")); lWebPort.setText(res.getString("WebPort")); @@ -357,7 +309,7 @@ public class ConfigurationPanel extends CPanel implements ActionListener lDatabaseName.setToolTipText(res.getString("DatabaseNameInfo")); lDatabaseName.setText(res.getString("DatabaseName")); fDatabaseName.setText("."); - + //TNS/Native connection lDatabaseDiscovered.setToolTipText(res.getString("TNSNameInfo")); lDatabaseDiscovered.setText(res.getString("TNSName")); @@ -438,7 +390,7 @@ public class ConfigurationPanel extends CPanel implements ActionListener ,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 2, 5), 0, 0)); this.add(fAdminEMail, new GridBagConstraints(5, 19, 1, 1, 0.5, 0.0 ,GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(5, 5, 2, 0), 0, 0)); - + // Mail User = Password lMailUser.setToolTipText(res.getString("MailUserInfo")); lMailUser.setText(res.getString("MailUser")); @@ -464,7 +416,7 @@ public class ConfigurationPanel extends CPanel implements ActionListener filler.setBorder(null); this.add(filler, new GridBagConstraints(0, 21, 1, 1, 0.0, 1.0 ,GridBagConstraints.WEST, GridBagConstraints.VERTICAL, new Insets(0, 0, 0, 0), 0, 0)); - + // End bTest.setToolTipText(res.getString("TestInfo")); bTest.setText(res.getString("Test")); @@ -480,9 +432,7 @@ public class ConfigurationPanel extends CPanel implements ActionListener // bAdempiereHome.addActionListener(this); bJavaHome.addActionListener(this); - bDeployDir.addActionListener(this); fJavaType.addActionListener(this); - fAppsType.addActionListener(this); fDatabaseType.addActionListener(this); fDatabaseDiscovered.addActionListener(this); bHelp.addActionListener(this); @@ -508,8 +458,8 @@ public class ConfigurationPanel extends CPanel implements ActionListener { m_statusBar.setText(text); } // setStatusBar - - + + /************************************************************************** * ActionListener * @param e event @@ -528,8 +478,6 @@ public class ConfigurationPanel extends CPanel implements ActionListener // else if (e.getSource() == fJavaType) m_data.initJava(); - else if (e.getSource() == fAppsType) - m_data.initAppsServer(); else if (e.getSource() == fDatabaseType) m_data.initDatabase(""); // @@ -537,8 +485,6 @@ public class ConfigurationPanel extends CPanel implements ActionListener setPath (fJavaHome); else if (e.getSource() == bAdempiereHome) setPath (fAdempiereHome); - else if (e.getSource() == bDeployDir) - setPath (fDeployDir); else if (e.getSource() == bHelp) new Setup_Help((Frame)SwingUtilities.getWindowAncestor(this)); else if (e.getSource() == bTest) @@ -547,8 +493,8 @@ public class ConfigurationPanel extends CPanel implements ActionListener startTest(true); } // actionPerformed - - + + /** * Set Path in Field * @param field field to set Path @@ -564,7 +510,7 @@ public class ConfigurationPanel extends CPanel implements ActionListener field.setText(fc.getSelectedFile().getAbsolutePath()); } // setPath - + /************************************************************************** * Start Test Async. * @param saveIt save @@ -605,8 +551,8 @@ public class ConfigurationPanel extends CPanel implements ActionListener if (m_errorString != null) { CLogger.get().severe(m_errorString); - JOptionPane.showConfirmDialog (m_statusBar.getParent(), - m_errorString, + JOptionPane.showConfirmDialog (m_statusBar.getParent(), + m_errorString, res.getString("ServerError"), JOptionPane.DEFAULT_OPTION, JOptionPane.ERROR_MESSAGE); } @@ -641,7 +587,7 @@ public class ConfigurationPanel extends CPanel implements ActionListener * @param critical true if critical * @param errorMsg error Message */ - void signalOK (CCheckBox cb, String resString, + void signalOK (CCheckBox cb, String resString, boolean pass, boolean critical, String errorMsg) { m_errorString = res.getString(resString); @@ -672,10 +618,10 @@ public class ConfigurationPanel extends CPanel implements ActionListener bSave.setEnabled(false); bTest.setEnabled(false); setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); - + if (!m_data.save()) return; - + // Final Info JOptionPane.showConfirmDialog(this, res.getString("EnvironmentSaved"), res.getString("AdempiereServerSetup"), @@ -695,7 +641,7 @@ public class ConfigurationPanel extends CPanel implements ActionListener { CLogger.get().log(Level.SEVERE, "ant", e); } - + // To be sure ((Frame)SwingUtilities.getWindowAncestor(this)).dispose(); System.exit(0); // remains active when License Dialog called