23 package org.sleuthkit.autopsy.centralrepository.datamodel;
25 import java.util.HashMap;
27 import java.util.logging.Level;
43 private static final String
PASSWORD_KEY =
"db.postgresql.password";
45 private static final String
PORT_KEY =
"db.postgresql.port";
46 private static final String
USER_KEY =
"db.postgresql.user";
47 private static final String
DBNAME_KEY =
"db.postgresql.dbName";
48 private static final String
HOST_KEY =
"db.postgresql.host";
77 if (value == null || value.isEmpty())
84 LOGGER.log(Level.WARNING,
"There was an error in converting central repo postgres settings", e);
104 CaseDbConnectionInfo muConn;
108 LOGGER.log(Level.SEVERE,
"Failed to import settings from multi-user settings.", ex);
140 String passwordHex = keyVals.get(PASSWORD_KEY);
141 if (passwordHex != null) {
146 LOGGER.log(Level.WARNING,
"Failed to convert password from hex text to text.", ex);
150 final String finalPassword = password;
162 Map<String, String> map =
new HashMap<String, String>();
163 map.put(HOST_KEY, settings.
getHost());
164 map.put(PORT_KEY, Integer.toString(settings.
getPort()));
165 map.put(DBNAME_KEY, settings.
getDbName());
171 LOGGER.log(Level.SEVERE,
"Failed to convert password from text to hex text.", ex);
184 return saved.
equals(settings);
void setPassword(String password)
PostgresConnectionSettings loadCustomSettings()
boolean areCustomSettingsChanged(PostgresConnectionSettings settings)
boolean equals(Object obj)
static final String DBNAME_KEY
void setHost(String host)
void setDbName(String dbName)
static CaseDbConnectionInfo getDatabaseConnectionInfo()
static final String MODULE_KEY
CentralRepoPostgresSettingsUtil()
void setBulkThreshold(int bulkThreshold)
void setUserName(String userName)
static synchronized CentralRepoPostgresSettingsUtil getInstance()
static final String USER_KEY
PostgresConnectionSettings loadMultiUserSettings()
void setValOrLog(ValueSetter setter, String value)
static final String PASSWORD_KEY
static CentralRepoPostgresSettingsUtil instance
static synchronized void setConfigSettings(String moduleName, Map< String, String > settings)
String getModuleSettingsKey()
void saveCustomSettings(PostgresConnectionSettings settings)
static final Logger LOGGER
synchronized static Logger getLogger(String name)
static final String PORT_KEY
static final String HOST_KEY
static String convertTextToHexText(String property)
static CentralRepoSettings getInstance()
static synchronized Map< String, String > getConfigSettings(String moduleName)
static final String BULK_THRESHOLD_KEY
static String convertHexTextToText(String property)