23package org.sleuthkit.autopsy.centralrepository.datamodel;
25import java.util.HashMap;
27import java.util.logging.Level;
28import org.sleuthkit.autopsy.centralrepository.CentralRepoSettings;
29import org.sleuthkit.autopsy.core.UserPreferences;
30import org.sleuthkit.autopsy.core.UserPreferencesException;
31import org.sleuthkit.autopsy.coreutils.Logger;
32import org.sleuthkit.autopsy.coreutils.ModuleSettings;
33import org.sleuthkit.autopsy.coreutils.TextConverter;
34import org.sleuthkit.autopsy.coreutils.TextConverterException;
35import org.sleuthkit.datamodel.CaseDbConnectionInfo;
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);
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>();
171 LOGGER.log(Level.SEVERE,
"Failed to convert password from text to hex text.", ex);
184 return saved.
equals(settings);
static CentralRepoSettings getInstance()
String getModuleSettingsKey()
static CentralRepoPostgresSettingsUtil instance
static final String PORT_KEY
static final String USER_KEY
static final String PASSWORD_KEY
PostgresConnectionSettings loadMultiUserSettings()
CentralRepoPostgresSettingsUtil()
static final String HOST_KEY
void setValOrLog(ValueSetter setter, String value)
PostgresConnectionSettings loadCustomSettings()
void saveCustomSettings(PostgresConnectionSettings settings)
static final String BULK_THRESHOLD_KEY
static final String MODULE_KEY
static final String DBNAME_KEY
static synchronized CentralRepoPostgresSettingsUtil getInstance()
boolean areCustomSettingsChanged(PostgresConnectionSettings settings)
static final Logger LOGGER
void setHost(String host)
boolean equals(Object obj)
void setDbName(String dbName)
void setBulkThreshold(int bulkThreshold)
void setUserName(String userName)
void setPassword(String password)
static CaseDbConnectionInfo getDatabaseConnectionInfo()
synchronized static Logger getLogger(String name)
static synchronized void setConfigSettings(String moduleName, Map< String, String > settings)
static synchronized Map< String, String > getConfigSettings(String moduleName)
static String convertHexTextToText(String property)
static String convertTextToHexText(String property)