Updated documentation; moved updateConfig() to 'core' Installer.

This commit is contained in:
U-BASIS\dgrove 2017-10-31 17:14:33 -04:00
parent dd7c6d9c03
commit ae4f07c164
4 changed files with 25 additions and 27 deletions

View File

@ -71,7 +71,7 @@ public class CueBannerPanel extends javax.swing.JPanel {
ImageIcon icon = new ImageIcon(cl.getResource(welcomeLogo));
autopsyLogo.setIcon(icon);
}
customizeComponents();
initRecentCasesWindow();
enableComponents();
}

View File

@ -29,10 +29,9 @@ import java.util.Date;
import java.util.Objects;
import java.util.logging.Level;
import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.autopsy.coreutils.TimeStampUtils;
/**
* A representation of a case created by automated ingest.
* A representation of a multi-user case.
*/
class MultiUserCase implements Comparable<MultiUserCase> {
@ -44,7 +43,7 @@ class MultiUserCase implements Comparable<MultiUserCase> {
private final Date lastAccessedDate;
/**
* Constructs a representation of case created by automated ingest.
* Constructs a representation of a multi-user case
*
* @param caseDirectoryPath The case directory path.
*
@ -219,7 +218,7 @@ class MultiUserCase implements Comparable<MultiUserCase> {
}
/**
* Compares this AutopIngestCase object with abnother MultiUserCase object
* Compares this MultiUserCase object with another MultiUserCase object
* for order.
*/
@Override
@ -237,7 +236,7 @@ class MultiUserCase implements Comparable<MultiUserCase> {
* date (descending).
*
* @param object The first MultiUserCase object
* @param otherObject The second AuotIngestCase object.
* @param otherObject The second MultiUserCase object.
*
* @return A negative integer, zero, or a positive integer as the first
* argument is less than, equal to, or greater than the second.

View File

@ -29,15 +29,15 @@ import java.util.logging.Handler;
import java.util.logging.Level;
import javafx.application.Platform;
import javafx.embed.swing.JFXPanel;
import javax.swing.SwingWorker;
import org.openide.LifecycleManager;
import org.openide.modules.ModuleInstall;
import org.openide.util.NbBundle;
import org.openide.windows.WindowManager;
import org.sleuthkit.autopsy.actions.IngestRunningCheck;
import org.sleuthkit.autopsy.casemodule.Case;
import static org.sleuthkit.autopsy.core.UserPreferences.SETTINGS_PROPERTIES;
import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
import org.sleuthkit.autopsy.coreutils.ModuleSettings;
import org.sleuthkit.autopsy.coreutils.PlatformUtil;
/**
@ -206,6 +206,9 @@ public class Installer extends ModuleInstall {
// Prevent the Autopsy UI from shrinking on high DPI displays
System.setProperty("sun.java2d.dpiaware", "false");
System.setProperty("prism.allowhidpi", "false");
// Update existing configuration in case of unsupported settings
updateConfig();
packageInstallers = new ArrayList<>();
packageInstallers.add(org.sleuthkit.autopsy.coreutils.Installer.getDefault());
@ -214,6 +217,21 @@ public class Installer extends ModuleInstall {
packageInstallers.add(org.sleuthkit.autopsy.ingest.Installer.getDefault());
packageInstallers.add(org.sleuthkit.autopsy.centralrepository.eventlisteners.Installer.getDefault());
}
/**
* If the mode in the configuration file is 'REVIEW' (2, now invalid), this
* method will set it to 'STANDALONE' (0) and disable auto ingest.
*/
private void updateConfig() {
String mode = ModuleSettings.getConfigSetting(SETTINGS_PROPERTIES, "AutopsyMode");
if(mode != null) {
int ordinal = Integer.parseInt(mode);
if(ordinal > 1) {
UserPreferences.setMode(UserPreferences.SelectedMode.STANDALONE);
ModuleSettings.setConfigSetting(UserPreferences.SETTINGS_PROPERTIES, "JoinAutoModeCluster", Boolean.toString(false));
}
}
}
/**
* Check if JavaFx initialized

View File

@ -30,10 +30,7 @@ import org.netbeans.swing.tabcontrol.plaf.DefaultTabbedContainerUI;
import org.openide.modules.ModuleInstall;
import org.openide.windows.WindowManager;
import org.sleuthkit.autopsy.casemodule.StartupWindowProvider;
import org.sleuthkit.autopsy.core.UserPreferences;
import static org.sleuthkit.autopsy.core.UserPreferences.SETTINGS_PROPERTIES;
import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.autopsy.coreutils.ModuleSettings;
/**
* Manages this module's life cycle. Opens the startup dialog during startup.
@ -62,7 +59,6 @@ public class Installer extends ModuleInstall {
UIManager.put("ViewTabDisplayerUI", "org.sleuthkit.autopsy.corecomponents.NoTabsTabDisplayerUI");
UIManager.put(DefaultTabbedContainerUI.KEY_VIEW_CONTENT_BORDER, BorderFactory.createEmptyBorder());
UIManager.put("TabbedPane.contentBorderInsets", new Insets(0, 0, 0, 0));
updateConfig();
WindowManager.getDefault().invokeWhenUIReady(() -> {
StartupWindowProvider.getInstance().open();
});
@ -72,21 +68,6 @@ public class Installer extends ModuleInstall {
public void uninstalled() {
super.uninstalled();
}
/**
* If the mode in the configuration file is 'REVIEW' (2, now invalid), this
* method will set it to 'STANDALONE' (0) and disable auto ingest.
*/
private void updateConfig() {
String mode = ModuleSettings.getConfigSetting(SETTINGS_PROPERTIES, "AutopsyMode");
if(mode != null) {
int ordinal = Integer.parseInt(mode);
if(ordinal > 1) {
UserPreferences.setMode(UserPreferences.SelectedMode.STANDALONE);
ModuleSettings.setConfigSetting(UserPreferences.SETTINGS_PROPERTIES, "JoinAutoModeCluster", Boolean.toString(false));
}
}
}
private void setLookAndFeel() {
if (System.getProperty("os.name").toLowerCase().contains("mac")) { //NON-NLS