mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
Merge remote-tracking branch 'upstream/develop' into cvt-graph-view
# Conflicts: # Core/nbproject/project.xml # Core/src/org/sleuthkit/autopsy/communications/AccountsRootChildren.java # Core/src/org/sleuthkit/autopsy/communications/CVTTopComponent.form # Core/src/org/sleuthkit/autopsy/communications/CVTTopComponent.java # Core/src/org/sleuthkit/autopsy/communications/FiltersPanel.java # build.xml
This commit is contained in:
commit
61e1cf0d26
@ -30,7 +30,10 @@
|
||||
<copy todir="${basedir}/release/photorec_exec" >
|
||||
<fileset dir="${thirdparty.dir}/photorec_exec"/>
|
||||
</copy>
|
||||
|
||||
<!--Copy ewfexport to release-->
|
||||
<copy todir="${basedir}/release/ewfexport_exec" >
|
||||
<fileset dir="${thirdparty.dir}/ewfexport_exec"/>
|
||||
</copy>
|
||||
<!--Copy other jars-->
|
||||
<copy file="${thirdparty.dir}/rejistry/Rejistry-1.0-SNAPSHOT.jar" todir="${ext.dir}" />
|
||||
<copy file="${thirdparty.dir}/sevenzip/sevenzipjbinding.jar" todir="${ext.dir}" />
|
||||
|
@ -30,5 +30,7 @@
|
||||
<dependency conf="core->default" org="org.apache.commons" name="commons-dbcp2" rev="2.1.1"/>
|
||||
<dependency conf="core->default" org="org.apache.commons" name="commons-pool2" rev="2.4.2"/>
|
||||
<dependency conf="core->default" org="org.jsoup" name="jsoup" rev="1.10.3"/>
|
||||
<dependency conf="core->default" org="com.googlecode.plist" name="dd-plist" rev="1.20"/>
|
||||
|
||||
</dependencies>
|
||||
</ivy-module>
|
||||
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
||||
OpenIDE-Module: org.sleuthkit.autopsy.core/10
|
||||
OpenIDE-Module-Localizing-Bundle: org/sleuthkit/autopsy/core/Bundle.properties
|
||||
OpenIDE-Module-Layer: org/sleuthkit/autopsy/core/layer.xml
|
||||
OpenIDE-Module-Implementation-Version: 21
|
||||
OpenIDE-Module-Implementation-Version: 22
|
||||
OpenIDE-Module-Requires: org.openide.windows.WindowManager
|
||||
AutoUpdate-Show-In-Client: true
|
||||
AutoUpdate-Essential-Module: true
|
||||
|
@ -3,6 +3,7 @@ file.reference.c3p0-0.9.5.jar=release/modules/ext/c3p0-0.9.5.jar
|
||||
file.reference.commons-compress-1.14.jar=release/modules/ext/commons-compress-1.14.jar
|
||||
file.reference.commons-dbcp2-2.1.1.jar=release\\modules\\ext\\commons-dbcp2-2.1.1.jar
|
||||
file.reference.commons-pool2-2.4.2.jar=release\\modules\\ext\\commons-pool2-2.4.2.jar
|
||||
file.reference.dd-plist-1.20.jar=release\\modules\\ext\\dd-plist-1.20.jar
|
||||
file.reference.jdom-2.0.5-contrib.jar=release/modules/ext/jdom-2.0.5-contrib.jar
|
||||
file.reference.jdom-2.0.5.jar=release/modules/ext/jdom-2.0.5.jar
|
||||
file.reference.jgraphx-v3.8.0.jar=release/modules/ext/jgraphx-v3.8.0.jar
|
||||
@ -33,5 +34,5 @@ nbm.homepage=http://www.sleuthkit.org/
|
||||
nbm.module.author=Brian Carrier
|
||||
nbm.needs.restart=true
|
||||
source.reference.curator-recipes-2.8.0.jar=release/modules/ext/curator-recipes-2.8.0-sources.jar
|
||||
spec.version.base=10.9
|
||||
spec.version.base=10.10
|
||||
|
||||
|
@ -6,6 +6,15 @@
|
||||
<code-name-base>org.sleuthkit.autopsy.core</code-name-base>
|
||||
<suite-component/>
|
||||
<module-dependencies>
|
||||
<dependency>
|
||||
<code-name-base>org.jdesktop.beansbinding</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<release-version>1</release-version>
|
||||
<specification-version>1.27.1.121</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.jdesktop.layout</code-name-base>
|
||||
<build-prerequisite/>
|
||||
@ -421,6 +430,10 @@
|
||||
<runtime-relative-path>ext/Rejistry-1.0-SNAPSHOT.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/Rejistry-1.0-SNAPSHOT.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/dd-plist-1.20.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/dd-plist-1.20.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/sevenzipjbinding-AllPlatforms.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/sevenzipjbinding-AllPlatforms.jar</binary-origin>
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2011-2017 Basis Technology Corp.
|
||||
* Copyright 2011-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -25,7 +25,9 @@ import javax.swing.JOptionPane;
|
||||
import javax.swing.SwingUtilities;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.openide.util.Utilities;
|
||||
import org.openide.windows.WindowManager;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.datamodel.BlackboardArtifact;
|
||||
import org.sleuthkit.datamodel.TagName;
|
||||
@ -82,11 +84,11 @@ public class AddBlackboardArtifactTagAction extends AddTagAction {
|
||||
new Thread(() -> {
|
||||
for (BlackboardArtifact artifact : selectedArtifacts) {
|
||||
try {
|
||||
Case.getCurrentCase().getServices().getTagsManager().addBlackboardArtifactTag(artifact, tagName, comment);
|
||||
} catch (TskCoreException ex) {
|
||||
Case.getOpenCase().getServices().getTagsManager().addBlackboardArtifactTag(artifact, tagName, comment);
|
||||
} catch (TskCoreException | NoCurrentCaseException ex) {
|
||||
Logger.getLogger(AddBlackboardArtifactTagAction.class.getName()).log(Level.SEVERE, "Error tagging result", ex); //NON-NLS
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
JOptionPane.showMessageDialog(null,
|
||||
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(),
|
||||
NbBundle.getMessage(this.getClass(),
|
||||
"AddBlackboardArtifactTagAction.unableToTag.msg",
|
||||
artifact.getDisplayName()),
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2011-2017 Basis Technology Corp.
|
||||
* Copyright 2011-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -30,6 +30,7 @@ import javax.swing.KeyStroke;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.openide.util.Utilities;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.datamodel.BlackboardArtifact;
|
||||
import org.sleuthkit.datamodel.TagName;
|
||||
@ -44,7 +45,7 @@ public class AddBookmarkTagAction extends AbstractAction {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
try {
|
||||
Map<String, TagName> tagNamesMap = Case.getCurrentCase().getServices().getTagsManager().getDisplayNamesToTagNamesMap();
|
||||
Map<String, TagName> tagNamesMap = Case.getOpenCase().getServices().getTagsManager().getDisplayNamesToTagNamesMap();
|
||||
TagName bookmarkTagName = tagNamesMap.get(BOOKMARK);
|
||||
|
||||
/*
|
||||
@ -60,7 +61,7 @@ public class AddBookmarkTagAction extends AbstractAction {
|
||||
AddContentTagAction.getInstance().addTag(bookmarkTagName, NO_COMMENT);
|
||||
}
|
||||
|
||||
} catch (TskCoreException ex) {
|
||||
} catch (TskCoreException | NoCurrentCaseException ex) {
|
||||
Logger.getLogger(AddBookmarkTagAction.class.getName()).log(Level.SEVERE, "Failed to get tag names", ex); //NON-NLS
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2011-2017 Basis Technology Corp.
|
||||
* Copyright 2011-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -25,7 +25,9 @@ import javax.swing.JOptionPane;
|
||||
import javax.swing.SwingUtilities;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.openide.util.Utilities;
|
||||
import org.openide.windows.WindowManager;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.datamodel.AbstractFile;
|
||||
import org.sleuthkit.datamodel.Content;
|
||||
@ -94,7 +96,7 @@ public class AddContentTagAction extends AddTagAction {
|
||||
file = (AbstractFile) parentFile;
|
||||
} else {
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
JOptionPane.showMessageDialog(null,
|
||||
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(),
|
||||
NbBundle.getMessage(this.getClass(),
|
||||
"AddContentTagAction.unableToTag.msg",
|
||||
parentFile.getName()),
|
||||
@ -113,7 +115,7 @@ public class AddContentTagAction extends AddTagAction {
|
||||
} else {
|
||||
final Content parentFileCopy = parentFile;
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
JOptionPane.showMessageDialog(null,
|
||||
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(),
|
||||
NbBundle.getMessage(this.getClass(),
|
||||
"AddContentTagAction.unableToTag.msg",
|
||||
parentFileCopy.getName()),
|
||||
@ -126,7 +128,7 @@ public class AddContentTagAction extends AddTagAction {
|
||||
} else {
|
||||
final Content parentFileCopy = parentFile;
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
JOptionPane.showMessageDialog(null,
|
||||
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(),
|
||||
NbBundle.getMessage(this.getClass(),
|
||||
"AddContentTagAction.unableToTag.msg",
|
||||
parentFileCopy.getName()),
|
||||
@ -138,12 +140,12 @@ public class AddContentTagAction extends AddTagAction {
|
||||
}
|
||||
}
|
||||
|
||||
Case.getCurrentCase().getServices().getTagsManager().addContentTag(file, tagName, comment);
|
||||
} catch (TskCoreException ex) {
|
||||
Case.getOpenCase().getServices().getTagsManager().addContentTag(file, tagName, comment);
|
||||
} catch (TskCoreException | NoCurrentCaseException ex) {
|
||||
Logger.getLogger(AddContentTagAction.class.getName()).log(Level.SEVERE, "Error tagging result", ex); //NON-NLS
|
||||
AbstractFile fileCopy = file;
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
JOptionPane.showMessageDialog(null,
|
||||
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(),
|
||||
NbBundle.getMessage(this.getClass(),
|
||||
"AddContentTagAction.unableToTag.msg2",
|
||||
fileCopy.getName()),
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2011-2017 Basis Technology Corp.
|
||||
* Copyright 2011-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -26,9 +26,9 @@ import javax.swing.AbstractAction;
|
||||
import javax.swing.JMenu;
|
||||
import javax.swing.JMenuItem;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.openide.util.NbBundle.Messages;
|
||||
import org.openide.util.actions.Presenter;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.autopsy.casemodule.services.TagsManager;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.datamodel.TagName;
|
||||
@ -91,11 +91,11 @@ abstract class AddTagAction extends AbstractAction implements Presenter.Popup {
|
||||
super(getActionDisplayName());
|
||||
|
||||
// Get the current set of tag names.
|
||||
TagsManager tagsManager = Case.getCurrentCase().getServices().getTagsManager();
|
||||
Map<String, TagName> tagNamesMap = null;
|
||||
try {
|
||||
TagsManager tagsManager = Case.getOpenCase().getServices().getTagsManager();
|
||||
tagNamesMap = new TreeMap<>(tagsManager.getDisplayNamesToTagNamesMap());
|
||||
} catch (TskCoreException ex) {
|
||||
} catch (TskCoreException | NoCurrentCaseException ex) {
|
||||
Logger.getLogger(TagsManager.class.getName()).log(Level.SEVERE, "Failed to get tag names", ex); //NON-NLS
|
||||
}
|
||||
|
||||
@ -168,18 +168,26 @@ abstract class AddTagAction extends AbstractAction implements Presenter.Popup {
|
||||
* @param comment comment for the content or artifact tag
|
||||
*/
|
||||
private void getAndAddTag(String tagDisplayName, TagName tagName, String comment) {
|
||||
Case openCase;
|
||||
try {
|
||||
openCase = Case.getOpenCase();
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
Logger.getLogger(AddTagAction.class.getName()).log(Level.SEVERE, "Exception while getting open case.", ex); // NON-NLS
|
||||
return;
|
||||
}
|
||||
|
||||
if (tagName == null) {
|
||||
try {
|
||||
tagName = Case.getCurrentCase().getServices().getTagsManager().addTagName(tagDisplayName);
|
||||
tagName = openCase.getServices().getTagsManager().addTagName(tagDisplayName);
|
||||
} catch (TagsManager.TagNameAlreadyExistsException ex) {
|
||||
try {
|
||||
tagName = Case.getCurrentCase().getServices().getTagsManager().getDisplayNamesToTagNamesMap().get(tagDisplayName);
|
||||
tagName = openCase.getServices().getTagsManager().getDisplayNamesToTagNamesMap().get(tagDisplayName);
|
||||
} catch (TskCoreException ex1) {
|
||||
Logger.getLogger(AddTagAction.class.getName()).log(Level.SEVERE, tagDisplayName + " already exists in database but an error occurred in retrieving it.", ex1); //NON-NLS
|
||||
}
|
||||
}
|
||||
} catch (TskCoreException ex) {
|
||||
Logger.getLogger(AddTagAction.class.getName()).log(Level.SEVERE, "Error adding " + tagDisplayName + " tag name", ex); //NON-NLS
|
||||
}
|
||||
}
|
||||
}
|
||||
addTag(tagName, comment);
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2013-2017 Basis Technology Corp.
|
||||
* Copyright 2013-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -20,23 +20,17 @@ package org.sleuthkit.autopsy.actions;
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.logging.Level;
|
||||
import javafx.application.Platform;
|
||||
import javafx.scene.control.Alert;
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.swing.SwingUtilities;
|
||||
import javax.swing.SwingWorker;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.openide.util.Utilities;
|
||||
import org.openide.windows.WindowManager;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.casemodule.services.TagsManager;
|
||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.datamodel.AbstractFile;
|
||||
import org.sleuthkit.datamodel.BlackboardArtifactTag;
|
||||
import org.sleuthkit.datamodel.TagName;
|
||||
import org.sleuthkit.datamodel.TskCoreException;
|
||||
|
||||
/**
|
||||
@ -51,7 +45,7 @@ import org.sleuthkit.datamodel.TskCoreException;
|
||||
})
|
||||
public class DeleteBlackboardArtifactTagAction extends AbstractAction {
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(DeleteBlackboardArtifactTagAction.class.getName());
|
||||
private static final Logger logger = Logger.getLogger(DeleteBlackboardArtifactTagAction.class.getName());
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final String MENU_TEXT = NbBundle.getMessage(DeleteBlackboardArtifactTagAction.class,
|
||||
@ -79,11 +73,11 @@ public class DeleteBlackboardArtifactTagAction extends AbstractAction {
|
||||
new Thread(() -> {
|
||||
for (BlackboardArtifactTag tag : selectedTags) {
|
||||
try {
|
||||
Case.getCurrentCase().getServices().getTagsManager().deleteBlackboardArtifactTag(tag);
|
||||
} catch (TskCoreException ex) {
|
||||
Case.getOpenCase().getServices().getTagsManager().deleteBlackboardArtifactTag(tag);
|
||||
} catch (TskCoreException | NoCurrentCaseException ex) {
|
||||
Logger.getLogger(DeleteBlackboardArtifactTagAction.class.getName()).log(Level.SEVERE, "Error deleting tag", ex); //NON-NLS
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
JOptionPane.showMessageDialog(null,
|
||||
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(),
|
||||
NbBundle.getMessage(this.getClass(),
|
||||
"DeleteBlackboardArtifactTagAction.unableToDelTag.msg",
|
||||
tag.getName()),
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2013-2017 Basis Technology Corp.
|
||||
* Copyright 2013-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -20,23 +20,17 @@ package org.sleuthkit.autopsy.actions;
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.logging.Level;
|
||||
import javafx.application.Platform;
|
||||
import javafx.scene.control.Alert;
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.swing.SwingUtilities;
|
||||
import javax.swing.SwingWorker;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.openide.util.Utilities;
|
||||
import org.openide.windows.WindowManager;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.casemodule.services.TagsManager;
|
||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.datamodel.AbstractFile;
|
||||
import org.sleuthkit.datamodel.ContentTag;
|
||||
import org.sleuthkit.datamodel.TagName;
|
||||
import org.sleuthkit.datamodel.TskCoreException;
|
||||
|
||||
/**
|
||||
@ -50,7 +44,7 @@ import org.sleuthkit.datamodel.TskCoreException;
|
||||
})
|
||||
public class DeleteContentTagAction extends AbstractAction {
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(DeleteContentTagAction.class.getName());
|
||||
private static final Logger logger = Logger.getLogger(DeleteContentTagAction.class.getName());
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final String MENU_TEXT = NbBundle.getMessage(DeleteContentTagAction.class,
|
||||
@ -78,11 +72,11 @@ public class DeleteContentTagAction extends AbstractAction {
|
||||
new Thread(() -> {
|
||||
for (ContentTag tag : selectedTags) {
|
||||
try {
|
||||
Case.getCurrentCase().getServices().getTagsManager().deleteContentTag(tag);
|
||||
} catch (TskCoreException ex) {
|
||||
Case.getOpenCase().getServices().getTagsManager().deleteContentTag(tag);
|
||||
} catch (TskCoreException | NoCurrentCaseException ex) {
|
||||
Logger.getLogger(DeleteContentTagAction.class.getName()).log(Level.SEVERE, "Error deleting tag", ex); //NON-NLS
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
JOptionPane.showMessageDialog(null,
|
||||
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(),
|
||||
NbBundle.getMessage(this.getClass(),
|
||||
"DeleteContentTagAction.unableToDelTag.msg",
|
||||
tag.getName()),
|
||||
|
@ -36,6 +36,7 @@ import org.openide.util.NbBundle;
|
||||
import org.openide.util.Utilities;
|
||||
import org.openide.util.actions.Presenter;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.autopsy.casemodule.services.TagsManager;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.datamodel.BlackboardArtifact;
|
||||
@ -95,7 +96,16 @@ public class DeleteFileBlackboardArtifactTagAction extends AbstractAction implem
|
||||
|
||||
@Override
|
||||
protected Void doInBackground() throws Exception {
|
||||
TagsManager tagsManager = Case.getCurrentCase().getServices().getTagsManager();
|
||||
TagsManager tagsManager;
|
||||
try {
|
||||
tagsManager = Case.getOpenCase().getServices().getTagsManager();
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
logger.log(Level.SEVERE, "Error untagging artifact. No open case found.", ex); //NON-NLS
|
||||
Platform.runLater(()
|
||||
-> new Alert(Alert.AlertType.ERROR, Bundle.DeleteFileBlackboardArtifactTagAction_deleteTag_alert(artifactId)).show()
|
||||
);
|
||||
return null;
|
||||
}
|
||||
|
||||
try {
|
||||
logger.log(Level.INFO, "Removing tag {0} from {1}", new Object[]{tagName.getDisplayName(), artifactTag.getContent().getName()}); //NON-NLS
|
||||
@ -142,13 +152,13 @@ public class DeleteFileBlackboardArtifactTagAction extends AbstractAction implem
|
||||
BlackboardArtifact artifact
|
||||
= selectedBlackboardArtifactsList.iterator().next();
|
||||
|
||||
// Get the current set of tag names.
|
||||
TagsManager tagsManager = Case.getCurrentCase().getServices().getTagsManager();
|
||||
|
||||
Map<String, TagName> tagNamesMap = null;
|
||||
try {
|
||||
// Get the current set of tag names.
|
||||
TagsManager tagsManager = Case.getOpenCase().getServices().getTagsManager();
|
||||
|
||||
tagNamesMap = new TreeMap<>(tagsManager.getDisplayNamesToTagNamesMap());
|
||||
} catch (TskCoreException ex) {
|
||||
} catch (TskCoreException | NoCurrentCaseException ex) {
|
||||
Logger.getLogger(TagsManager.class.getName()).log(Level.SEVERE, "Failed to get tag names", ex); //NON-NLS
|
||||
}
|
||||
|
||||
@ -158,7 +168,7 @@ public class DeleteFileBlackboardArtifactTagAction extends AbstractAction implem
|
||||
if (null != tagNamesMap && !tagNamesMap.isEmpty()) {
|
||||
try {
|
||||
List<BlackboardArtifactTag> existingTagsList
|
||||
= Case.getCurrentCase().getServices().getTagsManager()
|
||||
= Case.getOpenCase().getServices().getTagsManager()
|
||||
.getBlackboardArtifactTagsByArtifact(artifact);
|
||||
|
||||
for (Map.Entry<String, TagName> entry : tagNamesMap.entrySet()) {
|
||||
@ -176,7 +186,7 @@ public class DeleteFileBlackboardArtifactTagAction extends AbstractAction implem
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (TskCoreException ex) {
|
||||
} catch (TskCoreException | NoCurrentCaseException ex) {
|
||||
Logger.getLogger(TagMenu.class.getName())
|
||||
.log(Level.SEVERE, "Error retrieving tags for TagMenu", ex); //NON-NLS
|
||||
}
|
||||
|
@ -36,6 +36,7 @@ import org.openide.util.NbBundle;
|
||||
import org.openide.util.Utilities;
|
||||
import org.openide.util.actions.Presenter;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.autopsy.casemodule.services.TagsManager;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.datamodel.AbstractFile;
|
||||
@ -95,7 +96,16 @@ public class DeleteFileContentTagAction extends AbstractAction implements Presen
|
||||
|
||||
@Override
|
||||
protected Void doInBackground() throws Exception {
|
||||
TagsManager tagsManager = Case.getCurrentCase().getServices().getTagsManager();
|
||||
TagsManager tagsManager;
|
||||
try {
|
||||
tagsManager = Case.getOpenCase().getServices().getTagsManager();
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
logger.log(Level.SEVERE, "Error untagging file. No open case found.", ex); //NON-NLS
|
||||
Platform.runLater(() ->
|
||||
new Alert(Alert.AlertType.ERROR, Bundle.DeleteFileContentTagAction_deleteTag_alert(fileId)).show()
|
||||
);
|
||||
return null;
|
||||
}
|
||||
|
||||
try {
|
||||
logger.log(Level.INFO, "Removing tag {0} from {1}", new Object[]{tagName.getDisplayName(), contentTag.getContent().getName()}); //NON-NLS
|
||||
@ -139,13 +149,13 @@ public class DeleteFileContentTagAction extends AbstractAction implements Presen
|
||||
if(!selectedAbstractFilesList.isEmpty()) {
|
||||
AbstractFile file = selectedAbstractFilesList.iterator().next();
|
||||
|
||||
// Get the current set of tag names.
|
||||
TagsManager tagsManager = Case.getCurrentCase().getServices().getTagsManager();
|
||||
|
||||
Map<String, TagName> tagNamesMap = null;
|
||||
try {
|
||||
// Get the current set of tag names.
|
||||
TagsManager tagsManager = Case.getOpenCase().getServices().getTagsManager();
|
||||
|
||||
tagNamesMap = new TreeMap<>(tagsManager.getDisplayNamesToTagNamesMap());
|
||||
} catch (TskCoreException ex) {
|
||||
} catch (TskCoreException | NoCurrentCaseException ex) {
|
||||
Logger.getLogger(TagsManager.class.getName()).log(Level.SEVERE, "Failed to get tag names", ex); //NON-NLS
|
||||
}
|
||||
|
||||
@ -155,7 +165,7 @@ public class DeleteFileContentTagAction extends AbstractAction implements Presen
|
||||
if (null != tagNamesMap && !tagNamesMap.isEmpty()) {
|
||||
try {
|
||||
List<ContentTag> existingTagsList =
|
||||
Case.getCurrentCase().getServices().getTagsManager()
|
||||
Case.getOpenCase().getServices().getTagsManager()
|
||||
.getContentTagsByContent(file);
|
||||
|
||||
for (Map.Entry<String, TagName> entry : tagNamesMap.entrySet()) {
|
||||
@ -173,7 +183,7 @@ public class DeleteFileContentTagAction extends AbstractAction implements Presen
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (TskCoreException ex) {
|
||||
} catch (TskCoreException | NoCurrentCaseException ex) {
|
||||
Logger.getLogger(TagMenu.class.getName())
|
||||
.log(Level.SEVERE, "Error retrieving tags for TagMenu", ex); //NON-NLS
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2011-2017 Basis Technology Corp.
|
||||
* Copyright 2011-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -36,6 +36,7 @@ import javax.swing.KeyStroke;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.openide.windows.WindowManager;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.autopsy.casemodule.services.TagsManager;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.datamodel.TagName;
|
||||
@ -137,11 +138,11 @@ public class GetTagNameAndCommentDialog extends JDialog {
|
||||
// tag name DTOs to be enable to return the one the user selects.
|
||||
// Tag name DTOs may be null (user tag names that have not been used do
|
||||
// not exist in the database).
|
||||
TagsManager tagsManager = Case.getCurrentCase().getServices().getTagsManager();
|
||||
try {
|
||||
TagsManager tagsManager = Case.getOpenCase().getServices().getTagsManager();
|
||||
tagNamesSet.addAll(tagsManager.getAllTagNames());
|
||||
|
||||
} catch (TskCoreException ex) {
|
||||
} catch (TskCoreException | NoCurrentCaseException ex) {
|
||||
Logger.getLogger(GetTagNameAndCommentDialog.class
|
||||
.getName()).log(Level.SEVERE, "Failed to get tag names", ex); //NON-NLS
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2011-2016 Basis Technology Corp.
|
||||
* Copyright 2011-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -39,6 +39,7 @@ import org.openide.util.NbBundle;
|
||||
import org.openide.util.NbBundle.Messages;
|
||||
import org.openide.windows.WindowManager;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.autopsy.casemodule.services.TagsManager;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.datamodel.TagName;
|
||||
@ -108,10 +109,10 @@ public class GetTagNameDialog extends JDialog {
|
||||
|
||||
// Get the current set of tag names and hash them for a speedy lookup in
|
||||
// case the user chooses an existing tag name from the tag names table.
|
||||
TagsManager tagsManager = Case.getCurrentCase().getServices().getTagsManager();
|
||||
try {
|
||||
TagsManager tagsManager = Case.getOpenCase().getServices().getTagsManager();
|
||||
tagNamesMap.putAll(tagsManager.getDisplayNamesToTagNamesMap());
|
||||
} catch (TskCoreException ex) {
|
||||
} catch (TskCoreException | NoCurrentCaseException ex) {
|
||||
Logger.getLogger(GetTagNameDialog.class.getName()).log(Level.SEVERE, "Failed to get tag names", ex); //NON-NLS
|
||||
}
|
||||
|
||||
@ -326,19 +327,19 @@ public class GetTagNameDialog extends JDialog {
|
||||
String userTagDescription = descriptionTextArea.getText();
|
||||
TskData.FileKnown status = notableCheckbox.isSelected() ? TskData.FileKnown.BAD : TskData.FileKnown.UNKNOWN;
|
||||
if (tagDisplayName.isEmpty()) {
|
||||
JOptionPane.showMessageDialog(null,
|
||||
JOptionPane.showMessageDialog(this,
|
||||
NbBundle.getMessage(this.getClass(),
|
||||
"GetTagNameDialog.mustSupplyTtagName.msg"),
|
||||
NbBundle.getMessage(this.getClass(), "GetTagNameDialog.tagNameErr"),
|
||||
JOptionPane.ERROR_MESSAGE);
|
||||
} else if (TagsManager.containsIllegalCharacters(tagDisplayName)) {
|
||||
JOptionPane.showMessageDialog(null,
|
||||
JOptionPane.showMessageDialog(this,
|
||||
NbBundle.getMessage(this.getClass(), "GetTagNameDialog.illegalChars.msg"),
|
||||
NbBundle.getMessage(this.getClass(), "GetTagNameDialog.illegalCharsErr"),
|
||||
JOptionPane.ERROR_MESSAGE);
|
||||
} else if (userTagDescription.contains(",")
|
||||
|| userTagDescription.contains(";")) {
|
||||
JOptionPane.showMessageDialog(null,
|
||||
JOptionPane.showMessageDialog(this,
|
||||
NbBundle.getMessage(this.getClass(), "GetTagNameDialog.tagDescriptionIllegalCharacters.message"),
|
||||
NbBundle.getMessage(this.getClass(), "GetTagNameDialog.tagDescriptionIllegalCharacters.title"),
|
||||
JOptionPane.ERROR_MESSAGE);
|
||||
@ -347,11 +348,11 @@ public class GetTagNameDialog extends JDialog {
|
||||
|
||||
if (tagName == null) {
|
||||
try {
|
||||
tagName = Case.getCurrentCase().getServices().getTagsManager().addTagName(tagDisplayName, userTagDescription, TagName.HTML_COLOR.NONE, status);
|
||||
tagName = Case.getOpenCase().getServices().getTagsManager().addTagName(tagDisplayName, userTagDescription, TagName.HTML_COLOR.NONE, status);
|
||||
dispose();
|
||||
} catch (TskCoreException ex) {
|
||||
} catch (TskCoreException | NoCurrentCaseException ex) {
|
||||
Logger.getLogger(AddTagAction.class.getName()).log(Level.SEVERE, "Error adding " + tagDisplayName + " tag name", ex); //NON-NLS
|
||||
JOptionPane.showMessageDialog(null,
|
||||
JOptionPane.showMessageDialog(this,
|
||||
NbBundle.getMessage(this.getClass(),
|
||||
"GetTagNameDialog.unableToAddTagNameToCase.msg",
|
||||
tagDisplayName),
|
||||
@ -360,10 +361,10 @@ public class GetTagNameDialog extends JDialog {
|
||||
tagName = null;
|
||||
} catch (TagsManager.TagNameAlreadyExistsException ex) {
|
||||
try {
|
||||
tagName = Case.getCurrentCase().getServices().getTagsManager().getDisplayNamesToTagNamesMap().get(tagDisplayName);
|
||||
} catch (TskCoreException ex1) {
|
||||
tagName = Case.getOpenCase().getServices().getTagsManager().getDisplayNamesToTagNamesMap().get(tagDisplayName);
|
||||
} catch (TskCoreException | NoCurrentCaseException ex1) {
|
||||
Logger.getLogger(AddTagAction.class.getName()).log(Level.SEVERE, tagDisplayName + " exists in database but an error occurred in retrieving it.", ex1); //NON-NLS
|
||||
JOptionPane.showMessageDialog(null,
|
||||
JOptionPane.showMessageDialog(this,
|
||||
NbBundle.getMessage(this.getClass(),
|
||||
"GetTagNameDialog.tagNameExistsTskCore.msg",
|
||||
tagDisplayName),
|
||||
@ -373,7 +374,7 @@ public class GetTagNameDialog extends JDialog {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
JOptionPane.showMessageDialog(null,
|
||||
JOptionPane.showMessageDialog(this,
|
||||
NbBundle.getMessage(this.getClass(), "GetTagNameDialog.tagNameAlreadyExists.message"),
|
||||
NbBundle.getMessage(this.getClass(), "GetTagNameDialog.tagNameAlreadyExists.title"),
|
||||
JOptionPane.INFORMATION_MESSAGE);
|
||||
|
@ -32,6 +32,7 @@ import org.openide.awt.ActionRegistration;
|
||||
import org.openide.modules.Places;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
|
||||
/**
|
||||
@ -57,9 +58,9 @@ public final class OpenLogFolderAction implements ActionListener {
|
||||
/*
|
||||
* Open the log directory for the case.
|
||||
*/
|
||||
Case currentCase = Case.getCurrentCase();
|
||||
Case currentCase = Case.getOpenCase();
|
||||
logDir = new File(currentCase.getLogDirectoryPath());
|
||||
} catch (IllegalStateException ex) {
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
/*
|
||||
* There is no open case, open the application level log
|
||||
* directory.
|
||||
|
@ -31,7 +31,9 @@ import org.openide.awt.ActionRegistration;
|
||||
import org.openide.util.HelpCtx;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.openide.util.actions.CallableSystemAction;
|
||||
import org.openide.windows.WindowManager;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
|
||||
/**
|
||||
@ -55,7 +57,7 @@ public final class OpenOutputFolderAction extends CallableSystemAction {
|
||||
public void performAction() {
|
||||
File outputDir;
|
||||
try {
|
||||
Case currentCase = Case.getCurrentCase();
|
||||
Case currentCase = Case.getOpenCase();
|
||||
outputDir = new File(currentCase.getOutputDirectory());
|
||||
if (outputDir.exists()) {
|
||||
try {
|
||||
@ -71,9 +73,9 @@ public final class OpenOutputFolderAction extends CallableSystemAction {
|
||||
NbBundle.getMessage(this.getClass(), "OpenOutputFolder.error1", outputDir.getAbsolutePath()), NotifyDescriptor.ERROR_MESSAGE);
|
||||
DialogDisplayer.getDefault().notify(descriptor);
|
||||
}
|
||||
} catch (IllegalStateException ex) {
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
logger.log(Level.SEVERE, "OpenOutputFolderAction enabled with no current case", ex); //NON-NLS
|
||||
JOptionPane.showMessageDialog(null, NbBundle.getMessage(this.getClass(), "OpenOutputFolder.noCaseOpen"));
|
||||
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(), NbBundle.getMessage(this.getClass(), "OpenOutputFolder.noCaseOpen"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2013-2016 Basis Technology Corp.
|
||||
* Copyright 2013-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -43,6 +43,7 @@ class AddImageTask implements Runnable {
|
||||
private final Logger logger = Logger.getLogger(AddImageTask.class.getName());
|
||||
private final String deviceId;
|
||||
private final String imagePath;
|
||||
private final int sectorSize;
|
||||
private final String timeZone;
|
||||
private final ImageWriterSettings imageWriterSettings;
|
||||
private final boolean ignoreFatOrphanFiles;
|
||||
@ -75,6 +76,7 @@ class AddImageTask implements Runnable {
|
||||
* intended to be unique across multiple cases
|
||||
* (e.g., a UUID).
|
||||
* @param imagePath Path to the image file.
|
||||
* @param sectorSize The sector size (use '0' for autodetect).
|
||||
* @param timeZone The time zone to use when processing dates
|
||||
* and times for the image, obtained from
|
||||
* java.util.TimeZone.getID.
|
||||
@ -87,10 +89,11 @@ class AddImageTask implements Runnable {
|
||||
* processing.
|
||||
* @param callback Callback to call when processing is done.
|
||||
*/
|
||||
AddImageTask(String deviceId, String imagePath, String timeZone, boolean ignoreFatOrphanFiles, ImageWriterSettings imageWriterSettings,
|
||||
AddImageTask(String deviceId, String imagePath, int sectorSize, String timeZone, boolean ignoreFatOrphanFiles, ImageWriterSettings imageWriterSettings,
|
||||
DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback callback) {
|
||||
this.deviceId = deviceId;
|
||||
this.imagePath = imagePath;
|
||||
this.sectorSize = sectorSize;
|
||||
this.timeZone = timeZone;
|
||||
this.ignoreFatOrphanFiles = ignoreFatOrphanFiles;
|
||||
this.imageWriterSettings = imageWriterSettings;
|
||||
@ -104,9 +107,15 @@ class AddImageTask implements Runnable {
|
||||
*/
|
||||
@Override
|
||||
public void run() {
|
||||
Case currentCase;
|
||||
try {
|
||||
currentCase = Case.getOpenCase();
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
logger.log(Level.SEVERE, "Exception while getting open case.", ex);
|
||||
return;
|
||||
}
|
||||
progressMonitor.setIndeterminate(true);
|
||||
progressMonitor.setProgress(0);
|
||||
Case currentCase = Case.getCurrentCase();
|
||||
String imageWriterPath = "";
|
||||
if (imageWriterSettings != null) {
|
||||
imageWriterPath = imageWriterSettings.getPath();
|
||||
@ -126,9 +135,7 @@ class AddImageTask implements Runnable {
|
||||
Thread progressUpdateThread = new Thread(new ProgressUpdater(progressMonitor, tskAddImageProcess));
|
||||
progressUpdateThread.start();
|
||||
runAddImageProcess(errorMessages);
|
||||
if (null != progressUpdateThread) {
|
||||
progressUpdateThread.interrupt();
|
||||
}
|
||||
progressUpdateThread.interrupt();
|
||||
commitOrRevertAddImageProcess(currentCase, errorMessages, newDataSources);
|
||||
progressMonitor.setProgress(100);
|
||||
} finally {
|
||||
@ -178,7 +185,7 @@ class AddImageTask implements Runnable {
|
||||
*/
|
||||
private void runAddImageProcess(List<String> errorMessages) {
|
||||
try {
|
||||
tskAddImageProcess.run(deviceId, new String[]{imagePath});
|
||||
tskAddImageProcess.run(deviceId, new String[]{imagePath}, sectorSize);
|
||||
} catch (TskCoreException ex) {
|
||||
logger.log(Level.SEVERE, String.format("Critical error occurred adding image %s", imagePath), ex); //NON-NLS
|
||||
criticalErrorOccurred = true;
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2011-2017 Basis Technology Corp.
|
||||
* Copyright 2011-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -29,6 +29,7 @@ import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.logging.Level;
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.swing.SwingUtilities;
|
||||
import javax.swing.event.ChangeEvent;
|
||||
@ -46,6 +47,7 @@ import org.sleuthkit.autopsy.ingest.IngestJobSettings;
|
||||
import org.sleuthkit.autopsy.ingest.IngestManager;
|
||||
import org.sleuthkit.autopsy.ingest.runIngestModuleWizard.ShortcutWizardDescriptorPanel;
|
||||
import org.sleuthkit.datamodel.Content;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
|
||||
/**
|
||||
* The final panel of the add image wizard. It displays a progress bar and
|
||||
@ -300,7 +302,7 @@ class AddImageWizardAddingProgressPanel extends ShortcutWizardDescriptorPanel {
|
||||
for (String warning : warnings) {
|
||||
warningMessage.append(warning).append("\n");
|
||||
}
|
||||
JOptionPane.showMessageDialog(null, warningMessage.toString());
|
||||
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(), warningMessage.toString());
|
||||
}
|
||||
}
|
||||
|
||||
@ -331,7 +333,11 @@ class AddImageWizardAddingProgressPanel extends ShortcutWizardDescriptorPanel {
|
||||
cleanupTask.enable();
|
||||
|
||||
new Thread(() -> {
|
||||
Case.getCurrentCase().notifyAddingDataSource(dataSourceId);
|
||||
try {
|
||||
Case.getOpenCase().notifyAddingDataSource(dataSourceId);
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
Logger.getLogger(AddImageWizardAddingProgressVisual.class.getName()).log(Level.SEVERE, "Exception while getting open case.", ex); //NON-NLS
|
||||
}
|
||||
}).start();
|
||||
DataSourceProcessorCallback cbObj = new DataSourceProcessorCallback() {
|
||||
@Override
|
||||
@ -398,10 +404,14 @@ class AddImageWizardAddingProgressPanel extends ShortcutWizardDescriptorPanel {
|
||||
|
||||
//notify the UI of the new content added to the case
|
||||
new Thread(() -> {
|
||||
if (!contents.isEmpty()) {
|
||||
Case.getCurrentCase().notifyDataSourceAdded(contents.get(0), dataSourceId);
|
||||
} else {
|
||||
Case.getCurrentCase().notifyFailedAddingDataSource(dataSourceId);
|
||||
try {
|
||||
if (!contents.isEmpty()) {
|
||||
Case.getOpenCase().notifyDataSourceAdded(contents.get(0), dataSourceId);
|
||||
} else {
|
||||
Case.getOpenCase().notifyFailedAddingDataSource(dataSourceId);
|
||||
}
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
Logger.getLogger(AddImageWizardAddingProgressVisual.class.getName()).log(Level.SEVERE, "Exception while getting open case.", ex); //NON-NLS
|
||||
}
|
||||
}).start();
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2011-2017 Basis Technology Corp.
|
||||
* Copyright 2011-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -65,6 +65,7 @@ class AddImageWizardDataSourceSettingsPanel extends ShortcutWizardDescriptorPane
|
||||
if (component == null) {
|
||||
WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
|
||||
component = new AddImageWizardDataSourceSettingsVisual(this);
|
||||
component.setLocation(WindowManager.getDefault().getMainWindow().getLocation());
|
||||
}
|
||||
component.addPropertyChangeListener(this);
|
||||
return component;
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2011-2017 Basis Technology Corp.
|
||||
* Copyright 2011-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -27,6 +27,7 @@ import javax.swing.event.ChangeListener;
|
||||
import org.openide.WizardDescriptor;
|
||||
import org.openide.util.HelpCtx;
|
||||
import org.openide.util.NbBundle.Messages;
|
||||
import org.openide.windows.WindowManager;
|
||||
import org.sleuthkit.autopsy.coreutils.ModuleSettings;
|
||||
import org.sleuthkit.autopsy.ingest.IngestJobSettings;
|
||||
import org.sleuthkit.autopsy.ingest.IngestJobSettingsPanel;
|
||||
@ -170,7 +171,7 @@ class AddImageWizardIngestConfigPanel extends ShortcutWizardDescriptorPanel {
|
||||
for (String warning : warnings) {
|
||||
warningMessage.append(warning).append("\n");
|
||||
}
|
||||
JOptionPane.showMessageDialog(null, warningMessage.toString());
|
||||
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(), warningMessage.toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2011-2017 Basis Technology Corp.
|
||||
* Copyright 2011-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -58,10 +58,15 @@ final class AddImageWizardSelectDspVisual extends JPanel {
|
||||
initComponents();
|
||||
selectedDsp = lastDspUsed;
|
||||
//if the last selected DSP was the Local Disk DSP and it would be disabled then we want to select a different DSP
|
||||
if ((Case.getCurrentCase().getCaseType() == Case.CaseType.MULTI_USER_CASE) && selectedDsp.equals(LocalDiskDSProcessor.getType())) {
|
||||
selectedDsp = ImageDSProcessor.getType();
|
||||
try {
|
||||
if ((Case.getOpenCase().getCaseType() == Case.CaseType.MULTI_USER_CASE) && selectedDsp.equals(LocalDiskDSProcessor.getType())) {
|
||||
selectedDsp = ImageDSProcessor.getType();
|
||||
}
|
||||
createDataSourceProcessorButtons();
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
logger.log(Level.SEVERE, "Exception while getting open case.", ex);
|
||||
}
|
||||
createDataSourceProcessorButtons();
|
||||
|
||||
//add actionlistner to listen for change
|
||||
}
|
||||
|
||||
@ -96,7 +101,7 @@ final class AddImageWizardSelectDspVisual extends JPanel {
|
||||
* Create the a button for each DataSourceProcessor that should exist as an
|
||||
* option.
|
||||
*/
|
||||
private void createDataSourceProcessorButtons() {
|
||||
private void createDataSourceProcessorButtons() throws NoCurrentCaseException {
|
||||
//Listener for button selection
|
||||
ActionListener cbActionListener = new ActionListener() {
|
||||
@Override
|
||||
@ -126,7 +131,7 @@ final class AddImageWizardSelectDspVisual extends JPanel {
|
||||
//Add the button
|
||||
JToggleButton dspButton = createDspButton(dspType);
|
||||
dspButton.addActionListener(cbActionListener);
|
||||
if ((Case.getCurrentCase().getCaseType() == Case.CaseType.MULTI_USER_CASE) && dspType.equals(LocalDiskDSProcessor.getType())){
|
||||
if ((Case.getOpenCase().getCaseType() == Case.CaseType.MULTI_USER_CASE) && dspType.equals(LocalDiskDSProcessor.getType())){
|
||||
dspButton.setEnabled(false); //disable the button for local disk DSP when this is a multi user case
|
||||
dspButton.setSelected(false);
|
||||
shouldAddMultiUserWarning = true;
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2013-2016 Basis Technology Corp.
|
||||
* Copyright 2013-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -87,10 +87,10 @@ class AddLocalFilesTask implements Runnable {
|
||||
List<String> errors = new ArrayList<>();
|
||||
try {
|
||||
progress.setIndeterminate(true);
|
||||
FileManager fileManager = Case.getCurrentCase().getServices().getFileManager();
|
||||
FileManager fileManager = Case.getOpenCase().getServices().getFileManager();
|
||||
LocalFilesDataSource newDataSource = fileManager.addLocalFilesDataSource(deviceId, rootVirtualDirectoryName, "", localFilePaths, new ProgressUpdater());
|
||||
newDataSources.add(newDataSource);
|
||||
} catch (TskDataException | TskCoreException ex) {
|
||||
} catch (TskDataException | TskCoreException | NoCurrentCaseException ex) {
|
||||
errors.add(ex.getMessage());
|
||||
LOGGER.log(Level.SEVERE, String.format("Failed to add datasource: %s", ex.getMessage()), ex);
|
||||
} finally {
|
||||
|
@ -32,16 +32,6 @@ MissingImageDialog.selectButton.text=Select Image
|
||||
MissingImageDialog.titleLabel.text=Search for missing image
|
||||
MissingImageDialog.cancelButton.text=Cancel
|
||||
LocalDiskPanel.errorLabel.text=Error Label
|
||||
LocalFilesPanel.infoLabel.text=Add local files and folders:
|
||||
LocalFilesPanel.selectButton.text=Add
|
||||
LocalFilesPanel.localFileChooser.dialogTitle=Select Local Files or Folders
|
||||
LocalFilesPanel.selectButton.toolTipText=Add local files and folders as logical files
|
||||
LocalFilesPanel.clearButton.text=Clear
|
||||
LocalFilesPanel.clearButton.toolTipText=Clears currently selected local file paths
|
||||
LocalFilesPanel.selectedPaths.toolTipText=
|
||||
LocalFilesPanel.localFileChooser.approveButtonText=Select
|
||||
LocalFilesPanel.localFileChooser.approveButtonToolTipText=
|
||||
LocalFilesPanel.selectButton.actionCommand=Add
|
||||
AddImageWizardAddingProgressVisual.statusLabel.text=Data source has been added to the local database. Files are being analyzed.
|
||||
AddImageWizardAddingProgressVisual.progressLabel.text=<progress>
|
||||
AddImageWizardAddingProgressVisual.viewLogButton.text=View Log
|
||||
@ -142,7 +132,7 @@ LocalFilesPanel.moduleErr=Module Error
|
||||
LocalFilesPanel.moduleErr.msg=A module caused an error listening to LocalFilesPanel updates. See log to determine which module. Some data could be incomplete.
|
||||
MissingImageDialog.allDesc.text=All Supported Types
|
||||
MissingImageDialog.display.title=Search for Missing Image
|
||||
MissingImageDialog.confDlg.noFileSel.msg=No image file has been selected, are you sure you\nwould like to exit without finding the image.
|
||||
MissingImageDialog.confDlg.noFileSel.msg=No image file has been selected. Are you sure you\nwould like to exit without finding the image?
|
||||
MissingImageDialog.confDlg.noFileSel.title=Missing Image
|
||||
MissingImageDialog.ErrorSettingImage=Error setting image path. Please try again.
|
||||
NewCaseVisualPanel1.getName.text=Case Information
|
||||
@ -172,9 +162,7 @@ StartupWindow.title.text=Welcome
|
||||
UpdateRecentCases.menuItem.clearRecentCases.text=Clear Recent Cases
|
||||
UpdateRecentCases.menuItem.empty=-Empty-
|
||||
AddImageWizardIngestConfigPanel.CANCEL_BUTTON.text=Cancel
|
||||
ImageFilePanel.errorLabel.text=Error Label
|
||||
NewCaseVisualPanel1.CaseFolderOnCDriveError.text=Warning: Path to multi-user case folder is on \"C:\" drive
|
||||
LocalFilesPanel.errorLabel.text=Error Label
|
||||
CollaborationMonitor.addingDataSourceStatus.msg={0} adding data source
|
||||
CollaborationMonitor.analyzingDataSourceStatus.msg={0} analyzing {1}
|
||||
MissingImageDialog.lbWarning.text=
|
||||
@ -192,8 +180,6 @@ CloseCaseWhileIngesting.Warning=Ingest is running. Are you sure you want to clos
|
||||
CloseCaseWhileIngesting.Warning.title=Warning\: This will close the current case
|
||||
CasePropertiesForm.imagesTable.columnModel.title1=Remove
|
||||
CasePropertiesForm.imagesTable.columnModel.title0=Path
|
||||
LocalFilesPanel.jButton1.text=Change
|
||||
LocalFilesPanel.displayNameLabel.text=Logical File Set Display Name: Default
|
||||
IngestJobInfoPanel.jLabel1.text=Ingest Modules
|
||||
IngestJobInfoPanel.jLabel2.text=Ingest Jobs
|
||||
CaseInformationPanel.closeButton.text=Close
|
||||
@ -231,3 +217,27 @@ MultiUserCasesPanel.bnOpenSingleUserCase.text=Open Single-User Case...
|
||||
CueBannerPanel.newCaseButton.text=
|
||||
MultiUserCasesPanel.searchLabel.text=Select any case and start typing to search by case name
|
||||
MultiUserCasesPanel.cancelButton.text=Cancel
|
||||
ImageFilePanel.pathErrorLabel.text=Error Label
|
||||
ImageFilePanel.sectorSizeLabel.text=Sector size:
|
||||
LocalDiskPanel.sectorSizeLabel.text=Sector Size:
|
||||
LocalDiskPanel.refreshTableButton.text=Refresh Local Disks
|
||||
LocalFilesPanel.displayNameLabel.text=Logical File Set Display Name: Default
|
||||
LocalFilesPanel.errorLabel.text=Error Label
|
||||
LocalFilesPanel.selectedPaths.toolTipText=
|
||||
LocalFilesPanel.clearButton.toolTipText=Clears currently selected local file paths
|
||||
LocalFilesPanel.clearButton.text=Clear
|
||||
LocalFilesPanel.selectButton.actionCommand=Add
|
||||
LocalFilesPanel.selectButton.toolTipText=Add local files and folders as logical files
|
||||
LocalFilesPanel.selectButton.text=Add
|
||||
LocalFilesPanel.localFileChooser.dialogTitle=Select Local Files or Folders
|
||||
LocalFilesPanel.localFileChooser.approveButtonToolTipText=
|
||||
LocalFilesPanel.localFileChooser.approveButtonText=Select
|
||||
LogicalEvidenceFilePanel.selectButton.actionCommand=Add
|
||||
LogicalEvidenceFilePanel.selectButton.toolTipText=Add local files and folders as logical files
|
||||
LogicalEvidenceFilePanel.selectButton.text=Select
|
||||
LogicalEvidenceFilePanel.errorLabel.text=Error Label
|
||||
LogicalEvidenceFilePanel.logicalEvidenceFileChooser.dialogTitle=Select Local Files or Folders
|
||||
LogicalEvidenceFilePanel.logicalEvidenceFileChooser.approveButtonToolTipText=
|
||||
LogicalEvidenceFilePanel.logicalEvidenceFileChooser.approveButtonText=Select
|
||||
LogicalEvidenceFilePanel.logicalEvidencePathField.text=
|
||||
LocalFilesPanel.changeNameButton.text=Change
|
||||
|
@ -27,14 +27,6 @@ MissingImageDialog.selectButton.text=\u30a4\u30e1\u30fc\u30b8\u3092\u9078\u629e
|
||||
MissingImageDialog.titleLabel.text=\u6b20\u843d\u3057\u305f\u30a4\u30e1\u30fc\u30b8\u306e\u691c\u7d22
|
||||
MissingImageDialog.cancelButton.text=\u30ad\u30e3\u30f3\u30bb\u30eb
|
||||
LocalDiskPanel.errorLabel.text=\u30a8\u30e9\u30fc\u30e9\u30d9\u30eb
|
||||
LocalFilesPanel.infoLabel.text=\u30ed\u30fc\u30ab\u30eb\u30d5\u30a1\u30a4\u30eb\u304a\u3088\u3073\u30d5\u30a9\u30eb\u30c0\u3092\u8ffd\u52a0\uff1a
|
||||
LocalFilesPanel.selectButton.text=\u8ffd\u52a0
|
||||
LocalFilesPanel.localFileChooser.dialogTitle=\u30ed\u30fc\u30ab\u30eb\u30d5\u30a1\u30a4\u30eb\u307e\u305f\u306f\u30d5\u30a9\u30eb\u30c0\u3092\u9078\u629e
|
||||
LocalFilesPanel.selectButton.toolTipText=\u30ed\u30fc\u30ab\u30eb\u30d5\u30a1\u30a4\u30eb\u304a\u3088\u3073\u30d5\u30a9\u30eb\u30c0\u3092\u30ed\u30b8\u30ab\u30eb\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u8ffd\u52a0\u3057\u307e\u3059
|
||||
LocalFilesPanel.clearButton.text=\u30af\u30ea\u30a2
|
||||
LocalFilesPanel.clearButton.toolTipText=\u73fe\u5728\u9078\u629e\u3055\u308c\u3066\u3044\u308b\u30ed\u30fc\u30ab\u30eb\u30d5\u30a1\u30a4\u30eb\u30d1\u30b9\u304c\u30af\u30ea\u30a2\u3055\u308c\u307e\u3059
|
||||
LocalFilesPanel.localFileChooser.approveButtonText=\u9078\u629e
|
||||
LocalFilesPanel.selectButton.actionCommand=\u8ffd\u52a0
|
||||
AddImageWizardAddingProgressVisual.statusLabel.text=\u30ed\u30fc\u30ab\u30eb\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f\u3002\u30d5\u30a1\u30a4\u30eb\u3092\u89e3\u6790\u4e2d\u3067\u3059\u3002
|
||||
AddImageWizardAddingProgressVisual.progressLabel.text=\uff1c\u30d7\u30ed\u30b0\u30ec\u30b9\uff1e
|
||||
AddImageWizardAddingProgressVisual.viewLogButton.text=\u30ed\u30b0\u3092\u8868\u793a
|
||||
@ -142,8 +134,8 @@ UpdateRecentCases.menuItem.empty=-\u7a7a\u767d-
|
||||
ImageFilePanel.noFatOrphansCheckbox.text=FAT\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u306e\u30aa\u30fc\u30d5\u30a1\u30f3\u30d5\u30a1\u30a4\u30eb\u306f\u7121\u8996
|
||||
LocalDiskPanel.noFatOrphansCheckbox.text=FAT\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u306e\u30aa\u30fc\u30d5\u30a1\u30f3\u30d5\u30a1\u30a4\u30eb\u306f\u7121\u8996
|
||||
AddImageWizardIngestConfigPanel.CANCEL_BUTTON.text=\u30ad\u30e3\u30f3\u30bb\u30eb
|
||||
ImageFilePanel.errorLabel.text=\u30a8\u30e9\u30fc\u30e9\u30d9\u30eb
|
||||
LocalFilesPanel.errorLabel.text=\u30a8\u30e9\u30fc\u30e9\u30d9\u30eb
|
||||
ImageFilePanel.errorLabel.text=\u30a8\u30e9\u30fc\u30e9\u30d9\u30eb
|
||||
NewCaseVisualPanel1.caseTypeLabel.text=\u30b1\u30fc\u30b9\u30bf\u30a4\u30d7\uff1a
|
||||
Case.databaseConnectionInfo.error.msg=\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30b5\u30fc\u30d0\u30fc\u306e\u63a5\u7d9a\u60c5\u5831\u3092\u5165\u624b\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u30c4\u30fc\u30eb\u3001\u30aa\u30d7\u30b7\u30e7\u30f3\u3001\u8907\u6570\u30e6\u30fc\u30b6\u30fc\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002
|
||||
Case.open.exception.multiUserCaseNotEnabled=\u8907\u6570\u30e6\u30fc\u30b6\u30fc\u306e\u30b1\u30fc\u30b9\u304c\u6709\u52b9\u5316\u3055\u308c\u3066\u3044\u306a\u3044\u3068\u3001\u8907\u6570\u30e6\u30fc\u30b6\u30fc\u306e\u30b1\u30fc\u30b9\u306f\u958b\u3051\u307e\u305b\u3093\u3002\u30c4\u30fc\u30eb\u3001\u30aa\u30d7\u30b7\u30e7\u30f3\u3001\u8907\u6570\u30e6\u30fc\u30b6\u30fc\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002
|
||||
@ -197,3 +189,19 @@ OpenMultiUserCasePanel.cancelButton.text=\u30ad\u30e3\u30f3\u30bb\u30eb
|
||||
OpenMultiUserCasePanel.jLabel1.text=\u6700\u8fd1\u958b\u3044\u305f\u30d5\u30a1\u30a4\u30eb
|
||||
CueBannerPanel.newCaseLabel.text=\u65b0\u898f\u30b1\u30fc\u30b9\u3092\u4f5c\u6210
|
||||
CueBannerPanel.openCaseLabel.text=\u65e2\u5b58\u30b1\u30fc\u30b9\u3092\u958b\u304f
|
||||
ImageFilePanel.pathErrorLabel.text=\u30a8\u30e9\u30fc\u30e9\u30d9\u30eb
|
||||
ImageFilePanel.sectorSizeLabel.text=\u30a4\u30f3\u30d7\u30c3\u30c8\u30bf\u30a4\u30e0\u30be\u30fc\u30f3\u3092\u9078\u629e\u3057\u3066\u4e0b\u3055\u3044\uff1a
|
||||
LocalFilesPanel.errorLabel.text=\u30a8\u30e9\u30fc\u30e9\u30d9\u30eb
|
||||
LocalFilesPanel.clearButton.toolTipText=\u73fe\u5728\u9078\u629e\u3055\u308c\u3066\u3044\u308b\u30ed\u30fc\u30ab\u30eb\u30d5\u30a1\u30a4\u30eb\u30d1\u30b9\u304c\u30af\u30ea\u30a2\u3055\u308c\u307e\u3059
|
||||
LocalFilesPanel.clearButton.text=\u30af\u30ea\u30a2
|
||||
LocalFilesPanel.selectButton.actionCommand=\u8ffd\u52a0
|
||||
LocalFilesPanel.selectButton.toolTipText=\u30ed\u30fc\u30ab\u30eb\u30d5\u30a1\u30a4\u30eb\u304a\u3088\u3073\u30d5\u30a9\u30eb\u30c0\u3092\u30ed\u30b8\u30ab\u30eb\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u8ffd\u52a0\u3057\u307e\u3059
|
||||
LocalFilesPanel.selectButton.text=\u8ffd\u52a0
|
||||
LocalFilesPanel.localFileChooser.dialogTitle=\u30ed\u30fc\u30ab\u30eb\u30d5\u30a1\u30a4\u30eb\u307e\u305f\u306f\u30d5\u30a9\u30eb\u30c0\u3092\u9078\u629e
|
||||
LocalFilesPanel.localFileChooser.approveButtonText=\u9078\u629e
|
||||
LogicalEvidenceFilePanel.selectButton.actionCommand=\u8ffd\u52a0
|
||||
LogicalEvidenceFilePanel.selectButton.toolTipText=\u30ed\u30fc\u30ab\u30eb\u30d5\u30a1\u30a4\u30eb\u304a\u3088\u3073\u30d5\u30a9\u30eb\u30c0\u3092\u30ed\u30b8\u30ab\u30eb\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u8ffd\u52a0\u3057\u307e\u3059
|
||||
LogicalEvidenceFilePanel.selectButton.text=\u8ffd\u52a0
|
||||
LogicalEvidenceFilePanel.errorLabel.text=\u30a8\u30e9\u30fc\u30e9\u30d9\u30eb
|
||||
LogicalEvidenceFilePanel.logicalEvidenceFileChooser.dialogTitle=\u30ed\u30fc\u30ab\u30eb\u30d5\u30a1\u30a4\u30eb\u307e\u305f\u306f\u30d5\u30a9\u30eb\u30c0\u3092\u9078\u629e
|
||||
LogicalEvidenceFilePanel.logicalEvidenceFileChooser.approveButtonText=\u9078\u629e
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2011-2017 Basis Technology Corp.
|
||||
* Copyright 2011-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -583,24 +583,42 @@ public class Case {
|
||||
}
|
||||
|
||||
/**
|
||||
* Deprecated. Use getOpenCase() instead.
|
||||
*
|
||||
* Gets the current case, if there is one, at the time of the call.
|
||||
*
|
||||
* @return The current case.
|
||||
*
|
||||
* @throws IllegalStateException if there is no current case.
|
||||
*/
|
||||
*
|
||||
* @deprecated. Use getOpenCase() instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public static Case getCurrentCase() {
|
||||
/*
|
||||
* Throwing an unchecked exception is a bad idea here.
|
||||
*
|
||||
* TODO (JIRA-2229): Case.getCurrentCase() method throws unchecked
|
||||
* IllegalStateException; change to throw checked exception or return
|
||||
* null
|
||||
*/
|
||||
if (null != currentCase) {
|
||||
return currentCase;
|
||||
try {
|
||||
return getOpenCase();
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
throw new IllegalStateException(NbBundle.getMessage(Case.class, "Case.getCurCase.exception.noneOpen"), ex);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the current open case, if there is one, at the time of the call.
|
||||
*
|
||||
* @return The open case.
|
||||
*
|
||||
* @throws NoCurrentCaseException if there is no open case.
|
||||
*/
|
||||
public static Case getOpenCase() throws NoCurrentCaseException {
|
||||
Case openCase = currentCase;
|
||||
if (openCase == null) {
|
||||
throw new NoCurrentCaseException(NbBundle.getMessage(Case.class, "Case.getCurCase.exception.noneOpen"));
|
||||
} else {
|
||||
throw new IllegalStateException(NbBundle.getMessage(Case.class, "Case.getCurCase.exception.noneOpen"));
|
||||
return openCase;
|
||||
}
|
||||
}
|
||||
|
||||
@ -806,7 +824,7 @@ public class Case {
|
||||
*
|
||||
* @throws CaseActionException throw if could not create the case dir
|
||||
*/
|
||||
static void createCaseDirectory(String caseDir, CaseType caseType) throws CaseActionException {
|
||||
public static void createCaseDirectory(String caseDir, CaseType caseType) throws CaseActionException {
|
||||
|
||||
File caseDirF = new File(caseDir);
|
||||
|
||||
@ -998,17 +1016,16 @@ public class Case {
|
||||
}
|
||||
}
|
||||
|
||||
private static String getNameForTitle(){
|
||||
private static String getNameForTitle() {
|
||||
//Method should become unnecessary once technical debt story 3334 is done.
|
||||
if (UserPreferences.getAppName().equals(Version.getName())){
|
||||
if (UserPreferences.getAppName().equals(Version.getName())) {
|
||||
//Available version number is version number for this application
|
||||
return String.format("%s %s", UserPreferences.getAppName(), Version.getVersion());
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
return UserPreferences.getAppName();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Update the GUI to to reflect the current case.
|
||||
*/
|
||||
@ -1526,7 +1543,25 @@ public class Case {
|
||||
* @throws TskCoreException if there is a problem adding the report to the
|
||||
* case database.
|
||||
*/
|
||||
public void addReport(String localPath, String srcModuleName, String reportName) throws TskCoreException {
|
||||
public Report addReport(String localPath, String srcModuleName, String reportName) throws TskCoreException {
|
||||
return addReport(localPath, srcModuleName, reportName, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a report to the case.
|
||||
*
|
||||
* @param localPath The path of the report file, must be in the case
|
||||
* directory or one of its subdirectories.
|
||||
* @param srcModuleName The name of the module that created the report.
|
||||
* @param reportName The report name, may be empty.
|
||||
* @param parent The Content used to create the report, if available.
|
||||
*
|
||||
* @return The new Report instance.
|
||||
*
|
||||
* @throws TskCoreException if there is a problem adding the report to the
|
||||
* case database.
|
||||
*/
|
||||
public Report addReport(String localPath, String srcModuleName, String reportName, Content parent) throws TskCoreException {
|
||||
String normalizedLocalPath;
|
||||
try {
|
||||
normalizedLocalPath = Paths.get(localPath).normalize().toString();
|
||||
@ -1534,8 +1569,9 @@ public class Case {
|
||||
String errorMsg = "Invalid local path provided: " + localPath; // NON-NLS
|
||||
throw new TskCoreException(errorMsg, ex);
|
||||
}
|
||||
Report report = this.caseDb.addReport(normalizedLocalPath, srcModuleName, reportName);
|
||||
Report report = this.caseDb.addReport(normalizedLocalPath, srcModuleName, reportName, parent);
|
||||
eventPublisher.publish(new ReportAddedEvent(report));
|
||||
return report;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1616,13 +1652,14 @@ public class Case {
|
||||
/**
|
||||
* Constructs a Case object for a new Autopsy case.
|
||||
*
|
||||
* @param caseType The type of case (single-user or multi-user).
|
||||
* @param caseDir The full path of the case directory. The directory
|
||||
* will be created if it doesn't already exist; if it
|
||||
* exists, it is ASSUMED it was created by calling
|
||||
* createCaseDirectory.
|
||||
* @param caseDetails Contains details of the case, such as examiner, display name, etc
|
||||
*
|
||||
* @param caseType The type of case (single-user or multi-user).
|
||||
* @param caseDir The full path of the case directory. The directory
|
||||
* will be created if it doesn't already exist; if it
|
||||
* exists, it is ASSUMED it was created by calling
|
||||
* createCaseDirectory.
|
||||
* @param caseDetails Contains details of the case, such as examiner,
|
||||
* display name, etc
|
||||
*
|
||||
*/
|
||||
private Case(CaseType caseType, String caseDir, CaseDetails caseDetails) {
|
||||
metadata = new CaseMetadata(caseType, caseDir, displayNameToUniqueName(caseDetails.getCaseDisplayName()), caseDetails);
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2011-2017 Basis Technology Corp.
|
||||
* Copyright 2011-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -33,6 +33,7 @@ import org.openide.util.HelpCtx;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.openide.util.NbBundle.Messages;
|
||||
import org.openide.util.actions.CallableSystemAction;
|
||||
import org.openide.windows.WindowManager;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
|
||||
/**
|
||||
@ -44,7 +45,7 @@ import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
final class CaseDeleteAction extends CallableSystemAction {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final Logger LOGGER = Logger.getLogger(CaseDeleteAction.class.getName());
|
||||
private static final Logger logger = Logger.getLogger(CaseDeleteAction.class.getName());
|
||||
|
||||
CaseDeleteAction() {
|
||||
putValue(Action.NAME, NbBundle.getMessage(CaseDeleteAction.class, "CTL_CaseDeleteAction"));
|
||||
@ -65,7 +66,7 @@ final class CaseDeleteAction extends CallableSystemAction {
|
||||
"# {0} - exception message", "Case.deleteCaseFailureMessageBox.message=Error deleting case: {0}",})
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
try {
|
||||
Case currentCase = Case.getCurrentCase();
|
||||
Case currentCase = Case.getOpenCase();
|
||||
String caseName = currentCase.getName();
|
||||
String caseDirectory = currentCase.getCaseDirectory();
|
||||
|
||||
@ -95,9 +96,9 @@ final class CaseDeleteAction extends CallableSystemAction {
|
||||
try {
|
||||
get();
|
||||
} catch (InterruptedException | ExecutionException ex) {
|
||||
LOGGER.log(Level.SEVERE, String.format("Failed to delete case %s at %s", caseName, caseDirectory), ex);
|
||||
logger.log(Level.SEVERE, String.format("Failed to delete case %s at %s", caseName, caseDirectory), ex);
|
||||
JOptionPane.showMessageDialog(
|
||||
null,
|
||||
WindowManager.getDefault().getMainWindow(),
|
||||
Bundle.Case_deleteCaseFailureMessageBox_message(ex.getLocalizedMessage()),
|
||||
Bundle.Case_deleteCaseFailureMessageBox_title(),
|
||||
JOptionPane.ERROR_MESSAGE);
|
||||
@ -109,8 +110,8 @@ final class CaseDeleteAction extends CallableSystemAction {
|
||||
}
|
||||
}.execute();
|
||||
}
|
||||
} catch (IllegalStateException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Case delete action called with no current case", ex);
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
logger.log(Level.SEVERE, "Case delete action called with no current case", ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -38,9 +38,9 @@
|
||||
<Component id="tabbedPane" pref="709" max="32767" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="editDetailsButton" linkSize="3" min="-2" pref="88" max="-2" attributes="0"/>
|
||||
<Component id="editDetailsButton" min="-2" pref="128" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="closeButton" linkSize="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="closeButton" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
|
@ -18,13 +18,13 @@
|
||||
*/
|
||||
package org.sleuthkit.autopsy.casemodule;
|
||||
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Toolkit;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.util.logging.Level;
|
||||
import javax.swing.JDialog;
|
||||
import javax.swing.event.ChangeEvent;
|
||||
import javax.swing.event.ChangeListener;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.openide.util.NbBundle.Messages;
|
||||
import org.openide.windows.WindowManager;
|
||||
|
||||
@ -53,7 +53,11 @@ class CaseInformationPanel extends javax.swing.JPanel {
|
||||
"CaseInformationPanel.editDetailsDialog.title=Edit Case Details"
|
||||
})
|
||||
private void customizeComponents() {
|
||||
propertiesPanel = new CasePropertiesPanel(Case.getCurrentCase());
|
||||
try {
|
||||
propertiesPanel = new CasePropertiesPanel(Case.getOpenCase());
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
Logger.getLogger(CaseInformationPanel.class.getName()).log(Level.INFO, "Exception while getting open case.", ex);
|
||||
}
|
||||
propertiesPanel.setSize(propertiesPanel.getPreferredSize());
|
||||
this.tabbedPane.addTab(Bundle.CaseInformationPanel_caseDetails_header(), propertiesPanel);
|
||||
this.tabbedPane.addTab(Bundle.CaseInformationPanel_ingestJobInfo_header(), new IngestJobInfoPanel());
|
||||
@ -106,14 +110,11 @@ class CaseInformationPanel extends javax.swing.JPanel {
|
||||
.addComponent(tabbedPane, javax.swing.GroupLayout.DEFAULT_SIZE, 709, Short.MAX_VALUE)
|
||||
.addGroup(outerDetailsPanelLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(editDetailsButton, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(editDetailsButton, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(closeButton)
|
||||
.addContainerGap())
|
||||
);
|
||||
|
||||
outerDetailsPanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {closeButton, editDetailsButton});
|
||||
|
||||
outerDetailsPanelLayout.setVerticalGroup(
|
||||
outerDetailsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(outerDetailsPanelLayout.createSequentialGroup()
|
||||
@ -156,11 +157,7 @@ class CaseInformationPanel extends javax.swing.JPanel {
|
||||
editCasePropertiesDialog.add(editCasePropertiesPanel);
|
||||
editCasePropertiesDialog.setResizable(true);
|
||||
editCasePropertiesDialog.pack();
|
||||
|
||||
Dimension screenDimension = Toolkit.getDefaultToolkit().getScreenSize();
|
||||
double w = editCasePropertiesDialog.getSize().getWidth();
|
||||
double h = editCasePropertiesDialog.getSize().getHeight();
|
||||
editCasePropertiesDialog.setLocation((int) ((screenDimension.getWidth() - w) / 2), (int) ((screenDimension.getHeight() - h) / 2));
|
||||
editCasePropertiesDialog.setLocationRelativeTo(this);
|
||||
editCasePropertiesDialog.setVisible(true);
|
||||
editCasePropertiesDialog.toFront();
|
||||
propertiesPanel.updateCaseInfo();
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2011-2017 Basis Technology Corp.
|
||||
* Copyright 2011-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -18,8 +18,7 @@
|
||||
*/
|
||||
package org.sleuthkit.autopsy.casemodule;
|
||||
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Toolkit;
|
||||
import java.awt.Frame;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.beans.PropertyChangeEvent;
|
||||
import java.util.EnumSet;
|
||||
@ -52,7 +51,8 @@ final class CasePropertiesAction extends CallableSystemAction {
|
||||
public void performAction() {
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
String title = NbBundle.getMessage(this.getClass(), "CasePropertiesAction.window.title");
|
||||
casePropertiesDialog = new JDialog(WindowManager.getDefault().getMainWindow(), title, true);
|
||||
Frame mainWindow = WindowManager.getDefault().getMainWindow();
|
||||
casePropertiesDialog = new JDialog(mainWindow, title, true);
|
||||
CaseInformationPanel caseInformationPanel = new CaseInformationPanel();
|
||||
caseInformationPanel.addCloseButtonAction((ActionEvent e) -> {
|
||||
casePropertiesDialog.setVisible(false);
|
||||
@ -60,11 +60,7 @@ final class CasePropertiesAction extends CallableSystemAction {
|
||||
casePropertiesDialog.add(caseInformationPanel);
|
||||
casePropertiesDialog.setResizable(true);
|
||||
casePropertiesDialog.pack();
|
||||
|
||||
Dimension screenDimension = Toolkit.getDefaultToolkit().getScreenSize();
|
||||
double w = casePropertiesDialog.getSize().getWidth();
|
||||
double h = casePropertiesDialog.getSize().getHeight();
|
||||
casePropertiesDialog.setLocation((int) ((screenDimension.getWidth() - w) / 2), (int) ((screenDimension.getHeight() - h) / 2));
|
||||
casePropertiesDialog.setLocationRelativeTo(mainWindow);
|
||||
casePropertiesDialog.setVisible(true);
|
||||
casePropertiesDialog.toFront();
|
||||
});
|
||||
|
@ -101,8 +101,8 @@
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="caseNameLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="caseNumberLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="caseNameLabel" linkSize="6" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="caseNumberLabel" linkSize="6" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="6" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
@ -113,14 +113,14 @@
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="103" alignment="0" groupAlignment="1" max="-2" attributes="0">
|
||||
<Component id="lbCaseUUIDLabel" max="32767" attributes="0"/>
|
||||
<Component id="lbDbName" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbDbType" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="caseDirLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbCaseUUIDLabel" linkSize="6" max="32767" attributes="0"/>
|
||||
<Component id="lbDbType" linkSize="6" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="caseDirLabel" linkSize="6" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="crDateLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="crDateLabel" linkSize="6" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbDbName" linkSize="6" alignment="0" min="-2" pref="115" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="6" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="crDateField" max="32767" attributes="0"/>
|
||||
<Component id="caseDirField" max="32767" attributes="0"/>
|
||||
@ -281,15 +281,6 @@
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="CasePropertiesPanel.caseNumberLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[82, 14]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[82, 14]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[82, 14]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="caseDirLabel">
|
||||
@ -380,20 +371,20 @@
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="lbExaminerPhoneLabel" max="32767" attributes="0"/>
|
||||
<Component id="lbNotesLabel" max="32767" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="lbNotesLabel" linkSize="7" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbExaminerPhoneLabel" linkSize="7" min="-2" pref="115" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="6" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="lbExaminerPhoneText" max="32767" attributes="0"/>
|
||||
<Component id="caseNotesScrollPane" pref="411" max="32767" attributes="0"/>
|
||||
<Component id="caseNotesScrollPane" pref="704" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="lbExaminerEmailLabel" max="32767" attributes="0"/>
|
||||
<Component id="examinerLabel" max="32767" attributes="0"/>
|
||||
<Component id="lbExaminerEmailLabel" linkSize="7" max="32767" attributes="0"/>
|
||||
<Component id="examinerLabel" linkSize="7" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
@ -566,21 +557,19 @@
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="103" alignment="0" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="lbPointOfContactEmailLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbPointOfContactNameLabel" alignment="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="lbOrganizationNameLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbPointOfContactEmailLabel" linkSize="8" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbOrganizationNameLabel" linkSize="8" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbPointOfContactNameLabel" linkSize="8" min="-2" pref="115" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="6" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="1" attributes="0">
|
||||
<Component id="lbPointOfContactNameText" alignment="1" pref="411" max="32767" attributes="0"/>
|
||||
<Component id="lbPointOfContactNameText" alignment="1" pref="704" max="32767" attributes="0"/>
|
||||
<Component id="lbOrganizationNameText" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="lbPointOfContactEmailText" alignment="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="lbPointOfContactPhoneLabel" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbPointOfContactPhoneLabel" linkSize="8" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="lbPointOfContactPhoneText" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
|
@ -49,7 +49,12 @@ final class CasePropertiesPanel extends javax.swing.JPanel {
|
||||
}
|
||||
|
||||
void updateCaseInfo() {
|
||||
theCase = Case.getCurrentCase();
|
||||
try {
|
||||
theCase = Case.getOpenCase();
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Exception while getting open case.", ex);
|
||||
return;
|
||||
}
|
||||
lbCaseNameText.setText(theCase.getDisplayName());
|
||||
lbCaseNumberText.setText(theCase.getNumber());
|
||||
lbExaminerNameText.setText(theCase.getExaminer());
|
||||
@ -78,9 +83,9 @@ final class CasePropertiesPanel extends javax.swing.JPanel {
|
||||
try {
|
||||
EamDb dbManager = EamDb.getInstance();
|
||||
if (dbManager != null) {
|
||||
CorrelationCase correlationCase = dbManager.getCase(Case.getCurrentCase());
|
||||
CorrelationCase correlationCase = dbManager.getCase(theCase);
|
||||
if (null == correlationCase) {
|
||||
correlationCase = dbManager.newCase(Case.getCurrentCase());
|
||||
correlationCase = dbManager.newCase(theCase);
|
||||
}
|
||||
currentOrg = correlationCase.getOrg();
|
||||
}
|
||||
@ -210,9 +215,6 @@ final class CasePropertiesPanel extends javax.swing.JPanel {
|
||||
|
||||
caseNumberLabel.setFont(caseNumberLabel.getFont().deriveFont(caseNumberLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
|
||||
caseNumberLabel.setText(org.openide.util.NbBundle.getMessage(CasePropertiesPanel.class, "CasePropertiesPanel.caseNumberLabel.text")); // NOI18N
|
||||
caseNumberLabel.setMaximumSize(new java.awt.Dimension(82, 14));
|
||||
caseNumberLabel.setMinimumSize(new java.awt.Dimension(82, 14));
|
||||
caseNumberLabel.setPreferredSize(new java.awt.Dimension(82, 14));
|
||||
|
||||
caseDirLabel.setFont(caseDirLabel.getFont().deriveFont(caseDirLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
|
||||
caseDirLabel.setText(org.openide.util.NbBundle.getMessage(CasePropertiesPanel.class, "CasePropertiesPanel.caseDirLabel.text")); // NOI18N
|
||||
@ -242,7 +244,7 @@ final class CasePropertiesPanel extends javax.swing.JPanel {
|
||||
.addGroup(casePanelLayout.createSequentialGroup()
|
||||
.addGroup(casePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(caseNameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(caseNumberLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(caseNumberLabel))
|
||||
.addGap(6, 6, 6)
|
||||
.addGroup(casePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(lbCaseNumberText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
@ -251,11 +253,11 @@ final class CasePropertiesPanel extends javax.swing.JPanel {
|
||||
.addGroup(casePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(casePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
|
||||
.addComponent(lbCaseUUIDLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(lbDbName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(lbDbType, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(caseDirLabel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(crDateLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(crDateLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(lbDbName, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(6, 6, 6)
|
||||
.addGroup(casePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(crDateField, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(caseDirField, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
@ -264,6 +266,9 @@ final class CasePropertiesPanel extends javax.swing.JPanel {
|
||||
.addComponent(lbCaseUIDText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
|
||||
.addContainerGap())
|
||||
);
|
||||
|
||||
casePanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {caseDirLabel, caseNameLabel, caseNumberLabel, crDateLabel, lbCaseUUIDLabel, lbDbName, lbDbType});
|
||||
|
||||
casePanelLayout.setVerticalGroup(
|
||||
casePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(casePanelLayout.createSequentialGroup()
|
||||
@ -273,7 +278,7 @@ final class CasePropertiesPanel extends javax.swing.JPanel {
|
||||
.addComponent(lbCaseNameText, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(casePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(caseNumberLabel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(caseNumberLabel, javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(lbCaseNumberText, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(casePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
@ -343,13 +348,13 @@ final class CasePropertiesPanel extends javax.swing.JPanel {
|
||||
.addContainerGap()
|
||||
.addGroup(examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(examinerPanelLayout.createSequentialGroup()
|
||||
.addGroup(examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addComponent(lbExaminerPhoneLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(lbNotesLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(lbNotesLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(lbExaminerPhoneLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(6, 6, 6)
|
||||
.addGroup(examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(lbExaminerPhoneText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(caseNotesScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 411, Short.MAX_VALUE)))
|
||||
.addComponent(caseNotesScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 704, Short.MAX_VALUE)))
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, examinerPanelLayout.createSequentialGroup()
|
||||
.addGroup(examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addComponent(lbExaminerEmailLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
@ -360,6 +365,9 @@ final class CasePropertiesPanel extends javax.swing.JPanel {
|
||||
.addComponent(lbExaminerEmailText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
|
||||
.addContainerGap())
|
||||
);
|
||||
|
||||
examinerPanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {examinerLabel, lbExaminerEmailLabel, lbExaminerPhoneLabel, lbNotesLabel});
|
||||
|
||||
examinerPanelLayout.setVerticalGroup(
|
||||
examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(examinerPanelLayout.createSequentialGroup()
|
||||
@ -410,13 +418,12 @@ final class CasePropertiesPanel extends javax.swing.JPanel {
|
||||
.addGroup(pnOrganizationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(pnOrganizationLayout.createSequentialGroup()
|
||||
.addGroup(pnOrganizationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(pnOrganizationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addComponent(lbPointOfContactEmailLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(lbPointOfContactNameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addComponent(lbOrganizationNameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(lbPointOfContactEmailLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(lbOrganizationNameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(lbPointOfContactNameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(6, 6, 6)
|
||||
.addGroup(pnOrganizationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(lbPointOfContactNameText, javax.swing.GroupLayout.DEFAULT_SIZE, 411, Short.MAX_VALUE)
|
||||
.addComponent(lbPointOfContactNameText, javax.swing.GroupLayout.DEFAULT_SIZE, 704, Short.MAX_VALUE)
|
||||
.addComponent(lbOrganizationNameText, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(lbPointOfContactEmailText, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
|
||||
.addGroup(pnOrganizationLayout.createSequentialGroup()
|
||||
@ -425,6 +432,9 @@ final class CasePropertiesPanel extends javax.swing.JPanel {
|
||||
.addComponent(lbPointOfContactPhoneText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
|
||||
.addContainerGap())
|
||||
);
|
||||
|
||||
pnOrganizationLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {lbOrganizationNameLabel, lbPointOfContactEmailLabel, lbPointOfContactNameLabel, lbPointOfContactPhoneLabel});
|
||||
|
||||
pnOrganizationLayout.setVerticalGroup(
|
||||
pnOrganizationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(pnOrganizationLayout.createSequentialGroup()
|
||||
|
@ -122,8 +122,8 @@ final class CollaborationMonitor {
|
||||
* 2. Check for stale remote tasks.<br>
|
||||
*/
|
||||
periodicTasksExecutor = new ScheduledThreadPoolExecutor(NUMBER_OF_PERIODIC_TASK_THREADS, new ThreadFactoryBuilder().setNameFormat(PERIODIC_TASK_THREAD_NAME).build());
|
||||
periodicTasksExecutor.scheduleAtFixedRate(new HeartbeatTask(), HEARTBEAT_INTERVAL_MINUTES, HEARTBEAT_INTERVAL_MINUTES, TimeUnit.MINUTES);
|
||||
periodicTasksExecutor.scheduleAtFixedRate(new StaleTaskDetectionTask(), STALE_TASKS_DETECT_INTERVAL_MINS, STALE_TASKS_DETECT_INTERVAL_MINS, TimeUnit.MINUTES);
|
||||
periodicTasksExecutor.scheduleWithFixedDelay(new HeartbeatTask(), HEARTBEAT_INTERVAL_MINUTES, HEARTBEAT_INTERVAL_MINUTES, TimeUnit.MINUTES);
|
||||
periodicTasksExecutor.scheduleWithFixedDelay(new StaleTaskDetectionTask(), STALE_TASKS_DETECT_INTERVAL_MINS, STALE_TASKS_DETECT_INTERVAL_MINS, TimeUnit.MINUTES);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2011-2017 Basis Technology Corp.
|
||||
* Copyright 2011-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -246,7 +246,7 @@ public class CueBannerPanel extends javax.swing.JPanel {
|
||||
}//GEN-LAST:event_openCaseButtonActionPerformed
|
||||
|
||||
private void openRecentCaseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_openRecentCaseButtonActionPerformed
|
||||
recentCasesWindow.setLocationRelativeTo(WindowManager.getDefault().getMainWindow());
|
||||
recentCasesWindow.setLocationRelativeTo(this);
|
||||
OpenRecentCasePanel.getInstance(); //refreshes the recent cases table
|
||||
recentCasesWindow.setVisible(true);
|
||||
}//GEN-LAST:event_openRecentCaseButtonActionPerformed
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2013-2016 Basis Technology Corp.
|
||||
* Copyright 2013-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -63,6 +63,7 @@ public class ImageDSProcessor implements DataSourceProcessor, AutoIngestDataSour
|
||||
*/
|
||||
private String deviceId;
|
||||
private String imagePath;
|
||||
private int sectorSize;
|
||||
private String timeZone;
|
||||
private boolean ignoreFatOrphanFiles;
|
||||
private boolean setDataSourceOptionsCalled;
|
||||
@ -157,10 +158,11 @@ public class ImageDSProcessor implements DataSourceProcessor, AutoIngestDataSour
|
||||
configPanel.storeSettings();
|
||||
deviceId = UUID.randomUUID().toString();
|
||||
imagePath = configPanel.getContentPaths();
|
||||
sectorSize = configPanel.getSectorSize();
|
||||
timeZone = configPanel.getTimeZone();
|
||||
ignoreFatOrphanFiles = configPanel.getNoFatOrphans();
|
||||
}
|
||||
run(deviceId, imagePath, timeZone, ignoreFatOrphanFiles, progressMonitor, callback);
|
||||
run(deviceId, imagePath, sectorSize, timeZone, ignoreFatOrphanFiles, progressMonitor, callback);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -185,7 +187,33 @@ public class ImageDSProcessor implements DataSourceProcessor, AutoIngestDataSour
|
||||
* @param callback Callback to call when processing is done.
|
||||
*/
|
||||
public void run(String deviceId, String imagePath, String timeZone, boolean ignoreFatOrphanFiles, DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback callback) {
|
||||
addImageTask = new AddImageTask(deviceId, imagePath, timeZone, ignoreFatOrphanFiles, null, progressMonitor, callback);
|
||||
run(deviceId, imagePath, 0, timeZone, ignoreFatOrphanFiles, progressMonitor, callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a data source to the case database using a background task in a
|
||||
* separate thread and the given settings instead of those provided by the
|
||||
* selection and configuration panel. Returns as soon as the background task
|
||||
* is started and uses the callback object to signal task completion and
|
||||
* return results.
|
||||
*
|
||||
* @param deviceId An ASCII-printable identifier for the device
|
||||
* associated with the data source that is
|
||||
* intended to be unique across multiple cases
|
||||
* (e.g., a UUID).
|
||||
* @param imagePath Path to the image file.
|
||||
* @param sectorSize The sector size (use '0' for autodetect).
|
||||
* @param timeZone The time zone to use when processing dates
|
||||
* and times for the image, obtained from
|
||||
* java.util.TimeZone.getID.
|
||||
* @param ignoreFatOrphanFiles Whether to parse orphans if the image has a
|
||||
* FAT filesystem.
|
||||
* @param progressMonitor Progress monitor for reporting progress
|
||||
* during processing.
|
||||
* @param callback Callback to call when processing is done.
|
||||
*/
|
||||
private void run(String deviceId, String imagePath, int sectorSize, String timeZone, boolean ignoreFatOrphanFiles, DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback callback) {
|
||||
addImageTask = new AddImageTask(deviceId, imagePath, sectorSize, timeZone, ignoreFatOrphanFiles, null, progressMonitor, callback);
|
||||
new Thread(addImageTask).start();
|
||||
}
|
||||
|
||||
@ -236,7 +264,7 @@ public class ImageDSProcessor implements DataSourceProcessor, AutoIngestDataSour
|
||||
|
||||
try {
|
||||
// verify that the image has a file system that TSK can process
|
||||
Case currentCase = Case.getCurrentCase();
|
||||
Case currentCase = Case.getOpenCase();
|
||||
if (!DataSourceUtils.imageHasFileSystem(dataSourcePath)) {
|
||||
// image does not have a file system that TSK can process
|
||||
return 0;
|
||||
@ -253,10 +281,11 @@ public class ImageDSProcessor implements DataSourceProcessor, AutoIngestDataSour
|
||||
public void process(String deviceId, Path dataSourcePath, DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback callBack) throws AutoIngestDataSourceProcessorException {
|
||||
this.deviceId = deviceId;
|
||||
this.imagePath = dataSourcePath.toString();
|
||||
this.sectorSize = 0;
|
||||
this.timeZone = Calendar.getInstance().getTimeZone().getID();
|
||||
this.ignoreFatOrphanFiles = false;
|
||||
setDataSourceOptionsCalled = true;
|
||||
run(deviceId, dataSourcePath.toString(), timeZone, ignoreFatOrphanFiles, progressMonitor, callBack);
|
||||
run(deviceId, dataSourcePath.toString(), sectorSize, timeZone, ignoreFatOrphanFiles, progressMonitor, callBack);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -276,6 +305,7 @@ public class ImageDSProcessor implements DataSourceProcessor, AutoIngestDataSour
|
||||
public void setDataSourceOptions(String imagePath, String timeZone, boolean ignoreFatOrphanFiles) {
|
||||
this.deviceId = UUID.randomUUID().toString();
|
||||
this.imagePath = imagePath;
|
||||
this.sectorSize = 0;
|
||||
this.timeZone = Calendar.getInstance().getTimeZone().getID();
|
||||
this.ignoreFatOrphanFiles = ignoreFatOrphanFiles;
|
||||
setDataSourceOptionsCalled = true;
|
||||
|
@ -43,7 +43,12 @@
|
||||
<EmptySpace min="21" pref="21" max="-2" attributes="0"/>
|
||||
<Component id="descLabel" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="errorLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="pathErrorLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="sectorSizeLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="sectorSizeComboBox" min="-2" pref="85" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace min="0" pref="20" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
@ -59,7 +64,7 @@
|
||||
<Component id="pathTextField" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="3" max="-2" attributes="0"/>
|
||||
<Component id="errorLabel" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="pathErrorLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="1" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="timeZoneLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
@ -69,7 +74,12 @@
|
||||
<Component id="noFatOrphansCheckbox" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="descLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="sectorSizeLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="sectorSizeComboBox" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace pref="43" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
@ -134,15 +144,32 @@
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="errorLabel">
|
||||
<Component class="javax.swing.JLabel" name="pathErrorLabel">
|
||||
<Properties>
|
||||
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||
<Color blue="0" green="0" red="ff" type="rgb"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="ImageFilePanel.errorLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="ImageFilePanel.pathErrorLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="sectorSizeLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="ImageFilePanel.sectorSizeLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JComboBox" name="sectorSizeComboBox">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
|
||||
<StringArray count="0"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2011-2017 Basis Technology Corp.
|
||||
* Copyright 2011-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -31,6 +31,7 @@ import javax.swing.event.DocumentEvent;
|
||||
import javax.swing.event.DocumentListener;
|
||||
import javax.swing.filechooser.FileFilter;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.openide.util.Exceptions;
|
||||
import org.openide.util.NbBundle;
|
||||
import static org.sleuthkit.autopsy.casemodule.Bundle.*;
|
||||
import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessor;
|
||||
@ -49,6 +50,7 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(ImageFilePanel.class.getName());
|
||||
private static final String PROP_LASTIMAGE_PATH = "LBL_LastImage_PATH"; //NON-NLS
|
||||
private static final String[] SECTOR_SIZE_CHOICES = {"Auto Detect", "512", "1024", "2048", "4096"};
|
||||
|
||||
private final JFileChooser fileChooser = new JFileChooser();
|
||||
|
||||
@ -76,7 +78,13 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
|
||||
// set the selected timezone to the current timezone
|
||||
timeZoneComboBox.setSelectedItem(timeZoneToString(Calendar.getInstance().getTimeZone()));
|
||||
|
||||
errorLabel.setVisible(false);
|
||||
// Populate the drop down list of sector size options
|
||||
for (String choice : SECTOR_SIZE_CHOICES) {
|
||||
sectorSizeComboBox.addItem(choice);
|
||||
}
|
||||
sectorSizeComboBox.setSelectedIndex(0);
|
||||
|
||||
pathErrorLabel.setVisible(false);
|
||||
|
||||
fileChooser.setDragEnabled(false);
|
||||
fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
|
||||
@ -116,10 +124,12 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
|
||||
browseButton = new javax.swing.JButton();
|
||||
pathTextField = new javax.swing.JTextField();
|
||||
timeZoneLabel = new javax.swing.JLabel();
|
||||
timeZoneComboBox = new javax.swing.JComboBox<String>();
|
||||
timeZoneComboBox = new javax.swing.JComboBox<>();
|
||||
noFatOrphansCheckbox = new javax.swing.JCheckBox();
|
||||
descLabel = new javax.swing.JLabel();
|
||||
errorLabel = new javax.swing.JLabel();
|
||||
pathErrorLabel = new javax.swing.JLabel();
|
||||
sectorSizeLabel = new javax.swing.JLabel();
|
||||
sectorSizeComboBox = new javax.swing.JComboBox<>();
|
||||
|
||||
setMinimumSize(new java.awt.Dimension(0, 65));
|
||||
setPreferredSize(new java.awt.Dimension(403, 65));
|
||||
@ -144,8 +154,10 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(descLabel, org.openide.util.NbBundle.getMessage(ImageFilePanel.class, "ImageFilePanel.descLabel.text")); // NOI18N
|
||||
|
||||
errorLabel.setForeground(new java.awt.Color(255, 0, 0));
|
||||
org.openide.awt.Mnemonics.setLocalizedText(errorLabel, org.openide.util.NbBundle.getMessage(ImageFilePanel.class, "ImageFilePanel.errorLabel.text")); // NOI18N
|
||||
pathErrorLabel.setForeground(new java.awt.Color(255, 0, 0));
|
||||
org.openide.awt.Mnemonics.setLocalizedText(pathErrorLabel, org.openide.util.NbBundle.getMessage(ImageFilePanel.class, "ImageFilePanel.pathErrorLabel.text")); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(sectorSizeLabel, org.openide.util.NbBundle.getMessage(ImageFilePanel.class, "ImageFilePanel.sectorSizeLabel.text")); // NOI18N
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
@ -167,7 +179,11 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGap(21, 21, 21)
|
||||
.addComponent(descLabel))
|
||||
.addComponent(errorLabel))
|
||||
.addComponent(pathErrorLabel)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(sectorSizeLabel)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(sectorSizeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addGap(0, 20, Short.MAX_VALUE))
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
@ -179,7 +195,7 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
|
||||
.addComponent(browseButton)
|
||||
.addComponent(pathTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(3, 3, 3)
|
||||
.addComponent(errorLabel)
|
||||
.addComponent(pathErrorLabel)
|
||||
.addGap(1, 1, 1)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(timeZoneLabel)
|
||||
@ -188,7 +204,11 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
|
||||
.addComponent(noFatOrphansCheckbox)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(descLabel)
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addGap(18, 18, 18)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(sectorSizeLabel)
|
||||
.addComponent(sectorSizeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addContainerGap(43, Short.MAX_VALUE))
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
@ -225,10 +245,12 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JButton browseButton;
|
||||
private javax.swing.JLabel descLabel;
|
||||
private javax.swing.JLabel errorLabel;
|
||||
private javax.swing.JCheckBox noFatOrphansCheckbox;
|
||||
private javax.swing.JLabel pathErrorLabel;
|
||||
private javax.swing.JLabel pathLabel;
|
||||
private javax.swing.JTextField pathTextField;
|
||||
private javax.swing.JComboBox<String> sectorSizeComboBox;
|
||||
private javax.swing.JLabel sectorSizeLabel;
|
||||
private javax.swing.JComboBox<String> timeZoneComboBox;
|
||||
private javax.swing.JLabel timeZoneLabel;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
@ -251,6 +273,21 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
|
||||
pathTextField.setText(s);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the sector size.
|
||||
*
|
||||
* @return 0 if autodetect; otherwise the value selected.
|
||||
*/
|
||||
public int getSectorSize() {
|
||||
int sectorSizeSelectionIndex = sectorSizeComboBox.getSelectedIndex();
|
||||
|
||||
if (sectorSizeSelectionIndex == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return Integer.valueOf((String) sectorSizeComboBox.getSelectedItem());
|
||||
}
|
||||
|
||||
public String getTimeZone() {
|
||||
String tz = timeZoneComboBox.getSelectedItem().toString();
|
||||
return tz.substring(tz.indexOf(')') + 2).trim();
|
||||
@ -270,18 +307,25 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
|
||||
*
|
||||
* @return true if a proper image has been selected, false otherwise
|
||||
*/
|
||||
@NbBundle.Messages("DataSourceOnCDriveError.text=Warning: Path to multi-user data source is on \"C:\" drive")
|
||||
@NbBundle.Messages({"ImageFilePanel.pathValidation.dataSourceOnCDriveError=Warning: Path to multi-user data source is on \"C:\" drive",
|
||||
"ImageFilePanel.pathValidation.getOpenCase.Error=Warning: Exception while getting open case."
|
||||
})
|
||||
public boolean validatePanel() {
|
||||
errorLabel.setVisible(false);
|
||||
pathErrorLabel.setVisible(false);
|
||||
String path = getContentPaths();
|
||||
if (StringUtils.isBlank(path)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// display warning if there is one (but don't disable "next" button)
|
||||
if (false == PathValidator.isValid(path, Case.getCurrentCase().getCaseType())) {
|
||||
errorLabel.setVisible(true);
|
||||
errorLabel.setText(Bundle.DataSourceOnCDriveError_text());
|
||||
// Display warning if there is one (but don't disable "next" button)
|
||||
try {
|
||||
if (false == PathValidator.isValid(path, Case.getOpenCase().getCaseType())) {
|
||||
pathErrorLabel.setVisible(true);
|
||||
pathErrorLabel.setText(Bundle.ImageFilePanel_pathValidation_dataSourceOnCDriveError());
|
||||
}
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
pathErrorLabel.setVisible(true);
|
||||
pathErrorLabel.setText(Bundle.ImageFilePanel_pathValidation_getOpenCase_Error());
|
||||
}
|
||||
|
||||
return new File(path).isFile()
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2011-2016 Basis Technology Corp.
|
||||
* Copyright 2011-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -27,6 +27,7 @@ import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.swing.SwingUtilities;
|
||||
import javax.swing.event.ListSelectionEvent;
|
||||
import javax.swing.table.AbstractTableModel;
|
||||
import org.openide.util.NbBundle.Messages;
|
||||
@ -74,14 +75,14 @@ public final class IngestJobInfoPanel extends javax.swing.JPanel {
|
||||
}
|
||||
|
||||
private void refresh() {
|
||||
SleuthkitCase skCase = Case.getCurrentCase().getSleuthkitCase();
|
||||
try {
|
||||
SleuthkitCase skCase = Case.getOpenCase().getSleuthkitCase();
|
||||
List<IngestJobInfo> ingestJobs = skCase.getIngestJobs();
|
||||
this.ingestJobs = ingestJobs;
|
||||
this.repaint();
|
||||
} catch (TskCoreException ex) {
|
||||
} catch (TskCoreException | NoCurrentCaseException ex) {
|
||||
logger.log(Level.SEVERE, "Failed to load ingest jobs.", ex);
|
||||
JOptionPane.showMessageDialog(null, Bundle.IngestJobInfoPanel_loadIngestJob_error_text(), Bundle.IngestJobInfoPanel_loadIngestJob_error_title(), JOptionPane.ERROR_MESSAGE);
|
||||
JOptionPane.showMessageDialog(this, Bundle.IngestJobInfoPanel_loadIngestJob_error_text(), Bundle.IngestJobInfoPanel_loadIngestJob_error_title(), JOptionPane.ERROR_MESSAGE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -113,11 +114,11 @@ public final class IngestJobInfoPanel extends javax.swing.JPanel {
|
||||
@Override
|
||||
public Object getValueAt(int rowIndex, int columnIndex) {
|
||||
IngestJobInfo currIngestJob = ingestJobs.get(rowIndex);
|
||||
SleuthkitCase skCase = Case.getCurrentCase().getSleuthkitCase();
|
||||
if (columnIndex == 0) {
|
||||
try {
|
||||
SleuthkitCase skCase = Case.getOpenCase().getSleuthkitCase();
|
||||
return skCase.getContentById(currIngestJob.getObjectId()).getName();
|
||||
} catch (TskCoreException ex) {
|
||||
} catch (TskCoreException | NoCurrentCaseException ex) {
|
||||
logger.log(Level.SEVERE, "Failed to get content from db", ex);
|
||||
return "";
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2013-2017 Basis Technology Corp.
|
||||
* Copyright 2013-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -54,6 +54,7 @@ public class LocalDiskDSProcessor implements DataSourceProcessor, AutoIngestData
|
||||
*/
|
||||
private String deviceId;
|
||||
private String drivePath;
|
||||
private int sectorSize;
|
||||
private String timeZone;
|
||||
private ImageWriterSettings imageWriterSettings;
|
||||
private boolean ignoreFatOrphanFiles;
|
||||
@ -137,6 +138,7 @@ public class LocalDiskDSProcessor implements DataSourceProcessor, AutoIngestData
|
||||
if (!setDataSourceOptionsCalled) {
|
||||
deviceId = UUID.randomUUID().toString();
|
||||
drivePath = configPanel.getContentPaths();
|
||||
sectorSize = configPanel.getSectorSize();
|
||||
timeZone = configPanel.getTimeZone();
|
||||
ignoreFatOrphanFiles = configPanel.getNoFatOrphans();
|
||||
if (configPanel.getImageWriterEnabled()) {
|
||||
@ -145,7 +147,7 @@ public class LocalDiskDSProcessor implements DataSourceProcessor, AutoIngestData
|
||||
imageWriterSettings = null;
|
||||
}
|
||||
}
|
||||
addDiskTask = new AddImageTask(deviceId, drivePath, timeZone, ignoreFatOrphanFiles, imageWriterSettings, progressMonitor, callback);
|
||||
addDiskTask = new AddImageTask(deviceId, drivePath, sectorSize, timeZone, ignoreFatOrphanFiles, imageWriterSettings, progressMonitor, callback);
|
||||
new Thread(addDiskTask).start();
|
||||
}
|
||||
|
||||
@ -171,7 +173,33 @@ public class LocalDiskDSProcessor implements DataSourceProcessor, AutoIngestData
|
||||
* @param callback Callback to call when processing is done.
|
||||
*/
|
||||
public void run(String deviceId, String drivePath, String timeZone, boolean ignoreFatOrphanFiles, DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback callback) {
|
||||
addDiskTask = new AddImageTask(deviceId, drivePath, timeZone, ignoreFatOrphanFiles, imageWriterSettings, progressMonitor, callback);
|
||||
run(deviceId, drivePath, 0, timeZone, ignoreFatOrphanFiles, progressMonitor, callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a data source to the case database using a background task in a
|
||||
* separate thread and the given settings instead of those provided by the
|
||||
* selection and configuration panel. Returns as soon as the background task
|
||||
* is started and uses the callback object to signal task completion and
|
||||
* return results.
|
||||
*
|
||||
* @param deviceId An ASCII-printable identifier for the device
|
||||
* associated with the data source that is
|
||||
* intended to be unique across multiple cases
|
||||
* (e.g., a UUID).
|
||||
* @param drivePath Path to the local drive.
|
||||
* @param sectorSize The sector size (use '0' for autodetect).
|
||||
* @param timeZone The time zone to use when processing dates
|
||||
* and times for the image, obtained from
|
||||
* java.util.TimeZone.getID.
|
||||
* @param ignoreFatOrphanFiles Whether to parse orphans if the image has a
|
||||
* FAT filesystem.
|
||||
* @param progressMonitor Progress monitor for reporting progress
|
||||
* during processing.
|
||||
* @param callback Callback to call when processing is done.
|
||||
*/
|
||||
private void run(String deviceId, String drivePath, int sectorSize, String timeZone, boolean ignoreFatOrphanFiles, DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback callback) {
|
||||
addDiskTask = new AddImageTask(deviceId, drivePath, sectorSize, timeZone, ignoreFatOrphanFiles, imageWriterSettings, progressMonitor, callback);
|
||||
new Thread(addDiskTask).start();
|
||||
}
|
||||
|
||||
@ -227,10 +255,11 @@ public class LocalDiskDSProcessor implements DataSourceProcessor, AutoIngestData
|
||||
public void process(String deviceId, Path dataSourcePath, DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback callBack) throws AutoIngestDataSourceProcessorException {
|
||||
this.deviceId = deviceId;
|
||||
this.drivePath = dataSourcePath.toString();
|
||||
this.sectorSize = 0;
|
||||
this.timeZone = Calendar.getInstance().getTimeZone().getID();
|
||||
this.ignoreFatOrphanFiles = false;
|
||||
setDataSourceOptionsCalled = true;
|
||||
run(deviceId, drivePath, timeZone, ignoreFatOrphanFiles, progressMonitor, callBack);
|
||||
run(deviceId, drivePath, sectorSize, timeZone, ignoreFatOrphanFiles, progressMonitor, callBack);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -250,6 +279,7 @@ public class LocalDiskDSProcessor implements DataSourceProcessor, AutoIngestData
|
||||
public void setDataSourceOptions(String drivePath, String timeZone, boolean ignoreFatOrphanFiles) {
|
||||
this.deviceId = UUID.randomUUID().toString();
|
||||
this.drivePath = drivePath;
|
||||
this.sectorSize = 0;
|
||||
this.timeZone = Calendar.getInstance().getTimeZone().getID();
|
||||
this.ignoreFatOrphanFiles = ignoreFatOrphanFiles;
|
||||
setDataSourceOptionsCalled = true;
|
||||
|
@ -27,55 +27,52 @@
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="diskLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
<Component id="refreshTableButton" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="jScrollPane1" alignment="1" max="32767" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="noFatOrphansCheckbox" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" alignment="0" groupAlignment="1" attributes="0">
|
||||
<Component id="copyImageCheckbox" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="descLabel" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="21" pref="21" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="pathTextField" min="-2" pref="342" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="browseButton" pref="92" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="imageWriterErrorLabel" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="changeDatabasePathCheckbox" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="103" groupAlignment="1" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="timeZoneLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="timeZoneComboBox" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="1" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="21" pref="21" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="1" attributes="0">
|
||||
<Component id="jLabel1" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="changeDatabasePathCheckbox" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="imageWriterErrorLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="descLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Component id="copyImageCheckbox" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="errorLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="sectorSizeLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="sectorSizeComboBox" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="21" pref="21" max="-2" attributes="0"/>
|
||||
<Component id="pathTextField" min="-2" pref="342" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="browseButton" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="noFatOrphansCheckbox" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
<Component id="jScrollPane1" alignment="1" pref="488" max="32767" attributes="0"/>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
<Component id="refreshTablebutton" min="-2" pref="129" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="diskLabel" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="errorLabel" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
@ -85,27 +82,32 @@
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="diskLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="1" max="-2" attributes="0"/>
|
||||
<Component id="jScrollPane1" min="-2" pref="100" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="refreshTablebutton" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="refreshTableButton" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="timeZoneLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="timeZoneComboBox" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="noFatOrphansCheckbox" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="descLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="10" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="sectorSizeLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="sectorSizeComboBox" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="copyImageCheckbox" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="1" attributes="0">
|
||||
<Component id="browseButton" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="pathTextField" min="-2" pref="23" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="pathTextField" alignment="3" min="-2" pref="23" max="-2" attributes="0"/>
|
||||
<Component id="browseButton" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="changeDatabasePathCheckbox" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
|
||||
@ -113,7 +115,7 @@
|
||||
<Component id="imageWriterErrorLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="errorLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="58" max="32767" attributes="0"/>
|
||||
<EmptySpace pref="43" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
@ -276,15 +278,32 @@
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="refreshTablebutton">
|
||||
<Component class="javax.swing.JButton" name="refreshTableButton">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LocalDiskPanel.refreshTablebutton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LocalDiskPanel.refreshTableButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="refreshTablebuttonActionPerformed"/>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="refreshTableButtonActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="sectorSizeLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LocalDiskPanel.sectorSizeLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JComboBox" name="sectorSizeComboBox">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
|
||||
<StringArray count="0"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2011-2017 Basis Technology Corp.
|
||||
* Copyright 2011-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -42,7 +42,9 @@ import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
|
||||
import org.sleuthkit.autopsy.coreutils.PlatformUtil;
|
||||
import org.sleuthkit.autopsy.imagewriter.ImageWriterSettings;
|
||||
|
||||
@NbBundle.Messages({"LocalDiskPanel.refreshTablebutton.text=Refresh Local Disks"
|
||||
@NbBundle.Messages({"LocalDiskPanel.refreshTablebutton.text=Refresh Local Disks",
|
||||
"LocalDiskPanel.listener.getOpenCase.errTitle=No open case available",
|
||||
"LocalDiskPanel.listener.getOpenCase.errMsg=LocalDiskPanel listener couldn't get the open case."
|
||||
})
|
||||
/**
|
||||
* ImageTypePanel for adding a local disk or partition such as PhysicalDrive0 or
|
||||
@ -51,6 +53,7 @@ import org.sleuthkit.autopsy.imagewriter.ImageWriterSettings;
|
||||
final class LocalDiskPanel extends JPanel {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(LocalDiskPanel.class.getName());
|
||||
private static final String[] SECTOR_SIZE_CHOICES = {"Auto Detect", "512", "1024", "2048", "4096"};
|
||||
private static LocalDiskPanel instance;
|
||||
private static final long serialVersionUID = 1L;
|
||||
private List<LocalDisk> disks;
|
||||
@ -68,15 +71,21 @@ final class LocalDiskPanel extends JPanel {
|
||||
initComponents();
|
||||
customInit();
|
||||
createTimeZoneList();
|
||||
createSectorSizeList();
|
||||
refreshTable();
|
||||
diskTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
|
||||
@Override
|
||||
public void valueChanged(ListSelectionEvent e) {
|
||||
if (diskTable.getSelectedRow() >= 0 && diskTable.getSelectedRow() < disks.size()) {
|
||||
enableNext = true;
|
||||
setPotentialImageWriterPath(disks.get(diskTable.getSelectedRow()));
|
||||
try {
|
||||
setPotentialImageWriterPath(disks.get(diskTable.getSelectedRow()));
|
||||
firePropertyChange(DataSourceProcessor.DSP_PANEL_EVENT.UPDATE_UI.toString(), false, true);
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
logger.log(Level.SEVERE, "Exception while getting open case.", e); //NON-NLS
|
||||
MessageNotifyUtil.Notify.show(Bundle.LocalDiskPanel_listener_getOpenCase_errTitle(),
|
||||
Bundle.LocalDiskPanel_listener_getOpenCase_errMsg(),
|
||||
MessageNotifyUtil.MessageType.ERROR);
|
||||
} catch (Exception ex) {
|
||||
logger.log(Level.SEVERE, "LocalDiskPanel listener threw exception", e); //NON-NLS
|
||||
MessageNotifyUtil.Notify.show(NbBundle.getMessage(this.getClass(), "LocalDiskPanel.moduleErr"),
|
||||
@ -115,7 +124,7 @@ final class LocalDiskPanel extends JPanel {
|
||||
diskTable.setEnabled(false);
|
||||
imageWriterErrorLabel.setVisible(false);
|
||||
imageWriterErrorLabel.setText("");
|
||||
if(! PlatformUtil.isWindowsOS()){
|
||||
if (!PlatformUtil.isWindowsOS()) {
|
||||
copyImageCheckbox.setSelected(false);
|
||||
copyImageCheckbox.setEnabled(false);
|
||||
}
|
||||
@ -147,7 +156,9 @@ final class LocalDiskPanel extends JPanel {
|
||||
jLabel1 = new javax.swing.JLabel();
|
||||
imageWriterErrorLabel = new javax.swing.JLabel();
|
||||
changeDatabasePathCheckbox = new javax.swing.JCheckBox();
|
||||
refreshTablebutton = new javax.swing.JButton();
|
||||
refreshTableButton = new javax.swing.JButton();
|
||||
sectorSizeLabel = new javax.swing.JLabel();
|
||||
sectorSizeComboBox = new javax.swing.JComboBox<>();
|
||||
|
||||
setMinimumSize(new java.awt.Dimension(0, 420));
|
||||
setPreferredSize(new java.awt.Dimension(485, 410));
|
||||
@ -205,13 +216,15 @@ final class LocalDiskPanel extends JPanel {
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(changeDatabasePathCheckbox, org.openide.util.NbBundle.getMessage(LocalDiskPanel.class, "LocalDiskPanel.changeDatabasePathCheckbox.text")); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(refreshTablebutton, org.openide.util.NbBundle.getMessage(LocalDiskPanel.class, "LocalDiskPanel.refreshTablebutton.text")); // NOI18N
|
||||
refreshTablebutton.addActionListener(new java.awt.event.ActionListener() {
|
||||
org.openide.awt.Mnemonics.setLocalizedText(refreshTableButton, org.openide.util.NbBundle.getMessage(LocalDiskPanel.class, "LocalDiskPanel.refreshTableButton.text")); // NOI18N
|
||||
refreshTableButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
refreshTablebuttonActionPerformed(evt);
|
||||
refreshTableButtonActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(sectorSizeLabel, org.openide.util.NbBundle.getMessage(LocalDiskPanel.class, "LocalDiskPanel.sectorSizeLabel.text")); // NOI18N
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
@ -219,66 +232,70 @@ final class LocalDiskPanel extends JPanel {
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(noFatOrphansCheckbox)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(copyImageCheckbox)
|
||||
.addComponent(descLabel))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGap(21, 21, 21)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(pathTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 342, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(browseButton, javax.swing.GroupLayout.DEFAULT_SIZE, 92, Short.MAX_VALUE))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(imageWriterErrorLabel)
|
||||
.addComponent(jLabel1)
|
||||
.addComponent(changeDatabasePathCheckbox))
|
||||
.addGap(0, 0, Short.MAX_VALUE)))))
|
||||
.addGap(0, 0, Short.MAX_VALUE))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(timeZoneLabel)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(timeZoneComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 488, Short.MAX_VALUE)
|
||||
.addComponent(diskLabel)
|
||||
.addGap(0, 0, Short.MAX_VALUE))
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||
.addGap(0, 0, Short.MAX_VALUE)
|
||||
.addComponent(refreshTablebutton, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(refreshTableButton))
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(diskLabel)
|
||||
.addComponent(errorLabel))
|
||||
.addGap(0, 0, Short.MAX_VALUE)))
|
||||
.addContainerGap()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
|
||||
.addComponent(timeZoneLabel)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(timeZoneComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
|
||||
.addGap(21, 21, 21)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(jLabel1, javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(changeDatabasePathCheckbox, javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(imageWriterErrorLabel, javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(descLabel, javax.swing.GroupLayout.Alignment.LEADING)))
|
||||
.addComponent(copyImageCheckbox, javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(errorLabel, javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
|
||||
.addComponent(sectorSizeLabel)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(sectorSizeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
|
||||
.addGap(21, 21, 21)
|
||||
.addComponent(pathTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 342, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(browseButton))
|
||||
.addComponent(noFatOrphansCheckbox, javax.swing.GroupLayout.Alignment.LEADING))
|
||||
.addGap(0, 0, Short.MAX_VALUE)))))
|
||||
.addContainerGap())
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(diskLabel)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGap(1, 1, 1)
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(refreshTablebutton)
|
||||
.addComponent(refreshTableButton)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(timeZoneLabel)
|
||||
.addComponent(timeZoneComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(noFatOrphansCheckbox)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(descLabel)
|
||||
.addGap(10, 10, 10)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(sectorSizeLabel)
|
||||
.addComponent(sectorSizeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(copyImageCheckbox)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(browseButton)
|
||||
.addComponent(pathTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(pathTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(browseButton))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(changeDatabasePathCheckbox)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jLabel1)
|
||||
@ -286,7 +303,7 @@ final class LocalDiskPanel extends JPanel {
|
||||
.addComponent(imageWriterErrorLabel)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(errorLabel)
|
||||
.addContainerGap(58, Short.MAX_VALUE))
|
||||
.addContainerGap(43, Short.MAX_VALUE))
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
@ -317,9 +334,9 @@ final class LocalDiskPanel extends JPanel {
|
||||
fireUpdateEvent();
|
||||
}//GEN-LAST:event_browseButtonActionPerformed
|
||||
|
||||
private void refreshTablebuttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_refreshTablebuttonActionPerformed
|
||||
private void refreshTableButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_refreshTableButtonActionPerformed
|
||||
refreshTable();
|
||||
}//GEN-LAST:event_refreshTablebuttonActionPerformed
|
||||
}//GEN-LAST:event_refreshTableButtonActionPerformed
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JButton browseButton;
|
||||
@ -334,7 +351,9 @@ final class LocalDiskPanel extends JPanel {
|
||||
private javax.swing.JScrollPane jScrollPane1;
|
||||
private javax.swing.JCheckBox noFatOrphansCheckbox;
|
||||
private javax.swing.JTextField pathTextField;
|
||||
private javax.swing.JButton refreshTablebutton;
|
||||
private javax.swing.JButton refreshTableButton;
|
||||
private javax.swing.JComboBox<String> sectorSizeComboBox;
|
||||
private javax.swing.JLabel sectorSizeLabel;
|
||||
private javax.swing.JComboBox<String> timeZoneComboBox;
|
||||
private javax.swing.JLabel timeZoneLabel;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
@ -365,6 +384,21 @@ final class LocalDiskPanel extends JPanel {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the sector size.
|
||||
*
|
||||
* @return 0 if autodetect; otherwise the value selected.
|
||||
*/
|
||||
int getSectorSize() {
|
||||
int sectorSizeSelectionIndex = sectorSizeComboBox.getSelectedIndex();
|
||||
|
||||
if (sectorSizeSelectionIndex == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return Integer.valueOf((String) sectorSizeComboBox.getSelectedItem());
|
||||
}
|
||||
|
||||
String getTimeZone() {
|
||||
String tz = timeZoneComboBox.getSelectedItem().toString();
|
||||
return tz.substring(tz.indexOf(")") + 2).trim();
|
||||
@ -375,11 +409,11 @@ final class LocalDiskPanel extends JPanel {
|
||||
return noFatOrphansCheckbox.isSelected();
|
||||
}
|
||||
|
||||
private static String getDefaultImageWriterFolder() {
|
||||
return Paths.get(Case.getCurrentCase().getModuleDirectory(), "Image Writer").toString();
|
||||
private static String getDefaultImageWriterFolder() throws NoCurrentCaseException {
|
||||
return Paths.get(Case.getOpenCase().getModuleDirectory(), "Image Writer").toString();
|
||||
}
|
||||
|
||||
private void setPotentialImageWriterPath(LocalDisk disk) {
|
||||
private void setPotentialImageWriterPath(LocalDisk disk) throws NoCurrentCaseException {
|
||||
|
||||
File subDirectory = Paths.get(getDefaultImageWriterFolder()).toFile();
|
||||
if (!subDirectory.exists()) {
|
||||
@ -464,8 +498,8 @@ final class LocalDiskPanel extends JPanel {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the drop down list for the time zones and then makes the local
|
||||
* machine time zone to be selected.
|
||||
* Creates the drop down list for the time zones and defaults the selection
|
||||
* to the local machine time zone.
|
||||
*/
|
||||
public void createTimeZoneList() {
|
||||
// load and add all timezone
|
||||
@ -500,6 +534,17 @@ final class LocalDiskPanel extends JPanel {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the drop down list for the sector size and defaults the selection
|
||||
* to "Auto Detect".
|
||||
*/
|
||||
private void createSectorSizeList() {
|
||||
for (String choice : SECTOR_SIZE_CHOICES) {
|
||||
sectorSizeComboBox.addItem(choice);
|
||||
}
|
||||
sectorSizeComboBox.setSelectedIndex(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Table model for displaing information from LocalDisk Objects in a table.
|
||||
*/
|
||||
@ -556,7 +601,7 @@ final class LocalDiskPanel extends JPanel {
|
||||
case 1:
|
||||
return NbBundle.getMessage(this.getClass(), "LocalDiskPanel.diskTable.column2.title");
|
||||
default:
|
||||
return "Unnamed"; //NON-NLS
|
||||
return "Unnamed"; //NON-NLS
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2011-2016 Basis Technology Corp.
|
||||
* Copyright 2011-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -18,33 +18,61 @@
|
||||
*/
|
||||
package org.sleuthkit.autopsy.casemodule;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import java.util.logging.Level;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.filechooser.FileFilter;
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
import org.openide.modules.InstalledFileLocator;
|
||||
import org.openide.util.Exceptions;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.openide.util.NbBundle.Messages;
|
||||
import org.openide.util.lookup.ServiceProvider;
|
||||
import org.openide.util.lookup.ServiceProviders;
|
||||
import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorCallback;
|
||||
import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorProgressMonitor;
|
||||
import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessor;
|
||||
import org.sleuthkit.autopsy.coreutils.ExecUtil;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.coreutils.PlatformUtil;
|
||||
import org.sleuthkit.autopsy.datasourceprocessors.AutoIngestDataSourceProcessor;
|
||||
|
||||
/**
|
||||
* A local/logical files and/or directories data source processor that
|
||||
* implements the DataSourceProcessor service provider interface to allow
|
||||
* integration with the add data source wizard. It also provides a run method
|
||||
* overload to allow it to be used independently of the wizard.
|
||||
* A local/logical files/logical evidence file(.lo1)/or directories data source
|
||||
* processor that implements the DataSourceProcessor service provider interface
|
||||
* to allow integration with the add data source wizard. It also provides a run
|
||||
* method overload to allow it to be used independently of the wizard.
|
||||
*/
|
||||
@ServiceProviders(value={
|
||||
@ServiceProvider(service=DataSourceProcessor.class),
|
||||
@ServiceProvider(service=AutoIngestDataSourceProcessor.class)}
|
||||
@ServiceProviders(value = {
|
||||
@ServiceProvider(service = DataSourceProcessor.class)
|
||||
,
|
||||
@ServiceProvider(service = AutoIngestDataSourceProcessor.class)}
|
||||
)
|
||||
@Messages({
|
||||
"LocalFilesDSProcessor.logicalEvidenceFilter.desc=Logical Evidence Files (L01)"
|
||||
})
|
||||
public class LocalFilesDSProcessor implements DataSourceProcessor, AutoIngestDataSourceProcessor {
|
||||
|
||||
private static final String DATA_SOURCE_TYPE = NbBundle.getMessage(LocalFilesDSProcessor.class, "LocalFilesDSProcessor.dsType");
|
||||
private final LocalFilesPanel configPanel;
|
||||
private static final Logger logger = Logger.getLogger(LocalFilesDSProcessor.class.getName());
|
||||
private final LogicalFilesDspPanel configPanel;
|
||||
private static final String L01_EXTRACTION_DIR = "L01";
|
||||
private static final String UNIQUENESS_CONSTRAINT_SEPERATOR = "_";
|
||||
private static final String EWFEXPORT_DIR = "ewfexport_exec"; // NON-NLS
|
||||
private static final String EWFEXPORT_32_BIT_DIR = "32-bit"; // NON-NLS
|
||||
private static final String EWFEXPORT_64_BIT_DIR = "64-bit"; // NON-NLS
|
||||
private static final String EWFEXPORT_WINDOWS_EXE = "ewfexport.exe"; // NON-NLS
|
||||
private static final String LOG_FILE_EXTENSION = ".txt";
|
||||
private static final List<String> LOGICAL_EVIDENCE_EXTENSIONS = Arrays.asList(".l01");
|
||||
private static final String LOGICAL_EVIDENCE_DESC = Bundle.LocalFilesDSProcessor_logicalEvidenceFilter_desc();
|
||||
private static final GeneralFilter LOGICAL_EVIDENCE_FILTER = new GeneralFilter(LOGICAL_EVIDENCE_EXTENSIONS, LOGICAL_EVIDENCE_DESC);
|
||||
/*
|
||||
* TODO: Remove the setDataSourceOptionsCalled flag and the settings fields
|
||||
* when the deprecated method setDataSourceOptions is removed.
|
||||
@ -59,7 +87,7 @@ public class LocalFilesDSProcessor implements DataSourceProcessor, AutoIngestDat
|
||||
* method overload to allow it to be used independently of the wizard.
|
||||
*/
|
||||
public LocalFilesDSProcessor() {
|
||||
configPanel = LocalFilesPanel.getDefault();
|
||||
configPanel = LogicalFilesDspPanel.getDefault();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -129,10 +157,136 @@ public class LocalFilesDSProcessor implements DataSourceProcessor, AutoIngestDat
|
||||
public void run(DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback callback) {
|
||||
if (!setDataSourceOptionsCalled) {
|
||||
localFilePaths = configPanel.getContentPaths();
|
||||
if (configPanel.subTypeIsLogicalEvidencePanel()) {
|
||||
try {
|
||||
//if the L01 option was chosen
|
||||
localFilePaths = extractLogicalEvidenceFileContents(localFilePaths);
|
||||
} catch (L01Exception ex) {
|
||||
//contents of l01 could not be extracted don't add data source or run ingest
|
||||
final List<String> errors = new ArrayList<>();
|
||||
errors.add(ex.getMessage());
|
||||
callback.done(DataSourceProcessorCallback.DataSourceProcessorResult.CRITICAL_ERRORS, errors, new ArrayList<>());
|
||||
return;
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
logger.log(Level.WARNING, "Exception while getting open case.", ex);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
run(UUID.randomUUID().toString(), configPanel.getFileSetName(), localFilePaths, progressMonitor, callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* Extract the contents of the logical evidence files and return the paths
|
||||
* to those extracted files.
|
||||
*
|
||||
* @param logicalEvidenceFilePaths
|
||||
*
|
||||
* @return extractedPaths - the paths to all the files extracted from the
|
||||
* logical evidence files
|
||||
*
|
||||
* @throws
|
||||
* org.sleuthkit.autopsy.casemodule.LocalFilesDSProcessor.L01Exception
|
||||
*/
|
||||
private List<String> extractLogicalEvidenceFileContents(final List<String> logicalEvidenceFilePaths) throws L01Exception, NoCurrentCaseException {
|
||||
final List<String> extractedPaths = new ArrayList<>();
|
||||
Path ewfexportPath;
|
||||
ewfexportPath = locateEwfexportExecutable();
|
||||
List<String> command = new ArrayList<>();
|
||||
for (final String l01Path : logicalEvidenceFilePaths) {
|
||||
command.clear();
|
||||
command.add(ewfexportPath.toAbsolutePath().toString());
|
||||
command.add("-f");
|
||||
command.add("files");
|
||||
command.add("-t");
|
||||
File l01Dir = new File(Case.getOpenCase().getModuleDirectory(), L01_EXTRACTION_DIR); //WJS-TODO change to getOpenCase() when that method exists
|
||||
if (!l01Dir.exists()) {
|
||||
l01Dir.mkdirs();
|
||||
}
|
||||
Path dirPath = Paths.get(FilenameUtils.getBaseName(l01Path) + UNIQUENESS_CONSTRAINT_SEPERATOR + System.currentTimeMillis());
|
||||
|
||||
command.add(dirPath.toString());
|
||||
command.add(l01Path);
|
||||
ProcessBuilder processBuilder = new ProcessBuilder(command);
|
||||
processBuilder.directory(l01Dir);
|
||||
try {
|
||||
//redirect ewfexport stdout and stderr to txt file
|
||||
Path logFileName = Paths.get(l01Dir.toString(), dirPath.toString() + LOG_FILE_EXTENSION);
|
||||
File logFile = new File(logFileName.toString());
|
||||
Path errFileName = Paths.get(l01Dir.toString(), dirPath.toString() + LOG_FILE_EXTENSION);
|
||||
File errFile = new File(errFileName.toString());
|
||||
processBuilder.redirectError(ProcessBuilder.Redirect.appendTo(errFile));
|
||||
processBuilder.redirectOutput(ProcessBuilder.Redirect.appendTo(logFile));
|
||||
// open the file with ewfexport to extract its contents
|
||||
ExecUtil.execute(processBuilder, new ExecUtil.TimedProcessTerminator());
|
||||
if (l01Dir.toPath().resolve(dirPath).toFile().exists()) {
|
||||
extractedPaths.add(l01Dir.toPath().resolve(dirPath).toString());
|
||||
} else { //if we failed to extract anything let the user know the L01 file was unable to be processed
|
||||
throw new L01Exception("Can not process the selected L01 file, ewfExport was unable to extract any files from it.");
|
||||
}
|
||||
|
||||
} catch (SecurityException ex) {
|
||||
throw new L01Exception("Security exception occcured while trying to extract l01 contents", ex);
|
||||
} catch (IOException ex) {
|
||||
throw new L01Exception("IOException occcured while trying to extract l01 contents", ex);
|
||||
}
|
||||
}
|
||||
return extractedPaths;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a file filter for logical evidence files.
|
||||
*
|
||||
* @return LOGICAL_EVIDENCE_FILTER
|
||||
*/
|
||||
static FileFilter getLogicalEvidenceFilter() {
|
||||
return LOGICAL_EVIDENCE_FILTER;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the path for the ewfexport executable.
|
||||
*
|
||||
* @return the path to ewfexport.exe
|
||||
*
|
||||
* @throws
|
||||
* org.sleuthkit.autopsy.casemodule.LocalFilesDSProcessor.L01Exception
|
||||
*/
|
||||
private Path locateEwfexportExecutable() throws L01Exception {
|
||||
// Must be running under a Windows operating system.
|
||||
if (!PlatformUtil.isWindowsOS()) {
|
||||
throw new L01Exception("L01 files are only supported on windows currently");
|
||||
}
|
||||
|
||||
// Build the expected path to either the 32-bit or 64-bit version of the
|
||||
// ewfexport executable.
|
||||
final File ewfRoot = InstalledFileLocator.getDefault().locate(EWFEXPORT_DIR, LocalFilesDSProcessor.class.getPackage().getName(), false);
|
||||
|
||||
Path executablePath;
|
||||
if (PlatformUtil.is64BitOS()) {
|
||||
executablePath = Paths.get(
|
||||
ewfRoot.getAbsolutePath(),
|
||||
EWFEXPORT_64_BIT_DIR,
|
||||
EWFEXPORT_WINDOWS_EXE);
|
||||
} else {
|
||||
executablePath = Paths.get(
|
||||
ewfRoot.getAbsolutePath(),
|
||||
EWFEXPORT_32_BIT_DIR,
|
||||
EWFEXPORT_WINDOWS_EXE);
|
||||
}
|
||||
|
||||
// Make sure the executable exists at the expected location and that it
|
||||
// can be run.
|
||||
final File ewfexport = executablePath.toFile();
|
||||
if (null == ewfexport || !ewfexport.exists()) {
|
||||
throw new LocalFilesDSProcessor.L01Exception("EWF export executable was not found");
|
||||
}
|
||||
if (!ewfexport.canExecute()) {
|
||||
throw new LocalFilesDSProcessor.L01Exception("EWF export executable can not be executed");
|
||||
}
|
||||
|
||||
return executablePath;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a data source to the case database using a background task in a
|
||||
* separate thread and the given settings instead of those provided by the
|
||||
@ -180,7 +334,7 @@ public class LocalFilesDSProcessor implements DataSourceProcessor, AutoIngestDat
|
||||
*/
|
||||
@Override
|
||||
public void reset() {
|
||||
configPanel.reset();
|
||||
configPanel.select();
|
||||
localFilePaths = null;
|
||||
setDataSourceOptionsCalled = false;
|
||||
}
|
||||
@ -190,12 +344,32 @@ public class LocalFilesDSProcessor implements DataSourceProcessor, AutoIngestDat
|
||||
// Local files DSP can process any file by simply adding it as a logical file.
|
||||
// It should return lowest possible non-zero confidence level and be treated
|
||||
// as the "option of last resort" for auto ingest purposes
|
||||
|
||||
this.localFilePaths = Arrays.asList(new String[]{dataSourcePath.toString()});
|
||||
//If there is only 1 file check if it is an L01 file and if it is extract the
|
||||
//contents and replace the paths, if the contents can't be extracted return 0
|
||||
if (localFilePaths.size() == 1) {
|
||||
for (final String path : localFilePaths) {
|
||||
if (LOGICAL_EVIDENCE_FILTER.accept(new File(path))) {
|
||||
try {
|
||||
//if the L01 option was chosen
|
||||
localFilePaths = extractLogicalEvidenceFileContents(localFilePaths);
|
||||
} catch (L01Exception ex) {
|
||||
logger.log(Level.WARNING, "File extension was .l01 but contents of logical evidence file were unable to be extracted", ex);
|
||||
//contents of l01 could not be extracted don't add data source or run ingest
|
||||
return 0;
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
logger.log(Level.WARNING, "Exception while getting open case.", ex);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void process(String deviceId, Path dataSourcePath, DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback callBack) throws AutoIngestDataSourceProcessorException {
|
||||
this.localFilePaths = Arrays.asList(new String[]{dataSourcePath.toString()});
|
||||
run(deviceId, deviceId, this.localFilePaths, progressMonitor, callBack);
|
||||
}
|
||||
|
||||
@ -219,5 +393,21 @@ public class LocalFilesDSProcessor implements DataSourceProcessor, AutoIngestDat
|
||||
this.localFilePaths = Arrays.asList(paths.split(","));
|
||||
setDataSourceOptionsCalled = true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* A custom exception for the L01 processing.
|
||||
*/
|
||||
private final class L01Exception extends Exception {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
L01Exception(final String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
L01Exception(final String message, final Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.5" maxVersion="1.8" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<NonVisualComponents>
|
||||
<Component class="javax.swing.JFileChooser" name="localFileChooser">
|
||||
<Properties>
|
||||
@ -16,21 +16,6 @@
|
||||
<Property name="fileSelectionMode" type="int" value="2"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Container class="javax.swing.JScrollPane" name="jScrollPane1">
|
||||
<AuxValues>
|
||||
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JTextArea" name="jTextArea1">
|
||||
<Properties>
|
||||
<Property name="columns" type="int" value="20"/>
|
||||
<Property name="rows" type="int" value="5"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</NonVisualComponents>
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
|
||||
@ -47,141 +32,172 @@
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="infoLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="jScrollPane2" pref="389" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="selectButton" max="32767" attributes="0"/>
|
||||
<Component id="clearButton" pref="69" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="errorLabel" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="displayNameLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="jButton1" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="jPanel1" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="infoLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="1" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="selectButton" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="36" max="-2" attributes="0"/>
|
||||
<Component id="clearButton" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="jScrollPane2" min="-2" pref="82" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jButton1" alignment="3" min="-2" pref="20" max="-2" attributes="0"/>
|
||||
<Component id="displayNameLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="13" max="-2" attributes="0"/>
|
||||
<Component id="errorLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="7" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="jPanel1" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JButton" name="selectButton">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LocalFilesPanel.selectButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LocalFilesPanel.selectButton.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="actionCommand" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LocalFilesPanel.selectButton.actionCommand" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="selectButtonActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="infoLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LocalFilesPanel.infoLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="clearButton">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LocalFilesPanel.clearButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LocalFilesPanel.clearButton.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="clearButtonActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Container class="javax.swing.JScrollPane" name="jScrollPane2">
|
||||
<AuxValues>
|
||||
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
|
||||
</AuxValues>
|
||||
<Container class="javax.swing.JPanel" name="jPanel1">
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Component id="selectedPathsScrollPane" max="32767" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="selectButton" linkSize="1" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="clearButton" linkSize="1" alignment="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="displayNameLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="changeNameButton" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="errorLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="selectButton" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="36" max="-2" attributes="0"/>
|
||||
<Component id="clearButton" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="selectedPathsScrollPane" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="changeNameButton" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="displayNameLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="13" max="-2" attributes="0"/>
|
||||
<Component id="errorLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JTextArea" name="selectedPaths">
|
||||
<Component class="javax.swing.JButton" name="selectButton">
|
||||
<Properties>
|
||||
<Property name="editable" type="boolean" value="false"/>
|
||||
<Property name="columns" type="int" value="20"/>
|
||||
<Property name="rows" type="int" value="5"/>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LocalFilesPanel.selectButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LocalFilesPanel.selectedPaths.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LocalFilesPanel.selectButton.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="actionCommand" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LocalFilesPanel.selectButton.actionCommand" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[70, 23]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[70, 23]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[70, 23]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="selectButtonActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="clearButton">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LocalFilesPanel.clearButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LocalFilesPanel.clearButton.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[70, 23]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[70, 23]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[70, 23]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="clearButtonActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Container class="javax.swing.JScrollPane" name="selectedPathsScrollPane">
|
||||
<Properties>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[379, 96]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JTextArea" name="selectedPaths">
|
||||
<Properties>
|
||||
<Property name="editable" type="boolean" value="false"/>
|
||||
<Property name="columns" type="int" value="20"/>
|
||||
<Property name="rows" type="int" value="5"/>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LocalFilesPanel.selectedPaths.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Component class="javax.swing.JLabel" name="errorLabel">
|
||||
<Properties>
|
||||
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||
<Color blue="0" green="0" red="ff" type="rgb"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LocalFilesPanel.errorLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="changeNameButton">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LocalFilesPanel.changeNameButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="changeNameButtonActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="displayNameLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LocalFilesPanel.displayNameLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Component class="javax.swing.JLabel" name="errorLabel">
|
||||
<Properties>
|
||||
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||
<Color blue="0" green="0" red="ff" type="rgb"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LocalFilesPanel.errorLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="jButton1">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LocalFilesPanel.jButton1.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="displayNameLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LocalFilesPanel.displayNameLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2011-2016 Basis Technology Corp.
|
||||
* Copyright 2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -24,44 +24,34 @@ import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
import javax.swing.JFileChooser;
|
||||
import javax.swing.JPanel;
|
||||
|
||||
import org.openide.util.NbBundle;
|
||||
import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessor;
|
||||
import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
|
||||
import java.util.logging.Level;
|
||||
import javax.swing.JOptionPane;
|
||||
import org.sleuthkit.autopsy.casemodule.Case.CaseType;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.coreutils.PathValidator;
|
||||
|
||||
/**
|
||||
* Add input wizard subpanel for adding local files / dirs to the case
|
||||
* A panel which allows the user to select local files and/or directories.
|
||||
*/
|
||||
final class LocalFilesPanel extends JPanel {
|
||||
final class LocalFilesPanel extends javax.swing.JPanel {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private final Set<File> currentFiles = new TreeSet<>(); //keep currents in a set to disallow duplicates per add
|
||||
private boolean enableNext = false;
|
||||
private static LocalFilesPanel instance;
|
||||
private static final Logger logger = Logger.getLogger(LocalFilesPanel.class.getName());
|
||||
private String displayName = "";
|
||||
|
||||
/**
|
||||
* Creates new form LocalFilesPanel
|
||||
*/
|
||||
private LocalFilesPanel() {
|
||||
LocalFilesPanel() {
|
||||
initComponents();
|
||||
customInit();
|
||||
}
|
||||
|
||||
static synchronized LocalFilesPanel getDefault() {
|
||||
if (instance == null) {
|
||||
instance = new LocalFilesPanel();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
private void customInit() {
|
||||
localFileChooser.setMultiSelectionEnabled(true);
|
||||
errorLabel.setVisible(false);
|
||||
@ -69,69 +59,6 @@ final class LocalFilesPanel extends JPanel {
|
||||
this.displayNameLabel.setText(NbBundle.getMessage(this.getClass(), "LocalFilesPanel.displayNameLabel.text"));
|
||||
}
|
||||
|
||||
public List<String> getContentPaths() {
|
||||
List<String> pathsList = new ArrayList<>();
|
||||
if (currentFiles == null) {
|
||||
return pathsList;
|
||||
}
|
||||
for (File f : currentFiles) {
|
||||
pathsList.add(f.getAbsolutePath());
|
||||
}
|
||||
return pathsList;
|
||||
}
|
||||
|
||||
public String getContentType() {
|
||||
return NbBundle.getMessage(this.getClass(), "LocalFilesPanel.contentType.text");
|
||||
}
|
||||
|
||||
public boolean validatePanel() {
|
||||
// display warning if there is one (but don't disable "next" button)
|
||||
warnIfPathIsInvalid(getContentPaths());
|
||||
return enableNext;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates path to selected data source and displays warning if it is
|
||||
* invalid.
|
||||
*
|
||||
* @param paths Absolute paths to the selected data source
|
||||
*/
|
||||
private void warnIfPathIsInvalid(List<String> pathsList) {
|
||||
errorLabel.setVisible(false);
|
||||
|
||||
CaseType currentCaseType = Case.getCurrentCase().getCaseType();
|
||||
|
||||
for (String currentPath : pathsList) {
|
||||
if (!PathValidator.isValid(currentPath, currentCaseType)) {
|
||||
errorLabel.setVisible(true);
|
||||
errorLabel.setText(NbBundle.getMessage(this.getClass(), "DataSourceOnCDriveError.text"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void select() {
|
||||
reset();
|
||||
}
|
||||
|
||||
public void reset() {
|
||||
currentFiles.clear();
|
||||
selectedPaths.setText("");
|
||||
enableNext = false;
|
||||
errorLabel.setVisible(false);
|
||||
displayName = "";
|
||||
this.displayNameLabel.setText(NbBundle.getMessage(this.getClass(), "LocalFilesPanel.displayNameLabel.text"));
|
||||
}
|
||||
|
||||
public String getFileSetName() {
|
||||
return this.displayName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return NbBundle.getMessage(this.getClass(), "LocalFilesDSProcessor.toString.text");
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called from within the constructor to initialize the form.
|
||||
* WARNING: Do NOT modify this code. The content of this method is always
|
||||
@ -142,15 +69,13 @@ final class LocalFilesPanel extends JPanel {
|
||||
private void initComponents() {
|
||||
|
||||
localFileChooser = new javax.swing.JFileChooser();
|
||||
jScrollPane1 = new javax.swing.JScrollPane();
|
||||
jTextArea1 = new javax.swing.JTextArea();
|
||||
jPanel1 = new javax.swing.JPanel();
|
||||
selectButton = new javax.swing.JButton();
|
||||
infoLabel = new javax.swing.JLabel();
|
||||
clearButton = new javax.swing.JButton();
|
||||
jScrollPane2 = new javax.swing.JScrollPane();
|
||||
selectedPathsScrollPane = new javax.swing.JScrollPane();
|
||||
selectedPaths = new javax.swing.JTextArea();
|
||||
errorLabel = new javax.swing.JLabel();
|
||||
jButton1 = new javax.swing.JButton();
|
||||
changeNameButton = new javax.swing.JButton();
|
||||
displayNameLabel = new javax.swing.JLabel();
|
||||
|
||||
localFileChooser.setApproveButtonText(org.openide.util.NbBundle.getMessage(LocalFilesPanel.class, "LocalFilesPanel.localFileChooser.approveButtonText")); // NOI18N
|
||||
@ -158,103 +83,115 @@ final class LocalFilesPanel extends JPanel {
|
||||
localFileChooser.setDialogTitle(org.openide.util.NbBundle.getMessage(LocalFilesPanel.class, "LocalFilesPanel.localFileChooser.dialogTitle")); // NOI18N
|
||||
localFileChooser.setFileSelectionMode(javax.swing.JFileChooser.FILES_AND_DIRECTORIES);
|
||||
|
||||
jTextArea1.setColumns(20);
|
||||
jTextArea1.setRows(5);
|
||||
jScrollPane1.setViewportView(jTextArea1);
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(selectButton, org.openide.util.NbBundle.getMessage(LocalFilesPanel.class, "LocalFilesPanel.selectButton.text")); // NOI18N
|
||||
selectButton.setToolTipText(org.openide.util.NbBundle.getMessage(LocalFilesPanel.class, "LocalFilesPanel.selectButton.toolTipText")); // NOI18N
|
||||
selectButton.setActionCommand(org.openide.util.NbBundle.getMessage(LocalFilesPanel.class, "LocalFilesPanel.selectButton.actionCommand")); // NOI18N
|
||||
selectButton.setMaximumSize(new java.awt.Dimension(70, 23));
|
||||
selectButton.setMinimumSize(new java.awt.Dimension(70, 23));
|
||||
selectButton.setPreferredSize(new java.awt.Dimension(70, 23));
|
||||
selectButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
selectButtonActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(infoLabel, org.openide.util.NbBundle.getMessage(LocalFilesPanel.class, "LocalFilesPanel.infoLabel.text")); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(clearButton, org.openide.util.NbBundle.getMessage(LocalFilesPanel.class, "LocalFilesPanel.clearButton.text")); // NOI18N
|
||||
clearButton.setToolTipText(org.openide.util.NbBundle.getMessage(LocalFilesPanel.class, "LocalFilesPanel.clearButton.toolTipText")); // NOI18N
|
||||
clearButton.setMaximumSize(new java.awt.Dimension(70, 23));
|
||||
clearButton.setMinimumSize(new java.awt.Dimension(70, 23));
|
||||
clearButton.setPreferredSize(new java.awt.Dimension(70, 23));
|
||||
clearButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
clearButtonActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
selectedPathsScrollPane.setPreferredSize(new java.awt.Dimension(379, 96));
|
||||
|
||||
selectedPaths.setEditable(false);
|
||||
selectedPaths.setColumns(20);
|
||||
selectedPaths.setRows(5);
|
||||
selectedPaths.setToolTipText(org.openide.util.NbBundle.getMessage(LocalFilesPanel.class, "LocalFilesPanel.selectedPaths.toolTipText")); // NOI18N
|
||||
jScrollPane2.setViewportView(selectedPaths);
|
||||
selectedPathsScrollPane.setViewportView(selectedPaths);
|
||||
|
||||
errorLabel.setForeground(new java.awt.Color(255, 0, 0));
|
||||
org.openide.awt.Mnemonics.setLocalizedText(errorLabel, org.openide.util.NbBundle.getMessage(LocalFilesPanel.class, "LocalFilesPanel.errorLabel.text")); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(jButton1, org.openide.util.NbBundle.getMessage(LocalFilesPanel.class, "LocalFilesPanel.jButton1.text")); // NOI18N
|
||||
jButton1.addActionListener(new java.awt.event.ActionListener() {
|
||||
org.openide.awt.Mnemonics.setLocalizedText(changeNameButton, org.openide.util.NbBundle.getMessage(LocalFilesPanel.class, "LocalFilesPanel.changeNameButton.text")); // NOI18N
|
||||
changeNameButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jButton1ActionPerformed(evt);
|
||||
changeNameButtonActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(displayNameLabel, org.openide.util.NbBundle.getMessage(LocalFilesPanel.class, "LocalFilesPanel.displayNameLabel.text")); // NOI18N
|
||||
|
||||
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
|
||||
jPanel1.setLayout(jPanel1Layout);
|
||||
jPanel1Layout.setHorizontalGroup(
|
||||
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
|
||||
.addComponent(selectedPathsScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addComponent(selectButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(clearButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addGap(2, 2, 2))
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addComponent(displayNameLabel)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(changeNameButton))
|
||||
.addComponent(errorLabel))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
|
||||
);
|
||||
|
||||
jPanel1Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {clearButton, selectButton});
|
||||
|
||||
jPanel1Layout.setVerticalGroup(
|
||||
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addGap(0, 0, 0)
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addComponent(selectButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(36, 36, 36)
|
||||
.addComponent(clearButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(selectedPathsScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(changeNameButton)
|
||||
.addComponent(displayNameLabel))
|
||||
.addGap(13, 13, 13)
|
||||
.addComponent(errorLabel)
|
||||
.addContainerGap())
|
||||
);
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(infoLabel)
|
||||
.addGap(0, 0, Short.MAX_VALUE))
|
||||
.addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 389, Short.MAX_VALUE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addComponent(selectButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(clearButton, javax.swing.GroupLayout.DEFAULT_SIZE, 69, Short.MAX_VALUE))
|
||||
.addGap(2, 2, 2))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(errorLabel)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(displayNameLabel)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(jButton1)))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(infoLabel)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(selectButton)
|
||||
.addGap(36, 36, 36)
|
||||
.addComponent(clearButton))
|
||||
.addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 82, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(18, 18, 18)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(displayNameLabel))
|
||||
.addGap(13, 13, 13)
|
||||
.addComponent(errorLabel)
|
||||
.addGap(7, 7, 7))
|
||||
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void selectButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_selectButtonActionPerformed
|
||||
int returnVal = localFileChooser.showOpenDialog(this);
|
||||
|
||||
if (returnVal == JFileChooser.APPROVE_OPTION) {
|
||||
File[] files = localFileChooser.getSelectedFiles();
|
||||
StringBuilder allPaths = new StringBuilder();
|
||||
for (File f : files) {
|
||||
currentFiles.add(f);
|
||||
}
|
||||
|
||||
//update label
|
||||
StringBuilder allPaths = new StringBuilder();
|
||||
for (File f : currentFiles) {
|
||||
//update label
|
||||
allPaths.append(f.getAbsolutePath()).append("\n");
|
||||
}
|
||||
this.selectedPaths.setText(allPaths.toString());
|
||||
@ -275,28 +212,107 @@ final class LocalFilesPanel extends JPanel {
|
||||
|
||||
private void clearButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_clearButtonActionPerformed
|
||||
reset();
|
||||
|
||||
}//GEN-LAST:event_clearButtonActionPerformed
|
||||
|
||||
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
|
||||
String displayName = JOptionPane.showInputDialog("New Display Name: ");
|
||||
if (displayName != null && !displayName.equals("")) {
|
||||
this.displayName = displayName;
|
||||
private void changeNameButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_changeNameButtonActionPerformed
|
||||
final String selectedDisplayName = JOptionPane.showInputDialog("New Display Name: ");
|
||||
if (selectedDisplayName != null && !selectedDisplayName.isEmpty()) {
|
||||
this.displayName = selectedDisplayName;
|
||||
this.displayNameLabel.setText("Display Name: " + this.displayName);
|
||||
}
|
||||
}//GEN-LAST:event_jButton1ActionPerformed
|
||||
}//GEN-LAST:event_changeNameButtonActionPerformed
|
||||
|
||||
/**
|
||||
* Clear the fields and undo any selection of files.
|
||||
*/
|
||||
void reset() {
|
||||
currentFiles.clear();
|
||||
selectedPaths.setText("");
|
||||
enableNext = false;
|
||||
errorLabel.setVisible(false);
|
||||
displayName = "";
|
||||
this.displayNameLabel.setText(NbBundle.getMessage(this.getClass(), "LocalFilesPanel.displayNameLabel.text"));
|
||||
try {
|
||||
firePropertyChange(DataSourceProcessor.DSP_PANEL_EVENT.UPDATE_UI.toString(), false, true);
|
||||
} catch (Exception e) {
|
||||
logger.log(Level.SEVERE, "LocalFilesPanel listener threw exception", e); //NON-NLS
|
||||
MessageNotifyUtil.Notify.show(NbBundle.getMessage(this.getClass(), "LocalFilesPanel.moduleErr"),
|
||||
NbBundle.getMessage(this.getClass(), "LocalFilesPanel.moduleErr.msg"),
|
||||
MessageNotifyUtil.MessageType.ERROR);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Get the path(s) which have been selected on this panel
|
||||
*
|
||||
* @return a List of Strings representing the path(s) for the selected files or directories
|
||||
*/
|
||||
List<String> getContentPaths() {
|
||||
List<String> pathsList = new ArrayList<>();
|
||||
if (currentFiles == null) {
|
||||
return pathsList;
|
||||
}
|
||||
for (File f : currentFiles) {
|
||||
pathsList.add(f.getAbsolutePath());
|
||||
}
|
||||
return pathsList;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates path to selected data source and displays warning if it is
|
||||
* invalid.
|
||||
*
|
||||
* @return enableNext - true if the panel is valid, false if invalid
|
||||
*/
|
||||
boolean validatePanel() {
|
||||
// display warning if there is one (but don't disable "next" button)
|
||||
warnIfPathIsInvalid(getContentPaths());
|
||||
return enableNext;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates path to selected data source and displays warning if it is
|
||||
* invalid.
|
||||
*
|
||||
* @param paths Absolute paths to the selected data source
|
||||
*/
|
||||
@NbBundle.Messages("LocalFilesPanel.pathValidation.error=WARNING: Exception while gettting opon case.")
|
||||
private void warnIfPathIsInvalid(final List<String> pathsList) {
|
||||
errorLabel.setVisible(false);
|
||||
|
||||
try {
|
||||
final Case.CaseType currentCaseType = Case.getOpenCase().getCaseType();
|
||||
|
||||
for (String currentPath : pathsList) {
|
||||
if (!PathValidator.isValid(currentPath, currentCaseType)) {
|
||||
errorLabel.setVisible(true);
|
||||
errorLabel.setText(NbBundle.getMessage(this.getClass(), "DataSourceOnCDriveError.text"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
errorLabel.setVisible(true);
|
||||
errorLabel.setText(Bundle.LocalFilesPanel_pathValidation_error());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the name given to this collection of local files and directories
|
||||
*
|
||||
* @return a String which is the name for the file set.
|
||||
*/
|
||||
String getFileSetName() {
|
||||
return this.displayName;
|
||||
}
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JButton changeNameButton;
|
||||
private javax.swing.JButton clearButton;
|
||||
private javax.swing.JLabel displayNameLabel;
|
||||
private javax.swing.JLabel errorLabel;
|
||||
private javax.swing.JLabel infoLabel;
|
||||
private javax.swing.JButton jButton1;
|
||||
private javax.swing.JScrollPane jScrollPane1;
|
||||
private javax.swing.JScrollPane jScrollPane2;
|
||||
private javax.swing.JTextArea jTextArea1;
|
||||
private javax.swing.JPanel jPanel1;
|
||||
private javax.swing.JFileChooser localFileChooser;
|
||||
private javax.swing.JButton selectButton;
|
||||
private javax.swing.JTextArea selectedPaths;
|
||||
private javax.swing.JScrollPane selectedPathsScrollPane;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
}
|
||||
|
@ -0,0 +1,114 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<NonVisualComponents>
|
||||
<Component class="javax.swing.JFileChooser" name="logicalEvidenceFileChooser">
|
||||
<Properties>
|
||||
<Property name="approveButtonText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LogicalEvidenceFilePanel.logicalEvidenceFileChooser.approveButtonText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="approveButtonToolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LogicalEvidenceFilePanel.logicalEvidenceFileChooser.approveButtonToolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="dialogTitle" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LogicalEvidenceFilePanel.logicalEvidenceFileChooser.dialogTitle" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="fileSelectionMode" type="int" value="2"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
</NonVisualComponents>
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="errorLabel" max="32767" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="logicalEvidencePathField" max="32767" attributes="0"/>
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Component id="selectButton" min="-2" pref="68" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="4" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="selectButton" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="logicalEvidencePathField" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="errorLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="105" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JButton" name="selectButton">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LogicalEvidenceFilePanel.selectButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LogicalEvidenceFilePanel.selectButton.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="actionCommand" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LogicalEvidenceFilePanel.selectButton.actionCommand" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[70, 23]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[70, 23]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[70, 23]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="selectButtonActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="logicalEvidencePathField">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LogicalEvidenceFilePanel.logicalEvidencePathField.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[379, 20]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="errorLabel">
|
||||
<Properties>
|
||||
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||
<Color blue="0" green="0" red="ff" type="rgb"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LogicalEvidenceFilePanel.errorLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Form>
|
@ -0,0 +1,269 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.casemodule;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
import javax.swing.JFileChooser;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessor;
|
||||
import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
|
||||
import java.util.logging.Level;
|
||||
import javax.swing.event.DocumentEvent;
|
||||
import javax.swing.event.DocumentListener;
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.openide.util.Exceptions;
|
||||
import org.openide.util.NbBundle.Messages;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.coreutils.PathValidator;
|
||||
|
||||
/**
|
||||
* A panel which allows the user to select a Logical Evidence File (L01)
|
||||
*/
|
||||
final class LogicalEvidenceFilePanel extends javax.swing.JPanel implements DocumentListener {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private final Set<File> currentFiles = new TreeSet<>(); //keep currents in a set to disallow duplicates per add
|
||||
private static final Logger logger = Logger.getLogger(LocalFilesPanel.class.getName());
|
||||
private String displayName = "";
|
||||
|
||||
/**
|
||||
* Creates new form LogicalEvidenceFilePanel
|
||||
*/
|
||||
private LogicalEvidenceFilePanel() {
|
||||
initComponents();
|
||||
logicalEvidenceFileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
|
||||
logicalEvidenceFileChooser.setAcceptAllFileFilterUsed(false);
|
||||
logicalEvidenceFileChooser.setMultiSelectionEnabled(false);
|
||||
logicalEvidenceFileChooser.setFileFilter(LocalFilesDSProcessor.getLogicalEvidenceFilter());
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new LogicalEvidencePanel.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
static LogicalEvidenceFilePanel createInstance() {
|
||||
synchronized (LogicalEvidenceFilePanel.class) {
|
||||
final LogicalEvidenceFilePanel instance = new LogicalEvidenceFilePanel();
|
||||
// post-constructor initialization of listener support without leaking references of uninitialized objects
|
||||
instance.logicalEvidencePathField.getDocument().addDocumentListener(instance);
|
||||
return instance;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called from within the constructor to initialize the form.
|
||||
* WARNING: Do NOT modify this code. The content of this method is always
|
||||
* regenerated by the Form Editor.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
logicalEvidenceFileChooser = new javax.swing.JFileChooser();
|
||||
selectButton = new javax.swing.JButton();
|
||||
logicalEvidencePathField = new javax.swing.JTextField();
|
||||
errorLabel = new javax.swing.JLabel();
|
||||
|
||||
logicalEvidenceFileChooser.setApproveButtonText(org.openide.util.NbBundle.getMessage(LogicalEvidenceFilePanel.class, "LogicalEvidenceFilePanel.logicalEvidenceFileChooser.approveButtonText")); // NOI18N
|
||||
logicalEvidenceFileChooser.setApproveButtonToolTipText(org.openide.util.NbBundle.getMessage(LogicalEvidenceFilePanel.class, "LogicalEvidenceFilePanel.logicalEvidenceFileChooser.approveButtonToolTipText")); // NOI18N
|
||||
logicalEvidenceFileChooser.setDialogTitle(org.openide.util.NbBundle.getMessage(LogicalEvidenceFilePanel.class, "LogicalEvidenceFilePanel.logicalEvidenceFileChooser.dialogTitle")); // NOI18N
|
||||
logicalEvidenceFileChooser.setFileSelectionMode(javax.swing.JFileChooser.FILES_AND_DIRECTORIES);
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(selectButton, org.openide.util.NbBundle.getMessage(LogicalEvidenceFilePanel.class, "LogicalEvidenceFilePanel.selectButton.text")); // NOI18N
|
||||
selectButton.setToolTipText(org.openide.util.NbBundle.getMessage(LogicalEvidenceFilePanel.class, "LogicalEvidenceFilePanel.selectButton.toolTipText")); // NOI18N
|
||||
selectButton.setActionCommand(org.openide.util.NbBundle.getMessage(LogicalEvidenceFilePanel.class, "LogicalEvidenceFilePanel.selectButton.actionCommand")); // NOI18N
|
||||
selectButton.setMaximumSize(new java.awt.Dimension(70, 23));
|
||||
selectButton.setMinimumSize(new java.awt.Dimension(70, 23));
|
||||
selectButton.setPreferredSize(new java.awt.Dimension(70, 23));
|
||||
selectButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
selectButtonActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
logicalEvidencePathField.setText(org.openide.util.NbBundle.getMessage(LogicalEvidenceFilePanel.class, "LogicalEvidenceFilePanel.logicalEvidencePathField.text")); // NOI18N
|
||||
logicalEvidencePathField.setPreferredSize(new java.awt.Dimension(379, 20));
|
||||
|
||||
errorLabel.setForeground(new java.awt.Color(255, 0, 0));
|
||||
org.openide.awt.Mnemonics.setLocalizedText(errorLabel, org.openide.util.NbBundle.getMessage(LogicalEvidenceFilePanel.class, "LogicalEvidenceFilePanel.errorLabel.text")); // NOI18N
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(errorLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addContainerGap())
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(logicalEvidencePathField, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(selectButton, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(4, 4, 4))))
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGap(0, 0, 0)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(selectButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(logicalEvidencePathField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(errorLabel)
|
||||
.addContainerGap(105, Short.MAX_VALUE))
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
|
||||
private void selectButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_selectButtonActionPerformed
|
||||
final int returnVal = logicalEvidenceFileChooser.showOpenDialog(this);
|
||||
|
||||
if (returnVal == JFileChooser.APPROVE_OPTION) {
|
||||
final File file = logicalEvidenceFileChooser.getSelectedFile();
|
||||
final StringBuilder allPaths = new StringBuilder();
|
||||
currentFiles.add(file);
|
||||
allPaths.append(file.getAbsolutePath());
|
||||
logicalEvidencePathField.setText(allPaths.toString());
|
||||
logicalEvidencePathField.setToolTipText(allPaths.toString());
|
||||
}
|
||||
fireChange();
|
||||
}//GEN-LAST:event_selectButtonActionPerformed
|
||||
|
||||
/*
|
||||
* Clear previously selected items on the panel.
|
||||
*/
|
||||
void reset() {
|
||||
currentFiles.clear();
|
||||
logicalEvidencePathField.setText("");
|
||||
logicalEvidencePathField.setToolTipText("");
|
||||
}
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JLabel errorLabel;
|
||||
private javax.swing.JFileChooser logicalEvidenceFileChooser;
|
||||
private javax.swing.JTextField logicalEvidencePathField;
|
||||
private javax.swing.JButton selectButton;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
/**
|
||||
* Check if the current selection exists and is a logical evidence file and
|
||||
* therefore the panel is valid.
|
||||
*
|
||||
* @return true for a valid selection, false for an invalid or empty
|
||||
* selection
|
||||
*/
|
||||
@Messages({
|
||||
"LogicalEvidenceFilePanel.validatePanel.nonL01Error.text=Only files with the .l01 file extension are supported here.",
|
||||
"LogicalEvidenceFilePanel.pathValidation.dataSourceOnCDriveError=Warning: Path to multi-user data source is on \"C:\" drive",
|
||||
"LogicalEvidenceFilePanel.pathValidation.getOpenCase.Error=Warning: Exception while getting open case."
|
||||
})
|
||||
boolean validatePanel() {
|
||||
errorLabel.setVisible(false);
|
||||
// display warning if there is one (but don't disable "next" button)
|
||||
final String path = logicalEvidencePathField.getText();
|
||||
if (StringUtils.isBlank(path)) {
|
||||
return false;
|
||||
}
|
||||
// display warning if there is one (but don't disable "next" button)
|
||||
try {
|
||||
if (!PathValidator.isValid(path, Case.getOpenCase().getCaseType())) {
|
||||
errorLabel.setVisible(true);
|
||||
errorLabel.setText(Bundle.LogicalEvidenceFilePanel_pathValidation_dataSourceOnCDriveError());
|
||||
return false;
|
||||
}
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
errorLabel.setVisible(true);
|
||||
errorLabel.setText(Bundle.LogicalEvidenceFilePanel_pathValidation_getOpenCase_Error());
|
||||
return false;
|
||||
}
|
||||
//check the extension incase the path was manually entered
|
||||
if (!LocalFilesDSProcessor.getLogicalEvidenceFilter().accept(new File(path))) {
|
||||
errorLabel.setVisible(true);
|
||||
errorLabel.setText(Bundle.LogicalEvidenceFilePanel_validatePanel_nonL01Error_text());
|
||||
return false;
|
||||
}
|
||||
|
||||
displayName = FilenameUtils.getName(path);
|
||||
return new File(path).isFile();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the path(s) which have been selected on this panel
|
||||
*
|
||||
* @return a List of Strings representing the path(s) for the selected files
|
||||
*/
|
||||
List<String> getContentPaths() {
|
||||
final List<String> pathsList = new ArrayList<>();
|
||||
if (currentFiles == null) {
|
||||
return pathsList;
|
||||
}
|
||||
for (final File f : currentFiles) {
|
||||
pathsList.add(f.getAbsolutePath());
|
||||
}
|
||||
return pathsList;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the name of the logical evidence file which was selected.
|
||||
*
|
||||
* @return the name of the logical evidence file
|
||||
*/
|
||||
String getFileSetName() {
|
||||
return displayName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void insertUpdate(final DocumentEvent docEvent) {
|
||||
fireChange();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeUpdate(final DocumentEvent docEvent) {
|
||||
fireChange();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changedUpdate(final DocumentEvent docEvent) {
|
||||
fireChange();
|
||||
}
|
||||
|
||||
@Messages({
|
||||
"LogicalEvidenceFilePanel.moduleErr.name=Module Error",
|
||||
"LogicalEvidenceFilePanel.moduleErr.msg=A module caused an error listening to LogicalEvidenceFilePanel updates. See log to determine which module. Some data could be incomplete."
|
||||
})
|
||||
private void fireChange() {
|
||||
try {
|
||||
firePropertyChange(DataSourceProcessor.DSP_PANEL_EVENT.UPDATE_UI.toString(), false, true);
|
||||
} catch (Exception e) {
|
||||
logger.log(Level.SEVERE, "LogicalEvidenceFilePanel listener threw exception", e); //NON-NLS
|
||||
MessageNotifyUtil.Notify.show(NbBundle.getMessage(this.getClass(), "LogicalEvidenceFilePanel.moduleErr"),
|
||||
NbBundle.getMessage(this.getClass(), "LogicalEvidenceFilePanel.moduleErr.msg"),
|
||||
MessageNotifyUtil.MessageType.ERROR);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,83 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.5" maxVersion="1.8" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Component id="dspSubtypeComboBox" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="dspSubtypePanel" alignment="0" min="-2" pref="466" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="dspSubtypeComboBox" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="dspSubtypePanel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="dspSubtypePanel">
|
||||
<Properties>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[467, 160]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<EmptySpace min="0" pref="466" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<EmptySpace min="0" pref="160" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
</Container>
|
||||
<Component class="javax.swing.JComboBox" name="dspSubtypeComboBox">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
|
||||
<Connection code="new javax.swing.DefaultComboBoxModel<>(new String[] {Bundle.LogicalFilesDspPanel_subTypeComboBox_localFilesOption_text(), Bundle.LogicalFilesDspPanel_subTypeComboBox_l01FileOption_text()})" type="code"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[379, 20]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[379, 20]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="dspSubtypeComboBoxActionPerformed"/>
|
||||
</Events>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Form>
|
@ -0,0 +1,233 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2011-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.casemodule;
|
||||
|
||||
import java.beans.PropertyChangeListener;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.swing.BoxLayout;
|
||||
import javax.swing.JComboBox;
|
||||
import javax.swing.JPanel;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.openide.util.NbBundle.Messages;
|
||||
import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessor;
|
||||
|
||||
@Messages({
|
||||
"LogicalFilesDspPanel.subTypeComboBox.localFilesOption.text=Local files and folders",
|
||||
"LogicalFilesDspPanel.subTypeComboBox.l01FileOption.text=Logical evidence file (L01)"
|
||||
})
|
||||
/**
|
||||
* Add input wizard subpanel for adding local files / dirs to the case
|
||||
*/
|
||||
final class LogicalFilesDspPanel extends JPanel {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private final LocalFilesPanel localFilesPanel = new LocalFilesPanel();
|
||||
private final LogicalEvidenceFilePanel l01panel = LogicalEvidenceFilePanel.createInstance();
|
||||
private static LogicalFilesDspPanel instance;
|
||||
|
||||
/**
|
||||
* Creates new form LocalFilesPanel
|
||||
*/
|
||||
private LogicalFilesDspPanel() {
|
||||
initComponents();
|
||||
dspSubtypePanel.setLayout(new BoxLayout(dspSubtypePanel, BoxLayout.Y_AXIS));
|
||||
dspSubtypePanel.add(l01panel);
|
||||
dspSubtypePanel.add(localFilesPanel);
|
||||
l01panel.setVisible(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addPropertyChangeListener(final PropertyChangeListener listener) {
|
||||
super.addPropertyChangeListener(listener);
|
||||
localFilesPanel.addPropertyChangeListener(listener);
|
||||
l01panel.addPropertyChangeListener(listener);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removePropertyChangeListener(final PropertyChangeListener listener) {
|
||||
super.removePropertyChangeListener(listener);
|
||||
localFilesPanel.removePropertyChangeListener(listener);
|
||||
l01panel.removePropertyChangeListener(listener);
|
||||
}
|
||||
|
||||
static LogicalFilesDspPanel getDefault() {
|
||||
synchronized (LogicalFilesDspPanel.class) {
|
||||
if (instance == null) {
|
||||
instance = new LogicalFilesDspPanel();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
}
|
||||
|
||||
String getContentType() {
|
||||
return NbBundle.getMessage(this.getClass(), "LocalFilesPanel.contentType.text");
|
||||
}
|
||||
|
||||
void select() {
|
||||
dspSubtypeComboBox.setSelectedIndex(0);
|
||||
localFilesPanel.setVisible(true);
|
||||
l01panel.setVisible(false);
|
||||
localFilesPanel.reset();
|
||||
l01panel.reset();
|
||||
dspSubtypePanel.repaint();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return NbBundle.getMessage(this.getClass(), "LocalFilesDSProcessor.toString.text");
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called from within the constructor to initialize the form.
|
||||
* WARNING: Do NOT modify this code. The content of this method is always
|
||||
* regenerated by the Form Editor.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
dspSubtypePanel = new javax.swing.JPanel();
|
||||
dspSubtypeComboBox = new javax.swing.JComboBox<>();
|
||||
|
||||
dspSubtypePanel.setPreferredSize(new java.awt.Dimension(467, 160));
|
||||
|
||||
javax.swing.GroupLayout dspSubtypePanelLayout = new javax.swing.GroupLayout(dspSubtypePanel);
|
||||
dspSubtypePanel.setLayout(dspSubtypePanelLayout);
|
||||
dspSubtypePanelLayout.setHorizontalGroup(
|
||||
dspSubtypePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGap(0, 466, Short.MAX_VALUE)
|
||||
);
|
||||
dspSubtypePanelLayout.setVerticalGroup(
|
||||
dspSubtypePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGap(0, 160, Short.MAX_VALUE)
|
||||
);
|
||||
|
||||
dspSubtypeComboBox.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] {Bundle.LogicalFilesDspPanel_subTypeComboBox_localFilesOption_text(), Bundle.LogicalFilesDspPanel_subTypeComboBox_l01FileOption_text()}));
|
||||
dspSubtypeComboBox.setMinimumSize(new java.awt.Dimension(379, 20));
|
||||
dspSubtypeComboBox.setPreferredSize(new java.awt.Dimension(379, 20));
|
||||
dspSubtypeComboBox.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
dspSubtypeComboBoxActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(dspSubtypeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(dspSubtypePanel, javax.swing.GroupLayout.PREFERRED_SIZE, 466, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(dspSubtypeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(dspSubtypePanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(0, 0, 0))
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void dspSubtypeComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_dspSubtypeComboBoxActionPerformed
|
||||
if (evt.getSource() instanceof JComboBox<?>) {
|
||||
final String selectedSubType = dspSubtypeComboBox.getSelectedItem().toString();
|
||||
if (selectedSubType.equals(Bundle.LogicalFilesDspPanel_subTypeComboBox_localFilesOption_text())) {
|
||||
localFilesPanel.setVisible(true);
|
||||
l01panel.setVisible(false);
|
||||
} else if (selectedSubType.equals(Bundle.LogicalFilesDspPanel_subTypeComboBox_l01FileOption_text())) {
|
||||
localFilesPanel.setVisible(false);
|
||||
l01panel.setVisible(true);
|
||||
}
|
||||
firePropertyChange(DataSourceProcessor.DSP_PANEL_EVENT.UPDATE_UI.toString(), false, true);
|
||||
}
|
||||
}//GEN-LAST:event_dspSubtypeComboBoxActionPerformed
|
||||
|
||||
/**
|
||||
* Validate the contents of the panel and its subtype.
|
||||
*
|
||||
* @return true if the panel is valid, false if it is not
|
||||
*/
|
||||
boolean validatePanel() {
|
||||
// display warning if there is one (but don't disable "next" button)
|
||||
|
||||
final String selectedSubType = dspSubtypeComboBox.getSelectedItem().toString();
|
||||
if (selectedSubType.equals(Bundle.LogicalFilesDspPanel_subTypeComboBox_localFilesOption_text())) {
|
||||
return localFilesPanel.validatePanel();
|
||||
} else if (selectedSubType.equals(Bundle.LogicalFilesDspPanel_subTypeComboBox_l01FileOption_text())) {
|
||||
return l01panel.validatePanel();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JComboBox<String> dspSubtypeComboBox;
|
||||
private javax.swing.JPanel dspSubtypePanel;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
/**
|
||||
* Identify if the selected subtype panel is a LogicalEvidencePanel
|
||||
*
|
||||
* @return true if logical evidence files have been selected
|
||||
*/
|
||||
boolean subTypeIsLogicalEvidencePanel() {
|
||||
final String selectedSubType = dspSubtypeComboBox.getSelectedItem().toString();
|
||||
return selectedSubType.equals(Bundle.LogicalFilesDspPanel_subTypeComboBox_l01FileOption_text());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the selected paths of the selected panel subtype.
|
||||
*
|
||||
* @return a list of strings which are paths to the selected files or
|
||||
* directories
|
||||
*/
|
||||
List<String> getContentPaths() {
|
||||
String selectedSubType = dspSubtypeComboBox.getSelectedItem().toString();
|
||||
if (selectedSubType.equals(Bundle.LogicalFilesDspPanel_subTypeComboBox_localFilesOption_text())) {
|
||||
return localFilesPanel.getContentPaths();
|
||||
} else if (selectedSubType.equals(Bundle.LogicalFilesDspPanel_subTypeComboBox_l01FileOption_text())) {
|
||||
return l01panel.getContentPaths();
|
||||
} else {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the name of the file set based on its subtype.
|
||||
*
|
||||
* @return the name of the set of files to be ingested.
|
||||
*/
|
||||
String getFileSetName() {
|
||||
String selectedSubType = dspSubtypeComboBox.getSelectedItem().toString();
|
||||
if (selectedSubType.equals(Bundle.LogicalFilesDspPanel_subTypeComboBox_localFilesOption_text())) {
|
||||
return localFilesPanel.getFileSetName();
|
||||
} else if (selectedSubType.equals(Bundle.LogicalFilesDspPanel_subTypeComboBox_l01FileOption_text())) {
|
||||
return l01panel.getFileSetName();
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2012-2014 Basis Technology Corp.
|
||||
* Copyright 2012-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -18,7 +18,6 @@
|
||||
*/
|
||||
package org.sleuthkit.autopsy.casemodule;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.event.WindowAdapter;
|
||||
import java.awt.event.WindowEvent;
|
||||
import java.util.Arrays;
|
||||
@ -53,6 +52,12 @@ class MissingImageDialog extends javax.swing.JDialog {
|
||||
static final GeneralFilter allFilter = new GeneralFilter(allExt, allDesc);
|
||||
private JFileChooser fc = new JFileChooser();
|
||||
|
||||
/**
|
||||
* Instantiate a MissingImageDialog.
|
||||
*
|
||||
* @param obj_id Object ID of the missing image.
|
||||
* @param db The current SleuthkitCase connected to the database.
|
||||
*/
|
||||
private MissingImageDialog(long obj_id, SleuthkitCase db) {
|
||||
super((JFrame) WindowManager.getDefault().getMainWindow(), true);
|
||||
this.obj_id = obj_id;
|
||||
@ -67,15 +72,15 @@ class MissingImageDialog extends javax.swing.JDialog {
|
||||
fc.addChoosableFileFilter(encaseFilter);
|
||||
fc.setFileFilter(allFilter);
|
||||
|
||||
customInit();
|
||||
selectButton.setEnabled(false);
|
||||
}
|
||||
|
||||
//
|
||||
// * Client call to create a MissingImageDialog.
|
||||
// *
|
||||
// * @param obj_id obj_id of the missing image
|
||||
// * @param db the current SleuthkitCase connected to a db
|
||||
//
|
||||
/**
|
||||
* Client call to create a MissingImageDialog.
|
||||
*
|
||||
* @param obj_id Object ID of the missing image.
|
||||
* @param db The current SluethkitCase connected to the database.
|
||||
*/
|
||||
static void makeDialog(long obj_id, SleuthkitCase db) {
|
||||
final MissingImageDialog dialog = new MissingImageDialog(obj_id, db);
|
||||
dialog.addWindowListener(new WindowAdapter() {
|
||||
@ -87,33 +92,18 @@ class MissingImageDialog extends javax.swing.JDialog {
|
||||
dialog.display();
|
||||
}
|
||||
|
||||
private void customInit() {
|
||||
|
||||
selectButton.setEnabled(false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the dialog.
|
||||
*/
|
||||
private void display() {
|
||||
this.setTitle(NbBundle.getMessage(this.getClass(), "MissingImageDialog.display.title"));
|
||||
Dimension screenDimension = Toolkit.getDefaultToolkit().getScreenSize();
|
||||
// set the popUp window / JFrame
|
||||
int w = this.getSize().width;
|
||||
int h = this.getSize().height;
|
||||
// set the location of the popUp Window on the center of the screen
|
||||
setLocation((screenDimension.width - w) / 2, (screenDimension.height - h) / 2);
|
||||
|
||||
setLocationRelativeTo(WindowManager.getDefault().getMainWindow());
|
||||
this.setVisible(true);
|
||||
}
|
||||
|
||||
//
|
||||
// * Focuses the select button for easy enter-pressing access.
|
||||
//
|
||||
private void moveFocusToSelect() {
|
||||
this.selectButton.requestFocusInWindow();
|
||||
}
|
||||
|
||||
//
|
||||
// * Enables/disables the select button based off the current panel.
|
||||
//
|
||||
/**
|
||||
* Enables/disables the select button based off the current panel.
|
||||
*/
|
||||
private void updateSelectButton() {
|
||||
|
||||
// Enable this based on whether there is a valid path
|
||||
@ -124,11 +114,11 @@ class MissingImageDialog extends javax.swing.JDialog {
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// * This method is called from within the constructor to initialize the form.
|
||||
// * WARNING: Do NOT modify this code. The content of this method is always
|
||||
// * regenerated by the Form Editor.
|
||||
//
|
||||
/**
|
||||
* This method is called from within the constructor to initialize the form.
|
||||
* WARNING: Do NOT modify this code. The content of this method is always
|
||||
* regenerated by the Form Editor.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
@ -282,8 +272,6 @@ class MissingImageDialog extends javax.swing.JDialog {
|
||||
}//GEN-LAST:event_cancelButtonActionPerformed
|
||||
|
||||
private void pathNameTextFieldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_pathNameTextFieldActionPerformed
|
||||
// TODO add your handling code here:
|
||||
|
||||
updateSelectButton();
|
||||
}//GEN-LAST:event_pathNameTextFieldActionPerformed
|
||||
|
||||
@ -318,11 +306,11 @@ class MissingImageDialog extends javax.swing.JDialog {
|
||||
private javax.swing.JSeparator titleSeparator;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
//
|
||||
// * Verify the user wants to cancel searching for the image.
|
||||
//
|
||||
/**
|
||||
* Verify the user wants to cancel searching for the image.
|
||||
*/
|
||||
void cancel() {
|
||||
int ret = JOptionPane.showConfirmDialog(null,
|
||||
int ret = JOptionPane.showConfirmDialog(this,
|
||||
NbBundle.getMessage(this.getClass(),
|
||||
"MissingImageDialog.confDlg.noFileSel.msg"),
|
||||
NbBundle.getMessage(this.getClass(),
|
||||
|
@ -28,9 +28,9 @@
|
||||
<Component id="caseExplorerScrollPane" max="32767" attributes="0"/>
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="searchLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="120" max="32767" attributes="0"/>
|
||||
<Component id="bnOpenSingleUserCase" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="226" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="bnOpenSingleUserCase" min="-2" pref="192" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="190" max="-2" attributes="0"/>
|
||||
<Component id="bnOpen" linkSize="1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="cancelButton" linkSize="1" min="-2" max="-2" attributes="0"/>
|
||||
|
@ -205,9 +205,9 @@ final class MultiUserCasesPanel extends JPanel{
|
||||
.addComponent(caseExplorerScrollPane)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(searchLabel)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 120, Short.MAX_VALUE)
|
||||
.addComponent(bnOpenSingleUserCase, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(226, 226, 226)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(bnOpenSingleUserCase, javax.swing.GroupLayout.PREFERRED_SIZE, 192, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(190, 190, 190)
|
||||
.addComponent(bnOpen, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(cancelButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
|
@ -30,14 +30,14 @@
|
||||
<Group type="103" groupAlignment="1" attributes="0">
|
||||
<Component id="caseDirTextField" alignment="0" max="32767" attributes="1"/>
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="caseNameLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="26" max="-2" attributes="0"/>
|
||||
<Component id="caseNameLabel" linkSize="1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="caseNameTextField" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="caseDirLabel" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="caseTypeLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="caseDirLabel" linkSize="1" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="caseTypeLabel" linkSize="1" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
|
@ -281,7 +281,7 @@ final class NewCaseVisualPanel1 extends JPanel implements DocumentListener {
|
||||
.addComponent(caseDirTextField, javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(caseNameLabel)
|
||||
.addGap(26, 26, 26)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(caseNameTextField))
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
@ -302,6 +302,9 @@ final class NewCaseVisualPanel1 extends JPanel implements DocumentListener {
|
||||
.addComponent(caseParentDirWarningLabel)
|
||||
.addGap(0, 0, Short.MAX_VALUE))))
|
||||
);
|
||||
|
||||
layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {caseDirLabel, caseNameLabel, caseTypeLabel});
|
||||
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2011-2017 Basis Technology Corp.
|
||||
* Copyright 2011-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -91,9 +91,9 @@ final class NewCaseWizardAction extends CallableSystemAction {
|
||||
if (EamDb.isEnabled()) { //if the eam is enabled we need to save the case organization information now
|
||||
EamDb dbManager = EamDb.getInstance();
|
||||
if (dbManager != null) {
|
||||
CorrelationCase cRCase = dbManager.getCase(Case.getCurrentCase());
|
||||
CorrelationCase cRCase = dbManager.getCase(Case.getOpenCase());
|
||||
if (cRCase == null) {
|
||||
cRCase = dbManager.newCase(Case.getCurrentCase());
|
||||
cRCase = dbManager.newCase(Case.getOpenCase());
|
||||
}
|
||||
if (!organizationName.isEmpty()) {
|
||||
for (EamOrganization org : dbManager.getOrganizations()) {
|
||||
|
47
Core/src/org/sleuthkit/autopsy/casemodule/NoCurrentCaseException.java
Executable file
47
Core/src/org/sleuthkit/autopsy/casemodule/NoCurrentCaseException.java
Executable file
@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.casemodule;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* Exception thrown when no current case is available
|
||||
*/
|
||||
public class NoCurrentCaseException extends Exception {
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* Constructs an exception with the specified message.
|
||||
*
|
||||
* @param message The exception message.
|
||||
*/
|
||||
public NoCurrentCaseException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs an exception with the specified message and cause.
|
||||
*
|
||||
* @param message The exception message.
|
||||
* @param cause The exception cause.
|
||||
*/
|
||||
public NoCurrentCaseException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
|
||||
}
|
@ -59,15 +59,15 @@
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="caseNumberLabel" pref="60" max="32767" attributes="0"/>
|
||||
<Component id="caseDisplayNameLabel" max="32767" attributes="0"/>
|
||||
<Component id="caseNumberLabel" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="caseDisplayNameTextField" max="32767" attributes="1"/>
|
||||
<Component id="caseNumberTextField" max="32767" attributes="1"/>
|
||||
<Component id="caseDisplayNameTextField" max="32767" attributes="1"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
@ -172,21 +172,21 @@
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="lbNotesLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbExaminerPhoneLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbNotesLabel" linkSize="1" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbExaminerPhoneLabel" linkSize="1" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="10" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="caseNotesScrollPane" max="32767" attributes="0"/>
|
||||
<Component id="tfExaminerPhoneText" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="1" max="-2" attributes="0">
|
||||
<Component id="lbExaminerEmailLabel" alignment="1" max="32767" attributes="0"/>
|
||||
<Component id="examinerLabel" alignment="1" max="32767" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="lbExaminerEmailLabel" linkSize="1" max="32767" attributes="0"/>
|
||||
<Component id="examinerLabel" linkSize="1" min="-2" pref="60" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="examinerTextField" max="32767" attributes="1"/>
|
||||
<Component id="tfExaminerEmailText" max="32767" attributes="0"/>
|
||||
@ -356,27 +356,27 @@
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace min="-2" pref="106" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="lbPointOfContactNameLabel" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbPointOfContactPhoneLabel" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="lbPointOfContactEmailLabel" alignment="0" max="32767" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="lbPointOfContactPhoneLabel" linkSize="4" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="lbPointOfContactEmailLabel" linkSize="4" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="lbPointOfContactNameLabel" linkSize="4" min="-2" pref="109" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="15" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="lbPointOfContactPhoneText" alignment="1" max="32767" attributes="0"/>
|
||||
<Component id="lbPointOfContactNameText" max="32767" attributes="0"/>
|
||||
<Component id="lbPointOfContactEmailText" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbOrganizationNameLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Component id="comboBoxOrgName" pref="161" max="32767" attributes="0"/>
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Component id="bnNewOrganization" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="lbOrganizationNameLabel" pref="206" max="32767" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="comboBoxOrgName" min="-2" pref="108" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="bnNewOrganization" min="-2" pref="147" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
@ -394,10 +394,10 @@
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="lbPointOfContactNameLabel" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="lbPointOfContactNameText" alignment="0" min="-2" pref="14" max="-2" attributes="0"/>
|
||||
<Component id="lbPointOfContactNameText" max="32767" attributes="0"/>
|
||||
<Component id="lbPointOfContactNameLabel" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="lbPointOfContactPhoneLabel" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="lbPointOfContactPhoneText" alignment="0" min="-2" pref="14" max="-2" attributes="0"/>
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2011-2017 Basis Technology Corp.
|
||||
* Copyright 2011-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -62,12 +62,19 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel {
|
||||
OptionalCasePropertiesPanel(boolean editCurrentCase) {
|
||||
initComponents();
|
||||
if (editCurrentCase) {
|
||||
caseDisplayNameTextField.setText(Case.getCurrentCase().getDisplayName());
|
||||
caseNumberTextField.setText(Case.getCurrentCase().getNumber());
|
||||
examinerTextField.setText(Case.getCurrentCase().getExaminer());
|
||||
tfExaminerEmailText.setText(Case.getCurrentCase().getExaminerEmail());
|
||||
tfExaminerPhoneText.setText(Case.getCurrentCase().getExaminerPhone());
|
||||
taNotesText.setText(Case.getCurrentCase().getCaseNotes());
|
||||
Case openCase;
|
||||
try {
|
||||
openCase = Case.getOpenCase();
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Exception while getting open case.", ex);
|
||||
return;
|
||||
}
|
||||
caseDisplayNameTextField.setText(openCase.getDisplayName());
|
||||
caseNumberTextField.setText(openCase.getNumber());
|
||||
examinerTextField.setText(openCase.getExaminer());
|
||||
tfExaminerEmailText.setText(openCase.getExaminerEmail());
|
||||
tfExaminerPhoneText.setText(openCase.getExaminerPhone());
|
||||
taNotesText.setText(openCase.getCaseNotes());
|
||||
setUpCaseDetailsFields();
|
||||
setUpOrganizationData();
|
||||
} else {
|
||||
@ -86,15 +93,18 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel {
|
||||
|
||||
private void setUpOrganizationData() {
|
||||
if (EamDb.isEnabled()) {
|
||||
Case currentCase = Case.getCurrentCase();
|
||||
if (currentCase != null) {
|
||||
try {
|
||||
try {
|
||||
Case currentCase = Case.getOpenCase();
|
||||
if (currentCase != null) {
|
||||
EamDb dbManager = EamDb.getInstance();
|
||||
selectedOrg = dbManager.getCase(currentCase).getOrg();
|
||||
} catch (EamDbException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Unable to get Organization associated with the case from Central Repo", ex);
|
||||
}
|
||||
} catch (EamDbException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Unable to get Organization associated with the case from Central Repo", ex);
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Exception while getting open case.", ex);
|
||||
}
|
||||
|
||||
if (selectedOrg != null) {
|
||||
setCurrentlySelectedOrganization(selectedOrg.getName());
|
||||
}
|
||||
@ -270,12 +280,12 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel {
|
||||
.addGroup(casePanelLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(casePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addComponent(caseDisplayNameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(caseNumberLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(caseNumberLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 60, Short.MAX_VALUE)
|
||||
.addComponent(caseDisplayNameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(casePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(caseDisplayNameTextField)
|
||||
.addComponent(caseNumberTextField))
|
||||
.addComponent(caseNumberTextField)
|
||||
.addComponent(caseDisplayNameTextField))
|
||||
.addContainerGap())
|
||||
);
|
||||
casePanelLayout.setVerticalGroup(
|
||||
@ -338,20 +348,23 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel {
|
||||
.addGroup(examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(lbNotesLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(lbExaminerPhoneLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(10, 10, 10)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(caseNotesScrollPane)
|
||||
.addComponent(tfExaminerPhoneText)))
|
||||
.addGroup(examinerPanelLayout.createSequentialGroup()
|
||||
.addGroup(examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
|
||||
.addGroup(examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(lbExaminerEmailLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(examinerLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(examinerLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(examinerTextField)
|
||||
.addComponent(tfExaminerEmailText))))
|
||||
.addGap(11, 11, 11))
|
||||
);
|
||||
|
||||
examinerPanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {examinerLabel, lbExaminerEmailLabel, lbExaminerPhoneLabel, lbNotesLabel});
|
||||
|
||||
examinerPanelLayout.setVerticalGroup(
|
||||
examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(examinerPanelLayout.createSequentialGroup()
|
||||
@ -421,24 +434,27 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel {
|
||||
.addGroup(orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(orgainizationPanelLayout.createSequentialGroup()
|
||||
.addGap(106, 106, 106)
|
||||
.addGroup(orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addComponent(lbPointOfContactNameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGroup(orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(lbPointOfContactPhoneLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(lbPointOfContactEmailLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addGap(15, 15, 15)
|
||||
.addComponent(lbPointOfContactEmailLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(lbPointOfContactNameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(lbPointOfContactPhoneText, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(lbPointOfContactNameText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(lbPointOfContactEmailText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
|
||||
.addGroup(orgainizationPanelLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(lbOrganizationNameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(comboBoxOrgName, 0, 161, Short.MAX_VALUE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(bnNewOrganization, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addComponent(lbOrganizationNameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 206, Short.MAX_VALUE)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(comboBoxOrgName, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(bnNewOrganization, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addContainerGap())
|
||||
);
|
||||
|
||||
orgainizationPanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {lbPointOfContactEmailLabel, lbPointOfContactNameLabel, lbPointOfContactPhoneLabel});
|
||||
|
||||
orgainizationPanelLayout.setVerticalGroup(
|
||||
orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(orgainizationPanelLayout.createSequentialGroup()
|
||||
@ -449,8 +465,8 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel {
|
||||
.addComponent(bnNewOrganization, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addGroup(orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addComponent(lbPointOfContactNameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(lbPointOfContactNameText, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(lbPointOfContactNameText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(lbPointOfContactNameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addComponent(lbPointOfContactPhoneLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
@ -527,7 +543,8 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel {
|
||||
|
||||
@Messages({
|
||||
"OptionalCasePropertiesPanel.errorDialog.emptyCaseNameMessage=No case name entered.",
|
||||
"OptionalCasePropertiesPanel.errorDialog.invalidCaseNameMessage=Case names cannot include the following symbols: \\, /, :, *, ?, \", <, >, |"
|
||||
"OptionalCasePropertiesPanel.errorDialog.invalidCaseNameMessage=Case names cannot include the following symbols: \\, /, :, *, ?, \", <, >, |",
|
||||
"OptionalCasePropertiesPanel.errorDialog.noOpenCase.errMsg=Exception while getting open case."
|
||||
})
|
||||
void saveUpdatedCaseDetails() {
|
||||
if (caseDisplayNameTextField.getText().trim().isEmpty()) {
|
||||
@ -538,14 +555,19 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel {
|
||||
MessageNotifyUtil.Message.error(Bundle.OptionalCasePropertiesPanel_errorDialog_invalidCaseNameMessage());
|
||||
return;
|
||||
}
|
||||
updateCaseDetails();
|
||||
try {
|
||||
updateCaseDetails();
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
MessageNotifyUtil.Message.error(Bundle.OptionalCasePropertiesPanel_errorDialog_noOpenCase_errMsg());
|
||||
return;
|
||||
}
|
||||
updateCorrelationCase();
|
||||
}
|
||||
|
||||
private void updateCaseDetails() {
|
||||
private void updateCaseDetails() throws NoCurrentCaseException {
|
||||
if (caseDisplayNameTextField.isVisible()) {
|
||||
try {
|
||||
Case.getCurrentCase().updateCaseDetails(new CaseDetails(
|
||||
Case.getOpenCase().updateCaseDetails(new CaseDetails(
|
||||
caseDisplayNameTextField.getText(), caseNumberTextField.getText(),
|
||||
examinerTextField.getText(), tfExaminerPhoneText.getText(),
|
||||
tfExaminerEmailText.getText(), taNotesText.getText()));
|
||||
@ -564,7 +586,7 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel {
|
||||
if (EamDb.isEnabled()) {
|
||||
try {
|
||||
EamDb dbManager = EamDb.getInstance();
|
||||
CorrelationCase correlationCase = dbManager.getCase(Case.getCurrentCase());
|
||||
CorrelationCase correlationCase = dbManager.getCase(Case.getOpenCase());
|
||||
if (caseDisplayNameTextField.isVisible()) {
|
||||
correlationCase.setDisplayName(caseDisplayNameTextField.getText());
|
||||
}
|
||||
@ -576,7 +598,9 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel {
|
||||
correlationCase.setNotes(taNotesText.getText());
|
||||
dbManager.updateCase(correlationCase);
|
||||
} catch (EamDbException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Error connecting to central repository database", ex); // NON-NLS
|
||||
LOGGER.log(Level.SEVERE, "Error connecting to central repository database", ex); // NON-NLS
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Exception while getting open case.", ex); // NON-NLS
|
||||
} finally {
|
||||
setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2011-2017 Basis Technology Corp.
|
||||
* Copyright 2011-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -374,8 +374,8 @@ final class RecentCases extends CallableSystemAction implements Presenter.Menu {
|
||||
int i = 0;
|
||||
String currentCaseName = null;
|
||||
try {
|
||||
currentCaseName = Case.getCurrentCase().getDisplayName();
|
||||
} catch (IllegalStateException ex) {
|
||||
currentCaseName = Case.getOpenCase().getDisplayName();
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
// in case there is no current case.
|
||||
}
|
||||
|
||||
@ -407,8 +407,8 @@ final class RecentCases extends CallableSystemAction implements Presenter.Menu {
|
||||
String[] casePaths = new String[LENGTH];
|
||||
String currentCasePath = null;
|
||||
try {
|
||||
currentCasePath = Case.getCurrentCase().getMetadata().getFilePath().toString();
|
||||
} catch (IllegalStateException ex) {
|
||||
currentCasePath = Case.getOpenCase().getMetadata().getFilePath().toString();
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
/*
|
||||
* There may be no current case.
|
||||
*/
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2015 Basis Technology Corp.
|
||||
* Copyright 2015-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -21,6 +21,7 @@ package org.sleuthkit.autopsy.casemodule.events;
|
||||
import java.io.Serializable;
|
||||
import javax.annotation.concurrent.Immutable;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.datamodel.BlackboardArtifactTag;
|
||||
import org.sleuthkit.datamodel.TskCoreException;
|
||||
|
||||
@ -41,11 +42,11 @@ public class BlackBoardArtifactTagAddedEvent extends TagAddedEvent<BlackboardArt
|
||||
*
|
||||
* @return BlackboardArtifactTag that was added
|
||||
*
|
||||
* @throws IllegalStateException
|
||||
* @throws NoCurrentCaseException
|
||||
* @throws TskCoreException
|
||||
*/
|
||||
@Override
|
||||
BlackboardArtifactTag getTagByID() throws IllegalStateException, TskCoreException {
|
||||
return Case.getCurrentCase().getServices().getTagsManager().getBlackboardArtifactTagByTagID(getTagID());
|
||||
BlackboardArtifactTag getTagByID() throws NoCurrentCaseException, TskCoreException {
|
||||
return Case.getOpenCase().getServices().getTagsManager().getBlackboardArtifactTagByTagID(getTagID());
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2015 Basis Technology Corp.
|
||||
* Copyright 2015-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -21,6 +21,7 @@ package org.sleuthkit.autopsy.casemodule.events;
|
||||
import java.io.Serializable;
|
||||
import javax.annotation.concurrent.Immutable;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.datamodel.ContentTag;
|
||||
import org.sleuthkit.datamodel.TskCoreException;
|
||||
|
||||
@ -41,10 +42,10 @@ public class ContentTagAddedEvent extends TagAddedEvent<ContentTag> implements S
|
||||
*
|
||||
* @return ContentTag that was added
|
||||
*
|
||||
* @throws IllegalStateException
|
||||
* @throws NoCurrentCaseException
|
||||
* @throws TskCoreException
|
||||
*/
|
||||
ContentTag getTagByID() throws IllegalStateException, TskCoreException {
|
||||
return Case.getCurrentCase().getServices().getTagsManager().getContentTagByTagID(getTagID());
|
||||
ContentTag getTagByID() throws NoCurrentCaseException, TskCoreException {
|
||||
return Case.getOpenCase().getServices().getTagsManager().getContentTagByTagID(getTagID());
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2015 Basis Technology Corp.
|
||||
* Copyright 2015-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -22,6 +22,7 @@ import java.io.Serializable;
|
||||
import java.util.UUID;
|
||||
import java.util.logging.Level;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.events.AutopsyEvent;
|
||||
import org.sleuthkit.datamodel.Content;
|
||||
@ -78,9 +79,9 @@ public final class DataSourceAddedEvent extends AutopsyEvent implements Serializ
|
||||
}
|
||||
try {
|
||||
long id = (Long) super.getNewValue();
|
||||
dataSource = Case.getCurrentCase().getSleuthkitCase().getContentById(id);
|
||||
dataSource = Case.getOpenCase().getSleuthkitCase().getContentById(id);
|
||||
return dataSource;
|
||||
} catch (IllegalStateException | TskCoreException ex) {
|
||||
} catch (NoCurrentCaseException | TskCoreException ex) {
|
||||
logger.log(Level.SEVERE, "Error doing lazy load for remote event", ex); //NON-NLS
|
||||
return null;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2015 Basis Technology Corp.
|
||||
* Copyright 2015-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -22,6 +22,7 @@ import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.events.AutopsyEvent;
|
||||
import org.sleuthkit.datamodel.Report;
|
||||
@ -69,7 +70,7 @@ public final class ReportAddedEvent extends AutopsyEvent implements Serializable
|
||||
}
|
||||
try {
|
||||
long id = (Long) super.getNewValue();
|
||||
List<Report> reports = Case.getCurrentCase().getSleuthkitCase().getAllReports();
|
||||
List<Report> reports = Case.getOpenCase().getSleuthkitCase().getAllReports();
|
||||
for (Report thisReport : reports) {
|
||||
if (thisReport.getId() == id) {
|
||||
report = thisReport;
|
||||
@ -77,7 +78,7 @@ public final class ReportAddedEvent extends AutopsyEvent implements Serializable
|
||||
}
|
||||
}
|
||||
return report;
|
||||
} catch (IllegalStateException | TskCoreException ex) {
|
||||
} catch (NoCurrentCaseException | TskCoreException ex) {
|
||||
logger.log(Level.SEVERE, "Error doing lazy load for remote event", ex); //NON-NLS
|
||||
return null;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2015 Basis Technology Corp.
|
||||
* Copyright 2015-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -20,6 +20,7 @@ package org.sleuthkit.autopsy.casemodule.events;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.logging.Level;
|
||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.events.AutopsyEvent;
|
||||
import org.sleuthkit.datamodel.Tag;
|
||||
@ -84,7 +85,7 @@ abstract class TagAddedEvent<T extends Tag> extends AutopsyEvent implements Seri
|
||||
try {
|
||||
tag = getTagByID();
|
||||
return tag;
|
||||
} catch (IllegalStateException | TskCoreException ex) {
|
||||
} catch (NoCurrentCaseException | TskCoreException ex) {
|
||||
Logger.getLogger(TagAddedEvent.class.getName()).log(Level.SEVERE, "Error doing lazy load for remote event", ex); //NON-NLS
|
||||
return null;
|
||||
}
|
||||
@ -98,8 +99,8 @@ abstract class TagAddedEvent<T extends Tag> extends AutopsyEvent implements Seri
|
||||
*
|
||||
* @return the Tag based on the saved tag id
|
||||
*
|
||||
* @throws IllegalStateException
|
||||
* @throws NoCurrentCaseException
|
||||
* @throws TskCoreException
|
||||
*/
|
||||
abstract T getTagByID() throws IllegalStateException, TskCoreException;
|
||||
abstract T getTagByID() throws NoCurrentCaseException, TskCoreException;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2011-2017 Basis Technology Corp.
|
||||
* Copyright 2011-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -28,6 +28,7 @@ import java.util.logging.Level;
|
||||
import javax.annotation.concurrent.Immutable;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.coreutils.ModuleSettings;
|
||||
import org.sleuthkit.datamodel.TagName;
|
||||
@ -295,9 +296,11 @@ final class TagNameDefinition implements Comparable<TagNameDefinition> {
|
||||
setting.append(";");
|
||||
}
|
||||
setting.append(tagName.toSettingsFormat());
|
||||
if (Case.isCaseOpen()) {
|
||||
SleuthkitCase caseDb = Case.getCurrentCase().getSleuthkitCase();
|
||||
try {
|
||||
SleuthkitCase caseDb = Case.getOpenCase().getSleuthkitCase();
|
||||
tagName.saveToCase(caseDb);
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Exception while getting open case.", ex);
|
||||
}
|
||||
}
|
||||
ModuleSettings.setConfigSetting(TAGS_SETTINGS_NAME, TAG_NAMES_SETTING_KEY, setting.toString());
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2011-2017 Basis Technology Corp.
|
||||
* Copyright 2011-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -29,6 +29,7 @@ import javax.swing.event.DocumentEvent;
|
||||
import javax.swing.event.DocumentListener;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.openide.util.NbBundle.Messages;
|
||||
import org.openide.windows.WindowManager;
|
||||
import org.sleuthkit.datamodel.TskData;
|
||||
|
||||
@Messages({"TagNameDialog.descriptionLabel.text=Description:",
|
||||
@ -76,10 +77,7 @@ final class TagNameDialog extends javax.swing.JDialog {
|
||||
/*
|
||||
* Center the dialog
|
||||
*/
|
||||
Dimension screenDimension = Toolkit.getDefaultToolkit().getScreenSize();
|
||||
int width = this.getSize().width;
|
||||
int height = this.getSize().height;
|
||||
setLocation((screenDimension.width - width) / 2, (screenDimension.height - height) / 2);
|
||||
setLocationRelativeTo(WindowManager.getDefault().getMainWindow());
|
||||
|
||||
/*
|
||||
* Add a handler for when the dialog window is closed directly.
|
||||
@ -136,7 +134,7 @@ final class TagNameDialog extends javax.swing.JDialog {
|
||||
String newTagDisplayName = tagNameTextField.getText().trim();
|
||||
String descriptionText = descriptionTextArea.getText();
|
||||
if (newTagDisplayName.isEmpty()) {
|
||||
JOptionPane.showMessageDialog(null,
|
||||
JOptionPane.showMessageDialog(this,
|
||||
NbBundle.getMessage(TagNameDialog.class, "TagNameDialog.JOptionPane.tagNameEmpty.message"),
|
||||
NbBundle.getMessage(TagNameDialog.class, "TagNameDialog.JOptionPane.tagNameEmpty.title"),
|
||||
JOptionPane.ERROR_MESSAGE);
|
||||
@ -144,14 +142,14 @@ final class TagNameDialog extends javax.swing.JDialog {
|
||||
}
|
||||
//if a tag name contains illegal characters and is not the name of one of the standard tags
|
||||
if (TagsManager.containsIllegalCharacters(newTagDisplayName) && !TagNameDefinition.getStandardTagNames().contains(newTagDisplayName)) {
|
||||
JOptionPane.showMessageDialog(null,
|
||||
JOptionPane.showMessageDialog(this,
|
||||
NbBundle.getMessage(TagNameDialog.class, "TagNameDialog.JOptionPane.tagDescriptionIllegalCharacters.message"),
|
||||
NbBundle.getMessage(TagNameDialog.class, "TagNameDialog.JOptionPane.tagDescriptionIllegalCharacters.title"),
|
||||
JOptionPane.ERROR_MESSAGE);
|
||||
return;
|
||||
} else if (descriptionText.contains(",")
|
||||
|| descriptionText.contains(";")) {
|
||||
JOptionPane.showMessageDialog(null,
|
||||
JOptionPane.showMessageDialog(this,
|
||||
NbBundle.getMessage(TagNameDialog.class, "TagNameDialog.JOptionPane.tagDescriptionIllegalCharacters.message"),
|
||||
NbBundle.getMessage(TagNameDialog.class, "TagNameDialog.JOptionPane.tagDescriptionIllegalCharacters.title"),
|
||||
JOptionPane.ERROR_MESSAGE);
|
||||
|
@ -65,7 +65,7 @@
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JSplitPane" name="jSplitPane1">
|
||||
<Properties>
|
||||
<Property name="dividerLocation" type="int" value="365"/>
|
||||
<Property name="dividerLocation" type="int" value="450"/>
|
||||
<Property name="dividerSize" type="int" value="1"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[748, 488]"/>
|
||||
@ -89,21 +89,14 @@
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="tagTypesListLabel" max="32767" attributes="0"/>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="1" max="-2" attributes="0">
|
||||
<Component id="TagNameScrollPane" alignment="0" max="32767" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="newTagNameButton" linkSize="1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="editTagNameButton" linkSize="1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="deleteTagNameButton" linkSize="1" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Component id="panelDescriptionScrollPane" alignment="0" min="-2" pref="345" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
<Component id="newTagNameButton" linkSize="3" min="-2" pref="123" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="editTagNameButton" linkSize="3" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="32767" attributes="0"/>
|
||||
<Component id="deleteTagNameButton" linkSize="3" min="-2" pref="136" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="TagNameScrollPane" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="panelDescriptionScrollPane" alignment="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
@ -117,7 +110,7 @@
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="tagTypesListLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="TagNameScrollPane" pref="338" max="32767" attributes="0"/>
|
||||
<Component id="TagNameScrollPane" max="32767" attributes="0"/>
|
||||
<EmptySpace type="unrelated" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="newTagNameButton" linkSize="2" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
@ -266,14 +259,14 @@
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="descriptionScrollPane" pref="361" max="32767" attributes="0"/>
|
||||
<Component id="descriptionScrollPane" max="32767" attributes="0"/>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="descriptionLabel" min="-2" pref="92" max="-2" attributes="0"/>
|
||||
<Component id="descriptionLabel" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="isNotableLabel" min="-2" pref="150" max="-2" attributes="0"/>
|
||||
<Component id="isNotableLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="notableYesOrNoLabel" min="-2" pref="25" max="-2" attributes="0"/>
|
||||
<Component id="notableYesOrNoLabel" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="ingestRunningWarningLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
@ -293,10 +286,10 @@
|
||||
<Component id="descriptionScrollPane" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="isNotableLabel" alignment="3" min="-2" pref="22" max="-2" attributes="0"/>
|
||||
<Component id="isNotableLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="notableYesOrNoLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace pref="304" max="32767" attributes="0"/>
|
||||
<EmptySpace pref="311" max="32767" attributes="0"/>
|
||||
<Component id="ingestRunningWarningLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="31" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2011-2016 Basis Technology Corp.
|
||||
* Copyright 2011-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -24,17 +24,21 @@ import java.beans.PropertyChangeListener;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
import java.util.logging.Level;
|
||||
import javax.swing.DefaultListModel;
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.swing.SwingUtilities;
|
||||
import javax.swing.event.ListSelectionEvent;
|
||||
import org.netbeans.spi.options.OptionsPanelController;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.openide.util.NbBundle.Messages;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.autopsy.corecomponents.OptionsPanel;
|
||||
import org.sleuthkit.autopsy.ingest.IngestManager;
|
||||
import org.sleuthkit.datamodel.TagName;
|
||||
import org.sleuthkit.datamodel.TskData;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
|
||||
/**
|
||||
* A panel to allow the user to create and delete custom tag types.
|
||||
@ -121,7 +125,7 @@ final class TagOptionsPanel extends javax.swing.JPanel implements OptionsPanel {
|
||||
|
||||
jScrollPane2.setPreferredSize(new java.awt.Dimension(750, 490));
|
||||
|
||||
jSplitPane1.setDividerLocation(365);
|
||||
jSplitPane1.setDividerLocation(450);
|
||||
jSplitPane1.setDividerSize(1);
|
||||
jSplitPane1.setPreferredSize(new java.awt.Dimension(748, 488));
|
||||
|
||||
@ -183,17 +187,13 @@ final class TagOptionsPanel extends javax.swing.JPanel implements OptionsPanel {
|
||||
.addGroup(modifyTagTypesListPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(tagTypesListLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addGroup(modifyTagTypesListPanelLayout.createSequentialGroup()
|
||||
.addGroup(modifyTagTypesListPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(modifyTagTypesListPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
|
||||
.addComponent(TagNameScrollPane, javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, modifyTagTypesListPanelLayout.createSequentialGroup()
|
||||
.addComponent(newTagNameButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(editTagNameButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(deleteTagNameButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addComponent(panelDescriptionScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 345, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(0, 0, Short.MAX_VALUE)))
|
||||
.addComponent(newTagNameButton, javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(editTagNameButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(deleteTagNameButton, javax.swing.GroupLayout.PREFERRED_SIZE, 136, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(TagNameScrollPane)
|
||||
.addComponent(panelDescriptionScrollPane))
|
||||
.addContainerGap())
|
||||
);
|
||||
|
||||
@ -207,7 +207,7 @@ final class TagOptionsPanel extends javax.swing.JPanel implements OptionsPanel {
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(tagTypesListLabel)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(TagNameScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 338, Short.MAX_VALUE)
|
||||
.addComponent(TagNameScrollPane)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addGroup(modifyTagTypesListPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(newTagNameButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
@ -247,14 +247,14 @@ final class TagOptionsPanel extends javax.swing.JPanel implements OptionsPanel {
|
||||
.addGroup(tagTypesAdditionalPanelLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(tagTypesAdditionalPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(descriptionScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 361, Short.MAX_VALUE)
|
||||
.addComponent(descriptionScrollPane)
|
||||
.addGroup(tagTypesAdditionalPanelLayout.createSequentialGroup()
|
||||
.addGroup(tagTypesAdditionalPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(descriptionLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 92, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(descriptionLabel)
|
||||
.addGroup(tagTypesAdditionalPanelLayout.createSequentialGroup()
|
||||
.addComponent(isNotableLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(isNotableLabel)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(notableYesOrNoLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(notableYesOrNoLabel))
|
||||
.addComponent(ingestRunningWarningLabel))
|
||||
.addGap(0, 0, Short.MAX_VALUE)))
|
||||
.addContainerGap())
|
||||
@ -268,9 +268,9 @@ final class TagOptionsPanel extends javax.swing.JPanel implements OptionsPanel {
|
||||
.addComponent(descriptionScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(tagTypesAdditionalPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(isNotableLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(isNotableLabel)
|
||||
.addComponent(notableYesOrNoLabel))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 304, Short.MAX_VALUE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 311, Short.MAX_VALUE)
|
||||
.addComponent(ingestRunningWarningLabel)
|
||||
.addGap(31, 31, 31))
|
||||
);
|
||||
@ -327,7 +327,7 @@ final class TagOptionsPanel extends javax.swing.JPanel implements OptionsPanel {
|
||||
updatePanel();
|
||||
firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
|
||||
} else {
|
||||
JOptionPane.showMessageDialog(null,
|
||||
JOptionPane.showMessageDialog(this,
|
||||
NbBundle.getMessage(TagOptionsPanel.class, "TagOptionsPanel.TagNameDialog.tagNameAlreadyExists.message"),
|
||||
NbBundle.getMessage(TagOptionsPanel.class, "TagOptionsPanel.TagNameDialog.tagNameAlreadyExists.title"),
|
||||
JOptionPane.INFORMATION_MESSAGE);
|
||||
@ -424,8 +424,10 @@ final class TagOptionsPanel extends javax.swing.JPanel implements OptionsPanel {
|
||||
private void sendStatusChangedEvents() {
|
||||
for (String modifiedTagDisplayName : updatedStatusTags) {
|
||||
//if user closes their case after options have been changed but before application of them is complete don't notify
|
||||
if (Case.isCaseOpen()) {
|
||||
Case.getCurrentCase().notifyTagDefinitionChanged(modifiedTagDisplayName);
|
||||
try {
|
||||
Case.getOpenCase().notifyTagDefinitionChanged(modifiedTagDisplayName);
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
Logger.getLogger(TagOptionsPanel.class.getName()).log(Level.SEVERE, "Exception while getting open case.", ex); //NON-NLS
|
||||
}
|
||||
}
|
||||
updatedStatusTags.clear();
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2011-2017 Basis Technology Corp.
|
||||
* Copyright 2011-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -29,6 +29,7 @@ import java.util.Set;
|
||||
import java.util.logging.Level;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.datamodel.BlackboardArtifact;
|
||||
import org.sleuthkit.datamodel.BlackboardArtifactTag;
|
||||
@ -98,11 +99,11 @@ public class TagsManager implements Closeable {
|
||||
tagDisplayNames.add(tagType.getDisplayName());
|
||||
});
|
||||
try {
|
||||
TagsManager tagsManager = Case.getCurrentCase().getServices().getTagsManager();
|
||||
TagsManager tagsManager = Case.getOpenCase().getServices().getTagsManager();
|
||||
for (TagName tagName : tagsManager.getAllTagNames()) {
|
||||
tagDisplayNames.add(tagName.getDisplayName());
|
||||
}
|
||||
} catch (IllegalStateException ignored) {
|
||||
} catch (NoCurrentCaseException ignored) {
|
||||
/*
|
||||
* No current case, nothing more to add to the set.
|
||||
*/
|
||||
@ -339,8 +340,8 @@ public class TagsManager implements Closeable {
|
||||
ContentTag tag;
|
||||
tag = caseDb.addContentTag(content, tagName, comment, beginByteOffset, endByteOffset);
|
||||
try {
|
||||
Case.getCurrentCase().notifyContentTagAdded(tag);
|
||||
} catch (IllegalStateException ex) {
|
||||
Case.getOpenCase().notifyContentTagAdded(tag);
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
throw new TskCoreException("Added a tag to a closed case", ex);
|
||||
}
|
||||
return tag;
|
||||
@ -357,8 +358,8 @@ public class TagsManager implements Closeable {
|
||||
public void deleteContentTag(ContentTag tag) throws TskCoreException {
|
||||
caseDb.deleteContentTag(tag);
|
||||
try {
|
||||
Case.getCurrentCase().notifyContentTagDeleted(tag);
|
||||
} catch (IllegalStateException ex) {
|
||||
Case.getOpenCase().notifyContentTagDeleted(tag);
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
throw new TskCoreException("Deleted a tag from a closed case", ex);
|
||||
}
|
||||
}
|
||||
@ -469,8 +470,8 @@ public class TagsManager implements Closeable {
|
||||
public BlackboardArtifactTag addBlackboardArtifactTag(BlackboardArtifact artifact, TagName tagName, String comment) throws TskCoreException {
|
||||
BlackboardArtifactTag tag = caseDb.addBlackboardArtifactTag(artifact, tagName, comment);
|
||||
try {
|
||||
Case.getCurrentCase().notifyBlackBoardArtifactTagAdded(tag);
|
||||
} catch (IllegalStateException ex) {
|
||||
Case.getOpenCase().notifyBlackBoardArtifactTagAdded(tag);
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
throw new TskCoreException("Added a tag to a closed case", ex);
|
||||
}
|
||||
return tag;
|
||||
@ -487,8 +488,8 @@ public class TagsManager implements Closeable {
|
||||
public void deleteBlackboardArtifactTag(BlackboardArtifactTag tag) throws TskCoreException {
|
||||
caseDb.deleteBlackboardArtifactTag(tag);
|
||||
try {
|
||||
Case.getCurrentCase().notifyBlackBoardArtifactTagDeleted(tag);
|
||||
} catch (IllegalStateException ex) {
|
||||
Case.getOpenCase().notifyBlackBoardArtifactTagDeleted(tag);
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
throw new TskCoreException("Deleted a tag from a closed case", ex);
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Central Repository
|
||||
*
|
||||
* Copyright 2015-2017 Basis Technology Corp.
|
||||
* Copyright 2015-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -46,6 +46,7 @@ import org.openide.nodes.Node;
|
||||
import org.openide.util.NbBundle.Messages;
|
||||
import org.openide.util.lookup.ServiceProvider;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.autopsy.corecomponentinterfaces.DataContentViewer;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttribute;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttributeInstance;
|
||||
@ -97,7 +98,11 @@ public class DataContentViewerOtherCases extends javax.swing.JPanel implements D
|
||||
} else if (jmi.equals(showCaseDetailsMenuItem)) {
|
||||
showCaseDetails(otherCasesTable.getSelectedRow());
|
||||
} else if (jmi.equals(exportToCSVMenuItem)) {
|
||||
saveToCSV();
|
||||
try {
|
||||
saveToCSV();
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Exception while getting open case.", ex); // NON-NLS
|
||||
}
|
||||
} else if (jmi.equals(showCommonalityMenuItem)) {
|
||||
showCommonalityDetails();
|
||||
}
|
||||
@ -159,8 +164,19 @@ public class DataContentViewerOtherCases extends javax.swing.JPanel implements D
|
||||
@Messages({"DataContentViewerOtherCases.caseDetailsDialog.notSelected=No Row Selected",
|
||||
"DataContentViewerOtherCases.caseDetailsDialog.noDetails=No details for this case.",
|
||||
"DataContentViewerOtherCases.caseDetailsDialog.noDetailsReference=No case details for Global reference properties.",
|
||||
"DataContentViewerOtherCases.caseDetailsDialog.noCaseNameError=Error"})
|
||||
"DataContentViewerOtherCases.caseDetailsDialog.noCaseNameError=Error",
|
||||
"DataContentViewerOtherCases.noOpenCase.errMsg=No open case available."})
|
||||
private void showCaseDetails(int selectedRowViewIdx) {
|
||||
Case openCase;
|
||||
try {
|
||||
openCase = Case.getOpenCase();
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
JOptionPane.showConfirmDialog(showCaseDetailsMenuItem,
|
||||
Bundle.DataContentViewerOtherCases_noOpenCase_errMsg(),
|
||||
Bundle.DataContentViewerOtherCases_noOpenCase_errMsg(),
|
||||
DEFAULT_OPTION, PLAIN_MESSAGE);
|
||||
return;
|
||||
}
|
||||
String caseDisplayName = Bundle.DataContentViewerOtherCases_caseDetailsDialog_noCaseNameError();
|
||||
try {
|
||||
if (-1 != selectedRowViewIdx) {
|
||||
@ -177,7 +193,7 @@ public class DataContentViewerOtherCases extends javax.swing.JPanel implements D
|
||||
}
|
||||
caseDisplayName = eamCasePartial.getDisplayName();
|
||||
// query case details
|
||||
CorrelationCase eamCase = dbManager.getCase(Case.getCurrentCase());
|
||||
CorrelationCase eamCase = dbManager.getCase(openCase);
|
||||
if (eamCase == null) {
|
||||
JOptionPane.showConfirmDialog(showCaseDetailsMenuItem,
|
||||
Bundle.DataContentViewerOtherCases_caseDetailsDialog_noDetails(),
|
||||
@ -205,11 +221,11 @@ public class DataContentViewerOtherCases extends javax.swing.JPanel implements D
|
||||
}
|
||||
}
|
||||
|
||||
private void saveToCSV() {
|
||||
private void saveToCSV() throws NoCurrentCaseException {
|
||||
if (0 != otherCasesTable.getSelectedRowCount()) {
|
||||
Calendar now = Calendar.getInstance();
|
||||
String fileName = String.format("%1$tY%1$tm%1$te%1$tI%1$tM%1$tS_other_data_sources.csv", now);
|
||||
CSVFileChooser.setCurrentDirectory(new File(Case.getCurrentCase().getExportDirectory()));
|
||||
CSVFileChooser.setCurrentDirectory(new File(Case.getOpenCase().getExportDirectory()));
|
||||
CSVFileChooser.setSelectedFile(new File(fileName));
|
||||
CSVFileChooser.setFileFilter(new FileNameExtensionFilter("csv file", "csv"));
|
||||
|
||||
@ -417,8 +433,8 @@ public class DataContentViewerOtherCases extends javax.swing.JPanel implements D
|
||||
*/
|
||||
private Collection<CorrelationAttributeInstance> getCorrelatedInstances(CorrelationAttribute corAttr, String dataSourceName, String deviceId) {
|
||||
// @@@ Check exception
|
||||
String caseUUID = Case.getCurrentCase().getName();
|
||||
try {
|
||||
String caseUUID = Case.getOpenCase().getName();
|
||||
EamDb dbManager = EamDb.getInstance();
|
||||
Collection<CorrelationAttributeInstance> artifactInstances = dbManager.getArtifactInstancesByTypeValue(corAttr.getCorrelationType(), corAttr.getCorrelationValue()).stream()
|
||||
.filter(artifactInstance -> !artifactInstance.getCorrelationCase().getCaseUUID().equals(caseUUID)
|
||||
@ -428,6 +444,8 @@ public class DataContentViewerOtherCases extends javax.swing.JPanel implements D
|
||||
return artifactInstances;
|
||||
} catch (EamDbException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Error getting artifact instances from database.", ex); // NON-NLS
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Exception while getting open case.", ex); // NON-NLS
|
||||
}
|
||||
|
||||
return Collections.emptyList();
|
||||
@ -473,9 +491,9 @@ public class DataContentViewerOtherCases extends javax.swing.JPanel implements D
|
||||
if (af != null) {
|
||||
Content dataSource = af.getDataSource();
|
||||
dataSourceName = dataSource.getName();
|
||||
deviceId = Case.getCurrentCase().getSleuthkitCase().getDataSource(dataSource.getId()).getDeviceId();
|
||||
deviceId = Case.getOpenCase().getSleuthkitCase().getDataSource(dataSource.getId()).getDeviceId();
|
||||
}
|
||||
} catch (TskException ex) {
|
||||
} catch (TskException | NoCurrentCaseException ex) {
|
||||
// do nothing.
|
||||
// @@@ Review this behavior
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Central Repository
|
||||
*
|
||||
* Copyright 2015-2017 Basis Technology Corp.
|
||||
* Copyright 2015-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -20,6 +20,7 @@ package org.sleuthkit.autopsy.centralrepository.datamodel;
|
||||
|
||||
import java.io.Serializable;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.datamodel.Content;
|
||||
import org.sleuthkit.datamodel.TskCoreException;
|
||||
import org.sleuthkit.datamodel.TskDataException;
|
||||
@ -73,8 +74,8 @@ public class CorrelationDataSource implements Serializable {
|
||||
public static CorrelationDataSource fromTSKDataSource(CorrelationCase correlationCase, Content dataSource) throws EamDbException {
|
||||
Case curCase;
|
||||
try {
|
||||
curCase = Case.getCurrentCase();
|
||||
} catch (IllegalStateException ex) {
|
||||
curCase = Case.getOpenCase();
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
throw new EamDbException("Autopsy case is closed");
|
||||
}
|
||||
String deviceId;
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Central Repository
|
||||
*
|
||||
* Copyright 2015-2017 Basis Technology Corp.
|
||||
* Copyright 2015-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -23,6 +23,7 @@ import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
import org.openide.util.NbBundle.Messages;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.datamodel.AbstractFile;
|
||||
import org.sleuthkit.datamodel.BlackboardArtifact;
|
||||
@ -89,7 +90,7 @@ public class EamArtifactUtil {
|
||||
// if they asked for it, add the instance details associated with this occurance.
|
||||
if (!eamArtifacts.isEmpty() && addInstanceDetails) {
|
||||
try {
|
||||
Case currentCase = Case.getCurrentCase();
|
||||
Case currentCase = Case.getOpenCase();
|
||||
AbstractFile bbSourceFile = currentCase.getSleuthkitCase().getAbstractFileById(bbArtifact.getObjectID());
|
||||
if (null == bbSourceFile) {
|
||||
//@@@ Log this
|
||||
@ -97,9 +98,9 @@ public class EamArtifactUtil {
|
||||
}
|
||||
|
||||
// make an instance for the BB source file
|
||||
CorrelationCase correlationCase = EamDb.getInstance().getCase(Case.getCurrentCase());
|
||||
CorrelationCase correlationCase = EamDb.getInstance().getCase(Case.getOpenCase());
|
||||
if (null == correlationCase) {
|
||||
correlationCase = EamDb.getInstance().newCase(Case.getCurrentCase());
|
||||
correlationCase = EamDb.getInstance().newCase(Case.getOpenCase());
|
||||
}
|
||||
CorrelationAttributeInstance eamInstance = new CorrelationAttributeInstance(
|
||||
correlationCase,
|
||||
@ -116,7 +117,7 @@ public class EamArtifactUtil {
|
||||
} catch (TskCoreException | EamDbException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Error creating artifact instance.", ex); // NON-NLS
|
||||
return eamArtifacts;
|
||||
} catch (IllegalStateException ex) {
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Case is closed.", ex); // NON-NLS
|
||||
return eamArtifacts;
|
||||
}
|
||||
@ -145,7 +146,7 @@ public class EamArtifactUtil {
|
||||
// Get the associated artifact
|
||||
BlackboardAttribute attribute = bbArtifact.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_ASSOCIATED_ARTIFACT));
|
||||
if (attribute != null) {
|
||||
BlackboardArtifact associatedArtifact = Case.getCurrentCase().getSleuthkitCase().getBlackboardArtifact(attribute.getValueLong());
|
||||
BlackboardArtifact associatedArtifact = Case.getOpenCase().getSleuthkitCase().getBlackboardArtifact(attribute.getValueLong());
|
||||
return EamArtifactUtil.getCorrelationAttributeFromBlackboardArtifact(correlationType, associatedArtifact);
|
||||
}
|
||||
|
||||
@ -203,6 +204,9 @@ public class EamArtifactUtil {
|
||||
} catch (TskCoreException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Error getting attribute while getting type from BlackboardArtifact.", ex); // NON-NLS
|
||||
return null;
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Exception while getting open case.", ex); // NON-NLS
|
||||
return null;
|
||||
}
|
||||
|
||||
if (null != value) {
|
||||
@ -250,9 +254,9 @@ public class EamArtifactUtil {
|
||||
try {
|
||||
CorrelationAttribute.Type filesType = EamDb.getInstance().getCorrelationTypeById(CorrelationAttribute.FILES_TYPE_ID);
|
||||
eamArtifact = new CorrelationAttribute(filesType, af.getMd5Hash());
|
||||
CorrelationCase correlationCase = EamDb.getInstance().getCase(Case.getCurrentCase());
|
||||
CorrelationCase correlationCase = EamDb.getInstance().getCase(Case.getOpenCase());
|
||||
if (null == correlationCase) {
|
||||
correlationCase = EamDb.getInstance().newCase(Case.getCurrentCase());
|
||||
correlationCase = EamDb.getInstance().newCase(Case.getOpenCase());
|
||||
}
|
||||
CorrelationAttributeInstance cei = new CorrelationAttributeInstance(
|
||||
correlationCase,
|
||||
@ -263,7 +267,7 @@ public class EamArtifactUtil {
|
||||
);
|
||||
eamArtifact.addInstance(cei);
|
||||
return eamArtifact;
|
||||
} catch (TskCoreException | EamDbException ex) {
|
||||
} catch (TskCoreException | EamDbException | NoCurrentCaseException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Error making correlation attribute.", ex);
|
||||
return null;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Central Repository
|
||||
*
|
||||
* Copyright 2015-2017 Basis Technology Corp.
|
||||
* Copyright 2015-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -28,6 +28,7 @@ import java.util.logging.Level;
|
||||
import java.util.stream.Collectors;
|
||||
import org.openide.util.NbBundle.Messages;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.autopsy.casemodule.events.BlackBoardArtifactTagAddedEvent;
|
||||
import org.sleuthkit.autopsy.casemodule.events.BlackBoardArtifactTagDeletedEvent;
|
||||
import org.sleuthkit.autopsy.casemodule.events.ContentTagAddedEvent;
|
||||
@ -162,8 +163,8 @@ final class CaseEventListener implements PropertyChangeListener {
|
||||
|
||||
try {
|
||||
// Get the remaining tags on the content object
|
||||
Content content = Case.getCurrentCase().getSleuthkitCase().getContentById(contentID);
|
||||
TagsManager tagsManager = Case.getCurrentCase().getServices().getTagsManager();
|
||||
Content content = Case.getOpenCase().getSleuthkitCase().getContentById(contentID);
|
||||
TagsManager tagsManager = Case.getOpenCase().getServices().getTagsManager();
|
||||
List<ContentTag> tags = tagsManager.getContentTagsByContent(content);
|
||||
|
||||
if (tags.stream()
|
||||
@ -185,7 +186,7 @@ final class CaseEventListener implements PropertyChangeListener {
|
||||
// There's still at least one bad tag, so leave the known status as is
|
||||
return;
|
||||
}
|
||||
} catch (TskCoreException ex) {
|
||||
} catch (TskCoreException | NoCurrentCaseException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Failed to find content", ex);
|
||||
return;
|
||||
}
|
||||
@ -241,6 +242,13 @@ final class CaseEventListener implements PropertyChangeListener {
|
||||
return;
|
||||
}
|
||||
} else { //BLACKBOARD_ARTIFACT_TAG_DELETED
|
||||
Case openCase;
|
||||
try {
|
||||
openCase = Case.getOpenCase();
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Exception while getting open case.", ex);
|
||||
return;
|
||||
}
|
||||
// For deleted tags, we want to set the file status to UNKNOWN if:
|
||||
// - The tag that was just removed is notable in central repo
|
||||
// - There are no remaining tags that are notable
|
||||
@ -256,9 +264,9 @@ final class CaseEventListener implements PropertyChangeListener {
|
||||
|
||||
try {
|
||||
// Get the remaining tags on the artifact
|
||||
content = Case.getCurrentCase().getSleuthkitCase().getContentById(contentID);
|
||||
bbArtifact = Case.getCurrentCase().getSleuthkitCase().getBlackboardArtifact(artifactID);
|
||||
TagsManager tagsManager = Case.getCurrentCase().getServices().getTagsManager();
|
||||
content = openCase.getSleuthkitCase().getContentById(contentID);
|
||||
bbArtifact = openCase.getSleuthkitCase().getBlackboardArtifact(artifactID);
|
||||
TagsManager tagsManager = openCase.getServices().getTagsManager();
|
||||
List<BlackboardArtifactTag> tags = tagsManager.getBlackboardArtifactTagsByArtifact(bbArtifact);
|
||||
|
||||
if (tags.stream()
|
||||
@ -319,10 +327,10 @@ final class CaseEventListener implements PropertyChangeListener {
|
||||
* that are tagged with the given tag name.
|
||||
*/
|
||||
try {
|
||||
TagName tagName = Case.getCurrentCase().getServices().getTagsManager().getDisplayNamesToTagNamesMap().get(modifiedTagName);
|
||||
TagName tagName = Case.getOpenCase().getServices().getTagsManager().getDisplayNamesToTagNamesMap().get(modifiedTagName);
|
||||
//First update the artifacts
|
||||
//Get all BlackboardArtifactTags with this tag name
|
||||
List<BlackboardArtifactTag> artifactTags = Case.getCurrentCase().getSleuthkitCase().getBlackboardArtifactTagsByTagName(tagName);
|
||||
List<BlackboardArtifactTag> artifactTags = Case.getOpenCase().getSleuthkitCase().getBlackboardArtifactTagsByTagName(tagName);
|
||||
for (BlackboardArtifactTag bbTag : artifactTags) {
|
||||
//start with assumption that none of the other tags applied to this Correlation Attribute will prevent it's status from being changed
|
||||
boolean hasTagWithConflictingKnownStatus = false;
|
||||
@ -338,7 +346,7 @@ final class CaseEventListener implements PropertyChangeListener {
|
||||
}
|
||||
//Get the BlackboardArtifact which this BlackboardArtifactTag has been applied to.
|
||||
BlackboardArtifact bbArtifact = bbTag.getArtifact();
|
||||
TagsManager tagsManager = Case.getCurrentCase().getServices().getTagsManager();
|
||||
TagsManager tagsManager = Case.getOpenCase().getServices().getTagsManager();
|
||||
List<BlackboardArtifactTag> tags = tagsManager.getBlackboardArtifactTagsByArtifact(bbArtifact);
|
||||
//get all tags which are on this blackboard artifact
|
||||
for (BlackboardArtifactTag t : tags) {
|
||||
@ -366,7 +374,7 @@ final class CaseEventListener implements PropertyChangeListener {
|
||||
}
|
||||
// Next update the files
|
||||
|
||||
List<ContentTag> fileTags = Case.getCurrentCase().getSleuthkitCase().getContentTagsByTagName(tagName);
|
||||
List<ContentTag> fileTags = Case.getOpenCase().getSleuthkitCase().getContentTagsByTagName(tagName);
|
||||
//Get all ContentTags with this tag name
|
||||
for (ContentTag contentTag : fileTags) {
|
||||
//start with assumption that none of the other tags applied to this ContentTag will prevent it's status from being changed
|
||||
@ -376,7 +384,7 @@ final class CaseEventListener implements PropertyChangeListener {
|
||||
// the status of the file in the central repository
|
||||
if (tagName.getKnownStatus() == TskData.FileKnown.UNKNOWN) {
|
||||
Content content = contentTag.getContent();
|
||||
TagsManager tagsManager = Case.getCurrentCase().getServices().getTagsManager();
|
||||
TagsManager tagsManager = Case.getOpenCase().getServices().getTagsManager();
|
||||
List<ContentTag> tags = tagsManager.getContentTagsByContent(content);
|
||||
//get all tags which are on this file
|
||||
for (ContentTag t : tags) {
|
||||
@ -405,6 +413,8 @@ final class CaseEventListener implements PropertyChangeListener {
|
||||
LOGGER.log(Level.SEVERE, "Cannot update known status in central repository for tag: " + modifiedTagName, ex); //NON-NLS
|
||||
} catch (EamDbException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Cannot get central repository for tag: " + modifiedTagName, ex); //NON-NLS
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Exception while getting open case.", ex); //NON-NLS
|
||||
}
|
||||
} //TAG_STATUS_CHANGED
|
||||
}
|
||||
@ -424,15 +434,22 @@ final class CaseEventListener implements PropertyChangeListener {
|
||||
if (!EamDb.isEnabled()) {
|
||||
return;
|
||||
}
|
||||
Case openCase;
|
||||
try {
|
||||
openCase = Case.getOpenCase();
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Exception while getting open case.", ex);
|
||||
return;
|
||||
}
|
||||
|
||||
final DataSourceAddedEvent dataSourceAddedEvent = (DataSourceAddedEvent) event;
|
||||
Content newDataSource = dataSourceAddedEvent.getDataSource();
|
||||
|
||||
try {
|
||||
String deviceId = Case.getCurrentCase().getSleuthkitCase().getDataSource(newDataSource.getId()).getDeviceId();
|
||||
CorrelationCase correlationCase = dbManager.getCase(Case.getCurrentCase());
|
||||
String deviceId = openCase.getSleuthkitCase().getDataSource(newDataSource.getId()).getDeviceId();
|
||||
CorrelationCase correlationCase = dbManager.getCase(openCase);
|
||||
if (null == correlationCase) {
|
||||
correlationCase = dbManager.newCase(Case.getCurrentCase());
|
||||
correlationCase = dbManager.newCase(openCase);
|
||||
}
|
||||
if (null == dbManager.getDataSource(correlationCase, deviceId)) {
|
||||
dbManager.newDataSource(CorrelationDataSource.fromTSKDataSource(correlationCase, newDataSource));
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Central Repository
|
||||
*
|
||||
* Copyright 2015-2017 Basis Technology Corp.
|
||||
* Copyright 2015-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -32,6 +32,7 @@ import java.util.logging.Level;
|
||||
import java.util.stream.Collectors;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.autopsy.casemodule.services.Blackboard;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.ingest.IngestManager;
|
||||
@ -144,9 +145,9 @@ public class IngestEventsListener {
|
||||
tifArtifact.addAttributes(attributes);
|
||||
try {
|
||||
// index the artifact for keyword search
|
||||
Blackboard blackboard = Case.getCurrentCase().getServices().getBlackboard();
|
||||
Blackboard blackboard = Case.getOpenCase().getServices().getBlackboard();
|
||||
blackboard.indexArtifact(tifArtifact);
|
||||
} catch (Blackboard.BlackboardException ex) {
|
||||
} catch (Blackboard.BlackboardException | NoCurrentCaseException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Unable to index blackboard artifact " + tifArtifact.getArtifactID(), ex); //NON-NLS
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Central Repository
|
||||
*
|
||||
* Copyright 2011-2017 Basis Technology Corp.
|
||||
* Copyright 2011-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -26,6 +26,7 @@ import java.util.stream.Collectors;
|
||||
import org.openide.util.NbBundle.Messages;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.autopsy.casemodule.services.Blackboard;
|
||||
import org.sleuthkit.autopsy.core.RuntimeProperties;
|
||||
import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
|
||||
@ -79,7 +80,12 @@ class IngestModule implements FileIngestModule {
|
||||
return ProcessResult.OK;
|
||||
}
|
||||
|
||||
blackboard = Case.getCurrentCase().getServices().getBlackboard();
|
||||
try {
|
||||
blackboard = Case.getOpenCase().getServices().getBlackboard();
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Exception while getting open case.", ex);
|
||||
return ProcessResult.ERROR;
|
||||
}
|
||||
|
||||
if (!EamArtifactUtil.isValidCentralRepoFile(af)) {
|
||||
return ProcessResult.OK;
|
||||
@ -190,8 +196,16 @@ class IngestModule implements FileIngestModule {
|
||||
}
|
||||
return;
|
||||
}
|
||||
Case autopsyCase;
|
||||
try {
|
||||
autopsyCase = Case.getOpenCase();
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Exception while getting open case.", ex);
|
||||
throw new IngestModuleException("Exception while getting open case.", ex);
|
||||
}
|
||||
|
||||
// Don't allow sqlite central repo databases to be used for multi user cases
|
||||
if ((Case.getCurrentCase().getCaseType() == Case.CaseType.MULTI_USER_CASE)
|
||||
if ((autopsyCase.getCaseType() == Case.CaseType.MULTI_USER_CASE)
|
||||
&& (EamDbPlatformEnum.getSelectedPlatform() == EamDbPlatformEnum.SQLITE)) {
|
||||
LOGGER.log(Level.SEVERE, "Cannot run correlation engine on a multi-user case with a SQLite central repository.");
|
||||
throw new IngestModuleException("Cannot run on a multi-user case with a SQLite central repository."); // NON-NLS
|
||||
@ -212,7 +226,7 @@ class IngestModule implements FileIngestModule {
|
||||
LOGGER.log(Level.SEVERE, "Error getting correlation type FILES in ingest module start up.", ex); // NON-NLS
|
||||
throw new IngestModuleException("Error getting correlation type FILES in ingest module start up.", ex); // NON-NLS
|
||||
}
|
||||
Case autopsyCase = Case.getCurrentCase();
|
||||
|
||||
try {
|
||||
eamCase = centralRepoDb.getCase(autopsyCase);
|
||||
} catch (EamDbException ex) {
|
||||
|
@ -49,7 +49,7 @@
|
||||
<EmptySpace min="-2" pref="18" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="lbOrganizationName" min="-2" pref="104" max="-2" attributes="0"/>
|
||||
<Component id="lbOrganizationName" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="tfOrganizationName" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
@ -68,7 +68,7 @@
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="lbOrganizationName" alignment="3" min="-2" pref="22" max="-2" attributes="0"/>
|
||||
<Component id="lbOrganizationName" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="tfOrganizationName" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Central Repository
|
||||
*
|
||||
* Copyright 2015-2017 Basis Technology Corp.
|
||||
* Copyright 2015-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -18,8 +18,6 @@
|
||||
*/
|
||||
package org.sleuthkit.autopsy.centralrepository.optionspanel;
|
||||
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Toolkit;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.logging.Level;
|
||||
@ -86,8 +84,7 @@ public class AddNewOrganizationDialog extends javax.swing.JDialog {
|
||||
}
|
||||
|
||||
private void display() {
|
||||
Dimension screenDimension = Toolkit.getDefaultToolkit().getScreenSize();
|
||||
setLocation((screenDimension.width - getSize().width) / 2, (screenDimension.height - getSize().height) / 2);
|
||||
this.setLocationRelativeTo(WindowManager.getDefault().getMainWindow());
|
||||
setVisible(true);
|
||||
}
|
||||
|
||||
@ -283,7 +280,7 @@ public class AddNewOrganizationDialog extends javax.swing.JDialog {
|
||||
.addGap(18, 18, 18)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(lbOrganizationName, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(lbOrganizationName)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(tfOrganizationName))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
@ -297,7 +294,7 @@ public class AddNewOrganizationDialog extends javax.swing.JDialog {
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(lbOrganizationName, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(lbOrganizationName)
|
||||
.addComponent(tfOrganizationName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(lbPocHeading)
|
||||
|
@ -58,3 +58,10 @@ ManageCorrelationPropertiesDialog.okButton.text=OK
|
||||
GlobalSettingsPanel.bnManageProperties.text=Manage Correlation Properties
|
||||
EamDbSettingsDialog.lbDatabaseDesc.text=Database File:
|
||||
EamDbSettingsDialog.lbFullDbPath.text=
|
||||
GlobalSettingsPanel.cbUseCentralRepo.text=Use a central repository
|
||||
GlobalSettingsPanel.correlationPropertiesTextArea.text=Choose which file and result properties to store in the central repository for later correlation.\n
|
||||
GlobalSettingsPanel.organizationTextArea.text=Organization information can be tracked in the central repository.
|
||||
GlobalSettingsPanel.manageOrganizationButton.text=Manage Organizations
|
||||
GlobalSettingsPanel.lbCentralRepository.text=A central repository allows you to correlate files and results between cases.
|
||||
GlobalSettingsPanel.pnCorrelationProperties.border.title=Correlation Properties
|
||||
GlobalSettingsPanel.organizationPanel.border.title=Organizations
|
||||
|
@ -44,7 +44,7 @@
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="10" max="-2" attributes="0"/>
|
||||
<Component id="pnSQLiteSettings" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="11" max="32767" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="pnButtons" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="10" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
@ -120,12 +120,12 @@
|
||||
<Component id="lbHostName" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbPort" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbUserName" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbDatabaseType" alignment="0" min="-2" pref="82" max="-2" attributes="0"/>
|
||||
<Component id="lbDatabaseType" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" alignment="0" groupAlignment="1" max="-2" attributes="0">
|
||||
<Component id="lbDatabasePath" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="lbUserPassword" alignment="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="lbDatabaseDesc" alignment="0" min="-2" pref="78" max="-2" attributes="0"/>
|
||||
<Component id="lbDatabaseDesc" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="10" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
@ -133,7 +133,7 @@
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="cbDatabaseType" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="lbSingleUserSqLite" pref="467" max="32767" attributes="0"/>
|
||||
<Component id="lbSingleUserSqLite" max="32767" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="9" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Central Repository
|
||||
*
|
||||
* Copyright 2015-2017 Basis Technology Corp.
|
||||
* Copyright 2015-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -20,8 +20,6 @@ package org.sleuthkit.autopsy.centralrepository.optionspanel;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.Cursor;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Toolkit;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
@ -54,7 +52,7 @@ import org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings;
|
||||
*/
|
||||
public class EamDbSettingsDialog extends JDialog {
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(EamDbSettingsDialog.class.getName());
|
||||
private static final Logger logger = Logger.getLogger(EamDbSettingsDialog.class.getName());
|
||||
private static final String CENTRAL_REPO_DB_NAME = "central_repository";
|
||||
private static final String CENTRAL_REPO_SQLITE_EXT = ".db";
|
||||
private static final long serialVersionUID = 1L;
|
||||
@ -234,18 +232,18 @@ public class EamDbSettingsDialog extends JDialog {
|
||||
.addComponent(lbHostName)
|
||||
.addComponent(lbPort)
|
||||
.addComponent(lbUserName)
|
||||
.addComponent(lbDatabaseType, javax.swing.GroupLayout.PREFERRED_SIZE, 82, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(lbDatabaseType)
|
||||
.addGroup(pnSQLiteSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
|
||||
.addComponent(lbDatabasePath, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(lbUserPassword, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addComponent(lbDatabaseDesc, javax.swing.GroupLayout.PREFERRED_SIZE, 78, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(lbDatabaseDesc))
|
||||
.addGap(10, 10, 10)
|
||||
.addGroup(pnSQLiteSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(lbFullDbPath, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addGroup(pnSQLiteSettingsLayout.createSequentialGroup()
|
||||
.addComponent(cbDatabaseType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(lbSingleUserSqLite, javax.swing.GroupLayout.DEFAULT_SIZE, 467, Short.MAX_VALUE)
|
||||
.addComponent(lbSingleUserSqLite, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addGap(9, 9, 9))
|
||||
.addGroup(pnSQLiteSettingsLayout.createSequentialGroup()
|
||||
.addComponent(tfDatabasePath)
|
||||
@ -319,7 +317,7 @@ public class EamDbSettingsDialog extends JDialog {
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGap(10, 10, 10)
|
||||
.addComponent(pnSQLiteSettings, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 11, Short.MAX_VALUE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(pnButtons, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(10, 10, 10))
|
||||
);
|
||||
@ -348,8 +346,7 @@ public class EamDbSettingsDialog extends JDialog {
|
||||
}
|
||||
|
||||
private void display() {
|
||||
Dimension screenDimension = Toolkit.getDefaultToolkit().getScreenSize();
|
||||
setLocation((screenDimension.width - getSize().width) / 2, (screenDimension.height - getSize().height) / 2);
|
||||
this.setLocationRelativeTo(WindowManager.getDefault().getMainWindow());
|
||||
setVisible(true);
|
||||
}
|
||||
|
||||
@ -365,7 +362,7 @@ public class EamDbSettingsDialog extends JDialog {
|
||||
tfDatabasePath.setText(databaseFile.getCanonicalPath());
|
||||
valid();
|
||||
} catch (IOException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Failed to get path of selected database file", ex); // NON-NLS
|
||||
logger.log(Level.SEVERE, "Failed to get path of selected database file", ex); // NON-NLS
|
||||
}
|
||||
}
|
||||
}//GEN-LAST:event_bnDatabasePathFileOpenActionPerformed
|
||||
@ -432,7 +429,7 @@ public class EamDbSettingsDialog extends JDialog {
|
||||
Bundle.EamDbSettingsDialog_okButton_createPostgresDbError_message(),
|
||||
Bundle.EamDbSettingsDialog_okButton_createDbError_title(),
|
||||
JOptionPane.WARNING_MESSAGE);
|
||||
LOGGER.severe("Unable to initialize database schema or insert contents into central repository.");
|
||||
logger.severe("Unable to initialize database schema or insert contents into central repository.");
|
||||
return;
|
||||
}
|
||||
break;
|
||||
@ -453,7 +450,7 @@ public class EamDbSettingsDialog extends JDialog {
|
||||
Bundle.EamDbSettingsDialog_okButton_createSQLiteDbError_message(),
|
||||
Bundle.EamDbSettingsDialog_okButton_createDbError_title(),
|
||||
JOptionPane.WARNING_MESSAGE);
|
||||
LOGGER.severe("Unable to initialize database schema or insert contents into central repository.");
|
||||
logger.severe("Unable to initialize database schema or insert contents into central repository.");
|
||||
return;
|
||||
}
|
||||
break;
|
||||
@ -523,9 +520,9 @@ public class EamDbSettingsDialog extends JDialog {
|
||||
EamDb.getInstance().shutdownConnections();
|
||||
}
|
||||
} catch (EamDbException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Failed to close database connections in previously selected platform.", ex); // NON-NLS
|
||||
logger.log(Level.SEVERE, "Failed to close database connections in previously selected platform.", ex); // NON-NLS
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
JOptionPane.showMessageDialog(null,
|
||||
JOptionPane.showMessageDialog(this,
|
||||
Bundle.EamDbSettingsDialog_okButton_errorMsg_text(),
|
||||
Bundle.EamDbSettingsDialog_okButton_errorTitle_text(),
|
||||
JOptionPane.WARNING_MESSAGE);
|
||||
@ -548,7 +545,7 @@ public class EamDbSettingsDialog extends JDialog {
|
||||
EamDb.getInstance().updateSettings();
|
||||
configurationChanged = true;
|
||||
} catch (EamDbException ex) {
|
||||
LOGGER.log(Level.SEVERE, Bundle.EamDbSettingsDialog_okButton_connectionErrorMsg_text(), ex); //NON-NLS
|
||||
logger.log(Level.SEVERE, Bundle.EamDbSettingsDialog_okButton_connectionErrorMsg_text(), ex); //NON-NLS
|
||||
setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
|
||||
return;
|
||||
}
|
||||
@ -563,7 +560,7 @@ public class EamDbSettingsDialog extends JDialog {
|
||||
EamDb.getInstance().updateSettings();
|
||||
configurationChanged = true;
|
||||
} catch (EamDbException ex) {
|
||||
LOGGER.log(Level.SEVERE, Bundle.EamDbSettingsDialog_okButton_connectionErrorMsg_text(), ex); //NON-NLS
|
||||
logger.log(Level.SEVERE, Bundle.EamDbSettingsDialog_okButton_connectionErrorMsg_text(), ex); //NON-NLS
|
||||
setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
|
||||
return;
|
||||
}
|
||||
|
@ -3,6 +3,9 @@
|
||||
<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<Properties>
|
||||
<Property name="name" type="java.lang.String" value="" noResource="true"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[1022, 488]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
|
||||
@ -19,352 +22,393 @@
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="tbOops" alignment="1" max="32767" attributes="0"/>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Group type="103" groupAlignment="1" attributes="0">
|
||||
<Component id="organizationPanel" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="lbCentralRepository" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="pnCorrelationProperties" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="pnDatabaseConfiguration" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="cbUseCentralRepo" alignment="0" min="-2" pref="186" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
<Component id="jScrollPane1" alignment="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Component id="lbCentralRepository" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="cbUseCentralRepo" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Component id="pnDatabaseConfiguration" min="-2" pref="119" max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
|
||||
<Component id="pnCorrelationProperties" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
|
||||
<Component id="organizationPanel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
|
||||
<Component id="tbOops" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="jScrollPane1" alignment="0" pref="488" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="pnDatabaseConfiguration">
|
||||
<Container class="javax.swing.JScrollPane" name="jScrollPane1">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
|
||||
<TitledBorder title="Database Configuration">
|
||||
<ResourceString PropertyName="titleX" bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="GlobalSettingsPanel.pnDatabaseConfiguration.title" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<Font PropertyName="font" name="Tahoma" size="12" style="0"/>
|
||||
</TitledBorder>
|
||||
</Border>
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="bnDbConfigure" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="lbDbPlatformTypeLabel" max="32767" attributes="0"/>
|
||||
<Component id="lbDbNameLabel" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="lbDbLocationLabel" alignment="0" min="-2" pref="57" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="1" attributes="0">
|
||||
<Component id="lbDbNameValue" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="lbDbPlatformValue" max="32767" attributes="0"/>
|
||||
<Component id="lbDbLocationValue" alignment="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace min="-2" pref="7" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="lbDbPlatformTypeLabel" max="32767" attributes="0"/>
|
||||
<Component id="lbDbPlatformValue" min="-2" pref="14" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="lbDbNameLabel" max="32767" attributes="0"/>
|
||||
<Component id="lbDbNameValue" min="-2" pref="14" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="lbDbLocationLabel" max="32767" attributes="0"/>
|
||||
<Component id="lbDbLocationValue" min="-2" pref="14" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="bnDbConfigure" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="8" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JLabel" name="lbDbPlatformTypeLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="GlobalSettingsPanel.lbDbPlatformTypeLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lbDbNameLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="GlobalSettingsPanel.lbDbNameLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lbDbLocationLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="GlobalSettingsPanel.lbDbLocationLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="bnDbConfigure">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="GlobalSettingsPanel.bnDbConfigure.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="bnDbConfigureActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lbDbPlatformValue">
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lbDbNameValue">
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lbDbLocationValue">
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Component class="javax.swing.JCheckBox" name="cbUseCentralRepo">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="GlobalSettingsPanel.cbUseCentralRepo.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="cbUseCentralRepoActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="tbOops">
|
||||
<Properties>
|
||||
<Property name="editable" type="boolean" value="false"/>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font bold="true" component="tbOops" property="font" relativeSize="false" size="12"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="GlobalSettingsPanel.tbOops.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="null"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Container class="javax.swing.JPanel" name="pnCorrelationProperties">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
|
||||
<TitledBorder title="<GlobalSettingsPanel.pnCorrelationProperties.border.title>">
|
||||
<ResourceString PropertyName="titleX" bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="GlobalSettingsPanel.pnCorrelationProperties.border.title" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<Font PropertyName="font" name="Tahoma" size="12" style="0"/>
|
||||
</TitledBorder>
|
||||
</Border>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[674, 93]"/>
|
||||
<Dimension value="[1022, 407]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="correlationPropertiesScrollPane" pref="642" max="32767" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="bnManageTypes" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace min="-2" pref="7" max="-2" attributes="0"/>
|
||||
<Component id="correlationPropertiesScrollPane" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="bnManageTypes" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="8" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JButton" name="bnManageTypes">
|
||||
<Container class="javax.swing.JPanel" name="jPanel1">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="GlobalSettingsPanel.bnManageProperties.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[1020, 407]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="bnManageTypesActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Container class="javax.swing.JScrollPane" name="correlationPropertiesScrollPane">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="null"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="lbCentralRepository" max="32767" attributes="0"/>
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="cbUseCentralRepo" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="tbOops" min="-2" pref="974" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="36" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Group type="103" groupAlignment="1" attributes="0">
|
||||
<Component id="pnDatabaseConfiguration" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="pnCorrelationProperties" alignment="0" pref="1012" max="32767" attributes="0"/>
|
||||
<Component id="organizationPanel" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="lbCentralRepository" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="cbUseCentralRepo" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="pnDatabaseConfiguration" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="pnCorrelationProperties" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="organizationPanel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="tbOops" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="92" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JTextArea" name="correlationPropertiesTextArea">
|
||||
<Component class="javax.swing.JLabel" name="lbCentralRepository">
|
||||
<Properties>
|
||||
<Property name="editable" type="boolean" value="false"/>
|
||||
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||
<Color blue="f0" green="f0" red="f0" type="rgb"/>
|
||||
</Property>
|
||||
<Property name="columns" type="int" value="20"/>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Tahoma" size="11" style="0"/>
|
||||
</Property>
|
||||
<Property name="lineWrap" type="boolean" value="true"/>
|
||||
<Property name="rows" type="int" value="2"/>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="GlobalSettingsPanel.correlationPropertiesTextArea.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" value=""/>
|
||||
<Property name="wrapStyleWord" type="boolean" value="true"/>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="null"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="GlobalSettingsPanel.lbCentralRepository.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Component class="javax.swing.JLabel" name="lbCentralRepository">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="GlobalSettingsPanel.lbCentralRepository.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Container class="javax.swing.JPanel" name="organizationPanel">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
|
||||
<TitledBorder title="<GlobalSettingsPanel.organizationPanel.border.title>">
|
||||
<ResourceString PropertyName="titleX" bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="GlobalSettingsPanel.organizationPanel.border.title" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<Font PropertyName="font" name="Tahoma" size="12" style="0"/>
|
||||
</TitledBorder>
|
||||
</Border>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Component class="javax.swing.JCheckBox" name="cbUseCentralRepo">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="GlobalSettingsPanel.cbUseCentralRepo.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="cbUseCentralRepoActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Container class="javax.swing.JPanel" name="pnDatabaseConfiguration">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
|
||||
<TitledBorder title="Database Configuration">
|
||||
<ResourceString PropertyName="titleX" bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="GlobalSettingsPanel.pnDatabaseConfiguration.title" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<Font PropertyName="font" name="Tahoma" size="12" style="0"/>
|
||||
</TitledBorder>
|
||||
</Border>
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="organizationScrollPane" max="32767" attributes="0"/>
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="manageOrganizationButton" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="bnDbConfigure" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="lbDbPlatformTypeLabel" max="32767" attributes="0"/>
|
||||
<Component id="lbDbNameLabel" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="lbDbLocationLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="1" attributes="0">
|
||||
<Component id="lbDbNameValue" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="lbDbPlatformValue" max="32767" attributes="0"/>
|
||||
<Component id="lbDbLocationValue" alignment="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="organizationScrollPane" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="manageOrganizationButton" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="8" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JButton" name="manageOrganizationButton">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="GlobalSettingsPanel.manageOrganizationButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="manageOrganizationButtonActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Container class="javax.swing.JScrollPane" name="organizationScrollPane">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="null"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
|
||||
</AuxValues>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace min="-2" pref="7" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="lbDbPlatformTypeLabel" max="32767" attributes="0"/>
|
||||
<Component id="lbDbPlatformValue" min="-2" pref="14" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="lbDbNameLabel" max="32767" attributes="0"/>
|
||||
<Component id="lbDbNameValue" min="-2" pref="14" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="lbDbLocationLabel" max="32767" attributes="0"/>
|
||||
<Component id="lbDbLocationValue" min="-2" pref="14" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="bnDbConfigure" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="8" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JLabel" name="lbDbPlatformTypeLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="GlobalSettingsPanel.lbDbPlatformTypeLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lbDbNameLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="GlobalSettingsPanel.lbDbNameLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lbDbLocationLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="GlobalSettingsPanel.lbDbLocationLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="bnDbConfigure">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="GlobalSettingsPanel.bnDbConfigure.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="bnDbConfigureActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lbDbPlatformValue">
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lbDbNameValue">
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lbDbLocationValue">
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="pnCorrelationProperties">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
|
||||
<TitledBorder title="Correlation Properties">
|
||||
<ResourceString PropertyName="titleX" bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="GlobalSettingsPanel.pnCorrelationProperties.border.title" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<Font PropertyName="font" name="Tahoma" size="12" style="0"/>
|
||||
</TitledBorder>
|
||||
</Border>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[674, 93]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JTextArea" name="organizationTextArea">
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="correlationPropertiesScrollPane" max="32767" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="bnManageTypes" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace min="-2" pref="7" max="-2" attributes="0"/>
|
||||
<Component id="correlationPropertiesScrollPane" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="bnManageTypes" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="8" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JButton" name="bnManageTypes">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="GlobalSettingsPanel.bnManageProperties.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="bnManageTypesActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Container class="javax.swing.JScrollPane" name="correlationPropertiesScrollPane">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="null"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JTextArea" name="correlationPropertiesTextArea">
|
||||
<Properties>
|
||||
<Property name="editable" type="boolean" value="false"/>
|
||||
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||
<Color blue="f0" green="f0" red="f0" type="rgb"/>
|
||||
</Property>
|
||||
<Property name="columns" type="int" value="20"/>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Tahoma" size="11" style="0"/>
|
||||
</Property>
|
||||
<Property name="lineWrap" type="boolean" value="true"/>
|
||||
<Property name="rows" type="int" value="2"/>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="GlobalSettingsPanel.correlationPropertiesTextArea.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" value=""/>
|
||||
<Property name="wrapStyleWord" type="boolean" value="true"/>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="null"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="organizationPanel">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
|
||||
<TitledBorder title="Organizations">
|
||||
<ResourceString PropertyName="titleX" bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="GlobalSettingsPanel.organizationPanel.border.title" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<Font PropertyName="font" name="Tahoma" size="12" style="0"/>
|
||||
</TitledBorder>
|
||||
</Border>
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="organizationScrollPane" max="32767" attributes="0"/>
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="manageOrganizationButton" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="organizationScrollPane" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="manageOrganizationButton" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="8" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JButton" name="manageOrganizationButton">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="GlobalSettingsPanel.manageOrganizationButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="manageOrganizationButtonActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Container class="javax.swing.JScrollPane" name="organizationScrollPane">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="null"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JTextArea" name="organizationTextArea">
|
||||
<Properties>
|
||||
<Property name="editable" type="boolean" value="false"/>
|
||||
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||
<Color blue="f0" green="f0" red="f0" type="rgb"/>
|
||||
</Property>
|
||||
<Property name="columns" type="int" value="20"/>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Tahoma" size="11" style="0"/>
|
||||
</Property>
|
||||
<Property name="lineWrap" type="boolean" value="true"/>
|
||||
<Property name="rows" type="int" value="2"/>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="GlobalSettingsPanel.organizationTextArea.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="wrapStyleWord" type="boolean" value="true"/>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="null"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Component class="javax.swing.JTextField" name="tbOops">
|
||||
<Properties>
|
||||
<Property name="editable" type="boolean" value="false"/>
|
||||
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||
<Color blue="f0" green="f0" red="f0" type="rgb"/>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font bold="true" component="tbOops" property="font" relativeSize="false" size="12"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="columns" type="int" value="20"/>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Tahoma" size="11" style="0"/>
|
||||
</Property>
|
||||
<Property name="lineWrap" type="boolean" value="true"/>
|
||||
<Property name="rows" type="int" value="2"/>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="GlobalSettingsPanel.organizationTextArea.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="GlobalSettingsPanel.tbOops.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="wrapStyleWord" type="boolean" value="true"/>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="null"/>
|
||||
</Property>
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Central Repository
|
||||
*
|
||||
* Copyright 2015-2017 Basis Technology Corp.
|
||||
* Copyright 2015-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -43,7 +43,7 @@ import org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings;
|
||||
public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel implements OptionsPanel {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final Logger LOGGER = Logger.getLogger(GlobalSettingsPanel.class.getName());
|
||||
private static final Logger logger = Logger.getLogger(GlobalSettingsPanel.class.getName());
|
||||
|
||||
private final IngestJobEventPropertyChangeListener ingestJobEventListener;
|
||||
|
||||
@ -58,22 +58,8 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i
|
||||
addIngestJobEventsListener();
|
||||
}
|
||||
|
||||
@Messages({"GlobalSettingsPanel.title=Central Repository Settings",
|
||||
"GlobalSettingsPanel.cbUseCentralRepo.text=Use a central repository",
|
||||
"GlobalSettingsPanel.pnTagManagement.border.title=Tags",
|
||||
"GlobalSettingsPanel.pnCorrelationProperties.border.title=Correlation Properties",
|
||||
"GlobalSettingsPanel.lbCentralRepository.text=A central repository allows you to correlate files and results between cases.",
|
||||
"GlobalSettingsPanel.manageTagsTextArea.text=Configure which tag names are associated with notable items. "
|
||||
+ "When these tags are used, the file or result will be recorded in the central repository. "
|
||||
+ "If that file or result is seen again in future cases, it will be flagged.",
|
||||
"GlobalSettingsPanel.correlationPropertiesTextArea.text=Choose which file and result properties to store in the central repository for later correlation.",
|
||||
"GlobalSettingsPanel.organizationPanel.border.title=Organizations",
|
||||
"GlobalSettingsPanel.manageOrganizationButton.text=Manage Organizations",
|
||||
"GlobalSettingsPanel.organizationTextArea.text=Organization information can be tracked in the central repository"
|
||||
})
|
||||
|
||||
private void customizeComponents() {
|
||||
setName(Bundle.GlobalSettingsPanel_title());
|
||||
setName(NbBundle.getMessage(GlobalSettingsPanel.class, "GlobalSettingsPanel.pnCorrelationProperties.border.title"));
|
||||
}
|
||||
|
||||
private void addIngestJobEventsListener() {
|
||||
@ -95,7 +81,7 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i
|
||||
boolean result = EamDbUtil.upgradeDatabase();
|
||||
setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
|
||||
if(! result){
|
||||
JOptionPane.showMessageDialog(null,
|
||||
JOptionPane.showMessageDialog(this,
|
||||
NbBundle.getMessage(this.getClass(),
|
||||
"GlobalSettingsPanel.updateFailed.message"),
|
||||
NbBundle.getMessage(this.getClass(),
|
||||
@ -116,6 +102,10 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
jScrollPane1 = new javax.swing.JScrollPane();
|
||||
jPanel1 = new javax.swing.JPanel();
|
||||
lbCentralRepository = new javax.swing.JLabel();
|
||||
cbUseCentralRepo = new javax.swing.JCheckBox();
|
||||
pnDatabaseConfiguration = new javax.swing.JPanel();
|
||||
lbDbPlatformTypeLabel = new javax.swing.JLabel();
|
||||
lbDbNameLabel = new javax.swing.JLabel();
|
||||
@ -124,19 +114,33 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i
|
||||
lbDbPlatformValue = new javax.swing.JLabel();
|
||||
lbDbNameValue = new javax.swing.JLabel();
|
||||
lbDbLocationValue = new javax.swing.JLabel();
|
||||
cbUseCentralRepo = new javax.swing.JCheckBox();
|
||||
tbOops = new javax.swing.JTextField();
|
||||
pnCorrelationProperties = new javax.swing.JPanel();
|
||||
bnManageTypes = new javax.swing.JButton();
|
||||
correlationPropertiesScrollPane = new javax.swing.JScrollPane();
|
||||
correlationPropertiesTextArea = new javax.swing.JTextArea();
|
||||
lbCentralRepository = new javax.swing.JLabel();
|
||||
organizationPanel = new javax.swing.JPanel();
|
||||
manageOrganizationButton = new javax.swing.JButton();
|
||||
organizationScrollPane = new javax.swing.JScrollPane();
|
||||
organizationTextArea = new javax.swing.JTextArea();
|
||||
tbOops = new javax.swing.JTextField();
|
||||
|
||||
setName(""); // NOI18N
|
||||
setPreferredSize(new java.awt.Dimension(1022, 488));
|
||||
|
||||
jScrollPane1.setBorder(null);
|
||||
jScrollPane1.setPreferredSize(new java.awt.Dimension(1022, 407));
|
||||
|
||||
jPanel1.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
jPanel1.setPreferredSize(new java.awt.Dimension(1020, 407));
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(lbCentralRepository, org.openide.util.NbBundle.getMessage(GlobalSettingsPanel.class, "GlobalSettingsPanel.lbCentralRepository.text")); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(cbUseCentralRepo, org.openide.util.NbBundle.getMessage(GlobalSettingsPanel.class, "GlobalSettingsPanel.cbUseCentralRepo.text")); // NOI18N
|
||||
cbUseCentralRepo.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
cbUseCentralRepoActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
pnDatabaseConfiguration.setBorder(javax.swing.BorderFactory.createTitledBorder(null, org.openide.util.NbBundle.getMessage(GlobalSettingsPanel.class, "GlobalSettingsPanel.pnDatabaseConfiguration.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 12))); // NOI18N
|
||||
|
||||
@ -167,7 +171,7 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i
|
||||
.addGroup(pnDatabaseConfigurationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addComponent(lbDbPlatformTypeLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(lbDbNameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(lbDbLocationLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(lbDbLocationLabel))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addGroup(pnDatabaseConfigurationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(lbDbNameValue, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
@ -194,18 +198,6 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i
|
||||
.addGap(8, 8, 8))
|
||||
);
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(cbUseCentralRepo, org.openide.util.NbBundle.getMessage(GlobalSettingsPanel.class, "GlobalSettingsPanel.cbUseCentralRepo.text")); // NOI18N
|
||||
cbUseCentralRepo.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
cbUseCentralRepoActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
tbOops.setEditable(false);
|
||||
tbOops.setFont(tbOops.getFont().deriveFont(tbOops.getFont().getStyle() | java.awt.Font.BOLD, 12));
|
||||
tbOops.setText(org.openide.util.NbBundle.getMessage(GlobalSettingsPanel.class, "GlobalSettingsPanel.tbOops.text")); // NOI18N
|
||||
tbOops.setBorder(null);
|
||||
|
||||
pnCorrelationProperties.setBorder(javax.swing.BorderFactory.createTitledBorder(null, org.openide.util.NbBundle.getMessage(GlobalSettingsPanel.class, "GlobalSettingsPanel.pnCorrelationProperties.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 12))); // NOI18N
|
||||
pnCorrelationProperties.setPreferredSize(new java.awt.Dimension(674, 93));
|
||||
|
||||
@ -237,7 +229,7 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i
|
||||
.addGroup(pnCorrelationPropertiesLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(pnCorrelationPropertiesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(correlationPropertiesScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 642, Short.MAX_VALUE)
|
||||
.addComponent(correlationPropertiesScrollPane)
|
||||
.addGroup(pnCorrelationPropertiesLayout.createSequentialGroup()
|
||||
.addComponent(bnManageTypes)
|
||||
.addGap(0, 0, Short.MAX_VALUE)))
|
||||
@ -253,8 +245,6 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i
|
||||
.addGap(8, 8, 8))
|
||||
);
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(lbCentralRepository, org.openide.util.NbBundle.getMessage(GlobalSettingsPanel.class, "GlobalSettingsPanel.lbCentralRepository.text")); // NOI18N
|
||||
|
||||
organizationPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, org.openide.util.NbBundle.getMessage(GlobalSettingsPanel.class, "GlobalSettingsPanel.organizationPanel.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 12))); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(manageOrganizationButton, org.openide.util.NbBundle.getMessage(GlobalSettingsPanel.class, "GlobalSettingsPanel.manageOrganizationButton.text")); // NOI18N
|
||||
@ -300,38 +290,58 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i
|
||||
.addGap(8, 8, 8))
|
||||
);
|
||||
|
||||
tbOops.setEditable(false);
|
||||
tbOops.setFont(tbOops.getFont().deriveFont(tbOops.getFont().getStyle() | java.awt.Font.BOLD, 12));
|
||||
tbOops.setText(org.openide.util.NbBundle.getMessage(GlobalSettingsPanel.class, "GlobalSettingsPanel.tbOops.text")); // NOI18N
|
||||
tbOops.setBorder(null);
|
||||
|
||||
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
|
||||
jPanel1.setLayout(jPanel1Layout);
|
||||
jPanel1Layout.setHorizontalGroup(
|
||||
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(lbCentralRepository, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addComponent(cbUseCentralRepo)
|
||||
.addGap(0, 0, Short.MAX_VALUE))
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(tbOops, javax.swing.GroupLayout.PREFERRED_SIZE, 974, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap(36, Short.MAX_VALUE))
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(pnDatabaseConfiguration, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(pnCorrelationProperties, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 1012, Short.MAX_VALUE)
|
||||
.addComponent(organizationPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addContainerGap())
|
||||
);
|
||||
jPanel1Layout.setVerticalGroup(
|
||||
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addComponent(lbCentralRepository)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(cbUseCentralRepo)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(pnDatabaseConfiguration, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(pnCorrelationProperties, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(organizationPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(tbOops, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(0, 92, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
jScrollPane1.setViewportView(jPanel1);
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(tbOops, javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(organizationPanel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(lbCentralRepository, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(pnCorrelationProperties, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(pnDatabaseConfiguration, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(cbUseCentralRepo, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 186, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addContainerGap())))
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||
.addComponent(lbCentralRepository)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(cbUseCentralRepo)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(pnDatabaseConfiguration, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(0, 0, 0)
|
||||
.addComponent(pnCorrelationProperties, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(0, 0, 0)
|
||||
.addComponent(organizationPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(0, 0, 0)
|
||||
.addComponent(tbOops, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap())
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 488, Short.MAX_VALUE)
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
@ -523,6 +533,8 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i
|
||||
private javax.swing.JCheckBox cbUseCentralRepo;
|
||||
private javax.swing.JScrollPane correlationPropertiesScrollPane;
|
||||
private javax.swing.JTextArea correlationPropertiesTextArea;
|
||||
private javax.swing.JPanel jPanel1;
|
||||
private javax.swing.JScrollPane jScrollPane1;
|
||||
private javax.swing.JLabel lbCentralRepository;
|
||||
private javax.swing.JLabel lbDbLocationLabel;
|
||||
private javax.swing.JLabel lbDbLocationValue;
|
||||
|
@ -98,8 +98,7 @@ final class ManageCorrelationPropertiesDialog extends javax.swing.JDialog {
|
||||
}
|
||||
|
||||
private void display() {
|
||||
Dimension screenDimension = Toolkit.getDefaultToolkit().getScreenSize();
|
||||
setLocation((screenDimension.width - getSize().width) / 2, (screenDimension.height - getSize().height) / 2);
|
||||
this.setLocationRelativeTo(WindowManager.getDefault().getMainWindow());
|
||||
setVisible(true);
|
||||
}
|
||||
|
||||
|
@ -3,11 +3,12 @@
|
||||
<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JDialogFormInfo">
|
||||
<Properties>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[545, 450]"/>
|
||||
<Dimension value="[545, 415]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<SyntheticProperties>
|
||||
<SyntheticProperty name="formSizePolicy" type="int" value="2"/>
|
||||
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
|
||||
<SyntheticProperty name="generateCenter" type="boolean" value="false"/>
|
||||
</SyntheticProperties>
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
|
||||
@ -66,7 +67,7 @@
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="orgDescriptionScrollPane" min="-2" pref="225" max="-2" attributes="0"/>
|
||||
<Component id="orgListLabel" alignment="0" min="-2" pref="73" max="-2" attributes="0"/>
|
||||
<Component id="orgListLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="newButton" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
@ -106,7 +107,7 @@
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="orgDetailsLabel" min="-2" pref="115" max="-2" attributes="0"/>
|
||||
<Component id="orgDetailsLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
@ -140,7 +141,7 @@
|
||||
<Component id="pocEmailTextField" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="pocEmailLabel" alignment="3" min="-2" pref="20" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace pref="235" max="32767" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="closeButton" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="jSeparator1" max="32767" attributes="0"/>
|
||||
@ -149,7 +150,7 @@
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Component id="orgListLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Component id="orgListScrollPane" pref="288" max="32767" attributes="0"/>
|
||||
<Component id="orgListScrollPane" max="32767" attributes="0"/>
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="newButton" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Central Repository
|
||||
*
|
||||
* Copyright 2015-2017 Basis Technology Corp.
|
||||
* Copyright 2015-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -19,8 +19,6 @@
|
||||
package org.sleuthkit.autopsy.centralrepository.optionspanel;
|
||||
|
||||
import java.awt.Component;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Toolkit;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
import javax.swing.DefaultListCellRenderer;
|
||||
@ -46,7 +44,7 @@ public final class ManageOrganizationsDialog extends JDialog {
|
||||
private EamDb dbManager;
|
||||
private EamOrganization newOrg;
|
||||
private final DefaultListModel<EamOrganization> rulesListModel = new DefaultListModel<>();
|
||||
private final static Logger LOGGER = Logger.getLogger(ManageOrganizationsDialog.class.getName());
|
||||
private final static Logger logger = Logger.getLogger(ManageOrganizationsDialog.class.getName());
|
||||
|
||||
@Messages({"ManageOrganizationsDialog.title.text=Manage Organizations"})
|
||||
/**
|
||||
@ -82,8 +80,7 @@ public final class ManageOrganizationsDialog extends JDialog {
|
||||
}
|
||||
|
||||
private void display() {
|
||||
Dimension screenDimension = Toolkit.getDefaultToolkit().getScreenSize();
|
||||
setLocation((screenDimension.width - getSize().width) / 2, (screenDimension.height - getSize().height) / 2);
|
||||
this.setLocationRelativeTo(WindowManager.getDefault().getMainWindow());
|
||||
setVisible(true);
|
||||
}
|
||||
|
||||
@ -158,7 +155,7 @@ public final class ManageOrganizationsDialog extends JDialog {
|
||||
editButton = new javax.swing.JButton();
|
||||
orgDetailsLabel = new javax.swing.JLabel();
|
||||
|
||||
setMinimumSize(new java.awt.Dimension(545, 450));
|
||||
setMinimumSize(new java.awt.Dimension(545, 415));
|
||||
|
||||
manageOrganizationsScrollPane.setMinimumSize(null);
|
||||
manageOrganizationsScrollPane.setPreferredSize(new java.awt.Dimension(535, 415));
|
||||
@ -247,7 +244,7 @@ public final class ManageOrganizationsDialog extends JDialog {
|
||||
.addContainerGap()
|
||||
.addGroup(manageOrganizationsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(orgDescriptionScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 225, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(orgListLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(orgListLabel)
|
||||
.addGroup(manageOrganizationsPanelLayout.createSequentialGroup()
|
||||
.addComponent(newButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
@ -279,7 +276,7 @@ public final class ManageOrganizationsDialog extends JDialog {
|
||||
.addContainerGap())
|
||||
.addGroup(manageOrganizationsPanelLayout.createSequentialGroup()
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(orgDetailsLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(orgDetailsLabel)
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
|
||||
);
|
||||
manageOrganizationsPanelLayout.setVerticalGroup(
|
||||
@ -305,7 +302,7 @@ public final class ManageOrganizationsDialog extends JDialog {
|
||||
.addGroup(manageOrganizationsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(pocEmailTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(pocEmailLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 235, Short.MAX_VALUE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(closeButton))
|
||||
.addComponent(jSeparator1)
|
||||
.addGroup(manageOrganizationsPanelLayout.createSequentialGroup()
|
||||
@ -313,7 +310,7 @@ public final class ManageOrganizationsDialog extends JDialog {
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(orgListLabel)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(orgListScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 288, Short.MAX_VALUE)
|
||||
.addComponent(orgListScrollPane)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(manageOrganizationsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(newButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
@ -338,6 +335,8 @@ public final class ManageOrganizationsDialog extends JDialog {
|
||||
.addGap(0, 0, 0)
|
||||
.addComponent(manageOrganizationsScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
pack();
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void deleteButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deleteButtonActionPerformed
|
||||
@ -351,9 +350,9 @@ public final class ManageOrganizationsDialog extends JDialog {
|
||||
EamDb.getInstance().deleteOrganization(orgToDelete);
|
||||
populateList();
|
||||
} catch (EamDbException ex) {
|
||||
JOptionPane.showMessageDialog(null,
|
||||
JOptionPane.showMessageDialog(this,
|
||||
ex.getMessage(), Bundle.ManageOrganizationsDialog_unableToDeleteOrg_title(), JOptionPane.WARNING_MESSAGE);
|
||||
LOGGER.log(Level.INFO, "Was unable to delete organization from central repository", ex);
|
||||
logger.log(Level.INFO, "Was unable to delete organization from central repository", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -21,7 +21,7 @@
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="filtersTitleLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="applyFiltersButton" min="-2" pref="83" max="-2" attributes="0"/>
|
||||
<Component id="applyFiltersButton" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="refreshButton" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
@ -76,9 +76,6 @@
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/communications/Bundle.properties" key="FiltersPanel.filtersTitleLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Tahoma" size="16" style="0"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Container class="javax.swing.JPanel" name="jPanel2">
|
||||
@ -313,14 +310,14 @@
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Component id="endCheckBox" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="endDatePicker" min="-2" pref="163" max="-2" attributes="0"/>
|
||||
<Component id="endCheckBox" linkSize="1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="12" max="-2" attributes="0"/>
|
||||
<Component id="endDatePicker" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="startCheckBox" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="startDatePicker" min="-2" pref="162" max="-2" attributes="0"/>
|
||||
<Component id="startCheckBox" linkSize="1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="12" max="-2" attributes="0"/>
|
||||
<Component id="startDatePicker" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
@ -399,12 +396,12 @@
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="needsRefreshLabel">
|
||||
<Properties>
|
||||
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||
<Color blue="0" green="0" red="ff" type="rgb"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/communications/Bundle.properties" key="FiltersPanel.needsRefreshLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||
<Color blue="0" green="0" red="ff" type="rgb"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
|
@ -34,6 +34,7 @@ import javax.swing.JPanel;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import static org.sleuthkit.autopsy.casemodule.Case.Events.CURRENT_CASE;
|
||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.autopsy.core.UserPreferences;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.coreutils.ThreadConfined;
|
||||
@ -208,7 +209,7 @@ final public class FiltersPanel extends JPanel {
|
||||
|
||||
//TODO: something like this commented code could be used to show only
|
||||
//the account types that are found:
|
||||
//final CommunicationsManager communicationsManager = Case.getCurrentCase().getSleuthkitCase().getCommunicationsManager();
|
||||
//final CommunicationsManager communicationsManager = Case.getOpenCase().getSleuthkitCase().getCommunicationsManager();
|
||||
//List<Account.Type> accountTypesInUse = communicationsManager.getAccountTypesInUse();
|
||||
//accountTypesInUSe.forEach(...)
|
||||
Account.Type.PREDEFINED_ACCOUNT_TYPES.forEach(type -> {
|
||||
@ -239,7 +240,7 @@ final public class FiltersPanel extends JPanel {
|
||||
*/
|
||||
private void updateDeviceFilter(boolean initialState) {
|
||||
try {
|
||||
final SleuthkitCase sleuthkitCase = Case.getCurrentCase().getSleuthkitCase();
|
||||
final SleuthkitCase sleuthkitCase = Case.getOpenCase().getSleuthkitCase();
|
||||
|
||||
for (DataSource dataSource : sleuthkitCase.getDataSources()) {
|
||||
String dsName = sleuthkitCase.getContentById(dataSource.getId()).getName();
|
||||
@ -251,7 +252,7 @@ final public class FiltersPanel extends JPanel {
|
||||
return jCheckBox;
|
||||
});
|
||||
}
|
||||
} catch (IllegalStateException ex) {
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
logger.log(Level.WARNING, "Communications Visualization Tool opened with no open case.", ex);
|
||||
} catch (TskCoreException tskCoreException) {
|
||||
logger.log(Level.SEVERE, "There was a error loading the datasources for the case.", tskCoreException);
|
||||
@ -273,7 +274,6 @@ final public class FiltersPanel extends JPanel {
|
||||
|
||||
filtersTitleLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/communications/images/funnel.png"))); // NOI18N
|
||||
filtersTitleLabel.setText(org.openide.util.NbBundle.getMessage(FiltersPanel.class, "FiltersPanel.filtersTitleLabel.text")); // NOI18N
|
||||
filtersTitleLabel.setFont(new java.awt.Font("Tahoma", 0, 16)); // NOI18N
|
||||
|
||||
unCheckAllAccountTypesButton.setText(org.openide.util.NbBundle.getMessage(FiltersPanel.class, "FiltersPanel.unCheckAllAccountTypesButton.text")); // NOI18N
|
||||
unCheckAllAccountTypesButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
@ -430,13 +430,16 @@ final public class FiltersPanel extends JPanel {
|
||||
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
|
||||
.addComponent(endCheckBox)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(endDatePicker, javax.swing.GroupLayout.PREFERRED_SIZE, 163, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(12, 12, 12)
|
||||
.addComponent(endDatePicker, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(jPanel4Layout.createSequentialGroup()
|
||||
.addComponent(startCheckBox)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(startDatePicker, javax.swing.GroupLayout.PREFERRED_SIZE, 162, javax.swing.GroupLayout.PREFERRED_SIZE))))
|
||||
.addGap(12, 12, 12)
|
||||
.addComponent(startDatePicker, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
|
||||
);
|
||||
|
||||
jPanel4Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {endCheckBox, startCheckBox});
|
||||
|
||||
jPanel4Layout.setVerticalGroup(
|
||||
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel4Layout.createSequentialGroup()
|
||||
@ -454,8 +457,8 @@ final public class FiltersPanel extends JPanel {
|
||||
refreshButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/communications/images/arrow-circle-double-135.png"))); // NOI18N
|
||||
refreshButton.setText(org.openide.util.NbBundle.getMessage(FiltersPanel.class, "FiltersPanel.refreshButton.text")); // NOI18N
|
||||
|
||||
needsRefreshLabel.setForeground(new java.awt.Color(255, 0, 0));
|
||||
needsRefreshLabel.setText(org.openide.util.NbBundle.getMessage(FiltersPanel.class, "FiltersPanel.needsRefreshLabel.text")); // NOI18N
|
||||
needsRefreshLabel.setForeground(new java.awt.Color(255, 0, 0));
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
@ -466,7 +469,7 @@ final public class FiltersPanel extends JPanel {
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(filtersTitleLabel)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(applyFiltersButton, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(applyFiltersButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(refreshButton))
|
||||
.addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
|
@ -11,7 +11,7 @@
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
<AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,-1,0,0,3,-123"/>
|
||||
<AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,0,-111,0,0,3,32"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
||||
@ -48,19 +48,19 @@
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace pref="208" max="32767" attributes="0"/>
|
||||
<Component id="jTextArea1" min="-2" pref="372" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="209" max="32767" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="jTextArea1" min="-2" pref="424" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace pref="213" max="32767" attributes="0"/>
|
||||
<Component id="jTextArea1" min="-2" pref="43" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="214" max="32767" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="jTextArea1" min="-2" pref="47" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
|
@ -129,7 +129,7 @@ final public class VisualizationPanel extends JPanel implements Lookup.Provider
|
||||
private final mxGraphComponent graphComponent;
|
||||
private final CommunicationsGraph graph;
|
||||
|
||||
protected mxUndoManager undoManager = new mxUndoManager();
|
||||
private mxUndoManager undoManager = new mxUndoManager();
|
||||
private final mxRubberband rubberband;
|
||||
private final mxFastOrganicLayout fastOrganicLayout;
|
||||
private final mxCircleLayout circleLayout;
|
||||
@ -175,11 +175,11 @@ final public class VisualizationPanel extends JPanel implements Lookup.Provider
|
||||
//right click handler
|
||||
graphComponent.getGraphControl().addMouseWheelListener(new MouseAdapter() {
|
||||
@Override
|
||||
public void mouseWheelMoved(final MouseWheelEvent e) {
|
||||
super.mouseWheelMoved(e);
|
||||
if (e.getPreciseWheelRotation() > 0) {
|
||||
public void mouseWheelMoved(final MouseWheelEvent event) {
|
||||
super.mouseWheelMoved(event);
|
||||
if (event.getPreciseWheelRotation() > 0) {
|
||||
graphComponent.zoomIn();
|
||||
} else if (e.getPreciseWheelRotation() < 0) {
|
||||
} else if (event.getPreciseWheelRotation() < 0) {
|
||||
graphComponent.zoomOut();
|
||||
}
|
||||
}
|
||||
@ -187,10 +187,10 @@ final public class VisualizationPanel extends JPanel implements Lookup.Provider
|
||||
|
||||
graphComponent.getGraphControl().addMouseListener(new MouseAdapter() {
|
||||
@Override
|
||||
public void mouseClicked(MouseEvent e) {
|
||||
super.mouseClicked(e);
|
||||
if (SwingUtilities.isRightMouseButton(e)) {
|
||||
final mxCell cellAt = (mxCell) graphComponent.getCellAt(e.getX(), e.getY());
|
||||
public void mouseClicked(final MouseEvent event) {
|
||||
super.mouseClicked(event);
|
||||
if (SwingUtilities.isRightMouseButton(event)) {
|
||||
final mxCell cellAt = (mxCell) graphComponent.getCellAt(event.getX(), event.getY());
|
||||
if (cellAt != null && cellAt.isVertex()) {
|
||||
final JPopupMenu jPopupMenu = new JPopupMenu();
|
||||
final AccountDeviceInstanceKey adiKey = (AccountDeviceInstanceKey) cellAt.getValue();
|
||||
@ -198,14 +198,14 @@ final public class VisualizationPanel extends JPanel implements Lookup.Provider
|
||||
if (lockedVertexModel.isVertexLocked(cellAt)) {
|
||||
jPopupMenu.add(new JMenuItem(new AbstractAction("UnLock " + cellAt.getId(), unlockIcon) {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
public void actionPerformed(final ActionEvent event) {
|
||||
lockedVertexModel.unlockVertex(cellAt);
|
||||
}
|
||||
}));
|
||||
} else {
|
||||
jPopupMenu.add(new JMenuItem(new AbstractAction("Lock " + cellAt.getId(), lockIcon) {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
public void actionPerformed(final ActionEvent event) {
|
||||
lockedVertexModel.lockVertex(cellAt);
|
||||
}
|
||||
}));
|
||||
@ -213,25 +213,25 @@ final public class VisualizationPanel extends JPanel implements Lookup.Provider
|
||||
if (pinnedAccountModel.isAccountPinned(adiKey)) {
|
||||
jPopupMenu.add(new JMenuItem(new AbstractAction("Unpin " + cellAt.getId(), unpinIcon) {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
public void actionPerformed(final ActionEvent event) {
|
||||
handleUnPinEvent(new CVTEvents.UnpinAccountsEvent(singleton((AccountDeviceInstanceKey) cellAt.getValue())));
|
||||
}
|
||||
}));
|
||||
} else {
|
||||
jPopupMenu.add(new JMenuItem(new AbstractAction("Pin " + cellAt.getId(), addPinIcon) {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
public void actionPerformed(final ActionEvent event) {
|
||||
handlePinEvent(new CVTEvents.PinAccountsEvent(singleton((AccountDeviceInstanceKey) cellAt.getValue()), false));
|
||||
}
|
||||
}));
|
||||
jPopupMenu.add(new JMenuItem(new AbstractAction("Pin only " + cellAt.getId(), pinIcon) {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
public void actionPerformed(final ActionEvent event) {
|
||||
handlePinEvent(new CVTEvents.PinAccountsEvent(singleton((AccountDeviceInstanceKey) cellAt.getValue()), true));
|
||||
}
|
||||
}));
|
||||
}
|
||||
jPopupMenu.show(graphComponent.getGraphControl(), e.getX(), e.getY());
|
||||
jPopupMenu.show(graphComponent.getGraphControl(), event.getX(), event.getY());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -260,7 +260,7 @@ final public class VisualizationPanel extends JPanel implements Lookup.Provider
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
void handleUnPinEvent(CVTEvents.UnpinAccountsEvent pinEvent) {
|
||||
void handleUnPinEvent(final CVTEvents.UnpinAccountsEvent pinEvent) {
|
||||
graph.getModel().beginUpdate();
|
||||
pinnedAccountModel.unpinAccount(pinEvent.getAccountDeviceInstances());
|
||||
graph.clear();
|
||||
@ -271,7 +271,7 @@ final public class VisualizationPanel extends JPanel implements Lookup.Provider
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
void handlePinEvent(CVTEvents.PinAccountsEvent pinEvent) {
|
||||
void handlePinEvent(final CVTEvents.PinAccountsEvent pinEvent) {
|
||||
graph.getModel().beginUpdate();
|
||||
if (pinEvent.isReplace()) {
|
||||
graph.resetGraph();
|
||||
@ -284,7 +284,7 @@ final public class VisualizationPanel extends JPanel implements Lookup.Provider
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
void handleFilterEvent(CVTEvents.FilterChangeEvent filterChangeEvent) {
|
||||
void handleFilterEvent(final CVTEvents.FilterChangeEvent filterChangeEvent) {
|
||||
|
||||
graph.getModel().beginUpdate();
|
||||
graph.clear();
|
||||
@ -308,8 +308,8 @@ final public class VisualizationPanel extends JPanel implements Lookup.Provider
|
||||
worker.cancel(true);
|
||||
}
|
||||
|
||||
CancelationListener cancelationListener = new CancelationListener();
|
||||
ModalDialogProgressIndicator progress = new ModalDialogProgressIndicator(windowAncestor, "Loading Visualization", new String[]{CANCEL}, CANCEL, cancelationListener);
|
||||
final CancelationListener cancelationListener = new CancelationListener();
|
||||
final ModalDialogProgressIndicator progress = new ModalDialogProgressIndicator(windowAncestor, "Loading Visualization", new String[]{CANCEL}, CANCEL, cancelationListener);
|
||||
worker = graph.rebuild(progress, commsManager, currentFilter);
|
||||
cancelationListener.configure(worker, progress);
|
||||
worker.addPropertyChangeListener((final PropertyChangeEvent evt) -> {
|
||||
@ -320,7 +320,7 @@ final public class VisualizationPanel extends JPanel implements Lookup.Provider
|
||||
} else if (graph.getModel().getChildCount(graph.getDefaultParent()) < 64) {
|
||||
applyOrganicLayout(10);
|
||||
} else {
|
||||
JOptionPane.showMessageDialog(VisualizationPanel.this,
|
||||
JOptionPane.showMessageDialog(this,
|
||||
"Too many accounts, layout aborted.",
|
||||
"Autopsy",
|
||||
JOptionPane.WARNING_MESSAGE);
|
||||
@ -354,15 +354,15 @@ final public class VisualizationPanel extends JPanel implements Lookup.Provider
|
||||
} finally {
|
||||
graph.getModel().endUpdate();
|
||||
}
|
||||
if (evt.getNewValue() != null) {
|
||||
if (evt.getNewValue() == null) {
|
||||
commsManager = null;
|
||||
} else {
|
||||
Case currentCase = (Case) evt.getNewValue();
|
||||
try {
|
||||
commsManager = currentCase.getSleuthkitCase().getCommunicationsManager();
|
||||
} catch (TskCoreException ex) {
|
||||
logger.log(Level.SEVERE, "Error getting CommunicationsManager for the current case.", ex);
|
||||
}
|
||||
} else {
|
||||
commsManager = null;
|
||||
}
|
||||
|
||||
});
|
||||
@ -416,16 +416,16 @@ final public class VisualizationPanel extends JPanel implements Lookup.Provider
|
||||
GroupLayout placeHolderPanelLayout = new GroupLayout(placeHolderPanel);
|
||||
placeHolderPanel.setLayout(placeHolderPanelLayout);
|
||||
placeHolderPanelLayout.setHorizontalGroup(placeHolderPanelLayout.createParallelGroup(GroupLayout.LEADING)
|
||||
.add(GroupLayout.TRAILING, placeHolderPanelLayout.createSequentialGroup()
|
||||
.addContainerGap(208, Short.MAX_VALUE)
|
||||
.add(jTextArea1, GroupLayout.PREFERRED_SIZE, 372, GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap(209, Short.MAX_VALUE))
|
||||
.add(placeHolderPanelLayout.createSequentialGroup()
|
||||
.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.add(jTextArea1, GroupLayout.PREFERRED_SIZE, 424, GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
placeHolderPanelLayout.setVerticalGroup(placeHolderPanelLayout.createParallelGroup(GroupLayout.LEADING)
|
||||
.add(GroupLayout.TRAILING, placeHolderPanelLayout.createSequentialGroup()
|
||||
.addContainerGap(213, Short.MAX_VALUE)
|
||||
.add(jTextArea1, GroupLayout.PREFERRED_SIZE, 43, GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap(214, Short.MAX_VALUE))
|
||||
.add(placeHolderPanelLayout.createSequentialGroup()
|
||||
.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.add(jTextArea1, GroupLayout.PREFERRED_SIZE, 47, GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
borderLayoutPanel.add(placeHolderPanel, BorderLayout.CENTER);
|
||||
@ -637,8 +637,8 @@ final public class VisualizationPanel extends JPanel implements Lookup.Provider
|
||||
boundsForCells = new mxRectangle(0, 0, 1, 1);
|
||||
}
|
||||
|
||||
Dimension size = graphComponent.getSize();
|
||||
double widthFactor = size.getWidth() / boundsForCells.getWidth();
|
||||
final Dimension size = graphComponent.getSize();
|
||||
final double widthFactor = size.getWidth() / boundsForCells.getWidth();
|
||||
|
||||
graphComponent.zoom(widthFactor);
|
||||
|
||||
|
@ -1,3 +1,34 @@
|
||||
|
||||
FXVideoPanel.pauseButton.infoLabel.playbackErr=Unable to play video.
|
||||
FXVideoPanel.progress.bufferingCancelled=media buffering was canceled
|
||||
FXVideoPanel.progress.bufferingInterrupted=media buffering was interrupted
|
||||
FXVideoPanel.progress.errorWritingVideoToDisk=Error writing video to disk
|
||||
FXVideoPanel.mediaPane.infoLabel=Playback of deleted videos is not supported, use an external player.
|
||||
FXVideoPanel.progress.bufferingFile=Buffering {0}
|
||||
FXVideoPanel.progressLabel.buffering=Buffering...
|
||||
FXVideoPanel.media.unsupportedFormat=Unsupported Format.
|
||||
GstVideoPanel.cannotProcFile.err=The media player cannot process this file.
|
||||
GstVideoPanel.initGst.gstException.msg=Error initializing gstreamer for audio/video viewing and frame extraction capabilities. Video and audio viewing will be disabled.
|
||||
GstVideoPanel.initGst.otherException.msg=Error initializing gstreamer for audio/video viewing frame extraction capabilities. Video and audio viewing will be disabled.
|
||||
GstVideoPanel.setupVideo.infoLabel.text=Playback of deleted videos is not supported, use an external player.
|
||||
GstVideoPanel.exception.problemFile.msg=Cannot capture frames from this file ({0}).
|
||||
GstVideoPanel.exception.problemPlay.msg=Problem with video file; problem when attempting to play while obtaining duration.
|
||||
GstVideoPanel.exception.problemPause.msg=Problem with video file; problem when attempting to pause while obtaining duration.
|
||||
GstVideoPanel.exception.problemPauseCaptFrame.msg=Problem with video file; problem when attempting to pause while capturing a frame.
|
||||
GstVideoPanel.exception.problemPlayCaptFrame.msg=Problem with video file; problem when attempting to play while capturing a frame.
|
||||
GstVideoPanel.exception.problemStopCaptFrame.msg=Problem with video file; problem when attempting to stop while capturing a frame.
|
||||
GstVideoPanel.progress.buffering=Buffering...
|
||||
GstVideoPanel.progressLabel.bufferingErr=Error buffering file
|
||||
GstVideoPanel.progress.infoLabel.updateErr=Error updating video progress\: {0}
|
||||
GstVideoPanel.ExtractMedia.progress.buffering=Buffering {0}
|
||||
MediaFileViewer.AccessibleContext.accessibleDescription=
|
||||
MediaFileViewer.title=Media
|
||||
MediaFileViewer.toolTip=Displays supported multimedia files (images, videos, audio)
|
||||
MediaViewVideoPanel.pauseButton.text=\u25ba
|
||||
MediaViewVideoPanel.progressLabel.text=00:00
|
||||
MediaViewVideoPanel.infoLabel.text=info
|
||||
MediaViewImagePanel.imgFileTooLarge.msg=Could not load image file (too large)\: {0}
|
||||
|
||||
Metadata.tableRowTitle.name=Name
|
||||
Metadata.tableRowTitle.size=Size
|
||||
Metadata.tableRowTitle.fileNameAlloc=File Name Allocation
|
||||
@ -43,3 +74,4 @@ SQLiteViewer.currPageLabel.text=x
|
||||
SQLiteViewer.jLabel2.text=Page
|
||||
SQLiteViewer.numEntriesField.text=num Entries
|
||||
SQLiteViewer.jLabel1.text=Table
|
||||
PListViewer.exportButton.text=Export
|
||||
|
@ -1,19 +1,49 @@
|
||||
Metadata.tableRowTitle.name=\u540D\u524D
|
||||
Metadata.tableRowTitle.size=\u30B5\u30A4\u30BA
|
||||
Metadata.tableRowTitle.fileNameAlloc=\u30D5\u30A1\u30A4\u30EB\u540D\u30A2\u30ED\u30B1\u30FC\u30B7\u30E7\u30F3
|
||||
Metadata.tableRowTitle.metadataAlloc=\u30E1\u30BF\u30C7\u30FC\u30BF\u30A2\u30ED\u30B1\u30FC\u30B7\u30E7\u30F3
|
||||
Metadata.tableRowTitle.modified=\u4FEE\u6B63\u6E08\u307F
|
||||
Metadata.tableRowTitle.accessed=\u30A2\u30AF\u30BB\u30B9\u6E08\u307F
|
||||
Metadata.tableRowTitle.created=\u4F5C\u6210\u6E08\u307F
|
||||
Metadata.tableRowTitle.changed=\u5909\u66F4\u6E08\u307F
|
||||
Metadata.tableRowContent.md5notCalc=\u672A\u8A08\u7B97
|
||||
|
||||
FXVideoPanel.pauseButton.infoLabel.playbackErr=\u30d3\u30c7\u30aa\u3092\u518d\u751f\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002
|
||||
FXVideoPanel.progress.bufferingCancelled=\u30e1\u30c7\u30a3\u30a2\u306e\u30d0\u30c3\u30d5\u30a1\u30ea\u30f3\u30b0\u304c\u30ad\u30e3\u30f3\u30bb\u30eb\u3055\u308c\u307e\u3057\u305f
|
||||
FXVideoPanel.progress.bufferingInterrupted=\u30e1\u30c7\u30a3\u30a2\u306e\u30d0\u30c3\u30d5\u30a1\u30ea\u30f3\u30b0\u304c\u4e2d\u65ad\u3055\u308c\u307e\u3057\u305f
|
||||
FXVideoPanel.progress.errorWritingVideoToDisk=\u30d3\u30c7\u30aa\u3092\u30c7\u30a3\u30b9\u30af\u3078\u66f8\u304d\u8fbc\u307f\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f
|
||||
FXVideoPanel.mediaPane.infoLabel=\u524a\u9664\u3055\u308c\u305f\u30d3\u30c7\u30aa\u306e\u518d\u751f\u306f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002\u5916\u90e8\u30d7\u30ec\u30fc\u30e4\u30fc\u3092\u4f7f\u7528\u3057\u3066\u4e0b\u3055\u3044\u3002
|
||||
FXVideoPanel.progress.bufferingFile={0}\u3092\u30d0\u30c3\u30d5\u30a1\u30ea\u30f3\u30b0
|
||||
FXVideoPanel.progressLabel.buffering=\u30d0\u30c3\u30d5\u30a1\u30ea\u30f3\u30b0\u4e2d\u2026
|
||||
FXVideoPanel.media.unsupportedFormat=\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u306a\u3044\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3067\u3059\u3002
|
||||
GstVideoPanel.cannotProcFile.err=\u30e1\u30c7\u30a4\u30a2\u30d7\u30ec\u30fc\u30e4\u30fc\u3067\u306f\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u51e6\u7406\u3067\u304d\u307e\u305b\u3093\u3002
|
||||
GstVideoPanel.initGst.gstException.msg=\u30aa\u30fc\u30c7\u30a3\u30aa\uff0f\u30d3\u30c7\u30aa\u306e\u518d\u751f\u304a\u3088\u3073\u30d5\u30ec\u30fc\u30e0\u306e\u62bd\u51fa\u306b\u4f7f\u7528\u3059\u308bGStreamer\u306e\u521d\u671f\u5316\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u30d3\u30c7\u30aa\u304a\u3088\u3073\u30aa\u30fc\u30c7\u30a3\u30aa\u518d\u751f\u304c\u7121\u52b9\u5316\u3055\u308c\u307e\u3059\u3002
|
||||
GstVideoPanel.initGst.otherException.msg=\u30aa\u30fc\u30c7\u30a3\u30aa\uff0f\u30d3\u30c7\u30aa\u306e\u518d\u751f\u304a\u3088\u3073\u30d5\u30ec\u30fc\u30e0\u306e\u62bd\u51fa\u306b\u4f7f\u7528\u3059\u308bGStreamer\u306e\u521d\u671f\u5316\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u30d3\u30c7\u30aa\u304a\u3088\u3073\u30aa\u30fc\u30c7\u30a3\u30aa\u518d\u751f\u304c\u7121\u52b9\u5316\u3055\u308c\u307e\u3059\u3002
|
||||
GstVideoPanel.setupVideo.infoLabel.text=\u524a\u9664\u3055\u308c\u305f\u30d3\u30c7\u30aa\u306e\u518d\u751f\u306f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002\u5916\u90e8\u30d7\u30ec\u30fc\u30e4\u30fc\u3092\u4f7f\u7528\u3057\u3066\u4e0b\u3055\u3044\u3002
|
||||
GstVideoPanel.exception.problemFile.msg=\u30d5\u30a1\u30a4\u30eb({0})\u304b\u3089\u30d5\u30ec\u30fc\u30e0\u3092\u62bd\u51fa\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002
|
||||
GstVideoPanel.exception.problemPlay.msg=\u30d3\u30c7\u30aa\u30d5\u30a1\u30a4\u30eb\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u9577\u3055\u3092\u78ba\u8a8d\u4e2d\u306b\u518d\u751f\u3092\u3057\u3088\u3046\u3068\u3057\u305f\u969b\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002
|
||||
GstVideoPanel.exception.problemPause.msg=\u30d3\u30c7\u30aa\u30d5\u30a1\u30a4\u30eb\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u9577\u3055\u3092\u78ba\u8a8d\u4e2d\u306b\u4e00\u6642\u505c\u6b62\u3092\u3057\u3088\u3046\u3068\u3057\u305f\u969b\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002
|
||||
GstVideoPanel.exception.problemPauseCaptFrame.msg=\u30d3\u30c7\u30aa\u30d5\u30a1\u30a4\u30eb\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u30d5\u30ec\u30fc\u30e0\u306e\u62bd\u51fa\u4e2d\u306b\u4e00\u6642\u505c\u6b62\u3092\u3057\u3088\u3046\u3068\u3057\u305f\u969b\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002
|
||||
GstVideoPanel.exception.problemPlayCaptFrame.msg=\u30d3\u30c7\u30aa\u30d5\u30a1\u30a4\u30eb\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u30d5\u30ec\u30fc\u30e0\u306e\u62bd\u51fa\u4e2d\u306b\u518d\u751f\u3057\u3088\u3046\u3068\u3057\u305f\u969b\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002
|
||||
GstVideoPanel.exception.problemStopCaptFrame.msg=\u30d3\u30c7\u30aa\u30d5\u30a1\u30a4\u30eb\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u30d5\u30ec\u30fc\u30e0\u306e\u62bd\u51fa\u4e2d\u306b\u505c\u6b62\u3057\u3088\u3046\u3068\u3057\u305f\u969b\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002
|
||||
GstVideoPanel.progress.buffering=\u30d0\u30c3\u30d5\u30a1\u30ea\u30f3\u30b0\u4e2d\u2026
|
||||
GstVideoPanel.progressLabel.bufferingErr=\u30d5\u30a1\u30a4\u30eb\u306e\u30d0\u30c3\u30d5\u30a1\u30ea\u30f3\u30b0\u30a8\u30e9\u30fc
|
||||
GstVideoPanel.progress.infoLabel.updateErr=\u30d3\u30c7\u30aa\u30d7\u30ed\u30b0\u30ec\u30b9\u306e\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\uff1a {0}
|
||||
GstVideoPanel.ExtractMedia.progress.buffering={0}\u3092\u30d0\u30c3\u30d5\u30a1\u30ea\u30f3\u30b0\u4e2d
|
||||
MediaFileViewer.title=\u30e1\u30c7\u30a3\u30a2
|
||||
MediaFileViewer.toolTip=\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u308b\u30de\u30eb\u30c1\u30e1\u30c7\u30a3\u30a2\u30d5\u30a1\u30a4\u30eb\uff08\u30a4\u30e1\u30fc\u30b8\u3001\u30d3\u30c7\u30aa\u3001\u30aa\u30fc\u30c7\u30a3\u30aa\uff09\u3092\u8868\u793a\u3057\u307e\u3059\u3002
|
||||
MediaViewImagePanel.imgFileTooLarge.msg=\u30a4\u30e1\u30fc\u30b8\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u8fbc\u3081\u307e\u305b\u3093\u3067\u3057\u305f\uff08\u5927\u304d\u3059\u304e\u3067\u3059\uff09\uff1a {0}
|
||||
MediaViewVideoPanel.pauseButton.text=\u25ba
|
||||
MediaViewVideoPanel.progressLabel.text=00\:00
|
||||
MediaViewVideoPanel.infoLabel.text=\u60c5\u5831
|
||||
|
||||
Metadata.tableRowTitle.name=\u540d\u524d
|
||||
Metadata.tableRowTitle.size=\u30b5\u30a4\u30ba
|
||||
Metadata.tableRowTitle.fileNameAlloc=\u30d5\u30a1\u30a4\u30eb\u540d\u30a2\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3
|
||||
Metadata.tableRowTitle.metadataAlloc=\u30e1\u30bf\u30c7\u30fc\u30bf\u30a2\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3
|
||||
Metadata.tableRowTitle.modified=\u4fee\u6b63\u6e08\u307f
|
||||
Metadata.tableRowTitle.accessed=\u30a2\u30af\u30bb\u30b9\u6e08\u307f
|
||||
Metadata.tableRowTitle.created=\u4f5c\u6210\u6e08\u307f
|
||||
Metadata.tableRowTitle.changed=\u5909\u66f4\u6e08\u307f
|
||||
Metadata.tableRowContent.md5notCalc=\u672a\u8a08\u7b97
|
||||
Metadata.tableRowTitle.md5=MD5
|
||||
Metadata.tableRowTitle.hashLookupResults=\u30CF\u30C3\u30B7\u30E5\u30EB\u30C3\u30AF\u30A2\u30C3\u30D7\u7D50\u679C
|
||||
Metadata.tableRowTitle.internalid=\u5185\u90E8ID
|
||||
Metadata.tableRowTitle.localPath=\u30ED\u30FC\u30AB\u30EB\u30D1\u30B9
|
||||
Metadata.title=\u30D5\u30A1\u30A4\u30EB\u30E1\u30BF\u30C7\u30FC\u30BF
|
||||
Metadata.toolTip=\u30D5\u30A1\u30A4\u30EB\u306E\u30E1\u30BF\u30C7\u30FC\u30BF\u3092\u8868\u793A\u3057\u307E\u3059\u3002
|
||||
Metadata.tableRowTitle.type=\u30BF\u30A4\u30D7
|
||||
Metadata.nodeText.exceptionNotice.text=\u30D5\u30A1\u30A4\u30EB\u30E1\u30BF\u30C7\u30FC\u30BF\u3092\u53D6\u5F97\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\uFF1A
|
||||
Metadata.nodeText.text=Sleuth Kit istat\u30C4\u30FC\u30EB\u304B\u3089\uFF1A
|
||||
Metadata.nodeText.nonFilePassedIn=\u5165\u529B\u3055\u308C\u305F\u3082\u306E\u306F\u30D5\u30A1\u30A4\u30EB\u3067\u306F\u3042\u308A\u307E\u305B\u3093
|
||||
Metadata.tableRowTitle.hashLookupResults=\u30cf\u30c3\u30b7\u30e5\u30eb\u30c3\u30af\u30a2\u30c3\u30d7\u7d50\u679c
|
||||
Metadata.tableRowTitle.internalid=\u5185\u90e8ID
|
||||
Metadata.tableRowTitle.localPath=\u30ed\u30fc\u30ab\u30eb\u30d1\u30b9
|
||||
Metadata.title=\u30d5\u30a1\u30a4\u30eb\u30e1\u30bf\u30c7\u30fc\u30bf
|
||||
Metadata.toolTip=\u30d5\u30a1\u30a4\u30eb\u306e\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u8868\u793a\u3057\u307e\u3059\u3002
|
||||
Metadata.tableRowTitle.type=\u30bf\u30a4\u30d7
|
||||
Metadata.nodeText.exceptionNotice.text=\u30d5\u30a1\u30a4\u30eb\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\uff1a
|
||||
Metadata.nodeText.text=Sleuth Kit istat\u30c4\u30fc\u30eb\u304b\u3089\uff1a
|
||||
Metadata.nodeText.nonFilePassedIn=\u5165\u529b\u3055\u308c\u305f\u3082\u306e\u306f\u30d5\u30a1\u30a4\u30eb\u3067\u306f\u3042\u308a\u307e\u305b\u3093
|
@ -0,0 +1,105 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.contentviewers;
|
||||
|
||||
import java.awt.Component;
|
||||
import java.awt.Font;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.logging.Level;
|
||||
import javax.swing.JTable;
|
||||
import javax.swing.table.DefaultTableCellRenderer;
|
||||
import org.openide.nodes.Node;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
|
||||
/**
|
||||
* Custom Cell renderer to display a SQLite column cell as readable Epoch date/time
|
||||
*
|
||||
*/
|
||||
public class EpochTimeCellRenderer extends DefaultTableCellRenderer {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final Logger LOGGER = Logger.getLogger(FileViewer.class.getName());
|
||||
|
||||
private static final String FORMAT_STRING = "yyyy/MM/dd HH:mm:ss"; //NON-NLS
|
||||
private static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat(FORMAT_STRING);
|
||||
|
||||
private final boolean renderAsEpoch;
|
||||
|
||||
EpochTimeCellRenderer(boolean renderAsEpoch) {
|
||||
this.renderAsEpoch = renderAsEpoch;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
|
||||
|
||||
// Set the forceground/background so its obvious when the cell is selected.
|
||||
if (isSelected) {
|
||||
super.setForeground(table.getSelectionForeground());
|
||||
super.setBackground(table.getSelectionBackground());
|
||||
} else {
|
||||
super.setForeground( table.getForeground());
|
||||
super.setBackground( table.getBackground());
|
||||
}
|
||||
|
||||
if (value == null) {
|
||||
setText("");
|
||||
}
|
||||
else {
|
||||
String textStr = "";
|
||||
try {
|
||||
// get the col property value
|
||||
if (value instanceof Node.Property<?>) {
|
||||
Node.Property<?> nodeProp = (Node.Property)value;
|
||||
textStr = nodeProp.getValue().toString();
|
||||
}
|
||||
|
||||
if (renderAsEpoch) {
|
||||
long epochTime = Long.parseUnsignedLong(textStr);
|
||||
if (epochTime > 0 ) {
|
||||
Font font = getFont();
|
||||
setFont(font.deriveFont(font.getStyle() | Font.ITALIC));
|
||||
setText(DATE_FORMAT.format(new Date(epochTime)));
|
||||
}
|
||||
else {
|
||||
setText(textStr);
|
||||
}
|
||||
}
|
||||
else { // Display raw data
|
||||
setText(textStr);
|
||||
}
|
||||
}
|
||||
catch (NumberFormatException e) {
|
||||
setText(textStr);
|
||||
LOGGER.log(Level.INFO, "Error converting column value to number.", e); //NON-NLS
|
||||
} catch (IllegalAccessException | InvocationTargetException ex) {
|
||||
setText("");
|
||||
LOGGER.log(Level.SEVERE, "Error in getting column value.", ex); //NON-NLS
|
||||
}
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
boolean isRenderingAsEpoch() {
|
||||
return this.renderAsEpoch;
|
||||
}
|
||||
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2013-15 Basis Technology Corp.
|
||||
* Copyright 2013-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -16,7 +16,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.corecomponents;
|
||||
package org.sleuthkit.autopsy.contentviewers;
|
||||
|
||||
import com.google.common.io.Files;
|
||||
import java.awt.Dimension;
|
||||
@ -59,7 +59,10 @@ import org.openide.util.NbBundle;
|
||||
import org.openide.util.lookup.ServiceProvider;
|
||||
import org.openide.util.lookup.ServiceProviders;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.autopsy.core.Installer;
|
||||
import org.sleuthkit.autopsy.corecomponents.FrameCapture;
|
||||
import org.sleuthkit.autopsy.corecomponents.VideoFrame;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.coreutils.VideoUtils;
|
||||
import org.sleuthkit.autopsy.datamodel.ContentUtils;
|
||||
@ -134,7 +137,13 @@ public class FXVideoPanel extends MediaViewVideoPanel {
|
||||
mediaPane.setInfoLabelText(path);
|
||||
mediaPane.setInfoLabelToolTipText(path);
|
||||
|
||||
final File tempFile = VideoUtils.getTempVideoFile(currentFile);
|
||||
final File tempFile;
|
||||
try {
|
||||
tempFile = VideoUtils.getTempVideoFile(currentFile);
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
logger.log(Level.SEVERE, "Exception while getting open case.", ex); //NON-NLS
|
||||
return;
|
||||
}
|
||||
|
||||
new Thread(mediaPane.new ExtractMedia(currentFile, tempFile)).start();
|
||||
|
@ -18,6 +18,7 @@
|
||||
*/
|
||||
package org.sleuthkit.autopsy.contentviewers;
|
||||
|
||||
|
||||
import com.google.common.base.Strings;
|
||||
import java.awt.Component;
|
||||
import java.util.HashMap;
|
||||
@ -30,11 +31,12 @@ import org.sleuthkit.autopsy.corecomponentinterfaces.DataContentViewer;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.modules.filetypeid.FileTypeDetector;
|
||||
import org.sleuthkit.datamodel.AbstractFile;
|
||||
import org.sleuthkit.autopsy.corecomponentinterfaces.FileTypeViewer;
|
||||
|
||||
/**
|
||||
* Generic Application content viewer
|
||||
*/
|
||||
@ServiceProvider(service = DataContentViewer.class, position = 5)
|
||||
@ServiceProvider(service = DataContentViewer.class, position = 3)
|
||||
public class FileViewer extends javax.swing.JPanel implements DataContentViewer {
|
||||
|
||||
private static final int CONFIDENCE_LEVEL = 7;
|
||||
@ -45,8 +47,9 @@ public class FileViewer extends javax.swing.JPanel implements DataContentViewer
|
||||
|
||||
// TBD: This hardcoded list of viewers should be replaced with a dynamic lookup
|
||||
private static final FileTypeViewer[] KNOWN_VIEWERS = new FileTypeViewer[]{
|
||||
// new JPEGViewerDummy(), // this if for testing only
|
||||
new SQLiteViewer()
|
||||
new SQLiteViewer(),
|
||||
new PListViewer(),
|
||||
new MediaFileViewer()
|
||||
};
|
||||
|
||||
private FileTypeViewer lastViewer;
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2013-15 Basis Technology Corp.
|
||||
* Copyright 2013-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -16,7 +16,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.corecomponents;
|
||||
package org.sleuthkit.autopsy.contentviewers;
|
||||
|
||||
import com.google.common.io.Files;
|
||||
import java.awt.Dimension;
|
||||
@ -55,6 +55,9 @@ import org.netbeans.api.progress.ProgressHandle;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.openide.util.lookup.ServiceProvider;
|
||||
import org.openide.util.lookup.ServiceProviders;
|
||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.autopsy.corecomponents.FrameCapture;
|
||||
import org.sleuthkit.autopsy.corecomponents.VideoFrame;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
|
||||
import org.sleuthkit.autopsy.coreutils.VideoUtils;
|
||||
@ -85,7 +88,7 @@ public class GstVideoPanel extends MediaViewVideoPanel {
|
||||
private boolean autoTracking = false; // true if the slider is moving automatically
|
||||
private final Object playbinLock = new Object(); // lock for synchronization of gstPlaybin2 player
|
||||
private AbstractFile currentFile;
|
||||
private final Set<String> badVideoFiles = Collections.synchronizedSet(new HashSet<String>());
|
||||
private final Set<String> badVideoFiles = Collections.synchronizedSet(new HashSet<>());
|
||||
|
||||
/**
|
||||
* Creates new form MediaViewVideoPanel
|
||||
@ -179,6 +182,7 @@ public class GstVideoPanel extends MediaViewVideoPanel {
|
||||
}
|
||||
|
||||
@Override
|
||||
@NbBundle.Messages ({"GstVideoPanel.noOpenCase.errMsg=No open case available."})
|
||||
void setupVideo(final AbstractFile file, final Dimension dims) {
|
||||
reset();
|
||||
infoLabel.setText("");
|
||||
@ -192,6 +196,18 @@ public class GstVideoPanel extends MediaViewVideoPanel {
|
||||
return;
|
||||
}
|
||||
|
||||
java.io.File ioFile;
|
||||
try {
|
||||
ioFile = VideoUtils.getTempVideoFile(file);
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
logger.log(Level.SEVERE, "Exception while getting open case.", ex); //NON-NLS
|
||||
infoLabel.setText(Bundle.GstVideoPanel_noOpenCase_errMsg());
|
||||
pauseButton.setEnabled(false);
|
||||
progressSlider.setEnabled(false);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
String path = "";
|
||||
try {
|
||||
path = file.getUniquePath();
|
||||
@ -203,7 +219,6 @@ public class GstVideoPanel extends MediaViewVideoPanel {
|
||||
pauseButton.setEnabled(true);
|
||||
progressSlider.setEnabled(true);
|
||||
|
||||
java.io.File ioFile = VideoUtils.getTempVideoFile(file);
|
||||
|
||||
gstVideoComponent = new VideoComponent();
|
||||
synchronized (playbinLock) {
|
||||
@ -535,7 +550,14 @@ public class GstVideoPanel extends MediaViewVideoPanel {
|
||||
return;
|
||||
}
|
||||
} else if (state.equals(State.READY)) {
|
||||
final File tempVideoFile = VideoUtils.getTempVideoFile(currentFile);
|
||||
final File tempVideoFile;
|
||||
try {
|
||||
tempVideoFile = VideoUtils.getTempVideoFile(currentFile);
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
logger.log(Level.WARNING, "Exception while getting open case."); //NON-NLS
|
||||
infoLabel.setText(MEDIA_PLAYER_ERROR_STRING);
|
||||
return;
|
||||
}
|
||||
|
||||
new ExtractMedia(currentFile, tempVideoFile).execute();
|
||||
|
@ -1,89 +0,0 @@
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.contentviewers;
|
||||
|
||||
import java.awt.Component;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import org.sleuthkit.datamodel.AbstractFile;
|
||||
|
||||
public class JPEGViewerDummy extends javax.swing.JPanel implements FileTypeViewer {
|
||||
|
||||
public static final String[] SUPPORTED_MIMETYPES = new String[]{"image/jpeg"};
|
||||
|
||||
/**
|
||||
* Creates new form JPEGViewer
|
||||
*/
|
||||
public JPEGViewerDummy() {
|
||||
initComponents();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called from within the constructor to initialize the form.
|
||||
* WARNING: Do NOT modify this code. The content of this method is always
|
||||
* regenerated by the Form Editor.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
jLabel1 = new javax.swing.JLabel();
|
||||
jTextField1 = new javax.swing.JTextField();
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(JPEGViewerDummy.class, "JPEGViewerDummy.jLabel1.text")); // NOI18N
|
||||
|
||||
jTextField1.setEditable(false);
|
||||
jTextField1.setText(org.openide.util.NbBundle.getMessage(JPEGViewerDummy.class, "JPEGViewerDummy.jTextField1.text")); // NOI18N
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGap(43, 43, 43)
|
||||
.addComponent(jLabel1)
|
||||
.addGap(35, 35, 35)
|
||||
.addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap(120, Short.MAX_VALUE))
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel1)
|
||||
.addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addContainerGap(269, Short.MAX_VALUE))
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
@Override
|
||||
public List<String> getSupportedMIMETypes() {
|
||||
return Arrays.asList(SUPPORTED_MIMETYPES);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Component getComponent() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resetComponent() {
|
||||
this.jTextField1.setText("");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFile(AbstractFile file) {
|
||||
this.jTextField1.setText(file.getName());
|
||||
}
|
||||
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JLabel jLabel1;
|
||||
private javax.swing.JTextField jTextField1;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
}
|
@ -3,7 +3,7 @@
|
||||
<Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<AccessibilityProperties>
|
||||
<Property name="AccessibleContext.accessibleDescription" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerMedia.AccessibleContext.accessibleDescription" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="MediaFileViewer.AccessibleContext.accessibleDescription" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</AccessibilityProperties>
|
||||
<AuxValues>
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2011-2015 Basis Technology Corp.
|
||||
* Copyright 2011-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*s
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -16,31 +16,24 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.corecomponents;
|
||||
package org.sleuthkit.autopsy.contentviewers;
|
||||
|
||||
import java.awt.CardLayout;
|
||||
import java.awt.Component;
|
||||
import java.awt.Dimension;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
import org.openide.nodes.Node;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.openide.util.lookup.ServiceProvider;
|
||||
import org.openide.util.lookup.ServiceProviders;
|
||||
import org.sleuthkit.autopsy.corecomponentinterfaces.DataContentViewer;
|
||||
import org.sleuthkit.autopsy.corecomponentinterfaces.FileTypeViewer;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.datamodel.AbstractFile;
|
||||
import org.sleuthkit.datamodel.TskData.TSK_FS_NAME_FLAG_ENUM;
|
||||
|
||||
/**
|
||||
* Media content viewer for videos, sounds and images.
|
||||
*/
|
||||
@ServiceProviders(value = {
|
||||
@ServiceProvider(service = DataContentViewer.class, position = 5)
|
||||
})
|
||||
public class DataContentViewerMedia extends javax.swing.JPanel implements DataContentViewer {
|
||||
public class MediaFileViewer extends javax.swing.JPanel implements FileTypeViewer {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(DataContentViewerMedia.class.getName());
|
||||
private static final Logger LOGGER = Logger.getLogger(MediaFileViewer.class.getName());
|
||||
private AbstractFile lastFile;
|
||||
//UI
|
||||
private final MediaViewVideoPanel videoPanel;
|
||||
@ -54,7 +47,7 @@ public class DataContentViewerMedia extends javax.swing.JPanel implements DataCo
|
||||
/**
|
||||
* Creates new form DataContentViewerVideo
|
||||
*/
|
||||
public DataContentViewerMedia() {
|
||||
public MediaFileViewer() {
|
||||
|
||||
initComponents();
|
||||
|
||||
@ -66,7 +59,7 @@ public class DataContentViewerMedia extends javax.swing.JPanel implements DataCo
|
||||
imagePanelInited = imagePanel.isInited();
|
||||
|
||||
customizeComponents();
|
||||
logger.log(Level.INFO, "Created MediaView instance: {0}", this); //NON-NLS
|
||||
LOGGER.log(Level.INFO, "Created MediaView instance: {0}", this); //NON-NLS
|
||||
}
|
||||
|
||||
private void customizeComponents() {
|
||||
@ -86,20 +79,37 @@ public class DataContentViewerMedia extends javax.swing.JPanel implements DataCo
|
||||
private void initComponents() {
|
||||
|
||||
setLayout(new java.awt.CardLayout());
|
||||
getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(DataContentViewerMedia.class, "DataContentViewerMedia.AccessibleContext.accessibleDescription")); // NOI18N
|
||||
getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(MediaFileViewer.class, "MediaFileViewer.AccessibleContext.accessibleDescription")); // NOI18N
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
/**
|
||||
* Returns a list of mimetypes supported by this viewer
|
||||
*
|
||||
* @return list of supported mimetypes
|
||||
*/
|
||||
@Override
|
||||
public void setNode(Node selectedNode) {
|
||||
public List<String> getSupportedMIMETypes() {
|
||||
|
||||
List<String> mimeTypes = new ArrayList<>();
|
||||
|
||||
mimeTypes.addAll(this.imagePanel.getMimeTypes());
|
||||
mimeTypes.addAll(this.videoPanel.getMimeTypes());
|
||||
|
||||
return mimeTypes;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set up the view to display the given file.
|
||||
*
|
||||
* @param file file to display
|
||||
*/
|
||||
@Override
|
||||
public void setFile(AbstractFile file) {
|
||||
try {
|
||||
if (selectedNode == null) {
|
||||
resetComponent();
|
||||
return;
|
||||
}
|
||||
|
||||
AbstractFile file = selectedNode.getLookup().lookup(AbstractFile.class);
|
||||
|
||||
if (file == null) {
|
||||
resetComponent();
|
||||
return;
|
||||
@ -111,7 +121,7 @@ public class DataContentViewerMedia extends javax.swing.JPanel implements DataCo
|
||||
|
||||
lastFile = file;
|
||||
|
||||
final Dimension dims = DataContentViewerMedia.this.getSize();
|
||||
final Dimension dims = MediaFileViewer.this.getSize();
|
||||
//logger.info("setting node on media viewer"); //NON-NLS
|
||||
if (videoPanelInited && videoPanel.isSupported(file)) {
|
||||
videoPanel.setupVideo(file, dims);
|
||||
@ -121,7 +131,7 @@ public class DataContentViewerMedia extends javax.swing.JPanel implements DataCo
|
||||
this.showVideoPanel(false);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.log(Level.SEVERE, "Exception while setting node", e); //NON-NLS
|
||||
LOGGER.log(Level.SEVERE, "Exception while setting node", e); //NON-NLS
|
||||
}
|
||||
}
|
||||
|
||||
@ -139,21 +149,6 @@ public class DataContentViewerMedia extends javax.swing.JPanel implements DataCo
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return NbBundle.getMessage(this.getClass(), "DataContentViewerMedia.title");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getToolTip() {
|
||||
return NbBundle.getMessage(this.getClass(), "DataContentViewerMedia.toolTip");
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataContentViewer createInstance() {
|
||||
return new DataContentViewerMedia();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Component getComponent() {
|
||||
return this;
|
||||
@ -166,73 +161,6 @@ public class DataContentViewerMedia extends javax.swing.JPanel implements DataCo
|
||||
lastFile = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Is the given file a video we can display?
|
||||
*
|
||||
* @param file
|
||||
*
|
||||
* @return True if a video file that can be displayed
|
||||
*/
|
||||
private boolean isVideoSupported(AbstractFile file) {
|
||||
if (null == file || file.getSize() == 0) {
|
||||
return false;
|
||||
}
|
||||
return videoPanel.isSupported(file);
|
||||
}
|
||||
|
||||
/**
|
||||
* Is the given file an image that we can display?
|
||||
*
|
||||
* @param file
|
||||
*
|
||||
* @return True if an image file that can be displayed
|
||||
*/
|
||||
private boolean isImageSupported(AbstractFile file) {
|
||||
if (null == file || file.getSize() == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return imagePanel.isSupported(file);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSupported(Node node) {
|
||||
if (node == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
AbstractFile file = node.getLookup().lookup(AbstractFile.class);
|
||||
if (file == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (file.getSize() == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (imagePanelInited && isImageSupported(file)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return videoPanelInited && isVideoSupported(file);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int isPreferred(Node node) {
|
||||
//special case, check if deleted video, then do not make it preferred
|
||||
AbstractFile file = node.getLookup().lookup(AbstractFile.class);
|
||||
if (file == null) {
|
||||
return 0;
|
||||
}
|
||||
boolean deleted = file.isDirNameFlagSet(TSK_FS_NAME_FLAG_ENUM.UNALLOC);
|
||||
|
||||
if (videoPanel.isSupported(file) && deleted) {
|
||||
return 0;
|
||||
} else {
|
||||
return 7;
|
||||
}
|
||||
}
|
||||
|
||||
interface MediaViewPanel {
|
||||
|
||||
/**
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user