Tidied up ingest framework API

This commit is contained in:
Richard Cordovano 2014-03-26 17:12:24 -04:00
parent 819e10c2eb
commit 4f8617a16a
44 changed files with 119 additions and 128 deletions

View File

@ -108,7 +108,7 @@ public final class AddImageAction extends CallableSystemAction implements Presen
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
Logger.noteAction(AddImageAction.class); Logger.noteAction(AddImageAction.class);
if (IngestManager.getDefault().isIngestRunning()) { if (IngestManager.getInstance().isIngestRunning()) {
final String msg = NbBundle.getMessage(this.getClass(), "AddImageAction.ingestConfig.ongoingIngest.msg"); final String msg = NbBundle.getMessage(this.getClass(), "AddImageAction.ingestConfig.ongoingIngest.msg");
if (JOptionPane.showConfirmDialog(null, msg, if (JOptionPane.showConfirmDialog(null, msg,
NbBundle.getMessage(this.getClass(), NbBundle.getMessage(this.getClass(),

View File

@ -282,7 +282,7 @@ public class FileManager implements Closeable {
//for now reusing ingest events, in future this will be replaced by datamodel / observer sending out events //for now reusing ingest events, in future this will be replaced by datamodel / observer sending out events
// @@@ Is this the right place for this? A directory tree refresh will be triggered, so this may be creating a race condition // @@@ Is this the right place for this? A directory tree refresh will be triggered, so this may be creating a race condition
// since the transaction is not yet committed. // since the transaction is not yet committed.
IngestServices.getDefault().fireModuleContentEvent(new ModuleContentEvent(localFileAdded)); IngestServices.getInstance().fireModuleContentEvent(new ModuleContentEvent(localFileAdded));
} }
} }

View File

@ -33,7 +33,7 @@ import org.openide.util.lookup.ProxyLookup;
import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.autopsy.datamodel.AbstractContentNode; import org.sleuthkit.autopsy.datamodel.AbstractContentNode;
import org.sleuthkit.autopsy.datamodel.DisplayableItemNode; import org.sleuthkit.autopsy.datamodel.DisplayableItemNode;
import org.sleuthkit.autopsy.ingest.IngestDialog; import org.sleuthkit.autopsy.ingest.RunIngestModulesDialog;
import org.sleuthkit.datamodel.AbstractFile; import org.sleuthkit.datamodel.AbstractFile;
import org.sleuthkit.datamodel.Content; import org.sleuthkit.datamodel.Content;
import org.sleuthkit.datamodel.Directory; import org.sleuthkit.datamodel.Directory;
@ -116,7 +116,7 @@ class DirectoryTreeFilterNode extends FilterNode {
NbBundle.getMessage(this.getClass(), "DirectoryTreeFilterNode.action.runIngestMods.text")) { NbBundle.getMessage(this.getClass(), "DirectoryTreeFilterNode.action.runIngestMods.text")) {
@Override @Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
final IngestDialog ingestDialog = new IngestDialog(); final RunIngestModulesDialog ingestDialog = new RunIngestModulesDialog();
ingestDialog.setDataSources(Collections.<Content>singletonList(content)); ingestDialog.setDataSources(Collections.<Content>singletonList(content));
ingestDialog.display(); ingestDialog.display();
} }

View File

@ -45,7 +45,7 @@ public class DataSourceIngestModuleStatusHelper {
* *
* @return True if the task has been canceled, false otherwise. * @return True if the task has been canceled, false otherwise.
*/ */
public boolean isCancelled() { public boolean isIngestJobCancelled() {
return worker.isCancelled(); return worker.isCancelled();
} }

View File

@ -58,9 +58,9 @@ public final class IngestJobContext {
* *
* @param files The files to be processed by the file ingest pipeline. * @param files The files to be processed by the file ingest pipeline.
*/ */
public void addFilesToPipeline(List<AbstractFile> files) { public void addFiles(List<AbstractFile> files) {
for (AbstractFile file : files) { for (AbstractFile file : files) {
IngestManager.getDefault().scheduleFile(ingestJob.getId(), file); IngestManager.getInstance().scheduleFile(ingestJob.getId(), file);
} }
} }
} }

View File

@ -232,7 +232,7 @@ public final class IngestJobLauncher {
} }
if ((!enabledModuleTemplates.isEmpty()) && (dataSources != null) && (!dataSources.isEmpty())) { if ((!enabledModuleTemplates.isEmpty()) && (dataSources != null) && (!dataSources.isEmpty())) {
IngestManager.getDefault().scheduleDataSourceTasks(dataSources, enabledModuleTemplates, ingestConfigPanel.getProcessUnallocSpace()); IngestManager.getInstance().scheduleDataSourceTasks(dataSources, enabledModuleTemplates, ingestConfigPanel.getProcessUnallocSpace());
} }
} }
} }

View File

