19package org.sleuthkit.autopsy.centralrepository.eventlisteners;
21import java.lang.reflect.InvocationTargetException;
23import java.util.logging.Level;
24import javax.swing.JOptionPane;
25import javax.swing.SwingUtilities;
26import org.openide.util.NbBundle;
27import org.sleuthkit.autopsy.centralrepository.CentralRepoSettings;
28import org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbChoice;
29import org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbManager;
30import org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoException;
31import org.sleuthkit.autopsy.core.RuntimeProperties;
32import org.sleuthkit.autopsy.core.UserPreferences;
33import org.sleuthkit.autopsy.coreutils.Logger;
34import org.sleuthkit.autopsy.coreutils.ModuleSettings;
60 String initializedStr = centralRepoSettings.get(
"initialized");
63 boolean initialized = Boolean.parseBoolean(initializedStr);
67 boolean prevRepo = Boolean.parseBoolean(centralRepoSettings.get(
"db.useCentralRepo"));
88 logger.log(Level.SEVERE,
"There was an error while initializing the central repository database", ex);
103 @NbBundle.Messages({
"Installer.centralRepoUpgradeFailed.title=Central repository disabled"})
107 SwingUtilities.invokeAndWait(() -> {
108 JOptionPane.showMessageDialog(
null,
110 NbBundle.getMessage(
this.getClass(),
"Installer.centralRepoUpgradeFailed.title"),
111 JOptionPane.ERROR_MESSAGE);
113 }
catch (InterruptedException | InvocationTargetException e) {
114 logger.log(Level.WARNING, e.getMessage(), e);
static CentralRepoSettings getInstance()
String getModuleSettingsKey()
void setupPostgresDb(CentralRepoDbChoice choice)
void setupDefaultSqliteDb()
void doMessageBoxIfRunningInGUI(CentralRepoException ex)
static final Logger logger
static final CRDefaultSetupAction INSTANCE
static CRDefaultSetupAction getInstance()
boolean setupDefaultCentralRepository()
static boolean runningWithGUI
static boolean getIsMultiUserModeEnabled()
synchronized static Logger getLogger(String name)
static synchronized void setConfigSetting(String moduleName, String settingName, String settingVal)
static synchronized Map< String, String > getConfigSettings(String moduleName)