Class 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
    • Constructor Detail

      • ConfigurationData

        public ConfigurationData​(ConfigurationPanel panel)
        Constructor
        Parameters:
        panel - UI panel
    • Method Detail

      • updateProperty

        public void updateProperty​(String property,
                                   String value)
      • getProperty

        public String getProperty​(String property)
      • load

        public boolean load()
        Load Configuration Data
        Returns:
        true if loaded
      • resolveDatabaseName

        public String resolveDatabaseName​(String connectionName)
      • 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 name
        port - port
        file - 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 - host
        port - port
        shouldBeUsed - 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 - key
        value - value
      • dbChanged

        public void dbChanged()