From 53bcc68665240b01c90253c99df47c4dd392766b Mon Sep 17 00:00:00 2001 From: Brian Sweeney Date: Fri, 16 Mar 2018 07:17:07 -0600 Subject: [PATCH] impl notes --- .../commonfilesearch/CommonFilesPanel.java | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonFilesPanel.java b/Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonFilesPanel.java index 229ee57686..6e81d13b7f 100644 --- a/Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonFilesPanel.java +++ b/Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonFilesPanel.java @@ -18,7 +18,6 @@ */ package org.sleuthkit.autopsy.commonfilesearch; -import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.List; import java.util.concurrent.ExecutionException; @@ -75,9 +74,19 @@ public final class CommonFilesPanel extends javax.swing.JPanel { @Override @SuppressWarnings("FinallyDiscardsException") - protected List doInBackground() throws TskCoreException, NoCurrentCaseException { + protected List doInBackground() throws TskCoreException, NoCurrentCaseException { //return type should be CommonFilesMetaData - done will be adjusted accordingly - //contents of this function should be wrapped in a BL class for the sake of testing + //contents of this whole function should be wrapped in a business logic class for the sake of testing + + /* + + Use this query to grab mapping of object_id to datasourcename: + select name, obj_id from tsk_files where obj_id in (SELECT obj_id FROM tsk_objects WHERE obj_id in (select obj_id from data_source_info)); + + Use SleuthkitCase.executeSql to run the query and get back a result set which can be iterated like a regular old jdbc object. + + Use file.getDataSourceID() to get datasourceid and map it to the appropriate row from above + */ Case currentCase = Case.getOpenCase(); SleuthkitCase tskDb = currentCase.getSleuthkitCase(); @@ -91,7 +100,7 @@ public final class CommonFilesPanel extends javax.swing.JPanel { super.done(); List contentList = get(); // - //// To background thread + //// To background thread (doInBackground) CommonFilesMetaData metadata = CommonFilesMetaData.DeDupeFiles(contentList); // CommonFilesSearchNode contentFilesNode = new CommonFilesSearchNode(metadata);