public class ConfigUtil extends Object
Modifier and Type | Field and Description |
---|---|
static String |
CONFIG_FILE
Config file name to use.
|
Constructor and Description |
---|
ConfigUtil() |
Modifier and Type | Method and Description |
---|---|
static Properties |
getConfig()
Get current configuration properties.
|
static String |
getConnectionInfo(Connection connection)
Prints the PING results.
|
static String |
getPassKey()
Gets the current passkey.
|
static String |
getSchema()
Gets the schema name being used.
|
static void |
printConnectionInfo(Connection connection)
Prints the PING results to log.
|
static Properties |
readConfig()
Read properties file from current directory or if not available the internal one.
|
static void |
resetConfig()
Force config to be re-read.
|
static void |
setConnectionName(String name)
Set current connection name.
|
static void |
writeConfig()
Write the current config to current directory.
|
public static String CONFIG_FILE
public static Properties getConfig() throws IOException
IOException
- when problems reading config filepublic static void setConnectionName(String name)
name
- namepublic static Properties readConfig() throws IOException
IOException
- when problems reading config filepublic static void printConnectionInfo(Connection connection)
connection
- Connectionpublic static String getConnectionInfo(Connection connection)
connection
- Connectionpublic static void resetConfig()
public static void writeConfig() throws IOException
IOException
- when problems writing config filepublic static String getPassKey() throws IOException
IOException
- when problems reading propertiespublic static String getSchema() throws IOException
IOException
- when problems reading schema fileCopyright © 2021. All rights reserved.