Package org.compiere.install
Class ConfigurationData
- java.lang.Object
-
- org.compiere.install.ConfigurationData
-
public class ConfigurationData extends Object
Configuration Data- Version:
- $Id: ConfigurationData.java,v 1.4 2006/07/30 00:57:42 jjanke Exp $
- Author:
- Jorg Janke
-
-
Field Summary
-
Constructor Summary
Constructors Constructor Description ConfigurationData(ConfigurationPanel panel)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dbChanged()
String
getAdempiereHome()
Get Adempiere HomeString
getAdminEMail()
String
getAppsServer()
int
getAppsServerSSLPort()
int
getAppsServerWebPort()
String
getDatabaseDiscovered()
boolean
getDatabaseExists()
String
getDatabaseName()
String
getDatabasePassword()
int
getDatabasePort()
String
getDatabaseServer()
String
getDatabaseSystemPassword()
String
getDatabaseType()
String
getDatabaseUser()
String
getJavaHome()
String
getKeyStore()
Get Key StoreString
getMailPassword()
String
getMailServer()
String
getMailUser()
String
getProperty(String property)
String
getWebStores(Connection con)
Get Web Store Context Names separated by ,void
initAppsServer()
Init Apps Servervoid
initDatabase(String selected)
Init Databasevoid
initJava()
Init Databaseboolean
load()
Load Configuration DataString
resolveDatabaseName(String connectionName)
boolean
save()
Save Settingsvoid
setAdempiereHome(String adempiereHome)
Set Adempiere Homevoid
setAdminEMail(String adminEMail)
void
setAppsServer(String appsServer)
void
setAppsServerSSLPort(boolean enable)
void
setAppsServerSSLPort(String appsServerSSLPort)
void
setAppsServerWebPort(boolean enable)
void
setAppsServerWebPort(String appsServerWebPort)
void
setDatabaseDiscovered(String databaseDiscovered)
void
setDatabaseExists(String dbExists)
void
setDatabaseName(String databaseName)
void
setDatabasePassword(String databasePassword)
void
setDatabasePort(String databasePort)
void
setDatabaseServer(String databaseServer)
void
setDatabaseSystemPassword(boolean enable)
void
setDatabaseSystemPassword(String databaseSystemPassword)
int
setDatabaseType(String databaseType)
Set Database Typevoid
setDatabaseUser(String databaseUser)
void
setJavaHome(String javaHome)
void
setKeyStore(String password)
Set Key Store Passwordvoid
setMailPassword(String mailPassword)
void
setMailServer(String mailServer)
void
setMailUser(String mailUser)
void
setProperty(String key, String value)
Set Configuration Propertyboolean
test(IDBConfigMonitor monitor)
testString
testAdempiere()
Test Adempiere and set AdempiereHomeString
testAppsServer()
Test Apps ServerString
testDatabase(IDBConfigMonitor monitor)
Test DatabaseString
testJava()
Test JavaString
testMail()
Test (optional) Mailboolean
testPort(String protocol, String server, int port, String file)
Test Apps Server Port (client perspective)boolean
testPort(InetAddress host, int port, boolean shouldBeUsed)
Test Portprotected boolean
testServerPort(int port)
Test Server Portvoid
updateProperty(String property, String value)
-
-
-
Field Detail
-
p_panel
protected ConfigurationPanel p_panel
UI Panel
-
p_properties
protected Properties p_properties
Environment Properties
-
log
protected static final CLogger log
Static Logger
-
IDEMPIERE_ENV_FILE
public static final String IDEMPIERE_ENV_FILE
Properties File name- See Also:
- Constant Field Values
-
IDEMPIERE_HOME
public static final String IDEMPIERE_HOME
Adempiere Home- See Also:
- Constant Field Values
-
JAVA_HOME
public static final String JAVA_HOME
- See Also:
- Constant Field Values
-
IDEMPIERE_JAVA_OPTIONS
public static final String IDEMPIERE_JAVA_OPTIONS
- See Also:
- Constant Field Values
-
KEYSTORE_PASSWORD
public static final String KEYSTORE_PASSWORD
Default Keysore Password- See Also:
- Constant Field Values
-
ADEMPIERE_APPS_TYPE
public static final String ADEMPIERE_APPS_TYPE
- See Also:
- Constant Field Values
-
ADEMPIERE_APPS_SERVER
public static final String ADEMPIERE_APPS_SERVER
- See Also:
- Constant Field Values
-
ADEMPIERE_APPS_DEPLOY
public static final String ADEMPIERE_APPS_DEPLOY
- See Also:
- Constant Field Values
-
ADEMPIERE_JNP_PORT
public static final String ADEMPIERE_JNP_PORT
- See Also:
- Constant Field Values
-
ADEMPIERE_WEB_PORT
public static final String ADEMPIERE_WEB_PORT
- See Also:
- Constant Field Values
-
ADEMPIERE_SSL_PORT
public static final String ADEMPIERE_SSL_PORT
- See Also:
- Constant Field Values
-
ADEMPIERE_WEB_ALIAS
public static final String ADEMPIERE_WEB_ALIAS
- See Also:
- Constant Field Values
-
ADEMPIERE_KEYSTORE
public static final String ADEMPIERE_KEYSTORE
- See Also:
- Constant Field Values
-
ADEMPIERE_KEYSTOREPASS
public static final String ADEMPIERE_KEYSTOREPASS
- See Also:
- Constant Field Values
-
ADEMPIERE_KEYSTORECODEALIAS
public static final String ADEMPIERE_KEYSTORECODEALIAS
- See Also:
- Constant Field Values
-
ADEMPIERE_KEYSTOREWEBALIAS
public static final String ADEMPIERE_KEYSTOREWEBALIAS
- See Also:
- Constant Field Values
-
ADEMPIERE_CERT_CN
public static final String ADEMPIERE_CERT_CN
- See Also:
- Constant Field Values
-
ADEMPIERE_CERT_ORG
public static final String ADEMPIERE_CERT_ORG
- See Also:
- Constant Field Values
-
ADEMPIERE_CERT_ORG_UNIT
public static final String ADEMPIERE_CERT_ORG_UNIT
- See Also:
- Constant Field Values
-
ADEMPIERE_CERT_LOCATION
public static final String ADEMPIERE_CERT_LOCATION
- See Also:
- Constant Field Values
-
ADEMPIERE_CERT_STATE
public static final String ADEMPIERE_CERT_STATE
- See Also:
- Constant Field Values
-
ADEMPIERE_CERT_COUNTRY
public static final String ADEMPIERE_CERT_COUNTRY
- See Also:
- Constant Field Values
-
ADEMPIERE_DB_TYPE
public static final String ADEMPIERE_DB_TYPE
DB Type- See Also:
- Constant Field Values
-
ADEMPIERE_DB_PATH
public static final String ADEMPIERE_DB_PATH
DB Path- See Also:
- Constant Field Values
-
ADEMPIERE_DB_SERVER
public static final String ADEMPIERE_DB_SERVER
- See Also:
- Constant Field Values
-
ADEMPIERE_DB_PORT
public static final String ADEMPIERE_DB_PORT
- See Also:
- Constant Field Values
-
ADEMPIERE_DB_NAME
public static final String ADEMPIERE_DB_NAME
- See Also:
- Constant Field Values
-
ADEMPIERE_DB_URL
public static final String ADEMPIERE_DB_URL
- See Also:
- Constant Field Values
-
ADEMPIERE_DB_USER
public static final String ADEMPIERE_DB_USER
- See Also:
- Constant Field Values
-
ADEMPIERE_DB_PASSWORD
public static final String ADEMPIERE_DB_PASSWORD
- See Also:
- Constant Field Values
-
ADEMPIERE_DB_SYSTEM
public static final String ADEMPIERE_DB_SYSTEM
- See Also:
- Constant Field Values
-
ADEMPIERE_DB_EXISTS
public static final String ADEMPIERE_DB_EXISTS
- See Also:
- Constant Field Values
-
ADEMPIERE_MAIL_SERVER
public static final String ADEMPIERE_MAIL_SERVER
- See Also:
- Constant Field Values
-
ADEMPIERE_MAIL_USER
public static final String ADEMPIERE_MAIL_USER
- See Also:
- Constant Field Values
-
ADEMPIERE_MAIL_PASSWORD
public static final String ADEMPIERE_MAIL_PASSWORD
- See Also:
- Constant Field Values
-
ADEMPIERE_ADMIN_EMAIL
public static final String ADEMPIERE_ADMIN_EMAIL
- See Also:
- Constant Field Values
-
ADEMPIERE_MAIL_UPDATED
public static final String ADEMPIERE_MAIL_UPDATED
- See Also:
- Constant Field Values
-
ADEMPIERE_FTP_SERVER
public static final String ADEMPIERE_FTP_SERVER
- See Also:
- Constant Field Values
-
ADEMPIERE_FTP_USER
public static final String ADEMPIERE_FTP_USER
- See Also:
- Constant Field Values
-
ADEMPIERE_FTP_PASSWORD
public static final String ADEMPIERE_FTP_PASSWORD
- See Also:
- Constant Field Values
-
ADEMPIERE_FTP_PREFIX
public static final String ADEMPIERE_FTP_PREFIX
- See Also:
- Constant Field Values
-
ADEMPIERE_WEBSTORES
public static final String ADEMPIERE_WEBSTORES
- See Also:
- Constant Field Values
-
JAVATYPE
public static String[] JAVATYPE
Java VM Types
-
DBTYPE
public static String[] DBTYPE
Database Types
-
-
Constructor Detail
-
ConfigurationData
public ConfigurationData(ConfigurationPanel panel)
Constructor- Parameters:
panel
- UI panel
-
-
Method Detail
-
load
public boolean load()
Load Configuration Data- Returns:
- true if loaded
-
test
public boolean test(IDBConfigMonitor monitor)
test- Returns:
- true if test ok
-
testAdempiere
public String testAdempiere()
Test Adempiere and set AdempiereHome- Returns:
- error message or null if OK
-
testMail
public String testMail()
Test (optional) Mail- Returns:
- error message or null, if OK
-
testPort
public boolean testPort(String protocol, String server, int port, String file)
Test Apps Server Port (client perspective)- Parameters:
protocol
- protocol (http, ..)server
- server nameport
- portfile
- file name- Returns:
- true if able to connect
-
testServerPort
protected boolean testServerPort(int port)
Test Server Port- Parameters:
port
- port- Returns:
- true if able to create
-
testPort
public boolean testPort(InetAddress host, int port, boolean shouldBeUsed)
Test Port- Parameters:
host
- hostport
- portshouldBeUsed
- true if it should be used- Returns:
- true if some server answered on port
-
save
public boolean save()
Save Settings- Returns:
- true if saved
-
getAdempiereHome
public String getAdempiereHome()
Get Adempiere Home- Returns:
- adempiere home
-
setAdempiereHome
public void setAdempiereHome(String adempiereHome)
Set Adempiere Home- Parameters:
adempiereHome
-
-
getKeyStore
public String getKeyStore()
Get Key Store- Returns:
- password
-
setKeyStore
public void setKeyStore(String password)
Set Key Store Password- Parameters:
password
-
-
initJava
public void initJava()
Init Database
-
testJava
public String testJava()
Test Java- Returns:
- error message or null of OK
-
getJavaHome
public String getJavaHome()
- Returns:
- Returns the javaHome.
-
setJavaHome
public void setJavaHome(String javaHome)
- Parameters:
javaHome
- The javaHome to set.
-
initAppsServer
public void initAppsServer()
Init Apps Server
-
testAppsServer
public String testAppsServer()
Test Apps Server- Returns:
- error message or null of OK
-
getAppsServer
public String getAppsServer()
- Returns:
- Returns the appsServer.
-
setAppsServer
public void setAppsServer(String appsServer)
- Parameters:
appsServer
- The appsServer to set.
-
getAppsServerSSLPort
public int getAppsServerSSLPort()
- Returns:
- Returns the appsServerSSLPort.
-
setAppsServerSSLPort
public void setAppsServerSSLPort(String appsServerSSLPort)
- Parameters:
appsServerSSLPort
- The appsServerSSLPort to set.
-
setAppsServerSSLPort
public void setAppsServerSSLPort(boolean enable)
- Parameters:
enable
- if tre enable SSL entry
-
getAppsServerWebPort
public int getAppsServerWebPort()
- Returns:
- Returns the appsServerWebPort.
-
setAppsServerWebPort
public void setAppsServerWebPort(String appsServerWebPort)
- Parameters:
appsServerWebPort
- The appsServerWebPort to set.
-
setAppsServerWebPort
public void setAppsServerWebPort(boolean enable)
- Parameters:
enable
- if tre enable Web entry
-
initDatabase
public void initDatabase(String selected)
Init Database- Parameters:
selected
- DB
-
testDatabase
public String testDatabase(IDBConfigMonitor monitor)
Test Database- Parameters:
monitor
-- Returns:
- error message or null of OK
-
setDatabaseType
public int setDatabaseType(String databaseType)
Set Database Type- Parameters:
databaseType
- The databaseType to set.
-
getDatabaseType
public String getDatabaseType()
- Returns:
- Returns the databaseType.
-
getDatabaseDiscovered
public String getDatabaseDiscovered()
- Returns:
- Returns the database Discovered.
-
setDatabaseDiscovered
public void setDatabaseDiscovered(String databaseDiscovered)
- Parameters:
databaseDiscovered
- The database Discovered to set.
-
getDatabaseName
public String getDatabaseName()
- Returns:
- Returns the databaseName.
-
setDatabaseName
public void setDatabaseName(String databaseName)
- Parameters:
databaseName
- The databaseName to set.
-
getDatabasePassword
public String getDatabasePassword()
- Returns:
- Returns the database User Password.
-
setDatabasePassword
public void setDatabasePassword(String databasePassword)
- Parameters:
databasePassword
- The databasePassword to set.
-
getDatabasePort
public int getDatabasePort()
- Returns:
- Returns the databasePort.
-
setDatabasePort
public void setDatabasePort(String databasePort)
- Parameters:
databasePort
- The databasePort to set.
-
getDatabaseServer
public String getDatabaseServer()
- Returns:
- Returns the databaseServer.
-
setDatabaseServer
public void setDatabaseServer(String databaseServer)
- Parameters:
databaseServer
- The databaseServer to set.
-
getDatabaseSystemPassword
public String getDatabaseSystemPassword()
- Returns:
- Returns the databaseSystemPassword.
-
setDatabaseSystemPassword
public void setDatabaseSystemPassword(String databaseSystemPassword)
- Parameters:
databaseSystemPassword
- The databaseSystemPassword to set.
-
setDatabaseSystemPassword
public void setDatabaseSystemPassword(boolean enable)
- Parameters:
enable
- enable Database System Password
-
setDatabaseExists
public void setDatabaseExists(String dbExists)
- Parameters:
dbExists
- ADEMPIERE_DB_EXISTS
-
getDatabaseExists
public boolean getDatabaseExists()
-
getDatabaseUser
public String getDatabaseUser()
- Returns:
- Returns the databaseUser.
-
setDatabaseUser
public void setDatabaseUser(String databaseUser)
- Parameters:
databaseUser
- The databaseUser to set.
-
getMailServer
public String getMailServer()
- Returns:
- Returns the mail Server.
-
setMailServer
public void setMailServer(String mailServer)
-
getMailUser
public String getMailUser()
- Returns:
- Returns the mailUser.
-
setMailUser
public void setMailUser(String mailUser)
- Parameters:
mailUser
- The mailUser to set.
-
getMailPassword
public String getMailPassword()
- Returns:
- Returns the mail User Password.
-
setMailPassword
public void setMailPassword(String mailPassword)
- Parameters:
mailPassword
- The mailPassword to set.
-
getAdminEMail
public String getAdminEMail()
- Returns:
- Returns the admin email
-
setAdminEMail
public void setAdminEMail(String adminEMail)
- Parameters:
adminEMail
- The admin email
-
getWebStores
public String getWebStores(Connection con)
Get Web Store Context Names separated by ,- Parameters:
con
- connection- Returns:
- String of Web Store Names - e.g. /wstore
-
setProperty
public void setProperty(String key, String value)
Set Configuration Property- Parameters:
key
- keyvalue
- value
-
dbChanged
public void dbChanged()
-
-