@ -111,7 +111,7 @@ public class IngestManager {
* *
* @returns Instance of class. * @returns Instance of class.
*/ */
synchronized public static IngestManager getDefault() { synchronized public static IngestManager getInstance() {
if (instance == null) { if (instance == null) {
instance = new IngestManager(); instance = new IngestManager();
} }
@ -409,7 +409,7 @@ public class IngestManager {
if (progress != null) { if (progress != null) {
progress.setDisplayName(displayName + " (Cancelling...)"); progress.setDisplayName(displayName + " (Cancelling...)");
} }
IngestManager.getDefault().stopAll(); IngestManager.getInstance().stopAll();
return true; return true;
} }
}); });
@ -509,7 +509,7 @@ public class IngestManager {
"IngestManager.DataSourceTaskWorker.process.cancelling", "IngestManager.DataSourceTaskWorker.process.cancelling",
"Data source ingest")); "Data source ingest"));
} }
IngestManager.getDefault().stopAll(); IngestManager.getInstance().stopAll();
return true; return true;
} }
}); });
@ -529,7 +529,7 @@ public class IngestManager {
} }
logger.log(Level.INFO, "Data source ingest thread (id={0}) completed", this.id); logger.log(Level.INFO, "Data source ingest thread (id={0}) completed", this.id);
IngestManager.getDefault().reportThreadDone(this.id); IngestManager.getInstance().reportThreadDone(this.id);
return null; return null;
} }
@ -539,11 +539,11 @@ public class IngestManager {
super.get(); super.get();
} catch (CancellationException | InterruptedException e) { } catch (CancellationException | InterruptedException e) {
logger.log(Level.INFO, "Data source ingest thread (id={0}) cancelled", this.id); logger.log(Level.INFO, "Data source ingest thread (id={0}) cancelled", this.id);
IngestManager.getDefault().reportThreadDone(this.id); IngestManager.getInstance().reportThreadDone(this.id);
} catch (Exception ex) { } catch (Exception ex) {
String message = String.format("Data source ingest thread (id=%d) experienced a fatal error", this.id); String message = String.format("Data source ingest thread (id=%d) experienced a fatal error", this.id);
logger.log(Level.SEVERE, message, ex); logger.log(Level.SEVERE, message, ex);
IngestManager.getDefault().reportThreadDone(this.id); IngestManager.getInstance().reportThreadDone(this.id);
} finally { } finally {
progress.finish(); progress.finish();
} }
@ -580,7 +580,7 @@ public class IngestManager {
NbBundle.getMessage(this.getClass(), "IngestManager.FileTaskWorker.process.cancelling", NbBundle.getMessage(this.getClass(), "IngestManager.FileTaskWorker.process.cancelling",
displayName)); displayName));
} }
IngestManager.getDefault().stopAll(); IngestManager.getInstance().stopAll();
return true; return true;
} }
}); });
@ -593,7 +593,7 @@ public class IngestManager {
int processedFiles = 0; int processedFiles = 0;
while (fileScheduler.hasNext()) { while (fileScheduler.hasNext()) {
if (isCancelled()) { if (isCancelled()) {
IngestManager.getDefault().reportThreadDone(this.id); IngestManager.getInstance().reportThreadDone(this.id);
logger.log(Level.INFO, "File ingest thread (id={0}) cancelled", this.id); logger.log(Level.INFO, "File ingest thread (id={0}) cancelled", this.id);
return null; return null;
} }
@ -617,7 +617,7 @@ public class IngestManager {
} }
logger.log(Level.INFO, "File ingest thread (id={0}) completed", this.id); logger.log(Level.INFO, "File ingest thread (id={0}) completed", this.id);
IngestManager.getDefault().reportThreadDone(this.id); IngestManager.getInstance().reportThreadDone(this.id);
return null; return null;
} }
@ -627,11 +627,11 @@ public class IngestManager {
super.get(); super.get();
} catch (CancellationException | InterruptedException e) { } catch (CancellationException | InterruptedException e) {
logger.log(Level.INFO, "File ingest thread (id={0}) cancelled", this.id); logger.log(Level.INFO, "File ingest thread (id={0}) cancelled", this.id);
IngestManager.getDefault().reportThreadDone(this.id); IngestManager.getInstance().reportThreadDone(this.id);
} catch (Exception ex) { } catch (Exception ex) {
String message = String.format("File ingest thread {0} experienced a fatal error", this.id); String message = String.format("File ingest thread {0} experienced a fatal error", this.id);
logger.log(Level.SEVERE, message, ex); logger.log(Level.SEVERE, message, ex);
IngestManager.getDefault().reportThreadDone(this.id); IngestManager.getInstance().reportThreadDone(this.id);
} finally { } finally {
progress.finish(); progress.finish();
} }

View File

