mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-17 10:17:41 +00:00
Merge remote-tracking branch 'upstream/develop' into 988-eventing
# Conflicts: # Core/src/org/sleuthkit/autopsy/casemodule/Case.java # Core/src/org/sleuthkit/autopsy/casemodule/services/Blackboard.java # Core/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/IngestEventsListener.java # Core/src/org/sleuthkit/autopsy/centralrepository/ingestmodule/IngestModule.java # Core/src/org/sleuthkit/autopsy/modules/embeddedfileextractor/SevenZipExtractor.java # Core/src/org/sleuthkit/autopsy/modules/encryptiondetection/EncryptionDetectionFileIngestModule.java # Core/src/org/sleuthkit/autopsy/modules/exif/ExifParserFileIngestModule.java # Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/FileExtMismatchIngestModule.java # Core/src/org/sleuthkit/autopsy/modules/filetypeid/FileTypeIdIngestModule.java # Core/src/org/sleuthkit/autopsy/modules/hashdatabase/HashDbIngestModule.java # Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesIdentifierIngestModule.java # Core/src/org/sleuthkit/autopsy/modules/stix/StixArtifactData.java # Core/src/org/sleuthkit/autopsy/test/CustomArtifactType.java # Core/src/org/sleuthkit/autopsy/test/InterestingArtifactCreatorIngestModule.java # KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java
This commit is contained in:
commit
039e3ae7b5
2
.gitignore
vendored
2
.gitignore
vendored
@ -22,6 +22,8 @@
|
||||
!/CoreLibs/nbproject/project.xml
|
||||
!/CoreLibs/nbproject/project.properties
|
||||
|
||||
/Core/test/qa-functional/data/
|
||||
|
||||
/KeywordSearch/release/
|
||||
/KeywordSearch/build/
|
||||
/KeywordSearch/dist/
|
||||
|
14
.travis.yml
14
.travis.yml
@ -13,10 +13,14 @@ before_install:
|
||||
install:
|
||||
- sudo apt-get install testdisk
|
||||
- cd sleuthkit/sleuthkit
|
||||
- sh install-sleuthkit.sh
|
||||
script:
|
||||
- sh travis_build.sh
|
||||
script:
|
||||
- set -e
|
||||
- echo "building autopsy..." && echo -en 'travis_fold:start:script.build\\r'
|
||||
- cd $TRAVIS_BUILD_DIR/
|
||||
- ant build
|
||||
- ant -q build
|
||||
- echo -en 'travis_fold:end:script.build\\r'
|
||||
- echo "testing autopsy..." && echo -en 'travis_fold:start:script.tests\\r'
|
||||
- cd Core/
|
||||
- xvfb-run ant test
|
||||
|
||||
- xvfb-run ant -q test
|
||||
- echo -en 'travis_fold:end:script.tests\\r'
|
||||
|
@ -82,16 +82,20 @@
|
||||
verbose="true"/>
|
||||
</target>
|
||||
|
||||
<target name="getImageFile">
|
||||
<mkdir dir="${basedir}/test/qa-functional/data"/>
|
||||
<get src="https://drive.google.com/uc?id=0BxdBkzm5VKGNT0dGY0dqcHVsU3M" dest="${test-input}/filter_test1.img" skipexisting="true"/>
|
||||
</target>
|
||||
<target name="get-deps" depends="init-ivy,getTSKJars,get-thirdparty-dependencies,get-InternalPythonModules, download-binlist, getImageFile">
|
||||
<target name="getTestDataFiles">
|
||||
<mkdir dir="${basedir}/test/qa-functional/data"/>
|
||||
<get src="https://drive.google.com/uc?id=0BxdBkzm5VKGNT0dGY0dqcHVsU3M" dest="${test-input}/filter_test1.img" skipexisting="true"/>
|
||||
<get src="https://drive.google.com/uc?id=1bghoSm7z7nhmGIxlllyY1MMlbLntxm7n" dest="${test-input}/local_files_test.zip" skipexisting="true"/>
|
||||
<get src="https://drive.google.com/uc?id=1dLYGctuvRQMmnzfXPppTM_9gB49eLc_g" dest="${test-input}/embedded.vhd" skipexisting="true"/>
|
||||
<get src="https://drive.google.com/uc?id=1BrSiUQ1fzxFS9vIaK4mYKX6qIVp9kRWT" dest="${test-input}/password_detection_test.img" skipexisting="true"/>
|
||||
</target>
|
||||
|
||||
<target name="get-deps" depends="init-ivy,getTSKJars,get-thirdparty-dependencies,get-InternalPythonModules, download-binlist, getTestDataFiles">
|
||||
<mkdir dir="${ext.dir}"/>
|
||||
<copy file="${thirdparty.dir}/LICENSE-2.0.txt" todir="${ext.dir}" />
|
||||
|
||||
<!-- fetch all the dependencies from Ivy and stick them in the right places -->
|
||||
<ivy:resolve/>
|
||||
<ivy:resolve log="quiet"/>
|
||||
<ivy:retrieve conf="core" pattern="${ext.dir}/[artifact]-[revision](-[classifier]).[ext]" />
|
||||
</target>
|
||||
|
||||
|
@ -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: 22
|
||||
OpenIDE-Module-Implementation-Version: 23
|
||||
OpenIDE-Module-Requires: org.openide.windows.WindowManager
|
||||
AutoUpdate-Show-In-Client: true
|
||||
AutoUpdate-Essential-Module: true
|
||||
|
@ -18,7 +18,20 @@ file.reference.sevenzipjbinding-AllPlatforms.jar=release/modules/ext/sevenzipjbi
|
||||
file.reference.sevenzipjbinding.jar=release/modules/ext/sevenzipjbinding.jar
|
||||
file.reference.sqlite-jdbc-3.8.11.jar=release/modules/ext/sqlite-jdbc-3.8.11.jar
|
||||
file.reference.StixLib.jar=release/modules/ext/StixLib.jar
|
||||
file.reference.sleuthkit-postgresql-4.6.0.jar=release/modules/ext/sleuthkit-postgresql-4.6.0.jar
|
||||
file.reference.sleuthkit-postgresql-4.6.1.jar=release/modules/ext/sleuthkit-postgresql-4.6.1.jar
|
||||
file.reference.bcprov-jdk15on-1.54.jar=release/modules/ext/bcprov-jdk15on-1.54.jar
|
||||
file.reference.jackcess-2.1.8.jar=release/modules/ext/jackcess-2.1.8.jar
|
||||
file.reference.jackcess-encrypt-2.1.2.jar=release/modules/ext/jackcess-encrypt-2.1.2.jar
|
||||
file.reference.jempbox-1.8.13.jar=release/modules/ext/jempbox-1.8.13.jar
|
||||
file.reference.javax.ws.rs-api-2.0.1.jar=release/modules/ext/javax.ws.rs-api-2.0.1.jar
|
||||
file.reference.cxf-core-3.0.16.jar=release/modules/ext/cxf-core-3.0.16.jar
|
||||
file.reference.cxf-rt-frontend-jaxrs-3.0.16.jar=release/modules/ext/cxf-rt-frontend-jaxrs-3.0.16.jar
|
||||
file.reference.cxf-rt-rs-client-3.0.16.jar=release/modules/ext/cxf-rt-rs-client-3.0.16.jar
|
||||
file.reference.cxf-rt-transports-http-3.0.16.jar=release/modules/ext/cxf-rt-transports-http-3.0.16.jar
|
||||
file.reference.fontbox-2.0.8.jar=release/modules/ext/fontbox-2.0.8.jar
|
||||
file.reference.pdfbox-2.0.8.jar=release/modules/ext/pdfbox-2.0.8.jar
|
||||
file.reference.pdfbox-tools-2.0.8.jar=release/modules/ext/pdfbox-tools-2.0.8.jar
|
||||
file.reference.sleuthkit-postgresql-4.6.1.jar=release/modules/ext/sleuthkit-postgresql-4.6.1.jar
|
||||
file.reference.tika-core-1.17.jar=release/modules/ext/tika-core-1.17.jar
|
||||
file.reference.tika-parsers-1.17.jar=release/modules/ext/tika-parsers-1.17.jar
|
||||
file.reference.curator-client-2.8.0.jar=release/modules/ext/curator-client-2.8.0.jar
|
||||
@ -34,5 +47,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.10
|
||||
spec.version.base=10.11
|
||||
|
||||
|
@ -327,6 +327,7 @@
|
||||
<package>org.sleuthkit.autopsy.events</package>
|
||||
<package>org.sleuthkit.autopsy.filesearch</package>
|
||||
<package>org.sleuthkit.autopsy.guiutils</package>
|
||||
<package>org.sleuthkit.autopsy.healthmonitor</package>
|
||||
<package>org.sleuthkit.autopsy.ingest</package>
|
||||
<package>org.sleuthkit.autopsy.keywordsearchservice</package>
|
||||
<package>org.sleuthkit.autopsy.menuactions</package>
|
||||
@ -347,8 +348,8 @@
|
||||
<binary-origin>release/modules/ext/jdom-2.0.5.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/sleuthkit-postgresql-4.6.0.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/sleuthkit-postgresql-4.6.0.jar</binary-origin>
|
||||
<runtime-relative-path>ext/sleuthkit-postgresql-4.6.1.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/sleuthkit-postgresql-4.6.1.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/opencv-248.jar</runtime-relative-path>
|
||||
@ -410,10 +411,58 @@
|
||||
<runtime-relative-path>ext/curator-client-2.8.0.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/curator-client-2.8.0.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/bcprov-jdk15on-1.54.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/bcprov-jdk15on-1.54.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/jackcess-2.1.8.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/jackcess-2.1.8.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/jackcess-encrypt-2.1.2.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/jackcess-encrypt-2.1.2.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/jempbox-1.8.13.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/jempbox-1.8.13.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/javax.ws.rs-api-2.0.1.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/javax.ws.rs-api-2.0.1.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/cxf-rt-rs-client-3.0.16.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/cxf-rt-rs-client-3.0.16.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/cxf-rt-transports-http-3.0.16.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/cxf-rt-transports-http-3.0.16.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/cxf-core-3.0.16.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/cxf-core-3.0.16.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/cxf-rt-frontend-jaxrs-3.0.16.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/cxf-rt-frontend-jaxrs-3.0.16.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/tika-parsers-1.17.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/tika-parsers-1.17.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/fontbox-2.0.8.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/fontbox-2.0.8.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/pdfbox-2.0.8.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/pdfbox-2.0.8.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/pdfbox-tools-2.0.8.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/pdfbox-tools-2.0.8.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/sqlite-jdbc-3.8.11.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/sqlite-jdbc-3.8.11.jar</binary-origin>
|
||||
|
@ -84,7 +84,7 @@ public class AddBlackboardArtifactTagAction extends AddTagAction {
|
||||
new Thread(() -> {
|
||||
for (BlackboardArtifact artifact : selectedArtifacts) {
|
||||
try {
|
||||
Case.getOpenCase().getServices().getTagsManager().addBlackboardArtifactTag(artifact, tagName, comment);
|
||||
Case.getCurrentCaseThrows().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(() -> {
|
||||
|
@ -45,7 +45,7 @@ public class AddBookmarkTagAction extends AbstractAction {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
try {
|
||||
Map<String, TagName> tagNamesMap = Case.getOpenCase().getServices().getTagsManager().getDisplayNamesToTagNamesMap();
|
||||
Map<String, TagName> tagNamesMap = Case.getCurrentCaseThrows().getServices().getTagsManager().getDisplayNamesToTagNamesMap();
|
||||
TagName bookmarkTagName = tagNamesMap.get(BOOKMARK);
|
||||
|
||||
/*
|
||||
|
@ -140,7 +140,7 @@ public class AddContentTagAction extends AddTagAction {
|
||||
}
|
||||
}
|
||||
|
||||
Case.getOpenCase().getServices().getTagsManager().addContentTag(file, tagName, comment);
|
||||
Case.getCurrentCaseThrows().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;
|
||||
|
@ -93,7 +93,7 @@ abstract class AddTagAction extends AbstractAction implements Presenter.Popup {
|
||||
// Get the current set of tag names.
|
||||
Map<String, TagName> tagNamesMap = null;
|
||||
try {
|
||||
TagsManager tagsManager = Case.getOpenCase().getServices().getTagsManager();
|
||||
TagsManager tagsManager = Case.getCurrentCaseThrows().getServices().getTagsManager();
|
||||
tagNamesMap = new TreeMap<>(tagsManager.getDisplayNamesToTagNamesMap());
|
||||
} catch (TskCoreException | NoCurrentCaseException ex) {
|
||||
Logger.getLogger(TagsManager.class.getName()).log(Level.SEVERE, "Failed to get tag names", ex); //NON-NLS
|
||||
@ -170,7 +170,7 @@ abstract class AddTagAction extends AbstractAction implements Presenter.Popup {
|
||||
private void getAndAddTag(String tagDisplayName, TagName tagName, String comment) {
|
||||
Case openCase;
|
||||
try {
|
||||
openCase = Case.getOpenCase();
|
||||
openCase = Case.getCurrentCaseThrows();
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
Logger.getLogger(AddTagAction.class.getName()).log(Level.SEVERE, "Exception while getting open case.", ex); // NON-NLS
|
||||
return;
|
||||
|
@ -73,7 +73,7 @@ public class DeleteBlackboardArtifactTagAction extends AbstractAction {
|
||||
new Thread(() -> {
|
||||
for (BlackboardArtifactTag tag : selectedTags) {
|
||||
try {
|
||||
Case.getOpenCase().getServices().getTagsManager().deleteBlackboardArtifactTag(tag);
|
||||
Case.getCurrentCaseThrows().getServices().getTagsManager().deleteBlackboardArtifactTag(tag);
|
||||
} catch (TskCoreException | NoCurrentCaseException ex) {
|
||||
Logger.getLogger(DeleteBlackboardArtifactTagAction.class.getName()).log(Level.SEVERE, "Error deleting tag", ex); //NON-NLS
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
|
@ -72,7 +72,7 @@ public class DeleteContentTagAction extends AbstractAction {
|
||||
new Thread(() -> {
|
||||
for (ContentTag tag : selectedTags) {
|
||||
try {
|
||||
Case.getOpenCase().getServices().getTagsManager().deleteContentTag(tag);
|
||||
Case.getCurrentCaseThrows().getServices().getTagsManager().deleteContentTag(tag);
|
||||
} catch (TskCoreException | NoCurrentCaseException ex) {
|
||||
Logger.getLogger(DeleteContentTagAction.class.getName()).log(Level.SEVERE, "Error deleting tag", ex); //NON-NLS
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
|
@ -98,7 +98,7 @@ public class DeleteFileBlackboardArtifactTagAction extends AbstractAction implem
|
||||
protected Void doInBackground() throws Exception {
|
||||
TagsManager tagsManager;
|
||||
try {
|
||||
tagsManager = Case.getOpenCase().getServices().getTagsManager();
|
||||
tagsManager = Case.getCurrentCaseThrows().getServices().getTagsManager();
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
logger.log(Level.SEVERE, "Error untagging artifact. No open case found.", ex); //NON-NLS
|
||||
Platform.runLater(()
|
||||
@ -155,7 +155,7 @@ public class DeleteFileBlackboardArtifactTagAction extends AbstractAction implem
|
||||
Map<String, TagName> tagNamesMap = null;
|
||||
try {
|
||||
// Get the current set of tag names.
|
||||
TagsManager tagsManager = Case.getOpenCase().getServices().getTagsManager();
|
||||
TagsManager tagsManager = Case.getCurrentCaseThrows().getServices().getTagsManager();
|
||||
|
||||
tagNamesMap = new TreeMap<>(tagsManager.getDisplayNamesToTagNamesMap());
|
||||
} catch (TskCoreException | NoCurrentCaseException ex) {
|
||||
@ -168,7 +168,7 @@ public class DeleteFileBlackboardArtifactTagAction extends AbstractAction implem
|
||||
if (null != tagNamesMap && !tagNamesMap.isEmpty()) {
|
||||
try {
|
||||
List<BlackboardArtifactTag> existingTagsList
|
||||
= Case.getOpenCase().getServices().getTagsManager()
|
||||
= Case.getCurrentCaseThrows().getServices().getTagsManager()
|
||||
.getBlackboardArtifactTagsByArtifact(artifact);
|
||||
|
||||
for (Map.Entry<String, TagName> entry : tagNamesMap.entrySet()) {
|
||||
|
@ -98,7 +98,7 @@ public class DeleteFileContentTagAction extends AbstractAction implements Presen
|
||||
protected Void doInBackground() throws Exception {
|
||||
TagsManager tagsManager;
|
||||
try {
|
||||
tagsManager = Case.getOpenCase().getServices().getTagsManager();
|
||||
tagsManager = Case.getCurrentCaseThrows().getServices().getTagsManager();
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
logger.log(Level.SEVERE, "Error untagging file. No open case found.", ex); //NON-NLS
|
||||
Platform.runLater(() ->
|
||||
@ -152,7 +152,7 @@ public class DeleteFileContentTagAction extends AbstractAction implements Presen
|
||||
Map<String, TagName> tagNamesMap = null;
|
||||
try {
|
||||
// Get the current set of tag names.
|
||||
TagsManager tagsManager = Case.getOpenCase().getServices().getTagsManager();
|
||||
TagsManager tagsManager = Case.getCurrentCaseThrows().getServices().getTagsManager();
|
||||
|
||||
tagNamesMap = new TreeMap<>(tagsManager.getDisplayNamesToTagNamesMap());
|
||||
} catch (TskCoreException | NoCurrentCaseException ex) {
|
||||
@ -165,7 +165,7 @@ public class DeleteFileContentTagAction extends AbstractAction implements Presen
|
||||
if (null != tagNamesMap && !tagNamesMap.isEmpty()) {
|
||||
try {
|
||||
List<ContentTag> existingTagsList =
|
||||
Case.getOpenCase().getServices().getTagsManager()
|
||||
Case.getCurrentCaseThrows().getServices().getTagsManager()
|
||||
.getContentTagsByContent(file);
|
||||
|
||||
for (Map.Entry<String, TagName> entry : tagNamesMap.entrySet()) {
|
||||
|
@ -139,7 +139,7 @@ public class GetTagNameAndCommentDialog extends JDialog {
|
||||
// Tag name DTOs may be null (user tag names that have not been used do
|
||||
// not exist in the database).
|
||||
try {
|
||||
TagsManager tagsManager = Case.getOpenCase().getServices().getTagsManager();
|
||||
TagsManager tagsManager = Case.getCurrentCaseThrows().getServices().getTagsManager();
|
||||
tagNamesSet.addAll(tagsManager.getAllTagNames());
|
||||
|
||||
} catch (TskCoreException | NoCurrentCaseException ex) {
|
||||
|
@ -110,7 +110,7 @@ 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.
|
||||
try {
|
||||
TagsManager tagsManager = Case.getOpenCase().getServices().getTagsManager();
|
||||
TagsManager tagsManager = Case.getCurrentCaseThrows().getServices().getTagsManager();
|
||||
tagNamesMap.putAll(tagsManager.getDisplayNamesToTagNamesMap());
|
||||
} catch (TskCoreException | NoCurrentCaseException ex) {
|
||||
Logger.getLogger(GetTagNameDialog.class.getName()).log(Level.SEVERE, "Failed to get tag names", ex); //NON-NLS
|
||||
@ -348,7 +348,7 @@ public class GetTagNameDialog extends JDialog {
|
||||
|
||||
if (tagName == null) {
|
||||
try {
|
||||
tagName = Case.getOpenCase().getServices().getTagsManager().addTagName(tagDisplayName, userTagDescription, TagName.HTML_COLOR.NONE, status);
|
||||
tagName = Case.getCurrentCaseThrows().getServices().getTagsManager().addTagName(tagDisplayName, userTagDescription, TagName.HTML_COLOR.NONE, status);
|
||||
dispose();
|
||||
} catch (TskCoreException | NoCurrentCaseException ex) {
|
||||
Logger.getLogger(AddTagAction.class.getName()).log(Level.SEVERE, "Error adding " + tagDisplayName + " tag name", ex); //NON-NLS
|
||||
@ -361,7 +361,7 @@ public class GetTagNameDialog extends JDialog {
|
||||
tagName = null;
|
||||
} catch (TagsManager.TagNameAlreadyExistsException ex) {
|
||||
try {
|
||||
tagName = Case.getOpenCase().getServices().getTagsManager().getDisplayNamesToTagNamesMap().get(tagDisplayName);
|
||||
tagName = Case.getCurrentCaseThrows().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(this,
|
||||
|
@ -58,7 +58,7 @@ public final class OpenLogFolderAction implements ActionListener {
|
||||
/*
|
||||
* Open the log directory for the case.
|
||||
*/
|
||||
Case currentCase = Case.getOpenCase();
|
||||
Case currentCase = Case.getCurrentCaseThrows();
|
||||
logDir = new File(currentCase.getLogDirectoryPath());
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
/*
|
||||
|
@ -57,7 +57,7 @@ public final class OpenOutputFolderAction extends CallableSystemAction {
|
||||
public void performAction() {
|
||||
File outputDir;
|
||||
try {
|
||||
Case currentCase = Case.getOpenCase();
|
||||
Case currentCase = Case.getCurrentCaseThrows();
|
||||
outputDir = new File(currentCase.getOutputDirectory());
|
||||
if (outputDir.exists()) {
|
||||
try {
|
||||
|
@ -109,7 +109,7 @@ class AddImageTask implements Runnable {
|
||||
public void run() {
|
||||
Case currentCase;
|
||||
try {
|
||||
currentCase = Case.getOpenCase();
|
||||
currentCase = Case.getCurrentCaseThrows();
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
logger.log(Level.SEVERE, "Exception while getting open case.", ex);
|
||||
return;
|
||||
|
@ -345,7 +345,7 @@ class AddImageWizardAddingProgressPanel extends ShortcutWizardDescriptorPanel {
|
||||
|
||||
new Thread(() -> {
|
||||
try {
|
||||
Case.getOpenCase().notifyAddingDataSource(dataSourceId);
|
||||
Case.getCurrentCaseThrows().notifyAddingDataSource(dataSourceId);
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
Logger.getLogger(AddImageWizardAddingProgressVisual.class.getName()).log(Level.SEVERE, "Exception while getting open case.", ex); //NON-NLS
|
||||
}
|
||||
@ -417,9 +417,9 @@ class AddImageWizardAddingProgressPanel extends ShortcutWizardDescriptorPanel {
|
||||
new Thread(() -> {
|
||||
try {
|
||||
if (!contents.isEmpty()) {
|
||||
Case.getOpenCase().notifyDataSourceAdded(contents.get(0), dataSourceId);
|
||||
Case.getCurrentCaseThrows().notifyDataSourceAdded(contents.get(0), dataSourceId);
|
||||
} else {
|
||||
Case.getOpenCase().notifyFailedAddingDataSource(dataSourceId);
|
||||
Case.getCurrentCaseThrows().notifyFailedAddingDataSource(dataSourceId);
|
||||
}
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
Logger.getLogger(AddImageWizardAddingProgressVisual.class.getName()).log(Level.SEVERE, "Exception while getting open case.", ex); //NON-NLS
|
||||
|
@ -59,7 +59,7 @@ final class AddImageWizardSelectDspVisual extends JPanel {
|
||||
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
|
||||
try {
|
||||
if ((Case.getOpenCase().getCaseType() == Case.CaseType.MULTI_USER_CASE) && selectedDsp.equals(LocalDiskDSProcessor.getType())) {
|
||||
if ((Case.getCurrentCaseThrows().getCaseType() == Case.CaseType.MULTI_USER_CASE) && selectedDsp.equals(LocalDiskDSProcessor.getType())) {
|
||||
selectedDsp = ImageDSProcessor.getType();
|
||||
}
|
||||
createDataSourceProcessorButtons();
|
||||
@ -131,7 +131,7 @@ final class AddImageWizardSelectDspVisual extends JPanel {
|
||||
//Add the button
|
||||
JToggleButton dspButton = createDspButton(dspType);
|
||||
dspButton.addActionListener(cbActionListener);
|
||||
if ((Case.getOpenCase().getCaseType() == Case.CaseType.MULTI_USER_CASE) && dspType.equals(LocalDiskDSProcessor.getType())){
|
||||
if ((Case.getCurrentCaseThrows().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;
|
||||
|
@ -87,7 +87,7 @@ class AddLocalFilesTask implements Runnable {
|
||||
List<String> errors = new ArrayList<>();
|
||||
try {
|
||||
progress.setIndeterminate(true);
|
||||
FileManager fileManager = Case.getOpenCase().getServices().getFileManager();
|
||||
FileManager fileManager = Case.getCurrentCaseThrows().getServices().getFileManager();
|
||||
LocalFilesDataSource newDataSource = fileManager.addLocalFilesDataSource(deviceId, rootVirtualDirectoryName, "", localFilePaths, new ProgressUpdater());
|
||||
newDataSources.add(newDataSource);
|
||||
} catch (TskDataException | TskCoreException | NoCurrentCaseException ex) {
|
||||
|
@ -77,6 +77,7 @@ import org.sleuthkit.autopsy.casemodule.events.ContentTagDeletedEvent;
|
||||
import org.sleuthkit.autopsy.casemodule.events.DataSourceAddedEvent;
|
||||
import org.sleuthkit.autopsy.casemodule.events.ReportAddedEvent;
|
||||
import org.sleuthkit.autopsy.casemodule.services.Services;
|
||||
import org.sleuthkit.autopsy.commonfilesearch.CommonFilesSearchAction;
|
||||
import org.sleuthkit.autopsy.communications.OpenCommVisualizationToolAction;
|
||||
import org.sleuthkit.autopsy.coordinationservice.CoordinationService;
|
||||
import org.sleuthkit.autopsy.coordinationservice.CoordinationService.CategoryNode;
|
||||
@ -600,37 +601,41 @@ public class Case {
|
||||
}
|
||||
|
||||
/**
|
||||
* Deprecated. Use getOpenCase() instead.
|
||||
*
|
||||
* Gets the current case, if there is one, at the time of the call.
|
||||
* Gets the current case. This method should only be called by clients that
|
||||
* can be sure a case is currently open. Some examples of suitable clients
|
||||
* are data source processors, ingest modules, and report modules.
|
||||
*
|
||||
* @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.
|
||||
*
|
||||
*/
|
||||
try {
|
||||
return getOpenCase();
|
||||
return getCurrentCaseThrows();
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
/*
|
||||
* Throw a runtime exception, since this is a programming error.
|
||||
*/
|
||||
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.
|
||||
* Gets the current case, if there is one, or throws an exception if there
|
||||
* is no current case. This method should only be called by methods known to
|
||||
* run in threads where it is possible that another thread has closed the
|
||||
* current case. The exception provides some protection from the
|
||||
* consequences of the race condition between the calling thread and a case
|
||||
* closing thread, but it is not fool-proof. Background threads calling this
|
||||
* method should put all operations in an exception firewall with a try and
|
||||
* catch-all block to handle the possibility of bad timing.
|
||||
*
|
||||
* @return The open case.
|
||||
* TODO (JIRA-3825): Introduce a reference counting scheme for this get case
|
||||
* method.
|
||||
*
|
||||
* @throws NoCurrentCaseException if there is no open case.
|
||||
* @return The current case.
|
||||
*
|
||||
* @throws NoCurrentCaseException if there is no current case.
|
||||
*/
|
||||
public static Case getOpenCase() throws NoCurrentCaseException {
|
||||
public static Case getCurrentCaseThrows() throws NoCurrentCaseException {
|
||||
Case openCase = currentCase;
|
||||
if (openCase == null) {
|
||||
throw new NoCurrentCaseException(NbBundle.getMessage(Case.class, "Case.getCurCase.exception.noneOpen"));
|
||||
@ -1097,6 +1102,7 @@ public class Case {
|
||||
CallableSystemAction.get(CaseDeleteAction.class).setEnabled(true);
|
||||
CallableSystemAction.get(OpenTimelineAction.class).setEnabled(true);
|
||||
CallableSystemAction.get(OpenCommVisualizationToolAction.class).setEnabled(true);
|
||||
CallableSystemAction.get(CommonFilesSearchAction.class).setEnabled(true);
|
||||
CallableSystemAction.get(OpenOutputFolderAction.class).setEnabled(false);
|
||||
|
||||
/*
|
||||
@ -1146,6 +1152,7 @@ public class Case {
|
||||
CallableSystemAction.get(OpenTimelineAction.class).setEnabled(false);
|
||||
CallableSystemAction.get(OpenCommVisualizationToolAction.class).setEnabled(false);
|
||||
CallableSystemAction.get(OpenOutputFolderAction.class).setEnabled(false);
|
||||
CallableSystemAction.get(CommonFilesSearchAction.class).setEnabled(false);
|
||||
|
||||
/*
|
||||
* Clear the notifications in the notfier component in the lower
|
||||
@ -1560,8 +1567,8 @@ public class Case {
|
||||
* @throws TskCoreException if there is a problem adding the report to the
|
||||
* case database.
|
||||
*/
|
||||
public Report addReport(String localPath, String srcModuleName, String reportName) throws TskCoreException {
|
||||
return addReport(localPath, srcModuleName, reportName, null);
|
||||
public void addReport(String localPath, String srcModuleName, String reportName) throws TskCoreException {
|
||||
addReport(localPath, srcModuleName, reportName, null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -66,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.getOpenCase();
|
||||
Case currentCase = Case.getCurrentCaseThrows();
|
||||
String caseName = currentCase.getName();
|
||||
String caseDirectory = currentCase.getCaseDirectory();
|
||||
|
||||
|
@ -54,7 +54,7 @@ class CaseInformationPanel extends javax.swing.JPanel {
|
||||
})
|
||||
private void customizeComponents() {
|
||||
try {
|
||||
propertiesPanel = new CasePropertiesPanel(Case.getOpenCase());
|
||||
propertiesPanel = new CasePropertiesPanel(Case.getCurrentCaseThrows());
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
Logger.getLogger(CaseInformationPanel.class.getName()).log(Level.INFO, "Exception while getting open case.", ex);
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ final class CasePropertiesPanel extends javax.swing.JPanel {
|
||||
|
||||
void updateCaseInfo() {
|
||||
try {
|
||||
theCase = Case.getOpenCase();
|
||||
theCase = Case.getCurrentCaseThrows();
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Exception while getting open case.", ex);
|
||||
return;
|
||||
|
@ -264,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.getOpenCase();
|
||||
Case currentCase = Case.getCurrentCaseThrows();
|
||||
if (!DataSourceUtils.imageHasFileSystem(dataSourcePath)) {
|
||||
// image does not have a file system that TSK can process
|
||||
return 0;
|
||||
|
@ -319,7 +319,7 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
|
||||
|
||||
// Display warning if there is one (but don't disable "next" button)
|
||||
try {
|
||||
if (false == PathValidator.isValid(path, Case.getOpenCase().getCaseType())) {
|
||||
if (false == PathValidator.isValid(path, Case.getCurrentCaseThrows().getCaseType())) {
|
||||
pathErrorLabel.setVisible(true);
|
||||
pathErrorLabel.setText(Bundle.ImageFilePanel_pathValidation_dataSourceOnCDriveError());
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ public final class IngestJobInfoPanel extends javax.swing.JPanel {
|
||||
|
||||
private void refresh() {
|
||||
try {
|
||||
SleuthkitCase skCase = Case.getOpenCase().getSleuthkitCase();
|
||||
SleuthkitCase skCase = Case.getCurrentCaseThrows().getSleuthkitCase();
|
||||
List<IngestJobInfo> ingestJobs = skCase.getIngestJobs();
|
||||
this.ingestJobs = ingestJobs;
|
||||
this.repaint();
|
||||
@ -115,7 +115,7 @@ public final class IngestJobInfoPanel extends javax.swing.JPanel {
|
||||
IngestJobInfo currIngestJob = ingestJobs.get(rowIndex);
|
||||
if (columnIndex == 0) {
|
||||
try {
|
||||
SleuthkitCase skCase = Case.getOpenCase().getSleuthkitCase();
|
||||
SleuthkitCase skCase = Case.getCurrentCaseThrows().getSleuthkitCase();
|
||||
return skCase.getContentById(currIngestJob.getObjectId()).getName();
|
||||
} catch (TskCoreException | NoCurrentCaseException ex) {
|
||||
logger.log(Level.SEVERE, "Failed to get content from db", ex);
|
||||
|
@ -382,7 +382,7 @@ final class LocalDiskPanel extends JPanel {
|
||||
}
|
||||
|
||||
private static String getDefaultImageWriterFolder() throws NoCurrentCaseException {
|
||||
return Paths.get(Case.getOpenCase().getModuleDirectory(), "Image Writer").toString();
|
||||
return Paths.get(Case.getCurrentCaseThrows().getModuleDirectory(), "Image Writer").toString();
|
||||
}
|
||||
|
||||
private void setPotentialImageWriterPath(LocalDisk disk) throws NoCurrentCaseException {
|
||||
|
@ -197,7 +197,7 @@ public class LocalFilesDSProcessor implements DataSourceProcessor, AutoIngestDat
|
||||
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
|
||||
File l01Dir = new File(Case.getCurrentCaseThrows().getModuleDirectory(), L01_EXTRACTION_DIR); //WJS-TODO change to getOpenCase() when that method exists
|
||||
if (!l01Dir.exists()) {
|
||||
l01Dir.mkdirs();
|
||||
}
|
||||
|
@ -283,7 +283,7 @@ final class LocalFilesPanel extends javax.swing.JPanel {
|
||||
errorLabel.setVisible(false);
|
||||
|
||||
try {
|
||||
final Case.CaseType currentCaseType = Case.getOpenCase().getCaseType();
|
||||
final Case.CaseType currentCaseType = Case.getCurrentCaseThrows().getCaseType();
|
||||
|
||||
for (String currentPath : pathsList) {
|
||||
if (!PathValidator.isValid(currentPath, currentCaseType)) {
|
||||
|
@ -191,7 +191,7 @@ final class LogicalEvidenceFilePanel extends javax.swing.JPanel implements Docum
|
||||
}
|
||||
// display warning if there is one (but don't disable "next" button)
|
||||
try {
|
||||
if (!PathValidator.isValid(path, Case.getOpenCase().getCaseType())) {
|
||||
if (!PathValidator.isValid(path, Case.getCurrentCaseThrows().getCaseType())) {
|
||||
errorLabel.setVisible(true);
|
||||
errorLabel.setText(Bundle.LogicalEvidenceFilePanel_pathValidation_dataSourceOnCDriveError());
|
||||
return false;
|
||||
|
@ -115,19 +115,19 @@ final class MultiUserNode extends AbstractNode {
|
||||
|
||||
@Override
|
||||
protected Sheet createSheet() {
|
||||
Sheet s = super.createSheet();
|
||||
Sheet.Set ss = s.get(Sheet.PROPERTIES);
|
||||
if (ss == null) {
|
||||
ss = Sheet.createPropertiesSet();
|
||||
s.put(ss);
|
||||
Sheet sheet = super.createSheet();
|
||||
Sheet.Set sheetSet = sheet.get(Sheet.PROPERTIES);
|
||||
if (sheetSet == null) {
|
||||
sheetSet = Sheet.createPropertiesSet();
|
||||
sheet.put(sheetSet);
|
||||
}
|
||||
ss.put(new NodeProperty<>(Bundle.CaseNode_column_name(), Bundle.CaseNode_column_name(), Bundle.CaseNode_column_name(),
|
||||
sheetSet.put(new NodeProperty<>(Bundle.CaseNode_column_name(), Bundle.CaseNode_column_name(), Bundle.CaseNode_column_name(),
|
||||
caseName));
|
||||
ss.put(new NodeProperty<>(Bundle.CaseNode_column_createdTime(), Bundle.CaseNode_column_createdTime(), Bundle.CaseNode_column_createdTime(),
|
||||
sheetSet.put(new NodeProperty<>(Bundle.CaseNode_column_createdTime(), Bundle.CaseNode_column_createdTime(), Bundle.CaseNode_column_createdTime(),
|
||||
caseCreatedDate));
|
||||
ss.put(new NodeProperty<>(Bundle.CaseNode_column_metadataFilePath(), Bundle.CaseNode_column_metadataFilePath(), Bundle.CaseNode_column_metadataFilePath(),
|
||||
sheetSet.put(new NodeProperty<>(Bundle.CaseNode_column_metadataFilePath(), Bundle.CaseNode_column_metadataFilePath(), Bundle.CaseNode_column_metadataFilePath(),
|
||||
caseMetadataFilePath));
|
||||
return s;
|
||||
return sheet;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -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.getOpenCase());
|
||||
CorrelationCase cRCase = dbManager.getCase(Case.getCurrentCaseThrows());
|
||||
if (cRCase == null) {
|
||||
cRCase = dbManager.newCase(Case.getOpenCase());
|
||||
cRCase = dbManager.newCase(Case.getCurrentCaseThrows());
|
||||
}
|
||||
if (!organizationName.isEmpty()) {
|
||||
for (EamOrganization org : dbManager.getOrganizations()) {
|
||||
|
@ -64,7 +64,7 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel {
|
||||
if (editCurrentCase) {
|
||||
Case openCase;
|
||||
try {
|
||||
openCase = Case.getOpenCase();
|
||||
openCase = Case.getCurrentCaseThrows();
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Exception while getting open case.", ex);
|
||||
return;
|
||||
@ -94,7 +94,7 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel {
|
||||
private void setUpOrganizationData() {
|
||||
if (EamDb.isEnabled()) {
|
||||
try {
|
||||
Case currentCase = Case.getOpenCase();
|
||||
Case currentCase = Case.getCurrentCaseThrows();
|
||||
if (currentCase != null) {
|
||||
EamDb dbManager = EamDb.getInstance();
|
||||
selectedOrg = dbManager.getCase(currentCase).getOrg();
|
||||
@ -567,7 +567,7 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel {
|
||||
private void updateCaseDetails() throws NoCurrentCaseException {
|
||||
if (caseDisplayNameTextField.isVisible()) {
|
||||
try {
|
||||
Case.getOpenCase().updateCaseDetails(new CaseDetails(
|
||||
Case.getCurrentCaseThrows().updateCaseDetails(new CaseDetails(
|
||||
caseDisplayNameTextField.getText(), caseNumberTextField.getText(),
|
||||
examinerTextField.getText(), tfExaminerPhoneText.getText(),
|
||||
tfExaminerEmailText.getText(), taNotesText.getText()));
|
||||
@ -586,7 +586,7 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel {
|
||||
if (EamDb.isEnabled()) {
|
||||
try {
|
||||
EamDb dbManager = EamDb.getInstance();
|
||||
CorrelationCase correlationCase = dbManager.getCase(Case.getOpenCase());
|
||||
CorrelationCase correlationCase = dbManager.getCase(Case.getCurrentCaseThrows());
|
||||
if (caseDisplayNameTextField.isVisible()) {
|
||||
correlationCase.setDisplayName(caseDisplayNameTextField.getText());
|
||||
}
|
||||
|
@ -374,7 +374,7 @@ final class RecentCases extends CallableSystemAction implements Presenter.Menu {
|
||||
int i = 0;
|
||||
String currentCaseName = null;
|
||||
try {
|
||||
currentCaseName = Case.getOpenCase().getDisplayName();
|
||||
currentCaseName = Case.getCurrentCaseThrows().getDisplayName();
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
// in case there is no current case.
|
||||
}
|
||||
@ -407,7 +407,7 @@ final class RecentCases extends CallableSystemAction implements Presenter.Menu {
|
||||
String[] casePaths = new String[LENGTH];
|
||||
String currentCasePath = null;
|
||||
try {
|
||||
currentCasePath = Case.getOpenCase().getMetadata().getFilePath().toString();
|
||||
currentCasePath = Case.getCurrentCaseThrows().getMetadata().getFilePath().toString();
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
/*
|
||||
* There may be no current case.
|
||||
|
@ -47,6 +47,6 @@ public class BlackBoardArtifactTagAddedEvent extends TagAddedEvent<BlackboardArt
|
||||
*/
|
||||
@Override
|
||||
BlackboardArtifactTag getTagByID() throws NoCurrentCaseException, TskCoreException {
|
||||
return Case.getOpenCase().getServices().getTagsManager().getBlackboardArtifactTagByTagID(getTagID());
|
||||
return Case.getCurrentCaseThrows().getServices().getTagsManager().getBlackboardArtifactTagByTagID(getTagID());
|
||||
}
|
||||
}
|
||||
|
@ -46,6 +46,6 @@ public class ContentTagAddedEvent extends TagAddedEvent<ContentTag> implements S
|
||||
* @throws TskCoreException
|
||||
*/
|
||||
ContentTag getTagByID() throws NoCurrentCaseException, TskCoreException {
|
||||
return Case.getOpenCase().getServices().getTagsManager().getContentTagByTagID(getTagID());
|
||||
return Case.getCurrentCaseThrows().getServices().getTagsManager().getContentTagByTagID(getTagID());
|
||||
}
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ public final class DataSourceAddedEvent extends AutopsyEvent implements Serializ
|
||||
}
|
||||
try {
|
||||
long id = (Long) super.getNewValue();
|
||||
dataSource = Case.getOpenCase().getSleuthkitCase().getContentById(id);
|
||||
dataSource = Case.getCurrentCaseThrows().getSleuthkitCase().getContentById(id);
|
||||
return dataSource;
|
||||
} catch (NoCurrentCaseException | TskCoreException ex) {
|
||||
logger.log(Level.SEVERE, "Error doing lazy load for remote event", ex); //NON-NLS
|
||||
|
@ -70,7 +70,7 @@ public final class ReportAddedEvent extends AutopsyEvent implements Serializable
|
||||
}
|
||||
try {
|
||||
long id = (Long) super.getNewValue();
|
||||
List<Report> reports = Case.getOpenCase().getSleuthkitCase().getAllReports();
|
||||
List<Report> reports = Case.getCurrentCaseThrows().getSleuthkitCase().getAllReports();
|
||||
for (Report thisReport : reports) {
|
||||
if (thisReport.getId() == id) {
|
||||
report = thisReport;
|
||||
|
@ -1,14 +1,14 @@
|
||||
/*
|
||||
* Sleuth Kit Data Model
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2011-2018 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");
|
||||
* 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
|
||||
* 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,
|
||||
|
@ -297,7 +297,7 @@ final class TagNameDefinition implements Comparable<TagNameDefinition> {
|
||||
}
|
||||
setting.append(tagName.toSettingsFormat());
|
||||
try {
|
||||
SleuthkitCase caseDb = Case.getOpenCase().getSleuthkitCase();
|
||||
SleuthkitCase caseDb = Case.getCurrentCaseThrows().getSleuthkitCase();
|
||||
tagName.saveToCase(caseDb);
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Exception while getting open case.", ex);
|
||||
|
@ -425,7 +425,7 @@ final class TagOptionsPanel extends javax.swing.JPanel implements OptionsPanel {
|
||||
for (String modifiedTagDisplayName : updatedStatusTags) {
|
||||
//if user closes their case after options have been changed but before application of them is complete don't notify
|
||||
try {
|
||||
Case.getOpenCase().notifyTagDefinitionChanged(modifiedTagDisplayName);
|
||||
Case.getCurrentCaseThrows().notifyTagDefinitionChanged(modifiedTagDisplayName);
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
Logger.getLogger(TagOptionsPanel.class.getName()).log(Level.SEVERE, "Exception while getting open case.", ex); //NON-NLS
|
||||
}
|
||||
|
@ -99,7 +99,7 @@ public class TagsManager implements Closeable {
|
||||
tagDisplayNames.add(tagType.getDisplayName());
|
||||
});
|
||||
try {
|
||||
TagsManager tagsManager = Case.getOpenCase().getServices().getTagsManager();
|
||||
TagsManager tagsManager = Case.getCurrentCaseThrows().getServices().getTagsManager();
|
||||
for (TagName tagName : tagsManager.getAllTagNames()) {
|
||||
tagDisplayNames.add(tagName.getDisplayName());
|
||||
}
|
||||
@ -340,7 +340,7 @@ public class TagsManager implements Closeable {
|
||||
ContentTag tag;
|
||||
tag = caseDb.addContentTag(content, tagName, comment, beginByteOffset, endByteOffset);
|
||||
try {
|
||||
Case.getOpenCase().notifyContentTagAdded(tag);
|
||||
Case.getCurrentCaseThrows().notifyContentTagAdded(tag);
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
throw new TskCoreException("Added a tag to a closed case", ex);
|
||||
}
|
||||
@ -358,7 +358,7 @@ public class TagsManager implements Closeable {
|
||||
public void deleteContentTag(ContentTag tag) throws TskCoreException {
|
||||
caseDb.deleteContentTag(tag);
|
||||
try {
|
||||
Case.getOpenCase().notifyContentTagDeleted(tag);
|
||||
Case.getCurrentCaseThrows().notifyContentTagDeleted(tag);
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
throw new TskCoreException("Deleted a tag from a closed case", ex);
|
||||
}
|
||||
@ -470,7 +470,7 @@ 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.getOpenCase().notifyBlackBoardArtifactTagAdded(tag);
|
||||
Case.getCurrentCaseThrows().notifyBlackBoardArtifactTagAdded(tag);
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
throw new TskCoreException("Added a tag to a closed case", ex);
|
||||
}
|
||||
@ -488,7 +488,7 @@ public class TagsManager implements Closeable {
|
||||
public void deleteBlackboardArtifactTag(BlackboardArtifactTag tag) throws TskCoreException {
|
||||
caseDb.deleteBlackboardArtifactTag(tag);
|
||||
try {
|
||||
Case.getOpenCase().notifyBlackBoardArtifactTagDeleted(tag);
|
||||
Case.getCurrentCaseThrows().notifyBlackBoardArtifactTagDeleted(tag);
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
throw new TskCoreException("Deleted a tag from a closed case", ex);
|
||||
}
|
||||
|
@ -169,7 +169,7 @@ public class DataContentViewerOtherCases extends javax.swing.JPanel implements D
|
||||
private void showCaseDetails(int selectedRowViewIdx) {
|
||||
Case openCase;
|
||||
try {
|
||||
openCase = Case.getOpenCase();
|
||||
openCase = Case.getCurrentCaseThrows();
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
JOptionPane.showConfirmDialog(showCaseDetailsMenuItem,
|
||||
Bundle.DataContentViewerOtherCases_noOpenCase_errMsg(),
|
||||
@ -225,7 +225,7 @@ public class DataContentViewerOtherCases extends javax.swing.JPanel implements D
|
||||
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.getOpenCase().getExportDirectory()));
|
||||
CSVFileChooser.setCurrentDirectory(new File(Case.getCurrentCaseThrows().getExportDirectory()));
|
||||
CSVFileChooser.setSelectedFile(new File(fileName));
|
||||
CSVFileChooser.setFileFilter(new FileNameExtensionFilter("csv file", "csv"));
|
||||
|
||||
@ -434,7 +434,7 @@ public class DataContentViewerOtherCases extends javax.swing.JPanel implements D
|
||||
private Collection<CorrelationAttributeInstance> getCorrelatedInstances(CorrelationAttribute corAttr, String dataSourceName, String deviceId) {
|
||||
// @@@ Check exception
|
||||
try {
|
||||
String caseUUID = Case.getOpenCase().getName();
|
||||
String caseUUID = Case.getCurrentCaseThrows().getName();
|
||||
EamDb dbManager = EamDb.getInstance();
|
||||
Collection<CorrelationAttributeInstance> artifactInstances = dbManager.getArtifactInstancesByTypeValue(corAttr.getCorrelationType(), corAttr.getCorrelationValue()).stream()
|
||||
.filter(artifactInstance -> !artifactInstance.getCorrelationCase().getCaseUUID().equals(caseUUID)
|
||||
@ -491,7 +491,7 @@ public class DataContentViewerOtherCases extends javax.swing.JPanel implements D
|
||||
if (af != null) {
|
||||
Content dataSource = af.getDataSource();
|
||||
dataSourceName = dataSource.getName();
|
||||
deviceId = Case.getOpenCase().getSleuthkitCase().getDataSource(dataSource.getId()).getDeviceId();
|
||||
deviceId = Case.getCurrentCaseThrows().getSleuthkitCase().getDataSource(dataSource.getId()).getDeviceId();
|
||||
}
|
||||
} catch (TskException | NoCurrentCaseException ex) {
|
||||
// do nothing.
|
||||
|
@ -74,7 +74,7 @@ public class CorrelationDataSource implements Serializable {
|
||||
public static CorrelationDataSource fromTSKDataSource(CorrelationCase correlationCase, Content dataSource) throws EamDbException {
|
||||
Case curCase;
|
||||
try {
|
||||
curCase = Case.getOpenCase();
|
||||
curCase = Case.getCurrentCaseThrows();
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
throw new EamDbException("Autopsy case is closed");
|
||||
}
|
||||
|
@ -90,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.getOpenCase();
|
||||
Case currentCase = Case.getCurrentCaseThrows();
|
||||
AbstractFile bbSourceFile = currentCase.getSleuthkitCase().getAbstractFileById(bbArtifact.getObjectID());
|
||||
if (null == bbSourceFile) {
|
||||
//@@@ Log this
|
||||
@ -98,9 +98,9 @@ public class EamArtifactUtil {
|
||||
}
|
||||
|
||||
// make an instance for the BB source file
|
||||
CorrelationCase correlationCase = EamDb.getInstance().getCase(Case.getOpenCase());
|
||||
CorrelationCase correlationCase = EamDb.getInstance().getCase(Case.getCurrentCaseThrows());
|
||||
if (null == correlationCase) {
|
||||
correlationCase = EamDb.getInstance().newCase(Case.getOpenCase());
|
||||
correlationCase = EamDb.getInstance().newCase(Case.getCurrentCaseThrows());
|
||||
}
|
||||
CorrelationAttributeInstance eamInstance = new CorrelationAttributeInstance(
|
||||
correlationCase,
|
||||
@ -146,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.getOpenCase().getSleuthkitCase().getBlackboardArtifact(attribute.getValueLong());
|
||||
BlackboardArtifact associatedArtifact = Case.getCurrentCaseThrows().getSleuthkitCase().getBlackboardArtifact(attribute.getValueLong());
|
||||
return EamArtifactUtil.getCorrelationAttributeFromBlackboardArtifact(correlationType, associatedArtifact);
|
||||
}
|
||||
|
||||
@ -254,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.getOpenCase());
|
||||
CorrelationCase correlationCase = EamDb.getInstance().getCase(Case.getCurrentCaseThrows());
|
||||
if (null == correlationCase) {
|
||||
correlationCase = EamDb.getInstance().newCase(Case.getOpenCase());
|
||||
correlationCase = EamDb.getInstance().newCase(Case.getCurrentCaseThrows());
|
||||
}
|
||||
CorrelationAttributeInstance cei = new CorrelationAttributeInstance(
|
||||
correlationCase,
|
||||
|
@ -163,8 +163,8 @@ final class CaseEventListener implements PropertyChangeListener {
|
||||
|
||||
try {
|
||||
// Get the remaining tags on the content object
|
||||
Content content = Case.getOpenCase().getSleuthkitCase().getContentById(contentID);
|
||||
TagsManager tagsManager = Case.getOpenCase().getServices().getTagsManager();
|
||||
Content content = Case.getCurrentCaseThrows().getSleuthkitCase().getContentById(contentID);
|
||||
TagsManager tagsManager = Case.getCurrentCaseThrows().getServices().getTagsManager();
|
||||
List<ContentTag> tags = tagsManager.getContentTagsByContent(content);
|
||||
|
||||
if (tags.stream()
|
||||
@ -244,7 +244,7 @@ final class CaseEventListener implements PropertyChangeListener {
|
||||
} else { //BLACKBOARD_ARTIFACT_TAG_DELETED
|
||||
Case openCase;
|
||||
try {
|
||||
openCase = Case.getOpenCase();
|
||||
openCase = Case.getCurrentCaseThrows();
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Exception while getting open case.", ex);
|
||||
return;
|
||||
@ -327,10 +327,10 @@ final class CaseEventListener implements PropertyChangeListener {
|
||||
* that are tagged with the given tag name.
|
||||
*/
|
||||
try {
|
||||
TagName tagName = Case.getOpenCase().getServices().getTagsManager().getDisplayNamesToTagNamesMap().get(modifiedTagName);
|
||||
TagName tagName = Case.getCurrentCaseThrows().getServices().getTagsManager().getDisplayNamesToTagNamesMap().get(modifiedTagName);
|
||||
//First update the artifacts
|
||||
//Get all BlackboardArtifactTags with this tag name
|
||||
List<BlackboardArtifactTag> artifactTags = Case.getOpenCase().getSleuthkitCase().getBlackboardArtifactTagsByTagName(tagName);
|
||||
List<BlackboardArtifactTag> artifactTags = Case.getCurrentCaseThrows().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;
|
||||
@ -346,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.getOpenCase().getServices().getTagsManager();
|
||||
TagsManager tagsManager = Case.getCurrentCaseThrows().getServices().getTagsManager();
|
||||
List<BlackboardArtifactTag> tags = tagsManager.getBlackboardArtifactTagsByArtifact(bbArtifact);
|
||||
//get all tags which are on this blackboard artifact
|
||||
for (BlackboardArtifactTag t : tags) {
|
||||
@ -374,7 +374,7 @@ final class CaseEventListener implements PropertyChangeListener {
|
||||
}
|
||||
// Next update the files
|
||||
|
||||
List<ContentTag> fileTags = Case.getOpenCase().getSleuthkitCase().getContentTagsByTagName(tagName);
|
||||
List<ContentTag> fileTags = Case.getCurrentCaseThrows().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
|
||||
@ -384,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.getOpenCase().getServices().getTagsManager();
|
||||
TagsManager tagsManager = Case.getCurrentCaseThrows().getServices().getTagsManager();
|
||||
List<ContentTag> tags = tagsManager.getContentTagsByContent(content);
|
||||
//get all tags which are on this file
|
||||
for (ContentTag t : tags) {
|
||||
@ -436,7 +436,7 @@ final class CaseEventListener implements PropertyChangeListener {
|
||||
}
|
||||
Case openCase;
|
||||
try {
|
||||
openCase = Case.getOpenCase();
|
||||
openCase = Case.getCurrentCaseThrows();
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Exception while getting open case.", ex);
|
||||
return;
|
||||
|
@ -163,7 +163,7 @@ public class IngestEventsListener {
|
||||
tifArtifact.addAttributes(attributes);
|
||||
try {
|
||||
// index the artifact for keyword search
|
||||
Blackboard blackboard = Case.getOpenCase().getSleuthkitCase().getBlackboard();
|
||||
Blackboard blackboard = Case.getCurrentCaseThrows().getSleuthkitCase().getBlackboard();
|
||||
blackboard.publishArtifact(tifArtifact);
|
||||
} catch (Blackboard.BlackboardException | NoCurrentCaseException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Unable to index blackboard artifact " + tifArtifact.getArtifactID(), ex); //NON-NLS
|
||||
|
@ -94,7 +94,7 @@ final class IngestModule implements FileIngestModule {
|
||||
}
|
||||
|
||||
try {
|
||||
blackboard = Case.getOpenCase().getSleuthkitCase().getBlackboard();
|
||||
blackboard = Case.getCurrentCaseThrows().getSleuthkitCase().getBlackboard();
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
logger.log(Level.SEVERE, "Exception while getting open case.", ex);
|
||||
return ProcessResult.ERROR;
|
||||
@ -233,7 +233,7 @@ final class IngestModule implements FileIngestModule {
|
||||
}
|
||||
Case autopsyCase;
|
||||
try {
|
||||
autopsyCase = Case.getOpenCase();
|
||||
autopsyCase = Case.getCurrentCaseThrows();
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
logger.log(Level.SEVERE, "Exception while getting open case.", ex);
|
||||
throw new IngestModuleException("Exception while getting open case.", ex);
|
||||
|
@ -68,7 +68,17 @@ public class IngestModuleFactory extends IngestModuleFactoryAdapter {
|
||||
|
||||
@Override
|
||||
public FileIngestModule createFileIngestModule(IngestModuleIngestJobSettings settings) {
|
||||
return new IngestModule((IngestSettings) settings);
|
||||
if (settings instanceof IngestSettings) {
|
||||
return new IngestModule((IngestSettings) settings);
|
||||
}
|
||||
/*
|
||||
* Compatibility check for older versions.
|
||||
*/
|
||||
if (settings instanceof NoIngestModuleIngestJobSettings) {
|
||||
return new IngestModule(new IngestSettings());
|
||||
}
|
||||
|
||||
throw new IllegalArgumentException("Expected settings argument to be an instance of IngestSettings");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -0,0 +1,56 @@
|
||||
/*
|
||||
*
|
||||
* 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.commonfilesearch;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Provides logic for selecting common files from all data sources.
|
||||
*/
|
||||
final class AllDataSourcesCommonFilesAlgorithm extends CommonFilesMetadataBuilder {
|
||||
|
||||
private static final String WHERE_CLAUSE = "%s md5 in (select md5 from tsk_files where (known != 1 OR known IS NULL)%s GROUP BY md5 HAVING COUNT(*) > 1) order by md5"; //NON-NLS
|
||||
|
||||
/**
|
||||
* Implements the algorithm for getting common files across all data
|
||||
* sources.
|
||||
*
|
||||
* @param dataSourceIdMap a map of obj_id to datasource name
|
||||
* @param filterByMediaMimeType match only on files whose mime types can be broadly categorized as media types
|
||||
* @param filterByDocMimeType match only on files whose mime types can be broadly categorized as document types
|
||||
*/
|
||||
AllDataSourcesCommonFilesAlgorithm(Map<Long, String> dataSourceIdMap, boolean filterByMediaMimeType, boolean filterByDocMimeType) {
|
||||
super(dataSourceIdMap, filterByMediaMimeType, filterByDocMimeType);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String buildSqlSelectStatement() {
|
||||
Object[] args = new String[]{SELECT_PREFIX, determineMimeTypeFilter()};
|
||||
return String.format(WHERE_CLAUSE, args);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String buildTabTitle() {
|
||||
final String buildCategorySelectionString = this.buildCategorySelectionString();
|
||||
final String titleTemplate = Bundle.CommonFilesMetadataBuilder_buildTabTitle_titleAll();
|
||||
return String.format(titleTemplate, new Object[]{buildCategorySelectionString});
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
CommonFilesPanel.searchButton.text=Search
|
||||
CommonFilesPanel.withinDataSourceRadioButton.text=At least one instance of a given MD5 must appear in the data source selected below:
|
||||
CommonFilesPanel.allDataSourcesRadioButton.text=Files can be in any data source
|
||||
CommonFilesPanel.cancelButton.text=Cancel
|
||||
CommonFilesPanel.cancelButton.actionCommand=Cancel
|
||||
CommonFilesPanel.selectedFileCategoriesButton.text=Match on the following file categories:
|
||||
CommonFilesPanel.selectedFileCategoriesButton.toolTipText=Select from the options below...
|
||||
CommonFilesPanel.pictureVideoCheckbox.text=Pictures and Videos
|
||||
CommonFilesPanel.documentsCheckbox.text=Documents
|
||||
CommonFilesPanel.commonFilesSearchLabel.text=<html>Find duplicate files in the current case.</html>
|
||||
CommonFilesPanel.allFileCategoriesRadioButton.toolTipText=No filtering applied to results...
|
||||
CommonFilesPanel.allFileCategoriesRadioButton.text=Match on all file types
|
||||
CommonFilesPanel.text=Indicate which data sources to consider while searching for duplicates:
|
||||
CommonFilesPanel.categoriesLabel.text=Indicate which file types to include in results:
|
||||
CommonFilesPanel.errorText.text=In order to search, you must select a file category.
|
@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JDialogFormInfo">
|
||||
<Properties>
|
||||
<Property name="defaultCloseOperation" type="int" value="2"/>
|
||||
<Property name="size" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[340, 320]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<SyntheticProperties>
|
||||
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
|
||||
<SyntheticProperty name="generateCenter" type="boolean" value="true"/>
|
||||
</SyntheticProperties>
|
||||
<Events>
|
||||
<EventHandler event="windowClosed" listener="java.awt.event.WindowListener" parameters="java.awt.event.WindowEvent" handler="formWindowClosed"/>
|
||||
</Events>
|
||||
<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">
|
||||
<Component id="commonFilesPanel1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="0" 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="commonFilesPanel1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="org.sleuthkit.autopsy.commonfilesearch.CommonFilesPanel" name="commonFilesPanel1">
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Form>
|
@ -0,0 +1,94 @@
|
||||
/*
|
||||
* 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.commonfilesearch;
|
||||
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.SwingUtilities;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.openide.windows.WindowManager;
|
||||
|
||||
/**
|
||||
* Dialog box for configuring and running common files search.
|
||||
*/
|
||||
@SuppressWarnings("PMD.SingularField") // UI widgets cause lots of false positives
|
||||
public final class CommonFilesDialog extends javax.swing.JDialog {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* Creates new form CommonFilesDialog
|
||||
*/
|
||||
@NbBundle.Messages({
|
||||
"CommonFilesDialog.frame.title=Find Common Files",
|
||||
"CommonFilesDialog.frame.msg=Find Common Files"})
|
||||
public CommonFilesDialog() {
|
||||
super(new JFrame(Bundle.CommonFilesDialog_frame_title()),
|
||||
Bundle.CommonFilesDialog_frame_msg(), true);
|
||||
initComponents();
|
||||
|
||||
this.setResizable(false);
|
||||
this.setLocationRelativeTo(WindowManager.getDefault().getMainWindow());
|
||||
}
|
||||
|
||||
/**
|
||||
* 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() {
|
||||
|
||||
commonFilesPanel1 = new org.sleuthkit.autopsy.commonfilesearch.CommonFilesPanel();
|
||||
|
||||
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
|
||||
setSize(new java.awt.Dimension(340, 320));
|
||||
addWindowListener(new java.awt.event.WindowAdapter() {
|
||||
public void windowClosed(java.awt.event.WindowEvent evt) {
|
||||
formWindowClosed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
|
||||
getContentPane().setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(commonFilesPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(0, 0, Short.MAX_VALUE))
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(commonFilesPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(0, 0, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
pack();
|
||||
setLocationRelativeTo(null);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void formWindowClosed(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosed
|
||||
SwingUtilities.windowForComponent(this).dispose();
|
||||
}//GEN-LAST:event_formWindowClosed
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private org.sleuthkit.autopsy.commonfilesearch.CommonFilesPanel commonFilesPanel1;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
/*
|
||||
*
|
||||
* 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.commonfilesearch;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Utility and wrapper model around data required for Common Files Search
|
||||
* results. Subclass this to implement different selections of files from the
|
||||
* case.
|
||||
*/
|
||||
final class CommonFilesMetadata {
|
||||
|
||||
private final Map<String, Md5Metadata> metadata;
|
||||
|
||||
/**
|
||||
* Create meta dat object which can be handed off to the node factories
|
||||
*
|
||||
* @param metadata map of md5 to parent-level node meta data
|
||||
*/
|
||||
CommonFilesMetadata(Map<String, Md5Metadata> metadata) {
|
||||
this.metadata = metadata;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find the meta data for the given md5.
|
||||
*
|
||||
* This is a convenience method - you can also iterate over
|
||||
* <code>getMetadata()</code>.
|
||||
*
|
||||
* @param md5 key
|
||||
* @return
|
||||
*/
|
||||
Md5Metadata getMetadataForMd5(String md5) {
|
||||
return this.metadata.get(md5);
|
||||
}
|
||||
|
||||
Map<String, Md5Metadata> getMetadata() {
|
||||
return Collections.unmodifiableMap(this.metadata);
|
||||
}
|
||||
|
||||
/**
|
||||
* How many distinct file instances exist for this metadata?
|
||||
* @return number of file instances
|
||||
*/
|
||||
int size() {
|
||||
int count = 0;
|
||||
for (Md5Metadata data : this.metadata.values()) {
|
||||
count += data.size();
|
||||
}
|
||||
return count;
|
||||
}
|
||||
}
|
@ -0,0 +1,261 @@
|
||||
/*
|
||||
*
|
||||
* 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.commonfilesearch;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.datamodel.HashUtility;
|
||||
import org.sleuthkit.datamodel.SleuthkitCase;
|
||||
import org.sleuthkit.datamodel.SleuthkitCase.CaseDbQuery;
|
||||
import org.sleuthkit.datamodel.TskCoreException;
|
||||
|
||||
/**
|
||||
*
|
||||
* Generates a <code>List<CommonFilesMetadata></code> when
|
||||
* <code>findCommonFiles()</code> is called, which organizes files by md5 to
|
||||
* prepare to display in viewer.
|
||||
*
|
||||
* This entire thing runs on a background thread where exceptions are handled.
|
||||
*/
|
||||
@SuppressWarnings("PMD.AbstractNaming")
|
||||
abstract class CommonFilesMetadataBuilder {
|
||||
|
||||
private final Map<Long, String> dataSourceIdToNameMap;
|
||||
private final boolean filterByMedia;
|
||||
private final boolean filterByDoc;
|
||||
private static final String filterByMimeTypesWhereClause = " and mime_type in (%s)"; //NON-NLS // where %s is csv list of mime_types to filter on
|
||||
|
||||
/*
|
||||
* The set of the MIME types that will be checked for extension mismatches
|
||||
* when checkType is ONLY_MEDIA.
|
||||
* ".jpg", ".jpeg", ".png", ".psd", ".nef", ".tiff", ".bmp", ".tec"
|
||||
* ".aaf", ".3gp", ".asf", ".avi", ".m1v", ".m2v", //NON-NLS
|
||||
* ".m4v", ".mp4", ".mov", ".mpeg", ".mpg", ".mpe", ".mp4", ".rm", ".wmv", ".mpv", ".flv", ".swf"
|
||||
*/
|
||||
private static final Set<String> MEDIA_PICS_VIDEO_MIME_TYPES = Stream.of(
|
||||
"image/bmp", //NON-NLS
|
||||
"image/gif", //NON-NLS
|
||||
"image/jpeg", //NON-NLS
|
||||
"image/png", //NON-NLS
|
||||
"image/tiff", //NON-NLS
|
||||
"image/vnd.adobe.photoshop", //NON-NLS
|
||||
"image/x-raw-nikon", //NON-NLS
|
||||
"image/x-ms-bmp", //NON-NLS
|
||||
"image/x-icon", //NON-NLS
|
||||
"video/webm", //NON-NLS
|
||||
"video/3gpp", //NON-NLS
|
||||
"video/3gpp2", //NON-NLS
|
||||
"video/ogg", //NON-NLS
|
||||
"video/mpeg", //NON-NLS
|
||||
"video/mp4", //NON-NLS
|
||||
"video/quicktime", //NON-NLS
|
||||
"video/x-msvideo", //NON-NLS
|
||||
"video/x-flv", //NON-NLS
|
||||
"video/x-m4v", //NON-NLS
|
||||
"video/x-ms-wmv", //NON-NLS
|
||||
"application/vnd.ms-asf", //NON-NLS
|
||||
"application/vnd.rn-realmedia", //NON-NLS
|
||||
"application/x-shockwave-flash" //NON-NLS
|
||||
).collect(Collectors.toSet());
|
||||
|
||||
/*
|
||||
* The set of the MIME types that will be checked for extension mismatches
|
||||
* when checkType is ONLY_TEXT_FILES.
|
||||
* ".doc", ".docx", ".odt", ".xls", ".xlsx", ".ppt", ".pptx"
|
||||
* ".txt", ".rtf", ".log", ".text", ".xml"
|
||||
* ".html", ".htm", ".css", ".js", ".php", ".aspx"
|
||||
* ".pdf"
|
||||
*/
|
||||
private static final Set<String> TEXT_FILES_MIME_TYPES = Stream.of(
|
||||
"text/plain", //NON-NLS
|
||||
"application/rtf", //NON-NLS
|
||||
"application/pdf", //NON-NLS
|
||||
"text/css", //NON-NLS
|
||||
"text/html", //NON-NLS
|
||||
"text/csv", //NON-NLS
|
||||
"application/json", //NON-NLS
|
||||
"application/javascript", //NON-NLS
|
||||
"application/xml", //NON-NLS
|
||||
"text/calendar", //NON-NLS
|
||||
"application/x-msoffice", //NON-NLS
|
||||
"application/x-ooxml", //NON-NLS
|
||||
"application/msword", //NON-NLS
|
||||
"application/vnd.openxmlformats-officedocument.wordprocessingml.document", //NON-NLS
|
||||
"application/vnd.ms-powerpoint", //NON-NLS
|
||||
"application/vnd.openxmlformats-officedocument.presentationml.presentation", //NON-NLS
|
||||
"application/vnd.ms-excel", //NON-NLS
|
||||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", //NON-NLS
|
||||
"application/vnd.oasis.opendocument.presentation", //NON-NLS
|
||||
"application/vnd.oasis.opendocument.spreadsheet", //NON-NLS
|
||||
"application/vnd.oasis.opendocument.text" //NON-NLS
|
||||
).collect(Collectors.toSet());
|
||||
|
||||
/**
|
||||
* Subclass this to implement different algorithms for getting common files.
|
||||
*
|
||||
* @param dataSourceIdMap a map of obj_id to datasource name
|
||||
* @param filterByMediaMimeType match only on files whose mime types can be
|
||||
* broadly categorized as media types
|
||||
* @param filterByDocMimeType match only on files whose mime types can be
|
||||
* broadly categorized as document types
|
||||
*/
|
||||
CommonFilesMetadataBuilder(Map<Long, String> dataSourceIdMap, boolean filterByMediaMimeType, boolean filterByDocMimeType) {
|
||||
dataSourceIdToNameMap = dataSourceIdMap;
|
||||
filterByMedia = filterByMediaMimeType;
|
||||
filterByDoc = filterByDocMimeType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this as a prefix when building the SQL select statement.
|
||||
*
|
||||
* <ul>
|
||||
* <li>You only have to specify the WHERE clause if you use this.</li>
|
||||
* <li>If you do not use this string, you must use at least the columns
|
||||
* selected below, in that order.</li>
|
||||
* </ul>
|
||||
*/
|
||||
static final String SELECT_PREFIX = "SELECT obj_id, md5, data_source_obj_id from tsk_files where"; //NON-NLS
|
||||
|
||||
/**
|
||||
* Should build a SQL SELECT statement to be passed to
|
||||
* SleuthkitCase.executeQuery(sql) which will select the desired file ids
|
||||
* and MD5 hashes.
|
||||
*
|
||||
* The statement should select obj_id, md5, data_source_obj_id in that
|
||||
* order.
|
||||
*
|
||||
* @return sql string select statement
|
||||
*/
|
||||
protected abstract String buildSqlSelectStatement();
|
||||
|
||||
/**
|
||||
* Generate a meta data object which encapsulates everything need to add the
|
||||
* tree table tab to the top component.
|
||||
*
|
||||
* @return a data object with all of the matched files in a hierarchical
|
||||
* format
|
||||
* @throws TskCoreException
|
||||
* @throws NoCurrentCaseException
|
||||
* @throws SQLException
|
||||
*/
|
||||
public CommonFilesMetadata findCommonFiles() throws TskCoreException, NoCurrentCaseException, SQLException {
|
||||
|
||||
Map<String, Md5Metadata> commonFiles = new HashMap<>();
|
||||
|
||||
SleuthkitCase sleuthkitCase = Case.getCurrentCaseThrows().getSleuthkitCase();
|
||||
String selectStatement = this.buildSqlSelectStatement();
|
||||
|
||||
try (
|
||||
CaseDbQuery query = sleuthkitCase.executeQuery(selectStatement);
|
||||
ResultSet resultSet = query.getResultSet()) {
|
||||
|
||||
while (resultSet.next()) {
|
||||
Long objectId = resultSet.getLong(1);
|
||||
String md5 = resultSet.getString(2);
|
||||
Long dataSourceId = resultSet.getLong(3);
|
||||
String dataSource = this.dataSourceIdToNameMap.get(dataSourceId);
|
||||
|
||||
if (md5 == null || HashUtility.isNoDataMd5(md5)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (commonFiles.containsKey(md5)) {
|
||||
final Md5Metadata md5Metadata = commonFiles.get(md5);
|
||||
md5Metadata.addFileInstanceMetadata(new FileInstanceMetadata(objectId, dataSource));
|
||||
} else {
|
||||
final List<FileInstanceMetadata> fileInstances = new ArrayList<>();
|
||||
fileInstances.add(new FileInstanceMetadata(objectId, dataSource));
|
||||
Md5Metadata md5Metadata = new Md5Metadata(md5, fileInstances);
|
||||
commonFiles.put(md5, md5Metadata);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return new CommonFilesMetadata(commonFiles);
|
||||
}
|
||||
|
||||
/**
|
||||
* Should be used by subclasses, in their
|
||||
* <code>buildSqlSelectStatement()</code> function to create an SQL boolean
|
||||
* expression which will filter our matches based on mime type. The
|
||||
* expression will be conjoined to base query with an AND operator.
|
||||
*
|
||||
* @return sql fragment of the form:
|
||||
* 'and "mime_type" in ( [comma delimited list of mime types] )'
|
||||
* or empty string in the event that no types to filter on were given.
|
||||
*/
|
||||
String determineMimeTypeFilter() {
|
||||
|
||||
Set<String> mimeTypesToFilterOn = new HashSet<>();
|
||||
String mimeTypeString = "";
|
||||
if (filterByMedia) {
|
||||
mimeTypesToFilterOn.addAll(MEDIA_PICS_VIDEO_MIME_TYPES);
|
||||
}
|
||||
if (filterByDoc) {
|
||||
mimeTypesToFilterOn.addAll(TEXT_FILES_MIME_TYPES);
|
||||
}
|
||||
StringBuilder mimeTypeFilter = new StringBuilder(mimeTypesToFilterOn.size());
|
||||
if (!mimeTypesToFilterOn.isEmpty()) {
|
||||
for (String mimeType : mimeTypesToFilterOn) {
|
||||
mimeTypeFilter.append('"').append(mimeType).append("\",");
|
||||
}
|
||||
mimeTypeString = mimeTypeFilter.toString().substring(0, mimeTypeFilter.length() - 1);
|
||||
mimeTypeString = String.format(filterByMimeTypesWhereClause, new Object[]{mimeTypeString});
|
||||
}
|
||||
return mimeTypeString;
|
||||
}
|
||||
|
||||
@NbBundle.Messages({
|
||||
"CommonFilesMetadataBuilder.buildTabTitle.titleAll=Common Files (All Data Sources, %s)",
|
||||
"CommonFilesMetadataBuilder.buildTabTitle.titleSingle=Common Files (Match Within Data Source: %s, %s)"
|
||||
})
|
||||
protected abstract String buildTabTitle();
|
||||
|
||||
@NbBundle.Messages({
|
||||
"CommonFilesMetadataBuilder.buildCategorySelectionString.doc=Documents",
|
||||
"CommonFilesMetadataBuilder.buildCategorySelectionString.media=Media",
|
||||
"CommonFilesMetadataBuilder.buildCategorySelectionString.all=All File Categories"
|
||||
})
|
||||
protected String buildCategorySelectionString() {
|
||||
if (!this.filterByDoc && !this.filterByMedia) {
|
||||
return Bundle.CommonFilesMetadataBuilder_buildCategorySelectionString_all();
|
||||
} else {
|
||||
List<String> filters = new ArrayList<>();
|
||||
if (this.filterByDoc) {
|
||||
filters.add(Bundle.CommonFilesMetadataBuilder_buildCategorySelectionString_doc());
|
||||
}
|
||||
if (this.filterByMedia) {
|
||||
filters.add(Bundle.CommonFilesMetadataBuilder_buildCategorySelectionString_media());
|
||||
}
|
||||
return String.join(", ", filters);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,95 @@
|
||||
/*
|
||||
* 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.commonfilesearch;
|
||||
|
||||
import java.util.List;
|
||||
import org.openide.nodes.ChildFactory;
|
||||
import org.openide.nodes.Children;
|
||||
import org.openide.nodes.Node;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.openide.util.lookup.Lookups;
|
||||
import org.sleuthkit.autopsy.datamodel.Md5Node;
|
||||
import org.sleuthkit.autopsy.datamodel.DisplayableItemNode;
|
||||
import org.sleuthkit.autopsy.datamodel.DisplayableItemNodeVisitor;
|
||||
|
||||
/**
|
||||
* Wrapper node for <code>Md5Node</code> used to display common files search
|
||||
* results in the top right pane. Calls <code>Md5NodeFactory</code>.
|
||||
*/
|
||||
final public class CommonFilesNode extends DisplayableItemNode {
|
||||
|
||||
CommonFilesNode(CommonFilesMetadata metadataList) {
|
||||
super(Children.create(new Md5NodeFactory(metadataList), true), Lookups.singleton(CommonFilesNode.class));
|
||||
}
|
||||
|
||||
@NbBundle.Messages({
|
||||
"CommonFilesNode.getName.text=Common Files"})
|
||||
@Override
|
||||
public String getName() {
|
||||
return Bundle.CommonFilesNode_getName_text();
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T accept(DisplayableItemNodeVisitor<T> visitor) {
|
||||
return visitor.visit(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeafTypeNode() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getItemType() {
|
||||
return getClass().getName();
|
||||
}
|
||||
|
||||
/**
|
||||
* ChildFactory which builds CommonFileParentNodes from the
|
||||
* CommonFilesMetaaData models.
|
||||
*/
|
||||
static class Md5NodeFactory extends ChildFactory<String> {
|
||||
|
||||
/**
|
||||
* List of models, each of which is a parent node matching a single md5,
|
||||
* containing children FileNodes.
|
||||
*/
|
||||
private CommonFilesMetadata metadata;
|
||||
|
||||
Md5NodeFactory(CommonFilesMetadata metadata) {
|
||||
this.metadata = metadata;
|
||||
}
|
||||
|
||||
protected void removeNotify() {
|
||||
metadata = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Node createNodeForKey(String md5) {
|
||||
Md5Metadata metadata = this.metadata.getMetadataForMd5(md5);
|
||||
return new Md5Node(metadata);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean createKeys(List<String> list) {
|
||||
list.addAll(this.metadata.getMetadata().keySet());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,261 @@
|
||||
<?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.ButtonGroup" name="dataSourcesButtonGroup">
|
||||
</Component>
|
||||
<Component class="javax.swing.ButtonGroup" name="fileTypeFilterButtonGroup">
|
||||
</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" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Component id="errorText" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="searchButton" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="cancelButton" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="categoriesLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="commonFilesSearchLabel" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="dataSourceLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace min="6" pref="6" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="29" max="-2" attributes="0"/>
|
||||
<Component id="selectDataSourceComboBox" min="-2" pref="261" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="withinDataSourceRadioButton" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="allDataSourcesRadioButton" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="allFileCategoriesRadioButton" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="selectedFileCategoriesButton" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="21" pref="21" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="pictureVideoCheckbox" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="documentsCheckbox" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="19" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</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="commonFilesSearchLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="18" max="-2" attributes="0"/>
|
||||
<Component id="dataSourceLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="allDataSourcesRadioButton" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="withinDataSourceRadioButton" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="selectDataSourceComboBox" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="categoriesLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="selectedFileCategoriesButton" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="pictureVideoCheckbox" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="documentsCheckbox" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="allFileCategoriesRadioButton" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="cancelButton" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="searchButton" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="errorText" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JButton" name="searchButton">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/commonfilesearch/Bundle.properties" key="CommonFilesPanel.searchButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="enabled" type="boolean" value="false"/>
|
||||
<Property name="horizontalTextPosition" type="int" value="10"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="searchButtonActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JRadioButton" name="allDataSourcesRadioButton">
|
||||
<Properties>
|
||||
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
|
||||
<ComponentRef name="dataSourcesButtonGroup"/>
|
||||
</Property>
|
||||
<Property name="selected" type="boolean" value="true"/>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/commonfilesearch/Bundle.properties" key="CommonFilesPanel.allDataSourcesRadioButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="0"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="allDataSourcesRadioButtonActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JRadioButton" name="withinDataSourceRadioButton">
|
||||
<Properties>
|
||||
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
|
||||
<ComponentRef name="dataSourcesButtonGroup"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/commonfilesearch/Bundle.properties" key="CommonFilesPanel.withinDataSourceRadioButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="0"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="withinDataSourceRadioButtonActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JComboBox" name="selectDataSourceComboBox">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
|
||||
<Connection code="dataSourcesList" type="code"/>
|
||||
</Property>
|
||||
<Property name="enabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="selectDataSourceComboBoxActionPerformed"/>
|
||||
</Events>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="commonFilesSearchLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/commonfilesearch/Bundle.properties" key="CommonFilesPanel.commonFilesSearchLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="cancelButton">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/commonfilesearch/Bundle.properties" key="CommonFilesPanel.cancelButton.text" 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/commonfilesearch/Bundle.properties" key="CommonFilesPanel.cancelButton.actionCommand" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="horizontalTextPosition" type="int" value="10"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="cancelButtonActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JRadioButton" name="allFileCategoriesRadioButton">
|
||||
<Properties>
|
||||
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
|
||||
<ComponentRef name="fileTypeFilterButtonGroup"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/commonfilesearch/Bundle.properties" key="CommonFilesPanel.allFileCategoriesRadioButton.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/commonfilesearch/Bundle.properties" key="CommonFilesPanel.allFileCategoriesRadioButton.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="allFileCategoriesRadioButtonActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JRadioButton" name="selectedFileCategoriesButton">
|
||||
<Properties>
|
||||
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
|
||||
<ComponentRef name="fileTypeFilterButtonGroup"/>
|
||||
</Property>
|
||||
<Property name="selected" type="boolean" value="true"/>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/commonfilesearch/Bundle.properties" key="CommonFilesPanel.selectedFileCategoriesButton.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/commonfilesearch/Bundle.properties" key="CommonFilesPanel.selectedFileCategoriesButton.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="selectedFileCategoriesButtonActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="pictureVideoCheckbox">
|
||||
<Properties>
|
||||
<Property name="selected" type="boolean" value="true"/>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/commonfilesearch/Bundle.properties" key="CommonFilesPanel.pictureVideoCheckbox.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="pictureVideoCheckboxActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="documentsCheckbox">
|
||||
<Properties>
|
||||
<Property name="selected" type="boolean" value="true"/>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/commonfilesearch/Bundle.properties" key="CommonFilesPanel.documentsCheckbox.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="documentsCheckboxActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="dataSourceLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/commonfilesearch/Bundle.properties" key="CommonFilesPanel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="name" type="java.lang.String" value="" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="categoriesLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/commonfilesearch/Bundle.properties" key="CommonFilesPanel.categoriesLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="name" type="java.lang.String" value="" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="errorText">
|
||||
<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/commonfilesearch/Bundle.properties" key="CommonFilesPanel.errorText.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Form>
|
@ -0,0 +1,616 @@
|
||||
/*
|
||||
* 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.commonfilesearch;
|
||||
|
||||
import java.io.File;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.logging.Level;
|
||||
import javax.swing.ComboBoxModel;
|
||||
import javax.swing.SwingUtilities;
|
||||
import javax.swing.SwingWorker;
|
||||
import org.openide.explorer.ExplorerManager;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.autopsy.corecomponentinterfaces.DataResultViewer;
|
||||
import org.sleuthkit.autopsy.corecomponents.DataResultTopComponent;
|
||||
import org.sleuthkit.autopsy.corecomponents.DataResultViewerTable;
|
||||
import org.sleuthkit.autopsy.corecomponents.TableFilterNode;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
|
||||
import org.sleuthkit.autopsy.directorytree.DataResultFilterNode;
|
||||
import org.sleuthkit.autopsy.directorytree.DirectoryTreeTopComponent;
|
||||
import org.sleuthkit.datamodel.SleuthkitCase;
|
||||
import org.sleuthkit.datamodel.SleuthkitCase.CaseDbQuery;
|
||||
import org.sleuthkit.datamodel.TskCoreException;
|
||||
|
||||
/**
|
||||
* Panel used for common files search configuration and configuration business
|
||||
* logic. Nested within CommonFilesDialog.
|
||||
*/
|
||||
@SuppressWarnings("PMD.SingularField") // UI widgets cause lots of false positives
|
||||
public final class CommonFilesPanel extends javax.swing.JPanel {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private static final Long NO_DATA_SOURCE_SELECTED = -1L;
|
||||
|
||||
private ComboBoxModel<String> dataSourcesList = new DataSourceComboBoxModel();
|
||||
private Map<Long, String> dataSourceMap;
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(CommonFilesPanel.class.getName());
|
||||
private boolean singleDataSource = false;
|
||||
private String selectedDataSource = "";
|
||||
private boolean pictureViewCheckboxState;
|
||||
private boolean documentsCheckboxState;
|
||||
|
||||
/**
|
||||
* Creates new form CommonFilesPanel
|
||||
*/
|
||||
@NbBundle.Messages({
|
||||
"CommonFilesPanel.title=Common Files Panel",
|
||||
"CommonFilesPanel.exception=Unexpected Exception loading DataSources."})
|
||||
public CommonFilesPanel() {
|
||||
initComponents();
|
||||
|
||||
this.setupDataSources();
|
||||
|
||||
this.errorText.setVisible(false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets up the data sources dropdown and returns the data sources map for
|
||||
* future usage.
|
||||
*
|
||||
* @return a mapping of data source ids to data source names
|
||||
*/
|
||||
@NbBundle.Messages({
|
||||
"CommonFilesPanel.buildDataSourceMap.done.tskCoreException=Unable to run query against DB.",
|
||||
"CommonFilesPanel.buildDataSourceMap.done.noCurrentCaseException=Unable to open case file.",
|
||||
"CommonFilesPanel.buildDataSourceMap.done.exception=Unexpected exception building data sources map.",
|
||||
"CommonFilesPanel.buildDataSourceMap.done.interupted=Something went wrong building the Common Files Search dialog box.",
|
||||
"CommonFilesPanel.buildDataSourceMap.done.sqlException=Unable to query db for data sources.",
|
||||
"CommonFilesPanel.buildDataSourcesMap.updateUi.noDataSources=No data sources were found."})
|
||||
private void setupDataSources() {
|
||||
|
||||
new SwingWorker<Map<Long, String>, Void>() {
|
||||
|
||||
private static final String SELECT_DATA_SOURCES_LOGICAL = "select obj_id, name from tsk_files where obj_id in (SELECT obj_id FROM tsk_objects WHERE obj_id in (select obj_id from data_source_info))";
|
||||
|
||||
private static final String SELECT_DATA_SOURCES_IMAGE = "select obj_id, name from tsk_image_names where obj_id in (SELECT obj_id FROM tsk_objects WHERE obj_id in (select obj_id from data_source_info))";
|
||||
|
||||
private void updateUi() {
|
||||
|
||||
String[] dataSourcesNames = new String[CommonFilesPanel.this.dataSourceMap.size()];
|
||||
|
||||
//only enable all this stuff if we actually have datasources
|
||||
if (dataSourcesNames.length > 0) {
|
||||
dataSourcesNames = CommonFilesPanel.this.dataSourceMap.values().toArray(dataSourcesNames);
|
||||
CommonFilesPanel.this.dataSourcesList = new DataSourceComboBoxModel(dataSourcesNames);
|
||||
CommonFilesPanel.this.selectDataSourceComboBox.setModel(CommonFilesPanel.this.dataSourcesList);
|
||||
|
||||
boolean multipleDataSources = this.caseHasMultipleSources();
|
||||
CommonFilesPanel.this.allDataSourcesRadioButton.setEnabled(multipleDataSources);
|
||||
CommonFilesPanel.this.allDataSourcesRadioButton.setSelected(multipleDataSources);
|
||||
|
||||
if (!multipleDataSources) {
|
||||
CommonFilesPanel.this.withinDataSourceRadioButton.setSelected(true);
|
||||
withinDataSourceSelected(true);
|
||||
}
|
||||
|
||||
CommonFilesPanel.this.searchButton.setEnabled(true);
|
||||
} else {
|
||||
MessageNotifyUtil.Message.info(Bundle.CommonFilesPanel_buildDataSourcesMap_updateUi_noDataSources());
|
||||
CommonFilesPanel.this.cancelButtonActionPerformed(null);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean caseHasMultipleSources() {
|
||||
return CommonFilesPanel.this.dataSourceMap.size() >= 2;
|
||||
}
|
||||
|
||||
private void loadLogicalSources(SleuthkitCase tskDb, Map<Long, String> dataSouceMap) throws TskCoreException, SQLException {
|
||||
//try block releases resources - exceptions are handled in done()
|
||||
try (
|
||||
CaseDbQuery query = tskDb.executeQuery(SELECT_DATA_SOURCES_LOGICAL);
|
||||
ResultSet resultSet = query.getResultSet()) {
|
||||
while (resultSet.next()) {
|
||||
Long objectId = resultSet.getLong(1);
|
||||
String dataSourceName = resultSet.getString(2);
|
||||
dataSouceMap.put(objectId, dataSourceName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void loadImageSources(SleuthkitCase tskDb, Map<Long, String> dataSouceMap) throws SQLException, TskCoreException {
|
||||
//try block releases resources - exceptions are handled in done()
|
||||
try (
|
||||
CaseDbQuery query = tskDb.executeQuery(SELECT_DATA_SOURCES_IMAGE);
|
||||
ResultSet resultSet = query.getResultSet()) {
|
||||
|
||||
while (resultSet.next()) {
|
||||
Long objectId = resultSet.getLong(1);
|
||||
String dataSourceName = resultSet.getString(2);
|
||||
File image = new File(dataSourceName);
|
||||
String dataSourceNameTrimmed = image.getName();
|
||||
dataSouceMap.put(objectId, dataSourceNameTrimmed);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Map<Long, String> doInBackground() throws NoCurrentCaseException, TskCoreException, SQLException {
|
||||
|
||||
Map<Long, String> dataSouceMap = new HashMap<>();
|
||||
|
||||
Case currentCase = Case.getCurrentCaseThrows();
|
||||
SleuthkitCase tskDb = currentCase.getSleuthkitCase();
|
||||
|
||||
loadLogicalSources(tskDb, dataSouceMap);
|
||||
|
||||
loadImageSources(tskDb, dataSouceMap);
|
||||
|
||||
return dataSouceMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void done() {
|
||||
|
||||
try {
|
||||
CommonFilesPanel.this.dataSourceMap = this.get();
|
||||
|
||||
updateUi();
|
||||
|
||||
} catch (InterruptedException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Interrupted while building Common Files Search dialog.", ex);
|
||||
MessageNotifyUtil.Message.error(Bundle.CommonFilesPanel_buildDataSourceMap_done_interupted());
|
||||
} catch (ExecutionException ex) {
|
||||
String errorMessage;
|
||||
Throwable inner = ex.getCause();
|
||||
if (inner instanceof TskCoreException) {
|
||||
LOGGER.log(Level.SEVERE, "Failed to load data sources from database.", ex);
|
||||
errorMessage = Bundle.CommonFilesPanel_buildDataSourceMap_done_tskCoreException();
|
||||
} else if (inner instanceof NoCurrentCaseException) {
|
||||
LOGGER.log(Level.SEVERE, "Current case has been closed.", ex);
|
||||
errorMessage = Bundle.CommonFilesPanel_buildDataSourceMap_done_noCurrentCaseException();
|
||||
} else if (inner instanceof SQLException) {
|
||||
LOGGER.log(Level.SEVERE, "Unable to query db for data sources.", ex);
|
||||
errorMessage = Bundle.CommonFilesPanel_buildDataSourceMap_done_sqlException();
|
||||
} else {
|
||||
LOGGER.log(Level.SEVERE, "Unexpected exception while building Common Files Search dialog panel.", ex);
|
||||
errorMessage = Bundle.CommonFilesPanel_buildDataSourceMap_done_exception();
|
||||
}
|
||||
MessageNotifyUtil.Message.error(errorMessage);
|
||||
}
|
||||
}
|
||||
}.execute();
|
||||
}
|
||||
|
||||
@NbBundle.Messages({
|
||||
"CommonFilesPanel.search.results.titleAll=Common Files (All Data Sources)",
|
||||
"CommonFilesPanel.search.results.titleSingle=Common Files (Match Within Data Source: %s)",
|
||||
"CommonFilesPanel.search.results.pathText=Common Files Search Results",
|
||||
"CommonFilesPanel.search.done.tskCoreException=Unable to run query against DB.",
|
||||
"CommonFilesPanel.search.done.noCurrentCaseException=Unable to open case file.",
|
||||
"CommonFilesPanel.search.done.exception=Unexpected exception running Common Files Search.",
|
||||
"CommonFilesPanel.search.done.interupted=Something went wrong finding common files.",
|
||||
"CommonFilesPanel.search.done.sqlException=Unable to query db for files or data sources."})
|
||||
private void search() {
|
||||
String pathText = Bundle.CommonFilesPanel_search_results_pathText();
|
||||
|
||||
new SwingWorker<CommonFilesMetadata, Void>() {
|
||||
|
||||
private String tabTitle;
|
||||
|
||||
private void setTitleForAllDataSources() {
|
||||
this.tabTitle = Bundle.CommonFilesPanel_search_results_titleAll();
|
||||
}
|
||||
|
||||
private void setTitleForSingleSource(Long dataSourceId) {
|
||||
final String CommonFilesPanel_search_results_titleSingle = Bundle.CommonFilesPanel_search_results_titleSingle();
|
||||
final Object[] dataSourceName = new Object[]{dataSourceMap.get(dataSourceId)};
|
||||
|
||||
this.tabTitle = String.format(CommonFilesPanel_search_results_titleSingle, dataSourceName);
|
||||
}
|
||||
|
||||
private Long determineDataSourceId() {
|
||||
Long selectedObjId = CommonFilesPanel.NO_DATA_SOURCE_SELECTED;
|
||||
if (CommonFilesPanel.this.singleDataSource) {
|
||||
for (Entry<Long, String> dataSource : CommonFilesPanel.this.dataSourceMap.entrySet()) {
|
||||
if (dataSource.getValue().equals(CommonFilesPanel.this.selectedDataSource)) {
|
||||
selectedObjId = dataSource.getKey();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return selectedObjId;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings({"BoxedValueEquality", "NumberEquality"})
|
||||
protected CommonFilesMetadata doInBackground() throws TskCoreException, NoCurrentCaseException, SQLException {
|
||||
Long dataSourceId = determineDataSourceId();
|
||||
|
||||
CommonFilesMetadataBuilder builder;
|
||||
boolean filterByMedia = false;
|
||||
boolean filterByDocuments = false;
|
||||
if (selectedFileCategoriesButton.isSelected()) {
|
||||
if (pictureVideoCheckbox.isSelected()) {
|
||||
filterByMedia = true;
|
||||
}
|
||||
if (documentsCheckbox.isSelected()) {
|
||||
filterByDocuments = true;
|
||||
}
|
||||
}
|
||||
if (dataSourceId == CommonFilesPanel.NO_DATA_SOURCE_SELECTED) {
|
||||
builder = new AllDataSourcesCommonFilesAlgorithm(CommonFilesPanel.this.dataSourceMap, filterByMedia, filterByDocuments);
|
||||
|
||||
setTitleForAllDataSources();
|
||||
} else {
|
||||
builder = new SingleDataSource(dataSourceId, CommonFilesPanel.this.dataSourceMap, filterByMedia, filterByDocuments);
|
||||
|
||||
setTitleForSingleSource(dataSourceId);
|
||||
}
|
||||
|
||||
this.tabTitle = builder.buildTabTitle();
|
||||
|
||||
CommonFilesMetadata metadata = builder.findCommonFiles();
|
||||
|
||||
return metadata;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void done() {
|
||||
try {
|
||||
super.done();
|
||||
|
||||
CommonFilesMetadata metadata = get();
|
||||
|
||||
CommonFilesNode commonFilesNode = new CommonFilesNode(metadata);
|
||||
|
||||
DataResultFilterNode dataResultFilterNode = new DataResultFilterNode(commonFilesNode, ExplorerManager.find(CommonFilesPanel.this));
|
||||
|
||||
TableFilterNode tableFilterWithDescendantsNode = new TableFilterNode(dataResultFilterNode);
|
||||
|
||||
DataResultViewerTable table = new DataResultViewerTable();
|
||||
|
||||
Collection<DataResultViewer> viewers = new ArrayList<>(1);
|
||||
viewers.add(table);
|
||||
|
||||
DataResultTopComponent.createInstance(tabTitle, pathText, tableFilterWithDescendantsNode, metadata.size(), viewers);
|
||||
|
||||
} catch (InterruptedException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Interrupted while loading Common Files", ex);
|
||||
MessageNotifyUtil.Message.error(Bundle.CommonFilesPanel_search_done_interupted());
|
||||
} catch (ExecutionException ex) {
|
||||
String errorMessage;
|
||||
Throwable inner = ex.getCause();
|
||||
if (inner instanceof TskCoreException) {
|
||||
LOGGER.log(Level.SEVERE, "Failed to load files from database.", ex);
|
||||
errorMessage = Bundle.CommonFilesPanel_search_done_tskCoreException();
|
||||
} else if (inner instanceof NoCurrentCaseException) {
|
||||
LOGGER.log(Level.SEVERE, "Current case has been closed.", ex);
|
||||
errorMessage = Bundle.CommonFilesPanel_search_done_noCurrentCaseException();
|
||||
} else if (inner instanceof SQLException) {
|
||||
LOGGER.log(Level.SEVERE, "Unable to query db for files.", ex);
|
||||
errorMessage = Bundle.CommonFilesPanel_search_done_sqlException();
|
||||
} else {
|
||||
LOGGER.log(Level.SEVERE, "Unexpected exception while running Common Files Search.", ex);
|
||||
errorMessage = Bundle.CommonFilesPanel_search_done_exception();
|
||||
}
|
||||
MessageNotifyUtil.Message.error(errorMessage);
|
||||
}
|
||||
}
|
||||
}.execute();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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() {
|
||||
|
||||
dataSourcesButtonGroup = new javax.swing.ButtonGroup();
|
||||
fileTypeFilterButtonGroup = new javax.swing.ButtonGroup();
|
||||
searchButton = new javax.swing.JButton();
|
||||
allDataSourcesRadioButton = new javax.swing.JRadioButton();
|
||||
withinDataSourceRadioButton = new javax.swing.JRadioButton();
|
||||
selectDataSourceComboBox = new javax.swing.JComboBox<>();
|
||||
commonFilesSearchLabel = new javax.swing.JLabel();
|
||||
cancelButton = new javax.swing.JButton();
|
||||
allFileCategoriesRadioButton = new javax.swing.JRadioButton();
|
||||
selectedFileCategoriesButton = new javax.swing.JRadioButton();
|
||||
pictureVideoCheckbox = new javax.swing.JCheckBox();
|
||||
documentsCheckbox = new javax.swing.JCheckBox();
|
||||
dataSourceLabel = new javax.swing.JLabel();
|
||||
categoriesLabel = new javax.swing.JLabel();
|
||||
errorText = new javax.swing.JLabel();
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(searchButton, org.openide.util.NbBundle.getMessage(CommonFilesPanel.class, "CommonFilesPanel.searchButton.text")); // NOI18N
|
||||
searchButton.setEnabled(false);
|
||||
searchButton.setHorizontalTextPosition(javax.swing.SwingConstants.LEADING);
|
||||
searchButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
searchButtonActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
dataSourcesButtonGroup.add(allDataSourcesRadioButton);
|
||||
allDataSourcesRadioButton.setSelected(true);
|
||||
org.openide.awt.Mnemonics.setLocalizedText(allDataSourcesRadioButton, org.openide.util.NbBundle.getMessage(CommonFilesPanel.class, "CommonFilesPanel.allDataSourcesRadioButton.text")); // NOI18N
|
||||
allDataSourcesRadioButton.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||
allDataSourcesRadioButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
allDataSourcesRadioButtonActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
dataSourcesButtonGroup.add(withinDataSourceRadioButton);
|
||||
org.openide.awt.Mnemonics.setLocalizedText(withinDataSourceRadioButton, org.openide.util.NbBundle.getMessage(CommonFilesPanel.class, "CommonFilesPanel.withinDataSourceRadioButton.text")); // NOI18N
|
||||
withinDataSourceRadioButton.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||
withinDataSourceRadioButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
withinDataSourceRadioButtonActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
selectDataSourceComboBox.setModel(dataSourcesList);
|
||||
selectDataSourceComboBox.setEnabled(false);
|
||||
selectDataSourceComboBox.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
selectDataSourceComboBoxActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(commonFilesSearchLabel, org.openide.util.NbBundle.getMessage(CommonFilesPanel.class, "CommonFilesPanel.commonFilesSearchLabel.text")); // NOI18N
|
||||
commonFilesSearchLabel.setFocusable(false);
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(cancelButton, org.openide.util.NbBundle.getMessage(CommonFilesPanel.class, "CommonFilesPanel.cancelButton.text")); // NOI18N
|
||||
cancelButton.setActionCommand(org.openide.util.NbBundle.getMessage(CommonFilesPanel.class, "CommonFilesPanel.cancelButton.actionCommand")); // NOI18N
|
||||
cancelButton.setHorizontalTextPosition(javax.swing.SwingConstants.LEADING);
|
||||
cancelButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
cancelButtonActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
fileTypeFilterButtonGroup.add(allFileCategoriesRadioButton);
|
||||
org.openide.awt.Mnemonics.setLocalizedText(allFileCategoriesRadioButton, org.openide.util.NbBundle.getMessage(CommonFilesPanel.class, "CommonFilesPanel.allFileCategoriesRadioButton.text")); // NOI18N
|
||||
allFileCategoriesRadioButton.setToolTipText(org.openide.util.NbBundle.getMessage(CommonFilesPanel.class, "CommonFilesPanel.allFileCategoriesRadioButton.toolTipText")); // NOI18N
|
||||
allFileCategoriesRadioButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
allFileCategoriesRadioButtonActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
fileTypeFilterButtonGroup.add(selectedFileCategoriesButton);
|
||||
selectedFileCategoriesButton.setSelected(true);
|
||||
org.openide.awt.Mnemonics.setLocalizedText(selectedFileCategoriesButton, org.openide.util.NbBundle.getMessage(CommonFilesPanel.class, "CommonFilesPanel.selectedFileCategoriesButton.text")); // NOI18N
|
||||
selectedFileCategoriesButton.setToolTipText(org.openide.util.NbBundle.getMessage(CommonFilesPanel.class, "CommonFilesPanel.selectedFileCategoriesButton.toolTipText")); // NOI18N
|
||||
selectedFileCategoriesButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
selectedFileCategoriesButtonActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
pictureVideoCheckbox.setSelected(true);
|
||||
org.openide.awt.Mnemonics.setLocalizedText(pictureVideoCheckbox, org.openide.util.NbBundle.getMessage(CommonFilesPanel.class, "CommonFilesPanel.pictureVideoCheckbox.text")); // NOI18N
|
||||
pictureVideoCheckbox.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
pictureVideoCheckboxActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
documentsCheckbox.setSelected(true);
|
||||
org.openide.awt.Mnemonics.setLocalizedText(documentsCheckbox, org.openide.util.NbBundle.getMessage(CommonFilesPanel.class, "CommonFilesPanel.documentsCheckbox.text")); // NOI18N
|
||||
documentsCheckbox.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
documentsCheckboxActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(dataSourceLabel, org.openide.util.NbBundle.getMessage(CommonFilesPanel.class, "CommonFilesPanel.text")); // NOI18N
|
||||
dataSourceLabel.setName(""); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(categoriesLabel, org.openide.util.NbBundle.getMessage(CommonFilesPanel.class, "CommonFilesPanel.categoriesLabel.text")); // NOI18N
|
||||
categoriesLabel.setName(""); // NOI18N
|
||||
|
||||
errorText.setForeground(new java.awt.Color(255, 0, 0));
|
||||
org.openide.awt.Mnemonics.setLocalizedText(errorText, org.openide.util.NbBundle.getMessage(CommonFilesPanel.class, "CommonFilesPanel.errorText.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, false)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||
.addComponent(errorText)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(searchButton)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(cancelButton)
|
||||
.addContainerGap())
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(categoriesLabel)
|
||||
.addComponent(commonFilesSearchLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(dataSourceLabel)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGap(6, 6, 6)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGap(29, 29, 29)
|
||||
.addComponent(selectDataSourceComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 261, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(withinDataSourceRadioButton)
|
||||
.addComponent(allDataSourcesRadioButton)
|
||||
.addComponent(allFileCategoriesRadioButton)
|
||||
.addComponent(selectedFileCategoriesButton)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGap(21, 21, 21)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(pictureVideoCheckbox)
|
||||
.addComponent(documentsCheckbox))))))
|
||||
.addGap(19, 19, 19))))
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(commonFilesSearchLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(dataSourceLabel)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(allDataSourcesRadioButton)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(withinDataSourceRadioButton)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(selectDataSourceComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(categoriesLabel)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(selectedFileCategoriesButton)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(pictureVideoCheckbox)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(documentsCheckbox)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(allFileCategoriesRadioButton)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(cancelButton)
|
||||
.addComponent(searchButton)
|
||||
.addComponent(errorText)))
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void searchButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_searchButtonActionPerformed
|
||||
search();
|
||||
SwingUtilities.windowForComponent(this).dispose();
|
||||
}//GEN-LAST:event_searchButtonActionPerformed
|
||||
|
||||
private void allDataSourcesRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_allDataSourcesRadioButtonActionPerformed
|
||||
selectDataSourceComboBox.setEnabled(!allDataSourcesRadioButton.isSelected());
|
||||
singleDataSource = false;
|
||||
}//GEN-LAST:event_allDataSourcesRadioButtonActionPerformed
|
||||
|
||||
private void selectDataSourceComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_selectDataSourceComboBoxActionPerformed
|
||||
final Object selectedItem = selectDataSourceComboBox.getSelectedItem();
|
||||
if (selectedItem != null) {
|
||||
selectedDataSource = selectedItem.toString();
|
||||
} else {
|
||||
selectedDataSource = "";
|
||||
}
|
||||
}//GEN-LAST:event_selectDataSourceComboBoxActionPerformed
|
||||
|
||||
private void withinDataSourceRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_withinDataSourceRadioButtonActionPerformed
|
||||
withinDataSourceSelected(withinDataSourceRadioButton.isSelected());
|
||||
}//GEN-LAST:event_withinDataSourceRadioButtonActionPerformed
|
||||
|
||||
private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed
|
||||
SwingUtilities.windowForComponent(this).dispose();
|
||||
}//GEN-LAST:event_cancelButtonActionPerformed
|
||||
|
||||
private void allFileCategoriesRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_allFileCategoriesRadioButtonActionPerformed
|
||||
this.manageCheckBoxState();
|
||||
this.toggleErrorTextAndSearchBox();
|
||||
}//GEN-LAST:event_allFileCategoriesRadioButtonActionPerformed
|
||||
|
||||
private void selectedFileCategoriesButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_selectedFileCategoriesButtonActionPerformed
|
||||
this.manageCheckBoxState();
|
||||
}//GEN-LAST:event_selectedFileCategoriesButtonActionPerformed
|
||||
|
||||
private void pictureVideoCheckboxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_pictureVideoCheckboxActionPerformed
|
||||
this.toggleErrorTextAndSearchBox();
|
||||
}//GEN-LAST:event_pictureVideoCheckboxActionPerformed
|
||||
|
||||
private void documentsCheckboxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_documentsCheckboxActionPerformed
|
||||
this.toggleErrorTextAndSearchBox();
|
||||
}//GEN-LAST:event_documentsCheckboxActionPerformed
|
||||
|
||||
private void toggleErrorTextAndSearchBox() {
|
||||
if (!this.pictureVideoCheckbox.isSelected() && !this.documentsCheckbox.isSelected() && !this.allFileCategoriesRadioButton.isSelected()) {
|
||||
this.searchButton.setEnabled(false);
|
||||
this.errorText.setVisible(true);
|
||||
} else {
|
||||
this.searchButton.setEnabled(true);
|
||||
this.errorText.setVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
private void withinDataSourceSelected(boolean selected) {
|
||||
selectDataSourceComboBox.setEnabled(selected);
|
||||
if (selectDataSourceComboBox.isEnabled()) {
|
||||
selectDataSourceComboBox.setSelectedIndex(0);
|
||||
singleDataSource = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void manageCheckBoxState() {
|
||||
|
||||
if (this.allFileCategoriesRadioButton.isSelected()) {
|
||||
|
||||
this.pictureViewCheckboxState = this.pictureVideoCheckbox.isSelected();
|
||||
this.documentsCheckboxState = this.documentsCheckbox.isSelected();
|
||||
|
||||
this.pictureVideoCheckbox.setEnabled(false);
|
||||
this.documentsCheckbox.setEnabled(false);
|
||||
}
|
||||
|
||||
if (this.selectedFileCategoriesButton.isSelected()) {
|
||||
|
||||
this.pictureVideoCheckbox.setSelected(this.pictureViewCheckboxState);
|
||||
this.documentsCheckbox.setSelected(this.documentsCheckboxState);
|
||||
|
||||
this.pictureVideoCheckbox.setEnabled(true);
|
||||
this.documentsCheckbox.setEnabled(true);
|
||||
|
||||
this.toggleErrorTextAndSearchBox();
|
||||
}
|
||||
}
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JRadioButton allDataSourcesRadioButton;
|
||||
private javax.swing.JRadioButton allFileCategoriesRadioButton;
|
||||
private javax.swing.JButton cancelButton;
|
||||
private javax.swing.JLabel categoriesLabel;
|
||||
private javax.swing.JLabel commonFilesSearchLabel;
|
||||
private javax.swing.JLabel dataSourceLabel;
|
||||
private javax.swing.ButtonGroup dataSourcesButtonGroup;
|
||||
private javax.swing.JCheckBox documentsCheckbox;
|
||||
private javax.swing.JLabel errorText;
|
||||
private javax.swing.ButtonGroup fileTypeFilterButtonGroup;
|
||||
private javax.swing.JCheckBox pictureVideoCheckbox;
|
||||
private javax.swing.JButton searchButton;
|
||||
private javax.swing.JComboBox<String> selectDataSourceComboBox;
|
||||
private javax.swing.JRadioButton selectedFileCategoriesButton;
|
||||
private javax.swing.JRadioButton withinDataSourceRadioButton;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
/*
|
||||
* 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.commonfilesearch;
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
import org.openide.util.HelpCtx;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.openide.util.actions.CallableSystemAction;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.core.Installer;
|
||||
|
||||
/**
|
||||
* Encapsulates a menu action which triggers the common files search dialog.
|
||||
*/
|
||||
final public class CommonFilesSearchAction extends CallableSystemAction {
|
||||
|
||||
private static CommonFilesSearchAction instance = null;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
CommonFilesSearchAction() {
|
||||
super();
|
||||
this.setEnabled(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEnabled(){
|
||||
return super.isEnabled() && Case.isCaseOpen() && Installer.isJavaFxInited();
|
||||
}
|
||||
|
||||
public static synchronized CommonFilesSearchAction getDefault() {
|
||||
if (instance == null) {
|
||||
instance = new CommonFilesSearchAction();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent event) {
|
||||
new CommonFilesDialog().setVisible(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void performAction() {
|
||||
new CommonFilesDialog().setVisible(true);
|
||||
}
|
||||
|
||||
@NbBundle.Messages({
|
||||
"CommonFilesAction.getName.text=Common Files Search"})
|
||||
@Override
|
||||
public String getName() {
|
||||
return Bundle.CommonFilesAction_getName_text();
|
||||
}
|
||||
|
||||
@Override
|
||||
public HelpCtx getHelpCtx() {
|
||||
return HelpCtx.DEFAULT_HELP;
|
||||
}
|
||||
}
|
@ -0,0 +1,80 @@
|
||||
/*
|
||||
*
|
||||
* 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.commonfilesearch;
|
||||
|
||||
import javax.swing.AbstractListModel;
|
||||
import javax.swing.ComboBoxModel;
|
||||
import javax.swing.event.ListDataListener;
|
||||
|
||||
/**
|
||||
* Encapsulates meta data needed to populate the data source selection drop down menu
|
||||
*/
|
||||
public class DataSourceComboBoxModel extends AbstractListModel<String> implements ComboBoxModel<String> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private final String[] dataSourceList;
|
||||
String selection = null;
|
||||
|
||||
/**
|
||||
* Use this to initialize the panel
|
||||
*/
|
||||
DataSourceComboBoxModel() {
|
||||
this.dataSourceList = new String[0];
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this when we have data to display.
|
||||
*
|
||||
* @param theDataSoureList names of data sources for user to pick from
|
||||
*/
|
||||
DataSourceComboBoxModel(String... theDataSoureList) {
|
||||
dataSourceList = theDataSoureList.clone();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSelectedItem(Object anItem) {
|
||||
selection = (String) anItem;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getSelectedItem() {
|
||||
return selection;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSize() {
|
||||
return dataSourceList.length;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getElementAt(int index) {
|
||||
return dataSourceList[index];
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addListDataListener(ListDataListener listener) {
|
||||
this.listenerList.add(ListDataListener.class, listener);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeListDataListener(ListDataListener listener) {
|
||||
this.listenerList.remove(ListDataListener.class, listener);
|
||||
}
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
/*
|
||||
*
|
||||
* 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.commonfilesearch;
|
||||
|
||||
/**
|
||||
* Encapsulates data required to instantiate a <code>FileInstanceNode</code>.
|
||||
*/
|
||||
final public class FileInstanceMetadata {
|
||||
|
||||
private final Long objectId;
|
||||
private final String dataSourceName;
|
||||
|
||||
/**
|
||||
* Create meta data required to find an abstract file and build a
|
||||
* FileInstanceNode.
|
||||
*
|
||||
* @param objectId id of abstract file to find
|
||||
* @param dataSourceName name of datasource where the object is found
|
||||
*/
|
||||
FileInstanceMetadata(Long objectId, String dataSourceName) {
|
||||
this.objectId = objectId;
|
||||
this.dataSourceName = dataSourceName;
|
||||
}
|
||||
|
||||
/**
|
||||
* obj_id for the file represented by this object
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Long getObjectId() {
|
||||
return this.objectId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Name of datasource where this instance was found.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getDataSourceName() {
|
||||
return this.dataSourceName;
|
||||
}
|
||||
}
|
@ -0,0 +1,68 @@
|
||||
/*
|
||||
*
|
||||
* 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.commonfilesearch;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* Encapsulates data required to instantiate an <code>Md5Node</code>.
|
||||
*/
|
||||
final public class Md5Metadata {
|
||||
|
||||
private final String md5;
|
||||
private final List<FileInstanceMetadata> fileInstances;
|
||||
|
||||
Md5Metadata(String md5, List<FileInstanceMetadata> fileInstances){
|
||||
this.md5 = md5;
|
||||
this.fileInstances = fileInstances;
|
||||
}
|
||||
|
||||
public String getMd5(){
|
||||
return this.md5;
|
||||
}
|
||||
|
||||
void addFileInstanceMetadata(FileInstanceMetadata metadata){
|
||||
this.fileInstances.add(metadata);
|
||||
}
|
||||
|
||||
public Collection<FileInstanceMetadata> getMetadata(){
|
||||
return Collections.unmodifiableCollection(this.fileInstances);
|
||||
}
|
||||
|
||||
/**
|
||||
* How many distinct file instances exist for the MD5 represented by this object?
|
||||
* @return number of instances
|
||||
*/
|
||||
public int size(){
|
||||
return this.fileInstances.size();
|
||||
}
|
||||
|
||||
public String getDataSources() {
|
||||
Set<String> sources = new HashSet<> ();
|
||||
for(FileInstanceMetadata data : this.fileInstances){
|
||||
sources.add(data.getDataSourceName());
|
||||
}
|
||||
return String.join(", ", sources);
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
/*
|
||||
*
|
||||
* 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.commonfilesearch;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Provides logic for selecting common files from a single data source.
|
||||
*/
|
||||
final class SingleDataSource extends CommonFilesMetadataBuilder {
|
||||
|
||||
private static final String WHERE_CLAUSE = "%s md5 in (select md5 from tsk_files where md5 in (select md5 from tsk_files where (known != 1 OR known IS NULL) and data_source_obj_id=%s%s) GROUP BY md5 HAVING COUNT(*) > 1) order by md5"; //NON-NLS
|
||||
private final Long selectedDataSourceId;
|
||||
private final String dataSourceName;
|
||||
|
||||
/**
|
||||
* Implements the algorithm for getting common files that appear at least
|
||||
* once in the given data source.
|
||||
*
|
||||
* @param dataSourceId data source id for which common files must appear at
|
||||
* least once
|
||||
* @param dataSourceIdMap a map of obj_id to datasource name
|
||||
* @param filterByMediaMimeType match only on files whose mime types can be broadly categorized as media types
|
||||
* @param filterByDocMimeType match only on files whose mime types can be broadly categorized as document types
|
||||
*/
|
||||
SingleDataSource(Long dataSourceId, Map<Long, String> dataSourceIdMap, boolean filterByMediaMimeType, boolean filterByDocMimeType) {
|
||||
super(dataSourceIdMap, filterByMediaMimeType, filterByDocMimeType);
|
||||
this.selectedDataSourceId = dataSourceId;
|
||||
this.dataSourceName = dataSourceIdMap.get(this.selectedDataSourceId);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String buildSqlSelectStatement() {
|
||||
Object[] args = new String[]{SELECT_PREFIX, Long.toString(this.selectedDataSourceId), determineMimeTypeFilter()};
|
||||
return String.format(SingleDataSource.WHERE_CLAUSE, args);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String buildTabTitle() {
|
||||
final String buildCategorySelectionString = this.buildCategorySelectionString();
|
||||
final String titleTemplate = Bundle.CommonFilesMetadataBuilder_buildTabTitle_titleSingle();
|
||||
return String.format(titleTemplate, new Object[]{this.dataSourceName, buildCategorySelectionString});
|
||||
}
|
||||
}
|
@ -104,7 +104,7 @@ final class AccountDeviceInstanceKey {
|
||||
|
||||
private static String getDataSourceName(AccountDeviceInstance accountDeviceInstance) {
|
||||
try {
|
||||
SleuthkitCase db = Case.getOpenCase().getSleuthkitCase();
|
||||
SleuthkitCase db = Case.getCurrentCaseThrows().getSleuthkitCase();
|
||||
for (DataSource dataSource : db.getDataSources()) {
|
||||
if (dataSource.getDeviceId().equals(accountDeviceInstance.getDeviceId())) {
|
||||
return db.getContentById(dataSource.getId()).getName();
|
||||
|
@ -74,11 +74,11 @@ final class AccountDeviceInstanceNode extends AbstractNode {
|
||||
@Override
|
||||
@NbBundle.Messages(value = {"AccountNode.device=Device", "AccountNode.accountName=Account", "AccountNode.accountType=Type", "AccountNode.messageCount=Msgs"})
|
||||
protected Sheet createSheet() {
|
||||
Sheet s = super.createSheet();
|
||||
Sheet.Set properties = s.get(Sheet.PROPERTIES);
|
||||
Sheet sheet = super.createSheet();
|
||||
Sheet.Set properties = sheet.get(Sheet.PROPERTIES);
|
||||
if (properties == null) {
|
||||
properties = Sheet.createPropertiesSet();
|
||||
s.put(properties);
|
||||
sheet.put(properties);
|
||||
}
|
||||
properties.put(new NodeProperty<>("type",
|
||||
Bundle.AccountNode_accountType(),
|
||||
@ -92,7 +92,7 @@ final class AccountDeviceInstanceNode extends AbstractNode {
|
||||
Bundle.AccountNode_device(),
|
||||
"device",
|
||||
accountDeviceInstanceKey.getDataSourceName())); // NON-NLS
|
||||
return s;
|
||||
return sheet;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -121,7 +121,7 @@ public final class AccountsBrowser extends JPanel implements ExplorerManager.Pro
|
||||
@Subscribe
|
||||
public void handleFilterEvent(CVTEvents.FilterChangeEvent filterChangeEvent) {
|
||||
try {
|
||||
final CommunicationsManager commsManager = Case.getOpenCase().getSleuthkitCase().getCommunicationsManager();
|
||||
final CommunicationsManager commsManager = Case.getCurrentCaseThrows().getSleuthkitCase().getCommunicationsManager();
|
||||
accountsTableEM.setRootContext(new AbstractNode(Children.create(new AccountDeviceInstanceNodeFactory(commsManager, filterChangeEvent.getNewFilter()), true)));
|
||||
} catch (TskCoreException ex) {
|
||||
logger.log(Level.SEVERE, "There was an error getting the CommunicationsManager for the current case.", ex);
|
||||
|
@ -209,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.getOpenCase().getSleuthkitCase().getCommunicationsManager();
|
||||
//final CommunicationsManager communicationsManager = Case.getCurrentOpenCase().getSleuthkitCase().getCommunicationsManager();
|
||||
//List<Account.Type> accountTypesInUse = communicationsManager.getAccountTypesInUse();
|
||||
//accountTypesInUSe.forEach(...)
|
||||
Account.Type.PREDEFINED_ACCOUNT_TYPES.forEach(type -> {
|
||||
@ -240,7 +240,7 @@ final public class FiltersPanel extends JPanel {
|
||||
*/
|
||||
private void updateDeviceFilter(boolean initialState) {
|
||||
try {
|
||||
final SleuthkitCase sleuthkitCase = Case.getOpenCase().getSleuthkitCase();
|
||||
final SleuthkitCase sleuthkitCase = Case.getCurrentCaseThrows().getSleuthkitCase();
|
||||
|
||||
for (DataSource dataSource : sleuthkitCase.getDataSources()) {
|
||||
String dsName = sleuthkitCase.getContentById(dataSource.getId()).getName();
|
||||
|
@ -128,7 +128,7 @@ public final class MessageBrowser extends JPanel implements ExplorerManager.Prov
|
||||
public void propertyChange(PropertyChangeEvent pce) {
|
||||
if (pce.getPropertyName().equals(ExplorerManager.PROP_SELECTED_NODES)) {
|
||||
final Node[] selectedNodes = MessageBrowser.this.tableEM.getSelectedNodes();
|
||||
messagesResultPanel.setNumMatches(0);
|
||||
messagesResultPanel.setNumberOfChildNodes(0);
|
||||
messagesResultPanel.setNode(null);
|
||||
messagesResultPanel.setPath("");
|
||||
if (selectedNodes.length > 0) {
|
||||
|
@ -56,14 +56,14 @@ final class RelationshipNode extends BlackboardArtifactNode {
|
||||
|
||||
@Override
|
||||
protected Sheet createSheet() {
|
||||
Sheet s = new Sheet();
|
||||
Sheet.Set ss = s.get(Sheet.PROPERTIES);
|
||||
if (ss == null) {
|
||||
ss = Sheet.createPropertiesSet();
|
||||
s.put(ss);
|
||||
Sheet sheet = new Sheet();
|
||||
Sheet.Set sheetSet = sheet.get(Sheet.PROPERTIES);
|
||||
if (sheetSet == null) {
|
||||
sheetSet = Sheet.createPropertiesSet();
|
||||
sheet.put(sheetSet);
|
||||
}
|
||||
|
||||
ss.put(new NodeProperty<>("Type", "Type", "Type", getDisplayName()));
|
||||
sheetSet.put(new NodeProperty<>("Type", "Type", "Type", getDisplayName()));
|
||||
|
||||
final BlackboardArtifact artifact = getArtifact();
|
||||
BlackboardArtifact.ARTIFACT_TYPE fromID = BlackboardArtifact.ARTIFACT_TYPE.fromID(getArtifact().getArtifactTypeID());
|
||||
@ -71,42 +71,42 @@ final class RelationshipNode extends BlackboardArtifactNode {
|
||||
//Consider refactoring this to reduce boilerplate
|
||||
switch (fromID) {
|
||||
case TSK_EMAIL_MSG:
|
||||
ss.put(new NodeProperty<>("From", "From", "From",
|
||||
sheetSet.put(new NodeProperty<>("From", "From", "From",
|
||||
StringUtils.strip(getAttributeDisplayString(artifact, TSK_EMAIL_FROM), " \t\n;")));
|
||||
ss.put(new NodeProperty<>("To", "To", "To",
|
||||
sheetSet.put(new NodeProperty<>("To", "To", "To",
|
||||
StringUtils.strip(getAttributeDisplayString(artifact, TSK_EMAIL_TO), " \t\n;")));
|
||||
ss.put(new NodeProperty<>("Date", "Date", "Date",
|
||||
sheetSet.put(new NodeProperty<>("Date", "Date", "Date",
|
||||
getAttributeDisplayString(artifact, TSK_DATETIME_SENT)));
|
||||
ss.put(new NodeProperty<>("Subject", "Subject", "Subject",
|
||||
sheetSet.put(new NodeProperty<>("Subject", "Subject", "Subject",
|
||||
getAttributeDisplayString(artifact, TSK_SUBJECT)));
|
||||
try {
|
||||
ss.put(new NodeProperty<>("Attms", "Attms", "Attms", artifact.getChildrenCount()));
|
||||
sheetSet.put(new NodeProperty<>("Attms", "Attms", "Attms", artifact.getChildrenCount()));
|
||||
} catch (TskCoreException ex) {
|
||||
logger.log(Level.WARNING, "Error loading attachment count for " + artifact, ex);
|
||||
}
|
||||
|
||||
break;
|
||||
case TSK_MESSAGE:
|
||||
ss.put(new NodeProperty<>("From", "From", "From",
|
||||
sheetSet.put(new NodeProperty<>("From", "From", "From",
|
||||
getAttributeDisplayString(artifact, TSK_PHONE_NUMBER_FROM)));
|
||||
ss.put(new NodeProperty<>("To", "To", "To",
|
||||
sheetSet.put(new NodeProperty<>("To", "To", "To",
|
||||
getAttributeDisplayString(artifact, TSK_PHONE_NUMBER_TO)));
|
||||
ss.put(new NodeProperty<>("Date", "Date", "Date",
|
||||
sheetSet.put(new NodeProperty<>("Date", "Date", "Date",
|
||||
getAttributeDisplayString(artifact, TSK_DATETIME)));
|
||||
ss.put(new NodeProperty<>("Subject", "Subject", "Subject",
|
||||
sheetSet.put(new NodeProperty<>("Subject", "Subject", "Subject",
|
||||
getAttributeDisplayString(artifact, TSK_SUBJECT)));
|
||||
try {
|
||||
ss.put(new NodeProperty<>("Attms", "Attms", "Attms", artifact.getChildrenCount()));
|
||||
sheetSet.put(new NodeProperty<>("Attms", "Attms", "Attms", artifact.getChildrenCount()));
|
||||
} catch (TskCoreException ex) {
|
||||
logger.log(Level.WARNING, "Error loading attachment count for " + artifact, ex);
|
||||
}
|
||||
break;
|
||||
case TSK_CALLLOG:
|
||||
ss.put(new NodeProperty<>("From", "From", "From",
|
||||
sheetSet.put(new NodeProperty<>("From", "From", "From",
|
||||
getAttributeDisplayString(artifact, TSK_PHONE_NUMBER_FROM)));
|
||||
ss.put(new NodeProperty<>("To", "To", "To",
|
||||
sheetSet.put(new NodeProperty<>("To", "To", "To",
|
||||
getAttributeDisplayString(artifact, TSK_PHONE_NUMBER_TO)));
|
||||
ss.put(new NodeProperty<>("Date", "Date", "Date",
|
||||
sheetSet.put(new NodeProperty<>("Date", "Date", "Date",
|
||||
getAttributeDisplayString(artifact, TSK_DATETIME_START)));
|
||||
break;
|
||||
default:
|
||||
@ -114,9 +114,9 @@ final class RelationshipNode extends BlackboardArtifactNode {
|
||||
}
|
||||
}
|
||||
|
||||
addTagProperty(ss);
|
||||
addTagProperty(sheetSet);
|
||||
|
||||
return s;
|
||||
return sheet;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -208,11 +208,6 @@ final public class VisualizationPanel extends JPanel implements Lookup.Provider
|
||||
applyLayout(fastOrganicLayout);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param layoutButton the value of layoutButton
|
||||
* @param layout the value of layout
|
||||
*/
|
||||
@Override
|
||||
public Lookup getLookup() {
|
||||
return proxyLookup;
|
||||
@ -300,7 +295,7 @@ final public class VisualizationPanel extends JPanel implements Lookup.Provider
|
||||
windowAncestor = (Frame) SwingUtilities.getAncestorOfClass(Frame.class, this);
|
||||
|
||||
try {
|
||||
commsManager = Case.getOpenCase().getSleuthkitCase().getCommunicationsManager();
|
||||
commsManager = Case.getCurrentCaseThrows().getSleuthkitCase().getCommunicationsManager();
|
||||
} catch (TskCoreException ex) {
|
||||
logger.log(Level.SEVERE, "Error getting CommunicationsManager for the current case.", ex);
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
|
@ -33,7 +33,7 @@ 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 {
|
||||
class EpochTimeCellRenderer extends DefaultTableCellRenderer {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final Logger LOGGER = Logger.getLogger(FileViewer.class.getName());
|
||||
|
@ -139,7 +139,7 @@ public class FXVideoPanel extends MediaViewVideoPanel {
|
||||
|
||||
final File tempFile;
|
||||
try {
|
||||
tempFile = VideoUtils.getTempVideoFile(currentFile);
|
||||
tempFile = VideoUtils.getVideoFileInTempDir(currentFile);
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
logger.log(Level.SEVERE, "Exception while getting open case.", ex); //NON-NLS
|
||||
return;
|
||||
|
@ -16,7 +16,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.corecomponentinterfaces;
|
||||
package org.sleuthkit.autopsy.contentviewers;
|
||||
|
||||
import java.awt.Component;
|
||||
import java.util.List;
|
||||
@ -26,7 +26,7 @@ import org.sleuthkit.datamodel.AbstractFile;
|
||||
* Defines an interface for application specific content viewer
|
||||
*
|
||||
*/
|
||||
public interface FileTypeViewer {
|
||||
interface FileTypeViewer {
|
||||
|
||||
/**
|
||||
* Returns list of MIME types supported by this viewer
|
||||
@ -45,6 +45,11 @@ public interface FileTypeViewer {
|
||||
|
||||
/**
|
||||
* Clears the data in the panel
|
||||
*
|
||||
* IMPORTANT IF MAKING THIS PUBLIC: I (RC) am not sure that this method
|
||||
* belongs in this interface. If we are not going to use setFile(null) as a
|
||||
* reset method as in DataContentViewer and DataResultViewer, then this is
|
||||
* fine. Otherwise, it is ambiguous.
|
||||
*/
|
||||
void resetComponent();
|
||||
}
|
@ -31,7 +31,6 @@ 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
|
||||
|
@ -198,7 +198,7 @@ public class GstVideoPanel extends MediaViewVideoPanel {
|
||||
|
||||
java.io.File ioFile;
|
||||
try {
|
||||
ioFile = VideoUtils.getTempVideoFile(file);
|
||||
ioFile = VideoUtils.getVideoFileInTempDir(file);
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
logger.log(Level.SEVERE, "Exception while getting open case.", ex); //NON-NLS
|
||||
infoLabel.setText(Bundle.GstVideoPanel_noOpenCase_errMsg());
|
||||
@ -552,7 +552,7 @@ public class GstVideoPanel extends MediaViewVideoPanel {
|
||||
} else if (state.equals(State.READY)) {
|
||||
final File tempVideoFile;
|
||||
try {
|
||||
tempVideoFile = VideoUtils.getTempVideoFile(currentFile);
|
||||
tempVideoFile = VideoUtils.getVideoFileInTempDir(currentFile);
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
logger.log(Level.WARNING, "Exception while getting open case."); //NON-NLS
|
||||
infoLabel.setText(MEDIA_PLAYER_ERROR_STRING);
|
||||
|
@ -24,14 +24,13 @@ import java.awt.Dimension;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
import org.sleuthkit.autopsy.corecomponentinterfaces.FileTypeViewer;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.datamodel.AbstractFile;
|
||||
|
||||
/**
|
||||
* Media content viewer for videos, sounds and images.
|
||||
*/
|
||||
public class MediaFileViewer extends javax.swing.JPanel implements FileTypeViewer {
|
||||
class MediaFileViewer extends javax.swing.JPanel implements FileTypeViewer {
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(MediaFileViewer.class.getName());
|
||||
private AbstractFile lastFile;
|
||||
|
@ -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");
|
||||
@ -47,7 +47,6 @@ import org.controlsfx.control.MaskerPane;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.python.google.common.collect.Lists;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
//import org.sleuthkit.autopsy.corecomponents.Bundle;
|
||||
import org.sleuthkit.autopsy.coreutils.ImageUtils;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.datamodel.FileNode;
|
||||
@ -61,7 +60,7 @@ import org.sleuthkit.datamodel.AbstractFile;
|
||||
@NbBundle.Messages({"MediaViewImagePanel.externalViewerButton.text=Open in External Viewer",
|
||||
"MediaViewImagePanel.errorLabel.text=Could not load file into Media View.",
|
||||
"MediaViewImagePanel.errorLabel.OOMText=Could not load file into Media View: insufficent memory."})
|
||||
public class MediaViewImagePanel extends JPanel implements MediaFileViewer.MediaViewPanel {
|
||||
class MediaViewImagePanel extends JPanel implements MediaFileViewer.MediaViewPanel {
|
||||
|
||||
private static final Image EXTERNAL = new Image(MediaViewImagePanel.class.getResource("/org/sleuthkit/autopsy/images/external.png").toExternalForm());
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2013 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");
|
||||
@ -35,7 +35,7 @@ import org.sleuthkit.datamodel.AbstractFile;
|
||||
* Video viewer part of the Media View layered pane. Uses different engines
|
||||
* depending on platform.
|
||||
*/
|
||||
public abstract class MediaViewVideoPanel extends JPanel implements FrameCapture, MediaFileViewer.MediaViewPanel {
|
||||
abstract class MediaViewVideoPanel extends JPanel implements FrameCapture, MediaFileViewer.MediaViewPanel {
|
||||
|
||||
private static final Set<String> AUDIO_EXTENSIONS = new TreeSet<>(Arrays.asList(".mp3", ".wav", ".wma")); //NON-NLS
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2017-18 Basis Technology Corp.
|
||||
* Copyright 2017-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -98,7 +98,7 @@ public class MessageContentViewer extends javax.swing.JPanel implements DataCont
|
||||
@NbBundle.Messages("MessageContentViewer.AtrachmentsPanel.title=Attachments")
|
||||
public MessageContentViewer() {
|
||||
initComponents();
|
||||
drp = DataResultPanel.createInstanceUninitialized(Bundle.MessageContentViewer_AtrachmentsPanel_title(), "", Node.EMPTY, 0, null);
|
||||
drp = DataResultPanel.createInstanceUninitialized(Bundle.MessageContentViewer_AtrachmentsPanel_title(), "", new TableFilterNode(Node.EMPTY, false), 0, null);
|
||||
attachmentsScrollPane.setViewportView(drp);
|
||||
msgbodyTabbedPane.setEnabledAt(ATTM_TAB_INDEX, true);
|
||||
|
||||
@ -716,20 +716,20 @@ public class MessageContentViewer extends javax.swing.JPanel implements DataCont
|
||||
|
||||
@Override
|
||||
protected Sheet createSheet() {
|
||||
Sheet s = new Sheet();
|
||||
Sheet.Set ss = s.get(Sheet.PROPERTIES);
|
||||
if (ss == null) {
|
||||
ss = Sheet.createPropertiesSet();
|
||||
s.put(ss);
|
||||
Sheet sheet = new Sheet();
|
||||
Sheet.Set sheetSet = sheet.get(Sheet.PROPERTIES);
|
||||
if (sheetSet == null) {
|
||||
sheetSet = Sheet.createPropertiesSet();
|
||||
sheet.put(sheetSet);
|
||||
}
|
||||
AbstractFile file = getContent();
|
||||
ss.put(new NodeProperty<>("Name", "Name", "Name", file.getName()));
|
||||
ss.put(new NodeProperty<>("Size", "Size", "Size", file.getSize()));
|
||||
ss.put(new NodeProperty<>("Mime Type", "Mime Type", "Mime Type", StringUtils.defaultString(file.getMIMEType())));
|
||||
ss.put(new NodeProperty<>("Known", "Known", "Known", file.getKnown().getName()));
|
||||
sheetSet.put(new NodeProperty<>("Name", "Name", "Name", file.getName()));
|
||||
sheetSet.put(new NodeProperty<>("Size", "Size", "Size", file.getSize()));
|
||||
sheetSet.put(new NodeProperty<>("Mime Type", "Mime Type", "Mime Type", StringUtils.defaultString(file.getMIMEType())));
|
||||
sheetSet.put(new NodeProperty<>("Known", "Known", "Known", file.getKnown().getName()));
|
||||
|
||||
addTagProperty(ss);
|
||||
return s;
|
||||
addTagProperty(sheetSet);
|
||||
return sheet;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -11,7 +11,7 @@
|
||||
</NonVisualComponents>
|
||||
<Properties>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[610, 52]"/>
|
||||
<Dimension value="[100, 52]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
@ -41,7 +41,8 @@
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JScrollPane" name="jScrollPane2">
|
||||
<Properties>
|
||||
<Property name="horizontalScrollBarPolicy" type="int" value="31"/>
|
||||
<Property name="horizontalScrollBarPolicy" type="int" value="32"/>
|
||||
<Property name="verticalScrollBarPolicy" type="int" value="22"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[610, 52]"/>
|
||||
</Property>
|
||||
|
@ -59,9 +59,10 @@ public class Metadata extends javax.swing.JPanel implements DataContentViewer {
|
||||
jScrollPane2 = new javax.swing.JScrollPane();
|
||||
jTextPane1 = new javax.swing.JTextPane();
|
||||
|
||||
setPreferredSize(new java.awt.Dimension(610, 52));
|
||||
setPreferredSize(new java.awt.Dimension(100, 52));
|
||||
|
||||
jScrollPane2.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
|
||||
jScrollPane2.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
|
||||
jScrollPane2.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
|
||||
jScrollPane2.setPreferredSize(new java.awt.Dimension(610, 52));
|
||||
|
||||
jTextPane1.setEditable(false);
|
||||
|
@ -33,7 +33,8 @@ import org.sleuthkit.autopsy.datamodel.NodeProperty;
|
||||
/**
|
||||
* Factory class to create nodes for Plist table view
|
||||
*/
|
||||
public class PListRowFactory extends ChildFactory<Integer> {
|
||||
|
||||
class PListRowFactory extends ChildFactory<Integer> {
|
||||
|
||||
private final List<PropKeyValue> rows;
|
||||
|
||||
|
@ -58,13 +58,12 @@ import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.datamodel.TskCoreException;
|
||||
import org.xml.sax.SAXException;
|
||||
import org.sleuthkit.autopsy.corecomponentinterfaces.FileTypeViewer;
|
||||
|
||||
/**
|
||||
* PListViewer - a file viewer for binary plist files.
|
||||
*
|
||||
*/
|
||||
public class PListViewer extends javax.swing.JPanel implements FileTypeViewer, ExplorerManager.Provider {
|
||||
class PListViewer extends javax.swing.JPanel implements FileTypeViewer, ExplorerManager.Provider {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final String[] MIMETYPES = new String[]{"application/x-bplist"};
|
||||
@ -192,7 +191,7 @@ public class PListViewer extends javax.swing.JPanel implements FileTypeViewer, E
|
||||
|
||||
Case openCase;
|
||||
try {
|
||||
openCase = Case.getOpenCase();
|
||||
openCase = Case.getCurrentCaseThrows();
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
JOptionPane.showMessageDialog(this,
|
||||
"Failed to export plist file.",
|
||||
|
@ -34,7 +34,8 @@ import org.sleuthkit.autopsy.datamodel.NodeProperty;
|
||||
/**
|
||||
* Factory class to generate nodes for SQLite table rows
|
||||
*/
|
||||
public class SQLiteTableRowFactory extends ChildFactory<Integer> {
|
||||
|
||||
class SQLiteTableRowFactory extends ChildFactory<Integer> {
|
||||
|
||||
private final List<Map<String, Object>> rows;
|
||||
private final List<Action> colActions;
|
||||
|
@ -50,13 +50,12 @@ import org.sleuthkit.autopsy.datamodel.ContentUtils;
|
||||
import org.sleuthkit.datamodel.AbstractFile;
|
||||
import org.sleuthkit.datamodel.SleuthkitCase;
|
||||
import org.sleuthkit.datamodel.TskCoreException;
|
||||
import org.sleuthkit.autopsy.corecomponentinterfaces.FileTypeViewer;
|
||||
import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
|
||||
|
||||
/**
|
||||
* A file content viewer for SQLite database files.
|
||||
*/
|
||||
public class SQLiteViewer extends javax.swing.JPanel implements FileTypeViewer {
|
||||
class SQLiteViewer extends javax.swing.JPanel implements FileTypeViewer {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
public static final String[] SUPPORTED_MIMETYPES = new String[]{"application/x-sqlite3"};
|
||||
@ -320,7 +319,7 @@ public class SQLiteViewer extends javax.swing.JPanel implements FileTypeViewer {
|
||||
// Copy the file to temp folder
|
||||
String tmpDBPathName;
|
||||
try {
|
||||
tmpDBPathName = Case.getOpenCase().getTempDirectory() + File.separator + sqliteDbFile.getName();
|
||||
tmpDBPathName = Case.getCurrentCaseThrows().getTempDirectory() + File.separator + sqliteDbFile.getName();
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
logger.log(Level.SEVERE, "Current case has been closed", ex); //NON-NLS
|
||||
MessageNotifyUtil.Message.error(Bundle.SQLiteViewer_errorMessage_noCurrentCase());
|
||||
@ -373,7 +372,7 @@ public class SQLiteViewer extends javax.swing.JPanel implements FileTypeViewer {
|
||||
* @param metaFileName name of meta file to look for
|
||||
*/
|
||||
private void findAndCopySQLiteMetaFile(AbstractFile sqliteFile, String metaFileName) throws NoCurrentCaseException, TskCoreException, IOException {
|
||||
Case openCase = Case.getOpenCase();
|
||||
Case openCase = Case.getCurrentCaseThrows();
|
||||
SleuthkitCase sleuthkitCase = openCase.getSleuthkitCase();
|
||||
Services services = new Services(sleuthkitCase);
|
||||
FileManager fileManager = services.getFileManager();
|
||||
|
@ -455,7 +455,8 @@ public final class CoordinationService {
|
||||
CASES("cases"),
|
||||
MANIFESTS("manifests"),
|
||||
CONFIG("config"),
|
||||
CENTRAL_REPO("centralRepository");
|
||||
CENTRAL_REPO("centralRepository"),
|
||||
HEALTH_MONITOR("healthMonitor");
|
||||
|
||||
private final String displayName;
|
||||
|
||||
|
@ -216,6 +216,7 @@ public class Installer extends ModuleInstall {
|
||||
packageInstallers.add(org.sleuthkit.autopsy.datamodel.Installer.getDefault());
|
||||
packageInstallers.add(org.sleuthkit.autopsy.ingest.Installer.getDefault());
|
||||
packageInstallers.add(org.sleuthkit.autopsy.centralrepository.eventlisteners.Installer.getDefault());
|
||||
packageInstallers.add(org.sleuthkit.autopsy.healthmonitor.Installer.getDefault());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -77,6 +77,7 @@
|
||||
</folder>
|
||||
<folder name="Tools">
|
||||
<file name="org-sleuthkit-autopsy-filesearch-FileSearchAction.instance"/>
|
||||
<file name="org-sleuthkit-autopsy-commonfilesearch-CommonFilesSearchAction.instance"/>
|
||||
<file name="org-sleuthkit-autopsy-ingest-IngestMessagesAction.instance">
|
||||
<attr name="delegate" newvalue="org.sleuthkit.autopsy.ingest.IngestMessagesAction"/>
|
||||
</file>
|
||||
@ -196,6 +197,10 @@
|
||||
<file name="org-netbeans-modules-options-OptionsWindowAction.shadow"/>
|
||||
<file name="org-netbeans-modules-templates-actions-TemplatesAction.shadow_hidden"/>
|
||||
<file name="org-openide-actions-ToolsAction.shadow_hidden"/>
|
||||
<file name="org-sleuthkit-autopsy-commonfilesearch-CommonFilesAction.shadow">
|
||||
<attr name="originalFile" stringvalue="Actions/Tools/org-sleuthkit-autopsy-commonfilesearch-CommonFilesSearchAction.instance"/>
|
||||
<attr name="position" intvalue="103"/>
|
||||
</file>
|
||||
<file name="org-sleuthkit-autopsy-filesearch-FileSearchAction.shadow">
|
||||
<attr name="originalFile" stringvalue="Actions/Tools/org-sleuthkit-autopsy-filesearch-FileSearchAction.instance"/>
|
||||
<attr name="position" intvalue="200"/>
|
||||
@ -213,7 +218,7 @@
|
||||
</file>-->
|
||||
<file name="org-sleuthkit-autopsy-report-ReportWizardAction-separatorAfter.instance">
|
||||
<attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
|
||||
<attr name="position" intvalue="104"/>
|
||||
<attr name="position" intvalue="199"/>
|
||||
</file>
|
||||
<!--<file name="Separator1.instance_hidden"/>
|
||||
<file name="Separator3.instance_hidden"/>-->
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2011 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");
|
||||
@ -22,41 +22,58 @@ import java.util.List;
|
||||
import org.openide.nodes.Node;
|
||||
|
||||
/**
|
||||
* The interface for the "top right component" window.
|
||||
* An interface for result view components. A result view component provides
|
||||
* multiple views of the application data represented by a given NetBeans Node.
|
||||
* The differing views of the node are supplied by a collection of result
|
||||
* viewers (implementations of the DataResultViewer interface).
|
||||
*
|
||||
* A typical implementation of this interface are the NetBeans TopComponents
|
||||
* (DataResultTopComponents) that use a child result view component
|
||||
* (DataResultPanel) for displaying their result viewers, and are docked into
|
||||
* the upper right hand side (editor mode) of the main application window.
|
||||
*/
|
||||
public interface DataResult {
|
||||
|
||||
/**
|
||||
* Sets the "selected" node in this class.
|
||||
* Sets the node for which this result view component should provide
|
||||
* multiple views of the underlying application data.
|
||||
*
|
||||
* @param node The node, may be null. If null, the call to this method is
|
||||
* equivalent to a call to resetComponent on this result view
|
||||
* component's result viewers.
|
||||
*/
|
||||
public void setNode(Node selectedNode);
|
||||
public void setNode(Node node);
|
||||
|
||||
/**
|
||||
* Gets the unique TopComponent ID of this class.
|
||||
* Gets the preferred identifier for this result view panel in the window
|
||||
* system.
|
||||
*
|
||||
* @return preferredID the unique ID
|
||||
* @return The preferred identifier.
|
||||
*/
|
||||
public String getPreferredID();
|
||||
|
||||
/**
|
||||
* Sets the title of this TopComponent
|
||||
* Sets the title of this result view component.
|
||||
*
|
||||
* @param title the given title (String)
|
||||
* @param title The title.
|
||||
*/
|
||||
public void setTitle(String title);
|
||||
|
||||
/**
|
||||
* Sets the descriptive context text at the top of the pane.
|
||||
* Sets the descriptive text about the source of the nodes displayed in this
|
||||
* result view component.
|
||||
*
|
||||
* @param pathText Descriptive text giving context for the current results
|
||||
* @param description The text to display.
|
||||
*/
|
||||
public void setPath(String pathText);
|
||||
|
||||
/**
|
||||
* Checks if this is the main (uncloseable) instance of DataResult
|
||||
* Gets whether or not this result view panel is the "main" result view
|
||||
* panel used to view the child nodes of a node selected in the application
|
||||
* tree view (DirectoryTreeTopComponent) that is normally docked into the
|
||||
* left hand side of the main window.
|
||||
*
|
||||
* @return true if it is the main instance, otherwise false
|
||||
* @return True or false.
|
||||
*/
|
||||
public boolean isMain();
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2011-17 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");
|
||||
@ -22,76 +22,120 @@ import java.awt.Component;
|
||||
import org.openide.nodes.Node;
|
||||
|
||||
/**
|
||||
* Interface for the different viewers that show a set of nodes in the
|
||||
* DataResult area. AbstractDataResultViewer has default implementations for the
|
||||
* action handlers.
|
||||
* An interface for result viewers. A result viewer uses a Swing Component to
|
||||
* provide a view of the application data represented by a NetBeans Node passed
|
||||
* to it via its setNode method.
|
||||
*
|
||||
* Result viewers are most commonly presented as a tab in a result view panel
|
||||
* (DataResultPanel) inside a result view top component (DataResultTopComponent)
|
||||
* that is docked into the upper right hand side (editor mode) of the main
|
||||
* application window.
|
||||
*
|
||||
* A result viewer is typically a JPanel that displays the child nodes of the
|
||||
* given node using a NetBeans explorer view child component. Such a result
|
||||
* viewer should use the explorer manager of the ancestor top component to
|
||||
* connect the lookups of the nodes displayed in the NetBeans explorer view to
|
||||
* the actions global context. It is strongly recommended that this type of
|
||||
* result viewer is implemented by extending the abstract base class
|
||||
* AbstractDataResultViewer, which will handle some key aspects of working with
|
||||
* the ancestor top component's explorer manager.
|
||||
*
|
||||
* This interface is an extension point, so classes that implement it should
|
||||
* provide an appropriate ServiceProvider annotation.
|
||||
*/
|
||||
public interface DataResultViewer {
|
||||
|
||||
/**
|
||||
* Set the root node to display in this viewer. When called with null, must
|
||||
* clear all references to previous nodes.
|
||||
*/
|
||||
public void setNode(Node selectedNode);
|
||||
|
||||
/**
|
||||
* Gets the title of this viewer
|
||||
*/
|
||||
public String getTitle();
|
||||
|
||||
/**
|
||||
* Get a new instance of DataResultViewer
|
||||
* Creates a new instance of this result viewer, which allows the
|
||||
* application to use the capability provided by this result viewer in more
|
||||
* than one result view. This is done by using the default instance of this
|
||||
* result viewer as a "factory" for creating other instances.
|
||||
*/
|
||||
public DataResultViewer createInstance();
|
||||
|
||||
/**
|
||||
* Get the Swing component (i.e. JPanel) for this viewer
|
||||
* Indicates whether this result viewer is able to provide a meaningful view
|
||||
* of the application data represented by a given node. Typically, indicates
|
||||
* whether or not this result viewer can use the given node as the root node
|
||||
* of its child explorer view component.
|
||||
*
|
||||
* @param node The node.
|
||||
*
|
||||
* @return True or false.
|
||||
*/
|
||||
public boolean isSupported(Node node);
|
||||
|
||||
/**
|
||||
* Sets the node for which this result viewer should provide a view of the
|
||||
* underlying application data. Typically, this means using the given node
|
||||
* as the root node of this result viewer's child explorer view component.
|
||||
*
|
||||
* @param node The node, may be null. If null, the call to this method is
|
||||
* equivalent to a call to resetComponent.
|
||||
*/
|
||||
public void setNode(Node node);
|
||||
|
||||
/**
|
||||
* Requests selection of the given child nodes of the node passed to
|
||||
* setNode. This method should be implemented as a no-op for result viewers
|
||||
* that do not display the child nodes of a given root node using a NetBeans
|
||||
* explorer view set up to use a given explorer manager.
|
||||
*
|
||||
* @param selectedNodes The child nodes to select.
|
||||
*/
|
||||
default public void setSelectedNodes(Node[] selectedNodes) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the title of this result viewer.
|
||||
*
|
||||
* @return The title.
|
||||
*/
|
||||
public String getTitle();
|
||||
|
||||
/**
|
||||
* Gets the Swing component for this viewer.
|
||||
*
|
||||
* @return The component.
|
||||
*/
|
||||
public Component getComponent();
|
||||
|
||||
/**
|
||||
* Resets the viewer.
|
||||
* Resets the state of the Swing component for this viewer to its default
|
||||
* state.
|
||||
*/
|
||||
public void resetComponent();
|
||||
default public void resetComponent() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Frees the objects that have been allocated by this viewer, in preparation
|
||||
* for permanently disposing of it.
|
||||
* Frees any resources tha have been allocated by this result viewer, in
|
||||
* preparation for permanently disposing of it.
|
||||
*/
|
||||
public void clearComponent();
|
||||
default public void clearComponent() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Expand node, if supported by the viewed
|
||||
* Sets the node for which this result viewer should provide a view of the
|
||||
* underlying application data model object, and expands the node.
|
||||
*
|
||||
* @param n Node to expand
|
||||
*/
|
||||
public void expandNode(Node n);
|
||||
|
||||
/**
|
||||
* Select the given node array
|
||||
*/
|
||||
public void setSelectedNodes(Node[] selected);
|
||||
|
||||
/**
|
||||
* Checks whether the currently selected root node is supported by this
|
||||
* viewer
|
||||
* @param node The node.
|
||||
*
|
||||
* @param selectedNode the selected node
|
||||
*
|
||||
* @return True if supported, else false
|
||||
*/
|
||||
public boolean isSupported(Node selectedNode);
|
||||
|
||||
/**
|
||||
* Set a custom content viewer to respond to selection events from this
|
||||
* result viewer. If not set, the default content viewer is used
|
||||
*
|
||||
* @param contentViewer content viewer to respond to selection events from
|
||||
* this viewer
|
||||
*
|
||||
* @deprecated All implementations of this in the standard DataResultViewers are now no-ops.
|
||||
* @deprecated This API is not used by the application.
|
||||
*/
|
||||
@Deprecated
|
||||
public void setContentViewer(DataContent contentViewer);
|
||||
default public void expandNode(Node node) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a custom content viewer to which nodes selected in this result
|
||||
* viewer should be pushed via DataContent.setNode.
|
||||
*
|
||||
* @param contentViewer The content viewer.
|
||||
*
|
||||
* @deprecated This API is not used by the application.
|
||||
*/
|
||||
@Deprecated
|
||||
default public void setContentViewer(DataContent contentViewer) {
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2011-17 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");
|
||||
@ -23,65 +23,64 @@ import java.beans.PropertyVetoException;
|
||||
import java.util.logging.Level;
|
||||
import javax.swing.JPanel;
|
||||
import org.openide.explorer.ExplorerManager;
|
||||
import org.openide.explorer.ExplorerManager.Provider;
|
||||
import org.openide.nodes.Node;
|
||||
import org.sleuthkit.autopsy.corecomponentinterfaces.DataContent;
|
||||
import org.sleuthkit.autopsy.corecomponentinterfaces.DataResultViewer;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
|
||||
/**
|
||||
* This class provides a default implementation of selected methods of the
|
||||
* DataResultViewer interface. Derived classes will be Swing JPanel objects.
|
||||
* Additionally, the ExplorerManager.Provider interface is implemented to supply
|
||||
* an ExplorerManager to derived classes and their child components.
|
||||
* An abstract base class for an implementation of the result viewer interface
|
||||
* that is a JPanel that displays the child nodes of a given node using a
|
||||
* NetBeans explorer view as a child component. Such a result viewer should use
|
||||
* the explorer manager of an ancestor top component to connect the lookups of
|
||||
* the nodes displayed in the NetBeans explorer view to the actions global
|
||||
* context. This class handles some key aspects of working with the ancestor top
|
||||
* component's explorer manager.
|
||||
*
|
||||
* Instances of this class can be supplied with the top component's explorer
|
||||
* manager during construction, but the typical use case is for the result
|
||||
* viewer to find the ancestor top component's explorer manager at runtime.
|
||||
*
|
||||
* IMPORTANT: If the result viewer is going to find the ancestor top component's
|
||||
* explorer manager at runtime, the first call to the getExplorerManager method
|
||||
* of this class must be made AFTER the component hierarchy is fully
|
||||
* constructed.
|
||||
*
|
||||
*/
|
||||
abstract class AbstractDataResultViewer extends JPanel implements DataResultViewer, Provider {
|
||||
public abstract class AbstractDataResultViewer extends JPanel implements DataResultViewer, ExplorerManager.Provider {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(AbstractDataResultViewer.class.getName());
|
||||
protected transient ExplorerManager em;
|
||||
private transient ExplorerManager explorerManager;
|
||||
|
||||
/**
|
||||
* This constructor is intended to allow an AbstractDataResultViewer to use
|
||||
* an ExplorerManager provided by a TopComponent, allowing Node selections
|
||||
* to be available to Actions via the action global context lookup when the
|
||||
* TopComponent has focus. The ExplorerManager must be present when the
|
||||
* object is constructed so that its child components can discover it using
|
||||
* the ExplorerManager.find() method.
|
||||
* Constructs an abstract base class for an implementation of the result
|
||||
* viewer interface that is a JPanel that displays the child nodes of the
|
||||
* given node using a NetBeans explorer view as a child component.
|
||||
*
|
||||
* @param explorerManager
|
||||
* @param explorerManager The explorer manager to use in the NetBeans
|
||||
* explorer view child component of this result
|
||||
* viewer, may be null. If null, the explorer manager
|
||||
* will be discovered the first time
|
||||
* getExplorerManager is called.
|
||||
*/
|
||||
AbstractDataResultViewer(ExplorerManager explorerManager) {
|
||||
this.em = explorerManager;
|
||||
}
|
||||
|
||||
/**
|
||||
* This constructor can be used by AbstractDataResultViewers that do not
|
||||
* need to make Node selections available to Actions via the action global
|
||||
* context lookup.
|
||||
*/
|
||||
public AbstractDataResultViewer() {
|
||||
this(new ExplorerManager());
|
||||
public AbstractDataResultViewer(ExplorerManager explorerManager) {
|
||||
this.explorerManager = explorerManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearComponent() {
|
||||
}
|
||||
|
||||
public Node getSelectedNode() {
|
||||
Node result = null;
|
||||
Node[] selectedNodes = this.getExplorerManager().getSelectedNodes();
|
||||
if (selectedNodes.length > 0) {
|
||||
result = selectedNodes[0];
|
||||
public ExplorerManager getExplorerManager() {
|
||||
if (this.explorerManager == null) {
|
||||
this.explorerManager = ExplorerManager.find(this);
|
||||
}
|
||||
return result;
|
||||
return this.explorerManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void expandNode(Node n) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resetComponent() {
|
||||
public void setSelectedNodes(Node[] selected) {
|
||||
try {
|
||||
this.getExplorerManager().setSelectedNodes(selected);
|
||||
} catch (PropertyVetoException ex) {
|
||||
logger.log(Level.SEVERE, "Couldn't set selected nodes", ex); //NON-NLS
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -89,22 +88,4 @@ abstract class AbstractDataResultViewer extends JPanel implements DataResultView
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExplorerManager getExplorerManager() {
|
||||
return this.em;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSelectedNodes(Node[] selected) {
|
||||
try {
|
||||
this.em.setSelectedNodes(selected);
|
||||
} catch (PropertyVetoException ex) {
|
||||
logger.log(Level.WARNING, "Couldn't set selected nodes.", ex); //NON-NLS
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Override
|
||||
public void setContentViewer(DataContent contentViewer) {
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ LBL_Description=<div style=\"font-size: 12pt; font-family: Verdana, 'Verdana CE'
|
||||
Format_OperatingSystem_Value={0} version {1} running on {2}
|
||||
LBL_Copyright=<div style\="font-size\: 12pt; font-family\: Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif; ">Autopsy™ is a digital forensics platform based on The Sleuth Kit™ and other tools. <br><ul><li>General Information: <a style\="color\: \#1E2A60;" href\="http\://www.sleuthkit.org">http\://www.sleuthkit.org</a>.</li><li>Training: <a style\="color\: \#1E2A60;" href\="http://www.basistech.com/autopsy-training">http://www.basistech.com/autopsy-training</a></li><li>Commercial Support: <a style\="color\: \#1E2A60;" href\="http://www.basistech.com/digital-forensics/autopsy/support/">http://www.basistech.com/digital-forensics/autopsy/support/</a></li></ul>Copyright © 2003-2018. </div>
|
||||
URL_ON_IMG=http://www.sleuthkit.org/
|
||||
URL_ON_HELP=http://sleuthkit.org/autopsy/docs/user-docs/4.6.0/
|
||||
URL_ON_HELP=http://sleuthkit.org/autopsy/docs/user-docs/4.7.0/
|
||||
FILE_FOR_LOCAL_HELP=file:///
|
||||
INDEX_FOR_LOCAL_HELP=/docs/index.html
|
||||
LBL_Close=Close
|
||||
@ -62,9 +62,6 @@ DataResultViewerThumbnail.filePathLabel.text=\ \ \
|
||||
DataResultViewerThumbnail.goToPageLabel.text=Go to Page:
|
||||
DataResultViewerThumbnail.goToPageField.text=
|
||||
AdvancedConfigurationDialog.cancelButton.text=Cancel
|
||||
DataResultPanel.directoryTablePath.text=directoryPath
|
||||
DataResultPanel.numberMatchLabel.text=0
|
||||
DataResultPanel.matchLabel.text=Results
|
||||
DataContentViewerArtifact.waitText=Retrieving and preparing data, please wait...
|
||||
DataContentViewerArtifact.errorText=Error retrieving result
|
||||
DataContentViewerArtifact.title=Results
|
||||
@ -181,3 +178,6 @@ AutopsyOptionsPanel.agencyLogoPreview.text=<html><div style='text-align: center;
|
||||
AutopsyOptionsPanel.logoPanel.border.title=Logo
|
||||
AutopsyOptionsPanel.runtimePanel.border.title=Runtime
|
||||
AutopsyOptionsPanel.viewPanel.border.title=View
|
||||
DataResultPanel.matchLabel.text=Results
|
||||
DataResultPanel.numberOfChildNodesLabel.text=0
|
||||
DataResultPanel.descriptionLabel.text=directoryPath
|
||||
|
@ -37,9 +37,6 @@ DataResultViewerThumbnail.imagesRangeLabel.text=-
|
||||
DataResultViewerThumbnail.pageNumLabel.text=-
|
||||
DataResultViewerThumbnail.goToPageLabel.text=\u6b21\u306e\u30da\u30fc\u30b8\u306b\u79fb\u52d5\uff1a
|
||||
AdvancedConfigurationDialog.cancelButton.text=\u30ad\u30e3\u30f3\u30bb\u30eb
|
||||
DataResultPanel.directoryTablePath.text=\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30d1\u30b9
|
||||
DataResultPanel.numberMatchLabel.text=0
|
||||
DataResultPanel.matchLabel.text=\u7d50\u679c
|
||||
DataContentViewerArtifact.waitText=\u30c7\u30fc\u30bf\u3092\u53d6\u8fbc\u307f\u304a\u3088\u3073\u6e96\u5099\u4e2d\u3002\u3057\u3070\u3089\u304f\u304a\u5f85\u3061\u4e0b\u3055\u3044...
|
||||
DataContentViewerArtifact.errorText=\u7d50\u679c\u3092\u53d6\u8fbc\u307f\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f
|
||||
DataContentViewerArtifact.title=\u7d50\u679c
|
||||
@ -131,3 +128,6 @@ DataResultViewerThumbnail.thumbnailSizeComboBox.small=\u30b5\u30e0\u30cd\u30a4\u
|
||||
MediaViewImagePanel.errorLabel.OOMText=\u30d5\u30a1\u30a4\u30eb\u3092\u30e1\u30c7\u30a3\u30a2\u30d3\u30e5\u30fc\u306b\u8aad\u307f\u8fbc\u3081\u307e\u305b\u3093\u3067\u3057\u305f\uff1a\u30e1\u30e2\u30ea\u4e0d\u8db3\u3002
|
||||
MediaViewImagePanel.errorLabel.text=\u30d5\u30a1\u30a4\u30eb\u3092\u30e1\u30c7\u30a3\u30a2\u30d3\u30e5\u30fc\u306b\u8aad\u307f\u8fbc\u3081\u307e\u305b\u3093\u3067\u3057\u305f\u3002
|
||||
MediaViewImagePanel.externalViewerButton.text=\u5916\u90e8\u30d3\u30e5\u30fc\u30a2\u30fc\u3067\u958b\u304f
|
||||
DataResultPanel.matchLabel.text=\u7d50\u679c
|
||||
DataResultPanel.numberOfChildNodesLabel.text=0
|
||||
DataResultPanel.descriptionLabel.text=\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30d1\u30b9
|
||||
|
@ -184,7 +184,7 @@ public final class DataContentTopComponent extends TopComponent implements DataC
|
||||
*/
|
||||
Case openCase;
|
||||
try {
|
||||
openCase = Case.getOpenCase();
|
||||
openCase = Case.getCurrentCaseThrows();
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
return true;
|
||||
}
|
||||
|
@ -27,7 +27,7 @@
|
||||
</NonVisualComponents>
|
||||
<Properties>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[622, 58]"/>
|
||||
<Dimension value="[100, 58]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
@ -45,201 +45,214 @@
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jPanel1" pref="622" max="32767" attributes="0"/>
|
||||
<Component id="jScrollPane1" max="32767" attributes="0"/>
|
||||
<Component id="resultsTableScrollPane" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jPanel1" alignment="0" max="32767" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jScrollPane1" min="-2" pref="24" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="resultsTableScrollPane" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="jPanel1">
|
||||
<Container class="javax.swing.JScrollPane" name="jScrollPane1">
|
||||
<Properties>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[620, 58]"/>
|
||||
</Property>
|
||||
<Property name="horizontalScrollBarPolicy" type="int" value="31"/>
|
||||
<Property name="verticalScrollBarPolicy" type="int" value="21"/>
|
||||
</Properties>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="pageLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="currentPageLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="ofLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="totalPageLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="41" max="-2" attributes="0"/>
|
||||
<Component id="pageLabel2" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Component id="prevPageButton" min="-2" pref="23" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="0" max="-2" attributes="0"/>
|
||||
<Component id="nextPageButton" min="-2" pref="23" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="334" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="resultsTableScrollPane" alignment="1" max="32767" attributes="0"/>
|
||||
<Group type="103" rootIndex="1" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace pref="280" max="32767" attributes="0"/>
|
||||
<Component id="artifactLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="84" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<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="3" attributes="0">
|
||||
<Component id="pageLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="currentPageLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="ofLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="totalPageLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="nextPageButton" alignment="0" min="-2" pref="23" max="-2" attributes="0"/>
|
||||
<Component id="prevPageButton" alignment="0" min="-2" pref="23" max="-2" attributes="0"/>
|
||||
<Component id="pageLabel2" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Component id="resultsTableScrollPane" pref="29" max="32767" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="0" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="103" rootIndex="1" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="artifactLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="401" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JLabel" name="totalPageLabel">
|
||||
<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/corecomponents/Bundle.properties" key="DataContentViewerArtifact.totalPageLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="ofLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerArtifact.ofLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="currentPageLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerArtifact.currentPageLabel.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="[18, 14]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[18, 14]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[18, 14]"/>
|
||||
<Dimension value="[620, 58]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="pageLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerArtifact.pageLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="nextPageButton">
|
||||
<Properties>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/org/sleuthkit/autopsy/corecomponents/btn_step_forward.png"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerArtifact.nextPageButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="borderPainted" type="boolean" value="false"/>
|
||||
<Property name="contentAreaFilled" type="boolean" value="false"/>
|
||||
<Property name="disabledIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/org/sleuthkit/autopsy/corecomponents/btn_step_forward_disabled.png"/>
|
||||
</Property>
|
||||
<Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
|
||||
<Insets value="[2, 0, 2, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[23, 23]"/>
|
||||
</Property>
|
||||
<Property name="rolloverIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/org/sleuthkit/autopsy/corecomponents/btn_step_forward_hover.png"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="nextPageButtonActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="pageLabel2">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerArtifact.pageLabel2.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="[29, 14]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[29, 14]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="prevPageButton">
|
||||
<Properties>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/org/sleuthkit/autopsy/corecomponents/btn_step_back.png"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerArtifact.prevPageButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="borderPainted" type="boolean" value="false"/>
|
||||
<Property name="contentAreaFilled" type="boolean" value="false"/>
|
||||
<Property name="disabledIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/org/sleuthkit/autopsy/corecomponents/btn_step_back_disabled.png"/>
|
||||
</Property>
|
||||
<Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
|
||||
<Insets value="[2, 0, 2, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[23, 23]"/>
|
||||
</Property>
|
||||
<Property name="rolloverIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/org/sleuthkit/autopsy/corecomponents/btn_step_back_hover.png"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="prevPageButtonActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Container class="javax.swing.JScrollPane" name="resultsTableScrollPane">
|
||||
<Properties>
|
||||
<Property name="horizontalScrollBarPolicy" type="int" value="31"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[620, 34]"/>
|
||||
</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">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="pageLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="currentPageLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="ofLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="totalPageLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="41" max="-2" attributes="0"/>
|
||||
<Component id="pageLabel2" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Component id="prevPageButton" min="-2" pref="23" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="0" max="-2" attributes="0"/>
|
||||
<Component id="nextPageButton" min="-2" pref="23" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="383" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="103" rootIndex="1" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace pref="280" max="32767" attributes="0"/>
|
||||
<Component id="artifactLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="84" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<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="3" attributes="0">
|
||||
<Component id="pageLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="currentPageLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="ofLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="totalPageLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="nextPageButton" alignment="0" min="-2" pref="23" max="-2" attributes="0"/>
|
||||
<Component id="prevPageButton" alignment="0" min="-2" pref="23" max="-2" attributes="0"/>
|
||||
<Component id="pageLabel2" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace pref="35" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="103" rootIndex="1" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="artifactLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="58" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JLabel" name="totalPageLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerArtifact.totalPageLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="ofLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerArtifact.ofLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="currentPageLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerArtifact.currentPageLabel.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="[18, 14]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[18, 14]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[18, 14]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="pageLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerArtifact.pageLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="nextPageButton">
|
||||
<Properties>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/org/sleuthkit/autopsy/corecomponents/btn_step_forward.png"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerArtifact.nextPageButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="borderPainted" type="boolean" value="false"/>
|
||||
<Property name="contentAreaFilled" type="boolean" value="false"/>
|
||||
<Property name="disabledIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/org/sleuthkit/autopsy/corecomponents/btn_step_forward_disabled.png"/>
|
||||
</Property>
|
||||
<Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
|
||||
<Insets value="[2, 0, 2, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[23, 23]"/>
|
||||
</Property>
|
||||
<Property name="rolloverIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/org/sleuthkit/autopsy/corecomponents/btn_step_forward_hover.png"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="nextPageButtonActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="pageLabel2">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerArtifact.pageLabel2.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="[29, 14]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[29, 14]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="prevPageButton">
|
||||
<Properties>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/org/sleuthkit/autopsy/corecomponents/btn_step_back.png"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerArtifact.prevPageButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="borderPainted" type="boolean" value="false"/>
|
||||
<Property name="contentAreaFilled" type="boolean" value="false"/>
|
||||
<Property name="disabledIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/org/sleuthkit/autopsy/corecomponents/btn_step_back_disabled.png"/>
|
||||
</Property>
|
||||
<Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
|
||||
<Insets value="[2, 0, 2, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[23, 23]"/>
|
||||
</Property>
|
||||
<Property name="rolloverIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/org/sleuthkit/autopsy/corecomponents/btn_step_back_hover.png"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="prevPageButtonActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="artifactLabel">
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Component class="javax.swing.JLabel" name="artifactLabel">
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JScrollPane" name="resultsTableScrollPane">
|
||||
<Properties>
|
||||
<Property name="horizontalScrollBarPolicy" type="int" value="32"/>
|
||||
<Property name="verticalScrollBarPolicy" type="int" value="22"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[620, 34]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
|
@ -200,6 +200,7 @@ public class DataContentViewerArtifact extends javax.swing.JPanel implements Dat
|
||||
rightClickMenu = new javax.swing.JPopupMenu();
|
||||
copyMenuItem = new javax.swing.JMenuItem();
|
||||
selectAllMenuItem = new javax.swing.JMenuItem();
|
||||
jScrollPane1 = new javax.swing.JScrollPane();
|
||||
jPanel1 = new javax.swing.JPanel();
|
||||
totalPageLabel = new javax.swing.JLabel();
|
||||
ofLabel = new javax.swing.JLabel();
|
||||
@ -208,8 +209,8 @@ public class DataContentViewerArtifact extends javax.swing.JPanel implements Dat
|
||||
nextPageButton = new javax.swing.JButton();
|
||||
pageLabel2 = new javax.swing.JLabel();
|
||||
prevPageButton = new javax.swing.JButton();
|
||||
resultsTableScrollPane = new javax.swing.JScrollPane();
|
||||
artifactLabel = new javax.swing.JLabel();
|
||||
resultsTableScrollPane = new javax.swing.JScrollPane();
|
||||
|
||||
copyMenuItem.setText(org.openide.util.NbBundle.getMessage(DataContentViewerArtifact.class, "DataContentViewerArtifact.copyMenuItem.text")); // NOI18N
|
||||
rightClickMenu.add(copyMenuItem);
|
||||
@ -217,7 +218,10 @@ public class DataContentViewerArtifact extends javax.swing.JPanel implements Dat
|
||||
selectAllMenuItem.setText(org.openide.util.NbBundle.getMessage(DataContentViewerArtifact.class, "DataContentViewerArtifact.selectAllMenuItem.text")); // NOI18N
|
||||
rightClickMenu.add(selectAllMenuItem);
|
||||
|
||||
setPreferredSize(new java.awt.Dimension(622, 58));
|
||||
setPreferredSize(new java.awt.Dimension(100, 58));
|
||||
|
||||
jScrollPane1.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
|
||||
jScrollPane1.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);
|
||||
|
||||
jPanel1.setPreferredSize(new java.awt.Dimension(620, 58));
|
||||
|
||||
@ -264,9 +268,6 @@ public class DataContentViewerArtifact extends javax.swing.JPanel implements Dat
|
||||
}
|
||||
});
|
||||
|
||||
resultsTableScrollPane.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
|
||||
resultsTableScrollPane.setPreferredSize(new java.awt.Dimension(620, 34));
|
||||
|
||||
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
|
||||
jPanel1.setLayout(jPanel1Layout);
|
||||
jPanel1Layout.setHorizontalGroup(
|
||||
@ -286,8 +287,7 @@ public class DataContentViewerArtifact extends javax.swing.JPanel implements Dat
|
||||
.addComponent(prevPageButton, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(0, 0, 0)
|
||||
.addComponent(nextPageButton, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap(334, Short.MAX_VALUE))
|
||||
.addComponent(resultsTableScrollPane, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addContainerGap(383, Short.MAX_VALUE))
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
|
||||
.addContainerGap(280, Short.MAX_VALUE)
|
||||
@ -306,24 +306,32 @@ public class DataContentViewerArtifact extends javax.swing.JPanel implements Dat
|
||||
.addComponent(nextPageButton, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(prevPageButton, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(pageLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(resultsTableScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 29, Short.MAX_VALUE)
|
||||
.addGap(0, 0, 0))
|
||||
.addContainerGap(35, Short.MAX_VALUE))
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addComponent(artifactLabel)
|
||||
.addGap(0, 401, Short.MAX_VALUE)))
|
||||
.addGap(0, 58, Short.MAX_VALUE)))
|
||||
);
|
||||
|
||||
jScrollPane1.setViewportView(jPanel1);
|
||||
|
||||
resultsTableScrollPane.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
|
||||
resultsTableScrollPane.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
|
||||
resultsTableScrollPane.setPreferredSize(new java.awt.Dimension(620, 34));
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 622, Short.MAX_VALUE)
|
||||
.addComponent(jScrollPane1)
|
||||
.addComponent(resultsTableScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(resultsTableScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
@ -346,6 +354,7 @@ public class DataContentViewerArtifact extends javax.swing.JPanel implements Dat
|
||||
private javax.swing.JMenuItem copyMenuItem;
|
||||
private javax.swing.JLabel currentPageLabel;
|
||||
private javax.swing.JPanel jPanel1;
|
||||
private javax.swing.JScrollPane jScrollPane1;
|
||||
private javax.swing.JButton nextPageButton;
|
||||
private javax.swing.JLabel ofLabel;
|
||||
private javax.swing.JLabel pageLabel;
|
||||
@ -474,7 +483,8 @@ public class DataContentViewerArtifact extends javax.swing.JPanel implements Dat
|
||||
// file and not more details about the artifact
|
||||
if ((artifact == null)
|
||||
|| (artifact.getArtifactTypeID() == ARTIFACT_TYPE.TSK_HASHSET_HIT.getTypeID())
|
||||
|| (artifact.getArtifactTypeID() == ARTIFACT_TYPE.TSK_KEYWORD_HIT.getTypeID())) {
|
||||
|| (artifact.getArtifactTypeID() == ARTIFACT_TYPE.TSK_KEYWORD_HIT.getTypeID())
|
||||
|| (artifact.getArtifactTypeID() == ARTIFACT_TYPE.TSK_INTERESTING_FILE_HIT.getTypeID())) {
|
||||
return 3;
|
||||
} else {
|
||||
return 6;
|
||||
|
@ -27,7 +27,7 @@
|
||||
</NonVisualComponents>
|
||||
<Properties>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[610, 58]"/>
|
||||
<Dimension value="[100, 58]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
@ -45,261 +45,253 @@
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="hexViewerPanel" pref="701" max="32767" attributes="0"/>
|
||||
<Component id="jScrollPane1" alignment="0" pref="0" max="32767" attributes="0"/>
|
||||
<Component id="jScrollPane2" pref="100" max="32767" attributes="0"/>
|
||||
<Component id="jScrollPane3" alignment="0" pref="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="hexViewerPanel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jScrollPane1" pref="29" max="32767" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="0" max="-2" attributes="0"/>
|
||||
<Component id="jScrollPane2" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jScrollPane3" pref="27" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="hexViewerPanel">
|
||||
<Container class="javax.swing.JScrollPane" name="jScrollPane3">
|
||||
<Properties>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[610, 23]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="pageLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="currentPageLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="ofLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="totalPageLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="50" max="-2" attributes="0"/>
|
||||
<Component id="pageLabel2" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Component id="prevPageButton" min="-2" pref="23" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="0" max="-2" attributes="0"/>
|
||||
<Component id="nextPageButton" min="-2" pref="23" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="goToPageLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="goToPageTextField" min="-2" pref="79" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="goToOffsetLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="goToOffsetTextField" min="-2" pref="79" 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="0" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="pageLabel" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" alignment="0" groupAlignment="3" attributes="0">
|
||||
<Component id="currentPageLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="ofLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="totalPageLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="pageLabel2" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="nextPageButton" alignment="0" min="-2" pref="23" max="-2" attributes="0"/>
|
||||
<Component id="prevPageButton" alignment="0" min="-2" pref="23" max="-2" attributes="0"/>
|
||||
<Component id="goToPageLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="goToPageTextField" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="goToOffsetLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="goToOffsetTextField" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JLabel" name="totalPageLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerHex.totalPageLabel.text_1" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="ofLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerHex.ofLabel.text_1" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="currentPageLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerHex.currentPageLabel.text_1" 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="[18, 14]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[18, 14]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="pageLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerHex.pageLabel.text_1" 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="[33, 14]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[33, 14]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="prevPageButton">
|
||||
<Properties>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/org/sleuthkit/autopsy/corecomponents/btn_step_back.png"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerHex.prevPageButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="borderPainted" type="boolean" value="false"/>
|
||||
<Property name="contentAreaFilled" type="boolean" value="false"/>
|
||||
<Property name="disabledIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/org/sleuthkit/autopsy/corecomponents/btn_step_back_disabled.png"/>
|
||||
</Property>
|
||||
<Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
|
||||
<Insets value="[2, 0, 2, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[23, 23]"/>
|
||||
</Property>
|
||||
<Property name="rolloverIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/org/sleuthkit/autopsy/corecomponents/btn_step_back_hover.png"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="prevPageButtonActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="nextPageButton">
|
||||
<Properties>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/org/sleuthkit/autopsy/corecomponents/btn_step_forward.png"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerHex.nextPageButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="borderPainted" type="boolean" value="false"/>
|
||||
<Property name="contentAreaFilled" type="boolean" value="false"/>
|
||||
<Property name="disabledIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/org/sleuthkit/autopsy/corecomponents/btn_step_forward_disabled.png"/>
|
||||
</Property>
|
||||
<Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
|
||||
<Insets value="[2, 0, 2, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[23, 23]"/>
|
||||
</Property>
|
||||
<Property name="rolloverIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/org/sleuthkit/autopsy/corecomponents/btn_step_forward_hover.png"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="nextPageButtonActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="pageLabel2">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerHex.pageLabel2.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="[29, 14]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[29, 14]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="goToPageTextField">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerHex.goToPageTextField.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="goToPageTextFieldActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="goToPageLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerHex.goToPageLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="goToOffsetLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerHex.goToOffsetLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="goToOffsetTextField">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerHex.goToOffsetTextField.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="goToOffsetTextFieldActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JScrollPane" name="jScrollPane1">
|
||||
<Properties>
|
||||
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||
<Color blue="ff" green="ff" red="ff" type="rgb"/>
|
||||
</Property>
|
||||
<Property name="horizontalScrollBarPolicy" type="int" value="31"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[610, 402]"/>
|
||||
<Dimension value="[300, 33]"/>
|
||||
</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.JTextPane" name="outputViewPane">
|
||||
<Component class="javax.swing.JTextArea" name="outputTextArea">
|
||||
<Properties>
|
||||
<Property name="editable" type="boolean" value="false"/>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Courier New" size="11" style="0"/>
|
||||
</Property>
|
||||
<Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor">
|
||||
<Color id="Default Cursor"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[600, 20]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[700, 400]"/>
|
||||
</Property>
|
||||
<Property name="tabSize" type="int" value="0"/>
|
||||
<Property name="inheritsPopupMenu" type="boolean" value="true"/>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="new JTextPane(){
 public boolean getScrollableTracksViewportWidth() {
 return (getSize().width < 400);
 }};"/>
|
||||
<AuxValue name="JavaCodeGenerator_CreateCodePost" type="java.lang.String" value="this.outputViewPane.setBackground(new java.awt.Color(255, 255, 255)); // to make sure the background color is white
this.outputViewPane.requestFocusInWindow();
this.outputViewPane.setCursor(Cursor.getDefaultCursor());
"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JScrollPane" name="jScrollPane2">
|
||||
<Properties>
|
||||
<Property name="horizontalScrollBarPolicy" type="int" value="31"/>
|
||||
<Property name="verticalScrollBarPolicy" type="int" value="21"/>
|
||||
</Properties>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="hexViewerPanel">
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="pageLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="currentPageLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="ofLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="totalPageLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="50" max="-2" attributes="0"/>
|
||||
<Component id="pageLabel2" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Component id="prevPageButton" min="-2" pref="23" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="0" max="-2" attributes="0"/>
|
||||
<Component id="nextPageButton" min="-2" pref="23" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="goToPageLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="goToPageTextField" min="-2" pref="79" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="goToOffsetLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="goToOffsetTextField" min="-2" pref="79" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="32" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="pageLabel" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" alignment="0" groupAlignment="3" attributes="0">
|
||||
<Component id="currentPageLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="ofLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="totalPageLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="pageLabel2" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="nextPageButton" alignment="0" min="-2" pref="23" max="-2" attributes="0"/>
|
||||
<Component id="prevPageButton" alignment="0" min="-2" pref="23" max="-2" attributes="0"/>
|
||||
<Component id="goToPageLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="goToPageTextField" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="goToOffsetLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="goToOffsetTextField" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JLabel" name="totalPageLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerHex.totalPageLabel.text_1" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="ofLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerHex.ofLabel.text_1" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="currentPageLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerHex.currentPageLabel.text_1" 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="[18, 14]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[18, 14]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="pageLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerHex.pageLabel.text_1" 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="[33, 14]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[33, 14]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="prevPageButton">
|
||||
<Properties>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/org/sleuthkit/autopsy/corecomponents/btn_step_back.png"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerHex.prevPageButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="borderPainted" type="boolean" value="false"/>
|
||||
<Property name="contentAreaFilled" type="boolean" value="false"/>
|
||||
<Property name="disabledIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/org/sleuthkit/autopsy/corecomponents/btn_step_back_disabled.png"/>
|
||||
</Property>
|
||||
<Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
|
||||
<Insets value="[2, 0, 2, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[23, 23]"/>
|
||||
</Property>
|
||||
<Property name="rolloverIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/org/sleuthkit/autopsy/corecomponents/btn_step_back_hover.png"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="prevPageButtonActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="nextPageButton">
|
||||
<Properties>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/org/sleuthkit/autopsy/corecomponents/btn_step_forward.png"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerHex.nextPageButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="borderPainted" type="boolean" value="false"/>
|
||||
<Property name="contentAreaFilled" type="boolean" value="false"/>
|
||||
<Property name="disabledIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/org/sleuthkit/autopsy/corecomponents/btn_step_forward_disabled.png"/>
|
||||
</Property>
|
||||
<Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
|
||||
<Insets value="[2, 0, 2, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[23, 23]"/>
|
||||
</Property>
|
||||
<Property name="rolloverIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/org/sleuthkit/autopsy/corecomponents/btn_step_forward_hover.png"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="nextPageButtonActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="pageLabel2">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerHex.pageLabel2.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="[29, 14]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[29, 14]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="goToPageTextField">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerHex.goToPageTextField.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="goToPageTextFieldActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="goToPageLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerHex.goToPageLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="goToOffsetLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerHex.goToOffsetLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="goToOffsetTextField">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerHex.goToOffsetTextField.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="goToOffsetTextFieldActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
|
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