@ -126,7 +126,7 @@ import org.sleuthkit.datamodel.Content;
super.componentOpened(); super.componentOpened();
//create manager instance //create manager instance
if (manager == null) { if (manager == null) {
manager = IngestManager.getDefault(); manager = IngestManager.getInstance();
} }
} }
@ -221,7 +221,7 @@ import org.sleuthkit.datamodel.Content;
} }
//stop workers if running //stop workers if running
if (manager == null) { if (manager == null) {
manager = IngestManager.getDefault(); manager = IngestManager.getInstance();
} }
try { try {
manager.stopAll(); manager.stopAll();

View File

@ -45,7 +45,7 @@ public abstract class IngestModuleFactoryAdapter implements IngestModuleFactory
@Override @Override
public IngestModuleIngestJobSettings getDefaultModuleSettings() { public IngestModuleIngestJobSettings getDefaultModuleSettings() {
return new NoIngestModuleSettings(); return new NoIngestModuleIngestJobSettings();
} }
@Override @Override

View File

@ -151,7 +151,7 @@ public final class IngestMonitor {
@Override @Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
final IngestManager manager = IngestManager.getDefault(); final IngestManager manager = IngestManager.getInstance();
//runs checks only if ingest is running //runs checks only if ingest is running
if (manager.isIngestRunning() == false) { if (manager.isIngestRunning() == false) {
@ -166,7 +166,7 @@ public final class IngestMonitor {
MONITOR_LOGGER.log(Level.SEVERE, "Stopping ingest due to low disk space on disk " + diskPath); MONITOR_LOGGER.log(Level.SEVERE, "Stopping ingest due to low disk space on disk " + diskPath);
logger.log(Level.SEVERE, "Stopping ingest due to low disk space on disk " + diskPath); logger.log(Level.SEVERE, "Stopping ingest due to low disk space on disk " + diskPath);
manager.stopAll(); manager.stopAll();
IngestServices.getDefault().postMessage(IngestMessage.createManagerErrorMessage( IngestServices.getInstance().postMessage(IngestMessage.createManagerErrorMessage(
NbBundle.getMessage(this.getClass(), "IngestMonitor.mgrErrMsg.lowDiskSpace.title", diskPath), NbBundle.getMessage(this.getClass(), "IngestMonitor.mgrErrMsg.lowDiskSpace.title", diskPath),
NbBundle.getMessage(this.getClass(), "IngestMonitor.mgrErrMsg.lowDiskSpace.msg", diskPath))); NbBundle.getMessage(this.getClass(), "IngestMonitor.mgrErrMsg.lowDiskSpace.msg", diskPath)));
} }

View File

@ -19,11 +19,9 @@
package org.sleuthkit.autopsy.ingest; package org.sleuthkit.autopsy.ingest;
import java.util.Map; import java.util.Map;
import java.util.logging.Level;
import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.casemodule.Case;
import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.autopsy.coreutils.ModuleSettings; import org.sleuthkit.autopsy.coreutils.ModuleSettings;
import org.sleuthkit.datamodel.AbstractFile;
import org.sleuthkit.datamodel.SleuthkitCase; import org.sleuthkit.datamodel.SleuthkitCase;
/** /**
@ -33,12 +31,10 @@ import org.sleuthkit.datamodel.SleuthkitCase;
*/ */
public final class IngestServices { public final class IngestServices {
private static final Logger logger = Logger.getLogger(IngestServices.class.getName()); private static IngestServices instance = null;
private IngestManager manager; private final IngestManager manager = IngestManager.getInstance();
private static IngestServices instance;
private IngestServices() { private IngestServices() {
this.manager = IngestManager.getDefault();
} }
/** /**
@ -46,7 +42,7 @@ public final class IngestServices {
* *
* @return The ingest services singleton. * @return The ingest services singleton.
*/ */
public static synchronized IngestServices getDefault() { public static synchronized IngestServices getInstance() {
if (instance == null) { if (instance == null) {
instance = new IngestServices(); instance = new IngestServices();
} }
@ -91,20 +87,9 @@ public final class IngestServices {
manager.postIngestMessage(message); manager.postIngestMessage(message);
} }
/**
* Fire module event to notify registered module event listeners
*
* @param eventType the event type, defined in
* IngestManager.IngestManagerEvents
* @param moduleName the module name
*/
public void fireModuleEvent(String eventType, String moduleName) {
IngestManager.fireModuleEvent(eventType, moduleName);
}
/** /**
* Fire module data event to notify registered module data event listeners * Fire module data event to notify registered module data event listeners
* that there is new data of a given type from a module * that there is new data of a given type from a module.
* *
* @param moduleDataEvent module data event, encapsulating blackboard * @param moduleDataEvent module data event, encapsulating blackboard
* artifact data * artifact data
@ -137,6 +122,7 @@ public final class IngestServices {
/** /**
* Gets a specific name/value configuration setting for a module * Gets a specific name/value configuration setting for a module
*
* @param moduleName moduleName identifier unique to that module * @param moduleName moduleName identifier unique to that module
* @param settingName setting name to retrieve * @param settingName setting name to retrieve
* @return setting value for the module / setting name, or null if not found * @return setting value for the module / setting name, or null if not found
@ -147,6 +133,7 @@ public final class IngestServices {
/** /**
* Sets a specific name/value configuration setting for a module * Sets a specific name/value configuration setting for a module
*
* @param moduleName moduleName identifier unique to that module * @param moduleName moduleName identifier unique to that module
* @param settingName setting name to set * @param settingName setting name to set
* @param settingVal setting value to set * @param settingVal setting value to set
@ -157,6 +144,7 @@ public final class IngestServices {
/** /**
* Gets all name/value configuration settings for a module * Gets all name/value configuration settings for a module
*
* @param moduleName moduleName identifier unique to that module * @param moduleName moduleName identifier unique to that module
* @return settings for the module / setting name * @return settings for the module / setting name
*/ */
@ -165,9 +153,12 @@ public final class IngestServices {
} }
/** /**
* Sets all name/value configuration setting for a module. Names not in the list will have settings preserved. * Sets all name/value configuration setting for a module. Names not in the
* list will have settings preserved.
*
* @param moduleName moduleName identifier unique to that module * @param moduleName moduleName identifier unique to that module
* @param settings settings to set and replace old settings, keeping settings not specified in the map. * @param settings settings to set and replace old settings, keeping
* settings not specified in the map.
* *
*/ */
public void setConfigSettings(String moduleName, Map<String, String> settings) { public void setConfigSettings(String moduleName, Map<String, String> settings) {

View File

@ -46,7 +46,7 @@ public class Installer extends ModuleInstall {
Logger logger = Logger.getLogger(Installer.class.getName()); Logger logger = Logger.getLogger(Installer.class.getName());
logger.log(Level.INFO, "Initializing ingest manager"); logger.log(Level.INFO, "Initializing ingest manager");
final IngestManager manager = IngestManager.getDefault(); final IngestManager manager = IngestManager.getInstance();
WindowManager.getDefault().invokeWhenUIReady(new Runnable() { WindowManager.getDefault().invokeWhenUIReady(new Runnable() {
@Override @Override
public void run() { public void run() {

View File

@ -22,7 +22,7 @@ package org.sleuthkit.autopsy.ingest;
* Implementation of the IngestModuleOptions interface for use by ingest modules * Implementation of the IngestModuleOptions interface for use by ingest modules
* that do not have per ingest job options. * that do not have per ingest job options.
*/ */
public final class NoIngestModuleSettings implements IngestModuleIngestJobSettings { public final class NoIngestModuleIngestJobSettings implements IngestModuleIngestJobSettings {
private final String setting = "None"; private final String setting = "None";

View File

@ -37,19 +37,19 @@ import org.openide.util.NbBundle;
import org.sleuthkit.datamodel.Content; import org.sleuthkit.datamodel.Content;
/** /**
* Dialog box that allows ingest modules to be run on a data source. Used * Dialog box that allows ingest modules to be run on a data source that has
* outside of the wizards. * already been added to a case.
*/ */
public final class IngestDialog extends JDialog { public final class RunIngestModulesDialog extends JDialog {
private static final String TITLE = NbBundle.getMessage(IngestDialog.class, "IngestDialog.title.text"); private static final String TITLE = NbBundle.getMessage(RunIngestModulesDialog.class, "IngestDialog.title.text");
private static Dimension DIMENSIONS = new Dimension(500, 300); private static Dimension DIMENSIONS = new Dimension(500, 300);
private List<Content> dataSources = new ArrayList<>(); private List<Content> dataSources = new ArrayList<>();
private IngestJobLauncher ingestJobLauncher; private IngestJobLauncher ingestJobLauncher;
public IngestDialog(JFrame frame, String title, boolean modal) { public RunIngestModulesDialog(JFrame frame, String title, boolean modal) {
super(frame, title, modal); super(frame, title, modal);
ingestJobLauncher = new IngestJobLauncher(IngestDialog.class.getCanonicalName()); ingestJobLauncher = new IngestJobLauncher(RunIngestModulesDialog.class.getCanonicalName());
List<String> messages = ingestJobLauncher.getIngestJobConfigWarnings(); List<String> messages = ingestJobLauncher.getIngestJobConfigWarnings();
if (messages.isEmpty() == false) { if (messages.isEmpty() == false) {
StringBuilder warning = new StringBuilder(); StringBuilder warning = new StringBuilder();
@ -60,7 +60,7 @@ public final class IngestDialog extends JDialog {
} }
} }
public IngestDialog() { public RunIngestModulesDialog() {
this(new JFrame(TITLE), TITLE, true); this(new JFrame(TITLE), TITLE, true);
} }

View File

@ -91,7 +91,7 @@ import org.sleuthkit.datamodel.*;
// Check if ingest has finished // Check if ingest has finished
String ingestwarning = ""; String ingestwarning = "";
if (IngestManager.getDefault().isIngestRunning()) { if (IngestManager.getInstance().isIngestRunning()) {
ingestwarning = NbBundle.getMessage(this.getClass(), "ReportBodyFile.ingestWarning.text"); ingestwarning = NbBundle.getMessage(this.getClass(), "ReportBodyFile.ingestWarning.text");
} }

View File

@ -963,7 +963,7 @@ import org.sleuthkit.datamodel.TskData.TSK_DB_FILES_TYPE_ENUM;
StringBuilder summary = new StringBuilder(); StringBuilder summary = new StringBuilder();
boolean running = false; boolean running = false;
if (IngestManager.getDefault().isIngestRunning() || IngestManager.getDefault().isIngestRunning()) { if (IngestManager.getInstance().isIngestRunning()) {
running = true; running = true;
} }

View File

@ -56,7 +56,7 @@ import org.sleuthkit.datamodel.TskData.TSK_DB_FILES_TYPE_ENUM;
public final class ExifParserFileIngestModule extends IngestModuleAdapter implements FileIngestModule { public final class ExifParserFileIngestModule extends IngestModuleAdapter implements FileIngestModule {
private static final Logger logger = Logger.getLogger(ExifParserFileIngestModule.class.getName()); private static final Logger logger = Logger.getLogger(ExifParserFileIngestModule.class.getName());
private final IngestServices services = IngestServices.getDefault(); private final IngestServices services = IngestServices.getInstance();
private int filesProcessed = 0; private int filesProcessed = 0;
private boolean filesToFire = false; private boolean filesToFire = false;

View File

@ -50,7 +50,7 @@ public class FileExtMismatchContextMenuActionsProvider implements ContextMenuAct
ArrayList<Action> actions = new ArrayList<>(); ArrayList<Action> actions = new ArrayList<>();
// Ignore if file ingest is in progress. // Ignore if file ingest is in progress.
if (!IngestManager.getDefault().isIngestRunning()) { if (!IngestManager.getInstance().isIngestRunning()) {
final Collection<? extends BlackboardArtifact> selectedArts = Utilities.actionsGlobalContext().lookupAll(BlackboardArtifact.class); final Collection<? extends BlackboardArtifact> selectedArts = Utilities.actionsGlobalContext().lookupAll(BlackboardArtifact.class);

View File

@ -48,7 +48,7 @@ public class FileExtMismatchIngestModule extends IngestModuleAdapter implements
private static final Logger logger = Logger.getLogger(FileExtMismatchIngestModule.class.getName()); private static final Logger logger = Logger.getLogger(FileExtMismatchIngestModule.class.getName());
private static int messageId = 0; // RJCTODO: This is not thread safe private static int messageId = 0; // RJCTODO: This is not thread safe
private final IngestServices services = IngestServices.getDefault(); private final IngestServices services = IngestServices.getInstance();
private final FileExtMismatchDetectorModuleSettings settings; private final FileExtMismatchDetectorModuleSettings settings;
private HashMap<String, String[]> SigTypeToExtMap = new HashMap<>(); private HashMap<String, String[]> SigTypeToExtMap = new HashMap<>();
private long processTime = 0; private long processTime = 0;

View File

@ -109,7 +109,7 @@ public class FileTypeIdIngestModule extends IngestModuleAdapter implements FileI
.append(NbBundle.getMessage(this.getClass(), "FileTypeIdIngestModule.complete.totalFiles")) .append(NbBundle.getMessage(this.getClass(), "FileTypeIdIngestModule.complete.totalFiles"))
.append("</td><td>").append(numFiles).append("</td></tr>\n"); .append("</td><td>").append(numFiles).append("</td></tr>\n");
detailsSb.append("</table>"); detailsSb.append("</table>");
IngestServices.getDefault().postMessage(IngestMessage.createMessage(++messageId, IngestMessage.MessageType.INFO, FileTypeIdModuleFactory.getModuleName(), IngestServices.getInstance().postMessage(IngestMessage.createMessage(++messageId, IngestMessage.MessageType.INFO, FileTypeIdModuleFactory.getModuleName(),
NbBundle.getMessage(this.getClass(), NbBundle.getMessage(this.getClass(),
"FileTypeIdIngestModule.complete.srvMsg.text"), "FileTypeIdIngestModule.complete.srvMsg.text"),
detailsSb.toString())); detailsSb.toString()));

View File

@ -82,7 +82,7 @@ final class AddContentToHashDbAction extends AbstractAction implements Presenter
super(SINGLE_SELECTION_NAME); super(SINGLE_SELECTION_NAME);
// Disable the menu if file ingest is in progress. // Disable the menu if file ingest is in progress.
if (IngestManager.getDefault().isIngestRunning()) { if (IngestManager.getInstance().isIngestRunning()) {
setEnabled(false); setEnabled(false);
return; return;
} }

View File

@ -48,7 +48,7 @@ public class HashDbIngestModule extends IngestModuleAdapter implements FileInges
private static final Logger logger = Logger.getLogger(HashDbIngestModule.class.getName()); private static final Logger logger = Logger.getLogger(HashDbIngestModule.class.getName());
private static final int MAX_COMMENT_SIZE = 500; private static final int MAX_COMMENT_SIZE = 500;
private static int messageId = 0; // RJCTODO: This is not thread safe private static int messageId = 0; // RJCTODO: This is not thread safe
private final IngestServices services = IngestServices.getDefault(); private final IngestServices services = IngestServices.getInstance();
private final Hash hasher = new Hash(); private final Hash hasher = new Hash();
private final SleuthkitCase skCase = Case.getCurrentCase().getSleuthkitCase(); private final SleuthkitCase skCase = Case.getCurrentCase().getSleuthkitCase();
private final HashDbManager hashDbManager = HashDbManager.getInstance(); private final HashDbManager hashDbManager = HashDbManager.getInstance();

View File

@ -345,7 +345,7 @@ public class HashDbManager implements PropertyChangeListener {
*/ */
public synchronized void removeHashDatabase(HashDb hashDb) throws HashDbManagerException { public synchronized void removeHashDatabase(HashDb hashDb) throws HashDbManagerException {
// Don't remove a database if ingest is running // Don't remove a database if ingest is running
boolean ingestIsRunning = IngestManager.getDefault().isIngestRunning(); boolean ingestIsRunning = IngestManager.getInstance().isIngestRunning();
if (ingestIsRunning) { if (ingestIsRunning) {
throw new HashDbManagerException(NbBundle.getMessage(this.getClass(), "HashDbManager.ingestRunningExceptionMsg")); throw new HashDbManagerException(NbBundle.getMessage(this.getClass(), "HashDbManager.ingestRunningExceptionMsg"));
} }

View File

@ -55,7 +55,7 @@ import org.sleuthkit.autopsy.ingest.IngestManager;
* Check if ingest is currently running and refresh the panel accordingly. * Check if ingest is currently running and refresh the panel accordingly.
*/ */
public void refresh() { public void refresh() {
boolean running = IngestManager.getDefault().isIngestRunning(); boolean running = IngestManager.getInstance().isIngestRunning();
if(running) { if(running) {
titleLabel.setForeground(Color.red); titleLabel.setForeground(Color.red);
titleLabel.setText(NbBundle.getMessage(this.getClass(), "HashDbSearchPanel.titleText.ingestOngoing")); titleLabel.setText(NbBundle.getMessage(this.getClass(), "HashDbSearchPanel.titleText.ingestOngoing"));

View File

@ -105,7 +105,7 @@ public final class HashLookupSettingsPanel extends IngestModuleGlobalSetttingsPa
} }
private void updateComponentsForNoSelection() { private void updateComponentsForNoSelection() {
boolean ingestIsRunning = IngestManager.getDefault().isIngestRunning(); boolean ingestIsRunning = IngestManager.getInstance().isIngestRunning();
// Update descriptive labels. // Update descriptive labels.
hashDbNameLabel.setText(NO_SELECTION_TEXT); hashDbNameLabel.setText(NO_SELECTION_TEXT);
@ -135,7 +135,7 @@ public final class HashLookupSettingsPanel extends IngestModuleGlobalSetttingsPa
} }
private void updateComponentsForSelection(HashDb db) { private void updateComponentsForSelection(HashDb db) {
boolean ingestIsRunning = IngestManager.getDefault().isIngestRunning(); boolean ingestIsRunning = IngestManager.getInstance().isIngestRunning();
// Update descriptive labels. // Update descriptive labels.
hashDbNameLabel.setText(db.getHashSetName()); hashDbNameLabel.setText(db.getHashSetName());

View File

@ -86,7 +86,7 @@ abstract class AbstractKeywordSearchPerformer extends javax.swing.JPanel impleme
@Override @Override
public void search() { public void search() {
boolean isIngestRunning = IngestManager.getDefault().isIngestRunning(); boolean isIngestRunning = IngestManager.getInstance().isIngestRunning();
if (filesIndexed == 0) { if (filesIndexed == 0) {
if (isIngestRunning) { if (isIngestRunning) {

View File

@ -124,7 +124,7 @@ class KeywordSearchEditListPanel extends javax.swing.JPanel implements ListSelec
pasteMenuItem.addActionListener(actList); pasteMenuItem.addActionListener(actList);
selectAllMenuItem.addActionListener(actList); selectAllMenuItem.addActionListener(actList);
if (IngestManager.getDefault().isIngestRunning()) { if (IngestManager.getInstance().isIngestRunning()) {
initIngest(0); initIngest(0);
} else { } else {
initIngest(1); initIngest(1);

View File

@ -130,7 +130,7 @@ class KeywordSearchGlobalLanguageSettingsPanel extends javax.swing.JPanel implem
enableUTF8Checkbox.setSelected(utf8); enableUTF8Checkbox.setSelected(utf8);
final boolean extractEnabled = utf16 || utf8; final boolean extractEnabled = utf16 || utf8;
boolean ingestNotRunning = !IngestManager.getDefault().isIngestRunning() && !IngestManager.getDefault().isIngestRunning(); boolean ingestNotRunning = !IngestManager.getInstance().isIngestRunning() && !IngestManager.getInstance().isIngestRunning();
//enable / disable checboxes //enable / disable checboxes
activateScriptsCheckboxes(extractEnabled && ingestNotRunning); activateScriptsCheckboxes(extractEnabled && ingestNotRunning);
enableUTF16Checkbox.setEnabled(ingestNotRunning); enableUTF16Checkbox.setEnabled(ingestNotRunning);

View File

@ -44,7 +44,7 @@ class KeywordSearchGlobalSearchSettingsPanel extends javax.swing.JPanel implemen
private void activateWidgets() { private void activateWidgets() {
skipNSRLCheckBox.setSelected(KeywordSearchSettings.getSkipKnown()); skipNSRLCheckBox.setSelected(KeywordSearchSettings.getSkipKnown());
showSnippetsCB.setSelected(KeywordSearchSettings.getShowSnippets()); showSnippetsCB.setSelected(KeywordSearchSettings.getShowSnippets());
boolean enable = !IngestManager.getDefault().isIngestRunning(); boolean enable = !IngestManager.getInstance().isIngestRunning();
skipNSRLCheckBox.setEnabled(enable); skipNSRLCheckBox.setEnabled(enable);
setTimeSettingEnabled(enable); setTimeSettingEnabled(enable);

View File

@ -95,7 +95,7 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme
} }
}; };
private static final Logger logger = Logger.getLogger(KeywordSearchIngestModule.class.getName()); private static final Logger logger = Logger.getLogger(KeywordSearchIngestModule.class.getName());
private IngestServices services = IngestServices.getDefault(); private IngestServices services = IngestServices.getInstance();
private Ingester ingester = null; private Ingester ingester = null;
private volatile boolean commitIndex = false; //whether to commit index next time private volatile boolean commitIndex = false; //whether to commit index next time
private volatile boolean runSearcher = false; //whether to run searcher next time private volatile boolean runSearcher = false; //whether to run searcher next time

View File

@ -114,7 +114,7 @@ class KeywordSearchListsViewerPanel extends AbstractKeywordSearchPerformer {
} }
}); });
if (IngestManager.getDefault().isIngestRunning()) { if (IngestManager.getInstance().isIngestRunning()) {
initIngest(true); initIngest(true);
} else { } else {
initIngest(false); initIngest(false);

View File

@ -543,7 +543,7 @@ class KeywordSearchResultFactory extends ChildFactory<KeyValueQuery> {
}); });
if (!this.isCancelled() && !na.isEmpty()) { if (!this.isCancelled() && !na.isEmpty()) {
IngestServices.getDefault().fireModuleDataEvent(new ModuleDataEvent(KeywordSearchModuleFactory.getModuleName(), ARTIFACT_TYPE.TSK_KEYWORD_HIT, na)); IngestServices.getInstance().fireModuleDataEvent(new ModuleDataEvent(KeywordSearchModuleFactory.getModuleName(), ARTIFACT_TYPE.TSK_KEYWORD_HIT, na));
} }
} }

View File

@ -126,7 +126,7 @@ class Chrome extends Extract {
continue; continue;
} }
File dbFile = new File(temps); File dbFile = new File(temps);
if (controller.isCancelled()) { if (controller.isIngestJobCancelled()) {
dbFile.delete(); dbFile.delete();
break; break;
} }
@ -158,7 +158,7 @@ class Chrome extends Extract {
dbFile.delete(); dbFile.delete();
} }
IngestServices.getDefault().fireModuleDataEvent(new ModuleDataEvent(NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"), IngestServices.getInstance().fireModuleDataEvent(new ModuleDataEvent(NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"),
BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_HISTORY)); BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_HISTORY));
} }
@ -204,7 +204,7 @@ class Chrome extends Extract {
logger.log(Level.INFO, "{0}- Now getting Bookmarks from {1}", new Object[]{moduleName, temps}); logger.log(Level.INFO, "{0}- Now getting Bookmarks from {1}", new Object[]{moduleName, temps});
File dbFile = new File(temps); File dbFile = new File(temps);
if (controller.isCancelled()) { if (controller.isIngestJobCancelled()) {
dbFile.delete(); dbFile.delete();
break; break;
} }
@ -300,7 +300,7 @@ class Chrome extends Extract {
dbFile.delete(); dbFile.delete();
} }
IngestServices.getDefault().fireModuleDataEvent(new ModuleDataEvent(NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"), BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_BOOKMARK)); IngestServices.getInstance().fireModuleDataEvent(new ModuleDataEvent(NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"), BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_BOOKMARK));
} }
/** /**
@ -344,7 +344,7 @@ class Chrome extends Extract {
continue; continue;
} }
File dbFile = new File(temps); File dbFile = new File(temps);
if (controller.isCancelled()) { if (controller.isIngestJobCancelled()) {
dbFile.delete(); dbFile.delete();
break; break;
} }
@ -378,7 +378,7 @@ class Chrome extends Extract {
dbFile.delete(); dbFile.delete();
} }
IngestServices.getDefault().fireModuleDataEvent(new ModuleDataEvent(NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"), BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_COOKIE)); IngestServices.getInstance().fireModuleDataEvent(new ModuleDataEvent(NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"), BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_COOKIE));
} }
/** /**
@ -420,7 +420,7 @@ class Chrome extends Extract {
continue; continue;
} }
File dbFile = new File(temps); File dbFile = new File(temps);
if (controller.isCancelled()) { if (controller.isIngestJobCancelled()) {
dbFile.delete(); dbFile.delete();
break; break;
} }
@ -467,7 +467,7 @@ class Chrome extends Extract {
dbFile.delete(); dbFile.delete();
} }
IngestServices.getDefault().fireModuleDataEvent(new ModuleDataEvent(NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"), IngestServices.getInstance().fireModuleDataEvent(new ModuleDataEvent(NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"),
BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_DOWNLOAD)); BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_DOWNLOAD));
} }
@ -511,7 +511,7 @@ class Chrome extends Extract {
continue; continue;
} }
File dbFile = new File(temps); File dbFile = new File(temps);
if (controller.isCancelled()) { if (controller.isIngestJobCancelled()) {
dbFile.delete(); dbFile.delete();
break; break;
} }
@ -552,7 +552,7 @@ class Chrome extends Extract {
dbFile.delete(); dbFile.delete();
} }
IngestServices.getDefault().fireModuleDataEvent(new ModuleDataEvent(NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"), BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_HISTORY)); IngestServices.getInstance().fireModuleDataEvent(new ModuleDataEvent(NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"), BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_HISTORY));
} }
private boolean isChromePreVersion30(String temps) { private boolean isChromePreVersion30(String temps) {

View File

@ -60,7 +60,7 @@ import org.sleuthkit.datamodel.*;
*/ */
class ExtractIE extends Extract { class ExtractIE extends Extract {
private static final Logger logger = Logger.getLogger(ExtractIE.class.getName()); private static final Logger logger = Logger.getLogger(ExtractIE.class.getName());
private IngestServices services = IngestServices.getDefault(); private IngestServices services = IngestServices.getInstance();
private String moduleTempResultsDir; private String moduleTempResultsDir;
private String PASCO_LIB_PATH; private String PASCO_LIB_PATH;
private String JAVA_PATH; private String JAVA_PATH;
@ -110,7 +110,7 @@ class ExtractIE extends Extract {
continue; continue;
} }
if (controller.isCancelled()) { if (controller.isIngestJobCancelled()) {
break; break;
} }
@ -202,7 +202,7 @@ class ExtractIE extends Extract {
dataFound = true; dataFound = true;
for (AbstractFile cookiesFile : cookiesFiles) { for (AbstractFile cookiesFile : cookiesFiles) {
if (controller.isCancelled()) { if (controller.isIngestJobCancelled()) {
break; break;
} }
if (cookiesFile.getSize() == 0) { if (cookiesFile.getSize() == 0) {
@ -312,7 +312,7 @@ class ExtractIE extends Extract {
//indexFileName = "index" + Long.toString(bbart.getArtifactID()) + ".dat"; //indexFileName = "index" + Long.toString(bbart.getArtifactID()) + ".dat";
temps = RAImageIngestModule.getRATempPath(currentCase, "IE") + File.separator + indexFileName; temps = RAImageIngestModule.getRATempPath(currentCase, "IE") + File.separator + indexFileName;
File datFile = new File(temps); File datFile = new File(temps);
if (controller.isCancelled()) { if (controller.isIngestJobCancelled()) {
break; break;
} }
try { try {

View File

@ -171,7 +171,7 @@ class ExtractRegistry extends Extract {
continue; continue;
} }
if (controller.isCancelled()) { if (controller.isIngestJobCancelled()) {
break; break;
} }
@ -187,7 +187,7 @@ class ExtractRegistry extends Extract {
logger.log(Level.INFO, moduleName + "- Now getting registry information from " + regFileNameLocal); logger.log(Level.INFO, moduleName + "- Now getting registry information from " + regFileNameLocal);
RegOutputFiles regOutputFiles = executeRegRip(regFileNameLocal, outputPathBase); RegOutputFiles regOutputFiles = executeRegRip(regFileNameLocal, outputPathBase);
if (controller.isCancelled()) { if (controller.isIngestJobCancelled()) {
break; break;
} }

View File

@ -58,7 +58,7 @@ class Firefox extends Extract {
private static final String bookmarkQuery = "SELECT fk, moz_bookmarks.title, url, (moz_bookmarks.dateAdded/1000000) as dateAdded FROM moz_bookmarks INNER JOIN moz_places ON moz_bookmarks.fk=moz_places.id"; private static final String bookmarkQuery = "SELECT fk, moz_bookmarks.title, url, (moz_bookmarks.dateAdded/1000000) as dateAdded FROM moz_bookmarks INNER JOIN moz_places ON moz_bookmarks.fk=moz_places.id";
private static final String downloadQuery = "SELECT target, source,(startTime/1000000) as startTime, maxBytes FROM moz_downloads"; private static final String downloadQuery = "SELECT target, source,(startTime/1000000) as startTime, maxBytes FROM moz_downloads";
private static final String downloadQueryVersion24 = "SELECT url, content as target, (lastModified/1000000) as lastModified FROM moz_places, moz_annos WHERE moz_places.id = moz_annos.place_id AND moz_annos.anno_attribute_id = 3"; private static final String downloadQueryVersion24 = "SELECT url, content as target, (lastModified/1000000) as lastModified FROM moz_places, moz_annos WHERE moz_places.id = moz_annos.place_id AND moz_annos.anno_attribute_id = 3";
private final IngestServices services = IngestServices.getDefault(); private final IngestServices services = IngestServices.getInstance();
Firefox() { Firefox() {
moduleName = NbBundle.getMessage(Firefox.class, "Firefox.moduleName"); moduleName = NbBundle.getMessage(Firefox.class, "Firefox.moduleName");
@ -111,7 +111,7 @@ class Firefox extends Extract {
continue; continue;
} }
File dbFile = new File(temps); File dbFile = new File(temps);
if (controller.isCancelled()) { if (controller.isIngestJobCancelled()) {
dbFile.delete(); dbFile.delete();
break; break;
} }
@ -195,7 +195,7 @@ class Firefox extends Extract {
continue; continue;
} }
File dbFile = new File(temps); File dbFile = new File(temps);
if (controller.isCancelled()) { if (controller.isIngestJobCancelled()) {
dbFile.delete(); dbFile.delete();
break; break;
} }
@ -278,7 +278,7 @@ class Firefox extends Extract {
continue; continue;
} }
File dbFile = new File(temps); File dbFile = new File(temps);
if (controller.isCancelled()) { if (controller.isIngestJobCancelled()) {
dbFile.delete(); dbFile.delete();
break; break;
} }
@ -392,7 +392,7 @@ class Firefox extends Extract {
continue; continue;
} }
File dbFile = new File(temps); File dbFile = new File(temps);
if (controller.isCancelled()) { if (controller.isIngestJobCancelled()) {
dbFile.delete(); dbFile.delete();
break; break;
} }
@ -504,7 +504,7 @@ class Firefox extends Extract {
continue; continue;
} }
File dbFile = new File(temps); File dbFile = new File(temps);
if (controller.isCancelled()) { if (controller.isIngestJobCancelled()) {
dbFile.delete(); dbFile.delete();
break; break;
} }

View File

@ -48,7 +48,7 @@ public final class RAImageIngestModule extends IngestModuleAdapter implements Da
private static int messageId = 0; private static int messageId = 0;
private final List<Extract> extracters = new ArrayList<>(); private final List<Extract> extracters = new ArrayList<>();
private final List<Extract> browserExtracters = new ArrayList<>(); private final List<Extract> browserExtracters = new ArrayList<>();
private IngestServices services = IngestServices.getDefault(); private IngestServices services = IngestServices.getInstance();
private StringBuilder subCompleted = new StringBuilder(); private StringBuilder subCompleted = new StringBuilder();
RAImageIngestModule() { RAImageIngestModule() {
@ -93,7 +93,7 @@ public final class RAImageIngestModule extends IngestModuleAdapter implements Da
for (int i = 0; i < extracters.size(); i++) { for (int i = 0; i < extracters.size(); i++) {
Extract extracter = extracters.get(i); Extract extracter = extracters.get(i);
if (controller.isCancelled()) { if (controller.isIngestJobCancelled()) {
logger.log(Level.INFO, "Recent Activity has been canceled, quitting before {0}", extracter.getName()); logger.log(Level.INFO, "Recent Activity has been canceled, quitting before {0}", extracter.getName());
break; break;
} }

View File

@ -48,7 +48,7 @@ import org.sleuthkit.datamodel.*;
*/ */
class RecentDocumentsByLnk extends Extract { class RecentDocumentsByLnk extends Extract {
private static final Logger logger = Logger.getLogger(RecentDocumentsByLnk.class.getName()); private static final Logger logger = Logger.getLogger(RecentDocumentsByLnk.class.getName());
private IngestServices services = IngestServices.getDefault(); private IngestServices services = IngestServices.getInstance();
/** /**
* Find the documents that Windows stores about recent documents and make artifacts. * Find the documents that Windows stores about recent documents and make artifacts.
@ -76,7 +76,7 @@ class RecentDocumentsByLnk extends Extract {
dataFound = true; dataFound = true;
for (AbstractFile recentFile : recentFiles) { for (AbstractFile recentFile : recentFiles) {
if (controller.isCancelled()) { if (controller.isIngestJobCancelled()) {
break; break;
} }

View File

@ -255,7 +255,7 @@ class SearchEngineURLQueryAnalyzer extends Extract {
Collection<BlackboardAttribute> listAttributes = currentCase.getSleuthkitCase().getMatchingAttributes("Where `artifact_id` = " + artifact.getArtifactID()); Collection<BlackboardAttribute> listAttributes = currentCase.getSleuthkitCase().getMatchingAttributes("Where `artifact_id` = " + artifact.getArtifactID());
getAttributes: getAttributes:
for (BlackboardAttribute attribute : listAttributes) { for (BlackboardAttribute attribute : listAttributes) {
if (controller.isCancelled()) { if (controller.isIngestJobCancelled()) {
break getAll; //User cancled the process. break getAll; //User cancled the process.
} }
if (attribute.getAttributeTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_URL.getTypeID()) { if (attribute.getAttributeTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_URL.getTypeID()) {
@ -292,10 +292,10 @@ class SearchEngineURLQueryAnalyzer extends Extract {
} catch (TskException e) { } catch (TskException e) {
logger.log(Level.SEVERE, "Encountered error retrieving artifacts for search engine queries", e); logger.log(Level.SEVERE, "Encountered error retrieving artifacts for search engine queries", e);
} finally { } finally {
if (controller.isCancelled()) { if (controller.isIngestJobCancelled()) {
logger.info("Operation terminated by user."); logger.info("Operation terminated by user.");
} }
IngestServices.getDefault().fireModuleDataEvent(new ModuleDataEvent( IngestServices.getInstance().fireModuleDataEvent(new ModuleDataEvent(
NbBundle.getMessage(this.getClass(), "SearchEngineURLQueryAnalyzer.parentModuleName.noSpace"), NbBundle.getMessage(this.getClass(), "SearchEngineURLQueryAnalyzer.parentModuleName.noSpace"),
BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_SEARCH_QUERY)); BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_SEARCH_QUERY));
logger.info("Extracted " + totalQueries + " queries from the blackboard"); logger.info("Extracted " + totalQueries + " queries from the blackboard");

View File

@ -201,7 +201,7 @@ class ScalpelCarverIngestModule extends IngestModuleAdapter implements FileInges
} }
// get the IngestServices object // get the IngestServices object
IngestServices is = IngestServices.getDefault(); IngestServices is = IngestServices.getInstance();
// get the parent directory of the carved files // get the parent directory of the carved files
Content carvedFileDir = null; Content carvedFileDir = null;
@ -221,7 +221,7 @@ class ScalpelCarverIngestModule extends IngestModuleAdapter implements FileInges
} }
// reschedule carved files // reschedule carved files
context.addFilesToPipeline(new ArrayList<AbstractFile>(carvedFiles)); context.addFiles(new ArrayList<AbstractFile>(carvedFiles));
return ProcessResult.OK; return ProcessResult.OK;
} }

View File

@ -68,7 +68,7 @@ import org.sleuthkit.autopsy.ingest.ModuleDataEvent;
public final class SevenZipIngestModule extends IngestModuleAdapter implements FileIngestModule { public final class SevenZipIngestModule extends IngestModuleAdapter implements FileIngestModule {
private static final Logger logger = Logger.getLogger(SevenZipIngestModule.class.getName()); private static final Logger logger = Logger.getLogger(SevenZipIngestModule.class.getName());
private IngestServices services = IngestServices.getDefault(); private IngestServices services = IngestServices.getInstance();
private volatile int messageID = 0; // RJCTODO: This is not actually thread safe private volatile int messageID = 0; // RJCTODO: This is not actually thread safe
static final String[] SUPPORTED_EXTENSIONS = {"zip", "rar", "arj", "7z", "7zip", "gzip", "gz", "bzip2", "tar", "tgz",}; // "iso"}; static final String[] SUPPORTED_EXTENSIONS = {"zip", "rar", "arj", "7z", "7zip", "gzip", "gz", "bzip2", "tar", "tgz",}; // "iso"};
private String unpackDir; //relative to the case, to store in db private String unpackDir; //relative to the case, to store in db
@ -174,7 +174,7 @@ public final class SevenZipIngestModule extends IngestModuleAdapter implements F
List<AbstractFile> unpackedFiles = unpack(abstractFile); List<AbstractFile> unpackedFiles = unpack(abstractFile);
if (!unpackedFiles.isEmpty()) { if (!unpackedFiles.isEmpty()) {
sendNewFilesEvent(abstractFile, unpackedFiles); sendNewFilesEvent(abstractFile, unpackedFiles);
context.addFilesToPipeline(unpackedFiles); context.addFiles(unpackedFiles);
} }
return ProcessResult.OK; return ProcessResult.OK;

View File

@ -1164,7 +1164,7 @@ public class Timeline extends CallableSystemAction implements Presenter.Toolbar,
logger.log(Level.INFO, "Error creating timeline, there are no data sources. "); logger.log(Level.INFO, "Error creating timeline, there are no data sources. ");
} else { } else {
if (IngestManager.getDefault().isIngestRunning()) { if (IngestManager.getInstance().isIngestRunning()) {
int answer = JOptionPane.showConfirmDialog(new JFrame(), int answer = JOptionPane.showConfirmDialog(new JFrame(),
NbBundle.getMessage(this.getClass(), NbBundle.getMessage(this.getClass(),
"Timeline.initTimeline.confDlg.genBeforeIngest.msg"), "Timeline.initTimeline.confDlg.genBeforeIngest.msg"),

View File

@ -45,7 +45,7 @@ public class EwfVerifyIngestModule extends IngestModuleAdapter implements DataSo
private static final Logger logger = Logger.getLogger(EwfVerifyIngestModule.class.getName()); private static final Logger logger = Logger.getLogger(EwfVerifyIngestModule.class.getName());
private static final long DEFAULT_CHUNK_SIZE = 32 * 1024; private static final long DEFAULT_CHUNK_SIZE = 32 * 1024;
private static final IngestServices services = IngestServices.getDefault(); private static final IngestServices services = IngestServices.getInstance();
private Image img; private Image img;
private String imgName; private String imgName;
private MessageDigest messageDigest; private MessageDigest messageDigest;
@ -146,7 +146,7 @@ public class EwfVerifyIngestModule extends IngestModuleAdapter implements DataSo
// Read in byte size chunks and update the hash value with the data. // Read in byte size chunks and update the hash value with the data.
for (int i = 0; i < totalChunks; i++) { for (int i = 0; i < totalChunks; i++) {
if (statusHelper.isCancelled()) { if (statusHelper.isIngestJobCancelled()) {
return ProcessResult.OK; return ProcessResult.OK;
} }
data = new byte[(int) chunkSize]; data = new byte[(int) chunkSize];

View File

@ -53,7 +53,7 @@ import org.sleuthkit.datamodel.TskException;
public final class ThunderbirdMboxFileIngestModule extends IngestModuleAdapter implements FileIngestModule { public final class ThunderbirdMboxFileIngestModule extends IngestModuleAdapter implements FileIngestModule {
private static final Logger logger = Logger.getLogger(ThunderbirdMboxFileIngestModule.class.getName()); private static final Logger logger = Logger.getLogger(ThunderbirdMboxFileIngestModule.class.getName());
private IngestServices services = IngestServices.getDefault(); private IngestServices services = IngestServices.getInstance();
private int messageId = 0; // RJCTODO: Not thread safe private int messageId = 0; // RJCTODO: Not thread safe
private FileManager fileManager; private FileManager fileManager;
private IngestJobContext context; private IngestJobContext context;
@ -291,7 +291,7 @@ public final class ThunderbirdMboxFileIngestModule extends IngestModuleAdapter i
services.fireModuleContentEvent(new ModuleContentEvent(derived)); services.fireModuleContentEvent(new ModuleContentEvent(derived));
} }
} }
context.addFilesToPipeline(derivedFiles); context.addFiles(derivedFiles);
services.fireModuleDataEvent(new ModuleDataEvent(EmailParserModuleFactory.getModuleName(), BlackboardArtifact.ARTIFACT_TYPE.TSK_EMAIL_MSG)); services.fireModuleDataEvent(new ModuleDataEvent(EmailParserModuleFactory.getModuleName(), BlackboardArtifact.ARTIFACT_TYPE.TSK_EMAIL_MSG));
} }