diff --git a/Core/src/org/sleuthkit/autopsy/examples/SampleDataSourceIngestModule.java b/Core/src/org/sleuthkit/autopsy/examples/SampleDataSourceIngestModule.java index c3a1df985b..47a14829d4 100755 --- a/Core/src/org/sleuthkit/autopsy/examples/SampleDataSourceIngestModule.java +++ b/Core/src/org/sleuthkit/autopsy/examples/SampleDataSourceIngestModule.java @@ -49,9 +49,10 @@ import org.sleuthkit.datamodel.TskCoreException; * IngestModuleAdapter abstract class could have been used as a base class to * obtain default implementations of many of the DataSourceIngestModule methods. */ -// RJCTODO: Add service provider annotation (commend out) -// RJCTODO: Remove inheritance from IngestModuleAdapter and provide better documentation, -// and more extensive demonstration of how to use various ingest services. +// RJCTODO: Add factory with service provider annotation (commend out) +// RJCTODO: Remove inheritance from IngestModuleAdapter to show full implementation +// and provide better documentation, and more extensive demonstration of how to +// use various ingest services. class SampleDataSourceIngestModule extends IngestModuleAdapter implements DataSourceIngestModule { private static final Logger logger = Logger.getLogger(SampleDataSourceIngestModule.class); diff --git a/Core/src/org/sleuthkit/autopsy/examples/SampleFileIngestModule.java b/Core/src/org/sleuthkit/autopsy/examples/SampleFileIngestModule.java index f8c701a2d5..69ad4337a1 100755 --- a/Core/src/org/sleuthkit/autopsy/examples/SampleFileIngestModule.java +++ b/Core/src/org/sleuthkit/autopsy/examples/SampleFileIngestModule.java @@ -54,9 +54,10 @@ import org.sleuthkit.datamodel.TskData; * org.sleuthkit.autopsy.examples package. Either change the package or the * loading code to make this module actually run. */ -// RJCTODO: Add service provider annotation (commend out) -// RJCTODO: Remove inheritance from IngestModuleAdapter and provide better documentation, -// and more extensive demonstration of how to use various ingest services. +// RJCTODO: Add factory with service provider annotation (commend out) +// RJCTODO: Remove inheritance from IngestModuleAdapter to show full implementation +// and provide better documentation, and more extensive demonstration of how to +// use various ingest services. class SampleFileIngestModule extends IngestModuleAdapter implements FileIngestModule { private int attrId = -1; @@ -117,7 +118,7 @@ class SampleFileIngestModule extends IngestModuleAdapter implements FileIngestMo if (attrId != -1) { // Make an attribute using the ID for the private type that we previously created. - BlackboardAttribute attr = new BlackboardAttribute(attrId, "SampleFileIngestModule", count); // RJCTODO: Set up with module name as example + BlackboardAttribute attr = new BlackboardAttribute(attrId, "SampleFileIngestModule", count); // RJCTODO: Set up factory with static module name function as example /* add it to the general info artifact. In real modules, you would likely have * more complex data types and be making more specific artifacts. diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestJobContext.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestJobContext.java index 02132f7afb..229b418c87 100755 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestJobContext.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestJobContext.java @@ -39,7 +39,7 @@ public final class IngestJobContext { public void addFilesToPipeline(List files) { for (AbstractFile file : files) { - IngestManager.getDefault().scheduleFile(ingestJob.getId(), file); // RJCTODO: Should this API be just AbstractFile? + IngestManager.getDefault().scheduleFile(ingestJob.getId(), file); } } } diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestJobLauncher.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestJobLauncher.java index 9beec99a96..6751d1c74a 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestJobLauncher.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestJobLauncher.java @@ -200,7 +200,7 @@ public final class IngestJobLauncher { if (!modulesSetting.isEmpty()) { String[] settingNames = modulesSetting.split(", "); for (String name : settingNames) { - // Map some old core module names to the current core module names. // RJCTODO: Do we have the right names? + // Map some old core module names to the current core module names. switch (name) { case "Thunderbird Parser": case "MBox Parser": @@ -210,7 +210,7 @@ public final class IngestJobLauncher { moduleNames.add("Extension Mismatch Detector"); break; case "EWF Verify": - moduleNames.add("EWF Verifier"); + moduleNames.add("E01 Verifier"); break; default: moduleNames.add(name); diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestManager.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestManager.java index 63710df492..cd0d8ea201 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestManager.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestManager.java @@ -35,9 +35,6 @@ import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil; import org.sleuthkit.datamodel.AbstractFile; import org.sleuthkit.datamodel.Content; -// RJCTODO: Fix comment -// RJCTODO: It woulod be really nice to move such a powerful class behind a -// facade. This is a good argument for IngestServices as the facade. /** * IngestManager sets up and manages ingest modules runs them in a background * thread notifies modules when work is complete or should be interrupted @@ -63,7 +60,6 @@ public class IngestManager { "IngestManager.moduleProperties.text"); private volatile IngestUI ingestMessageBox; - // RJCTODO: Redo eventing for 3.1 /** * Possible events about ingest modules Event listeners can get the event * name by using String returned by toString() method on the specific event. @@ -276,10 +272,13 @@ public class IngestManager { void scheduleFile(long ingestJobId, AbstractFile file) { IngestJob job = this.ingestJobs.get(ingestJobId); if (job == null) { - // RJCTODO: Handle severe error + logger.log(Level.SEVERE, "Unable to map ingest job id (id = {0}) to an ingest job, failed to schedule file (id = {1})", new Object[]{ingestJobId, file.getId()}); + MessageNotifyUtil.Notify.show(NbBundle.getMessage(IngestManager.class, "IngestManager.moduleErr"), + "Unable to associate " + file.getName() + " with ingest job, file will not be processed by ingest nodules", + MessageNotifyUtil.MessageType.ERROR); } - scheduler.getFileScheduler().scheduleIngestOfDerivedFile(job, file); + scheduler.getFileScheduler().scheduleFile(job, file); } /** @@ -328,7 +327,6 @@ public class IngestManager { taskSchedulingWorker.cancel(true); while (!taskSchedulingWorker.isDone()) { // Wait. - // RJCTODO: Add sleep? } taskSchedulingWorker = null; } @@ -437,9 +435,18 @@ public class IngestManager { List errors = ingestJob.startUpIngestPipelines(); if (!errors.isEmpty()) { - // RJCTODO: Log all errors, not just the first one. Provide a list of all of the modules that failed. + StringBuilder failedModules = new StringBuilder(); + for (int i = 0; i < errors.size(); ++i) { + IngestModuleError error = errors.get(i); + String moduleName = error.getModuleDisplayName(); + logger.log(Level.SEVERE, "The " + moduleName + " module failed to start up", error.getModuleError()); + failedModules.append(moduleName); + if ((errors.size() > 1) && (i != (errors.size() - 1))) { + failedModules.append(","); + } + } MessageNotifyUtil.Message.error( - "Failed to load " + errors.get(0).getModuleDisplayName() + " ingest module.\n\n" + "Failed to start the following ingest modules: " + failedModules.toString() + " .\n\n" + "No ingest modules will be run. Please disable the module " + "or fix the error and restart ingest by right clicking on " + "the data source and selecting Run Ingest Modules.\n\n" @@ -472,7 +479,7 @@ public class IngestManager { // IngestManager.stopAll() will dispose of all tasks. } catch (Exception ex) { logger.log(Level.SEVERE, "Error while scheduling ingest jobs", ex); - // RJCTODO: On EDT, report error, cannot dump all tasks since multiple data source tasks can be submitted. Would get partial results either way. + MessageNotifyUtil.Message.error("An error occurred while starting ingest. Results may only be partial"); } finally { if (!isCancelled()) { startAll(); @@ -603,7 +610,7 @@ public class IngestManager { IngestScheduler.FileScheduler.FileTask task = fileScheduler.next(); AbstractFile file = task.getFile(); progress.progress(file.getName(), processedFiles); - IngestJob.FileIngestPipeline pipeline = task.getParent().getFileIngestPipelineForThread(this.id); + IngestJob.FileIngestPipeline pipeline = task.getJob().getFileIngestPipelineForThread(this.id); pipeline.process(file); // Update the progress bar. @@ -625,7 +632,6 @@ public class IngestManager { @Override protected void done() { - // RJCTODO: Why was GC done here in the old code? try { super.get(); } catch (CancellationException | InterruptedException e) { diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestMessageTopComponent.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestMessageTopComponent.java index c92ab0264e..13acce0d2d 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestMessageTopComponent.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestMessageTopComponent.java @@ -210,7 +210,7 @@ import org.sleuthkit.datamodel.Content; private void registerListeners() { //handle case change - Case.addPropertyChangeListener(new PropertyChangeListener() { // RJCTODO: Why is this here? + Case.addPropertyChangeListener(new PropertyChangeListener() { @Override public void propertyChange(PropertyChangeEvent evt) { if (evt.getPropertyName().equals(Case.Events.CURRENT_CASE.toString())) { diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestModuleLoader.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestModuleLoader.java index e805fccd33..4eba4eb43f 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestModuleLoader.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestModuleLoader.java @@ -46,7 +46,7 @@ final class IngestModuleLoader { synchronized List getIngestModuleFactories() { moduleFactories.clear(); - // RJCTODO: Need a name uniqueness test/solution? + // RJCTODO: Need a name uniqueness test/solution, here or in the launcher. Collection factories = Lookup.getDefault().lookupAll(IngestModuleFactory.class); for (IngestModuleFactory factory : factories) { logger.log(Level.INFO, "Found ingest module factory: name = {0}, version = {1}", new Object[]{factory.getModuleDisplayName(), factory.getModuleVersionNumber()}); diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestScheduler.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestScheduler.java index a45ecce528..ec3c236cad 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestScheduler.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestScheduler.java @@ -162,11 +162,11 @@ final class IngestScheduler { try { children = root.getChildren(); if (children.isEmpty()) { - //add the root itself, could be unalloc file, child of volume or image // RJCTODO: Get explanation, improve comment + //add the root itself, could be unalloc file, child of volume or image firstLevelFiles.add(root); } else { - //root for fs root dir, schedule children dirs/files // RJCTODO: Get explanation, improve comment + //root for fs root dir, schedule children dirs/files for (Content child : children) { if (child instanceof AbstractFile) { firstLevelFiles.add((AbstractFile) child); @@ -206,7 +206,7 @@ final class IngestScheduler { * @param originalContext original content schedule context that was used * to schedule the parent origin content, with the modules, settings, etc. */ - synchronized void scheduleIngestOfDerivedFile(IngestJob ingestJob, AbstractFile file) { + synchronized void scheduleFile(IngestJob ingestJob, AbstractFile file) { FileTask fileTask = new FileTask(file, ingestJob); if (shouldEnqueueTask(fileTask)) { fileTasks.addFirst(fileTask); @@ -328,7 +328,7 @@ final class IngestScheduler { for (Content c : children) { if (c instanceof AbstractFile) { AbstractFile childFile = (AbstractFile) c; - FileTask childTask = new FileTask(childFile, parentTask.getParent()); + FileTask childTask = new FileTask(childFile, parentTask.getJob()); if (childFile.hasChildren()) { this.directoryTasks.add(childTask); @@ -363,13 +363,13 @@ final class IngestScheduler { final Set contentSet = new HashSet<>(); for (FileTask task : rootDirectoryTasks) { - contentSet.add(task.getParent().getDataSource()); + contentSet.add(task.getJob().getDataSource()); } for (FileTask task : directoryTasks) { - contentSet.add(task.getParent().getDataSource()); + contentSet.add(task.getJob().getDataSource()); } for (FileTask task : fileTasks) { - contentSet.add(task.getParent().getDataSource()); + contentSet.add(task.getJob().getDataSource()); } return new ArrayList<>(contentSet); @@ -392,7 +392,7 @@ final class IngestScheduler { final AbstractFile aFile = processTask.file; //if it's unalloc file, skip if so scheduled - if (processTask.getParent().shouldProcessUnallocatedSpace() == false + if (processTask.getJob().shouldProcessUnallocatedSpace() == false && aFile.getType().equals(TSK_DB_FILES_TYPE_ENUM.UNALLOC_BLOCKS //unalloc files )) { return false; @@ -459,7 +459,7 @@ final class IngestScheduler { this.task = task; } - public IngestJob getParent() { // RJCTODO: Provide wrappers to get rid of train-style calls + public IngestJob getJob() { return task; } @@ -499,8 +499,8 @@ final class IngestScheduler { if (this.file != other.file && (this.file == null || !this.file.equals(other.file))) { return false; } - IngestJob thisTask = this.getParent(); - IngestJob otherTask = other.getParent(); + IngestJob thisTask = this.getJob(); + IngestJob otherTask = other.getJob(); if (thisTask != otherTask && (thisTask == null || !thisTask.equals(otherTask))) { diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestServices.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestServices.java index f495f93e7e..b269afb50f 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestServices.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestServices.java @@ -18,9 +18,11 @@ */ package org.sleuthkit.autopsy.ingest; +import java.util.Map; import java.util.logging.Level; import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.coreutils.Logger; +import org.sleuthkit.autopsy.coreutils.ModuleSettings; import org.sleuthkit.datamodel.AbstractFile; import org.sleuthkit.datamodel.SleuthkitCase; @@ -123,20 +125,6 @@ public final class IngestServices { IngestManager.fireModuleContentEvent(moduleContentEvent); } - // RJCTODO: This can stay in the context since it is context (pipeline) specific - /** - * Schedule a new file for ingest with the same settings as the file being - * analyzed. This is used, for example, when opening an archive file. File - * needs to have already been added to the database. - * - * @param file file to be scheduled - * @param pipelineContext the ingest context for the file ingest pipeline - */ - public void scheduleFile(long dataSourceTaskId, AbstractFile file) { - logger.log(Level.INFO, "Scheduling file: {0}", file.getName()); - manager.scheduleFile(dataSourceTaskId, file); - } - /** * Get free disk space of a drive where ingest data are written to That * drive is being monitored by IngestMonitor thread when ingest is running. @@ -147,5 +135,42 @@ public final class IngestServices { return manager.getFreeDiskSpace(); } - // RJCTODO: Add properties methods back into IngestServices - } + /** + * Gets a specific name/value configuration setting for a module + * @param moduleName moduleName identifier unique to that module + * @param settingName setting name to retrieve + * @return setting value for the module / setting name, or null if not found + */ + public String getConfigSetting(String moduleName, String settingName) { + return ModuleSettings.getConfigSetting(moduleName, settingName); + } + + /** + * Sets a specific name/value configuration setting for a module + * @param moduleName moduleName identifier unique to that module + * @param settingName setting name to set + * @param settingVal setting value to set + */ + public void setConfigSetting(String moduleName, String settingName, String settingVal) { + ModuleSettings.setConfigSetting(moduleName, settingName, settingVal); + } + + /** + * Gets all name/value configuration settings for a module + * @param moduleName moduleName identifier unique to that module + * @return settings for the module / setting name + */ + public Map getConfigSettings(String moduleName) { + return ModuleSettings.getConfigSettings(moduleName); + } + + /** + * 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 settings settings to set and replace old settings, keeping settings not specified in the map. + * + */ + public void setConfigSettings(String moduleName, Mapsettings) { + ModuleSettings.setConfigSettings(moduleName, settings); + } +} diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestUI.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestUI.java index 8b07c058e2..e4984bf38e 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestUI.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestUI.java @@ -21,7 +21,6 @@ package org.sleuthkit.autopsy.ingest; import org.sleuthkit.datamodel.Content; -// RJCTODO: This is not needed, KISS /** * UI support for ingest */ diff --git a/Core/src/org/sleuthkit/autopsy/ingest/Installer.java b/Core/src/org/sleuthkit/autopsy/ingest/Installer.java index 51f50523a6..9ab47753f5 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/Installer.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/Installer.java @@ -23,7 +23,6 @@ import org.sleuthkit.autopsy.coreutils.Logger; import org.openide.modules.ModuleInstall; import org.openide.windows.WindowManager; -// RJCTODO: Does this really need to be public /** * Initializes ingest manager when the module is loaded */ diff --git a/Core/src/org/sleuthkit/autopsy/ingest/ModuleContentEvent.java b/Core/src/org/sleuthkit/autopsy/ingest/ModuleContentEvent.java index 27f9badedb..297236cd55 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/ModuleContentEvent.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/ModuleContentEvent.java @@ -21,7 +21,6 @@ package org.sleuthkit.autopsy.ingest; import javax.swing.event.ChangeEvent; import org.sleuthkit.datamodel.Content; -// RJCTODO: Rename /** * Event data that are fired off by ingest modules when they changed or added new content. */ diff --git a/Core/src/org/sleuthkit/autopsy/ingest/ModuleDataEvent.java b/Core/src/org/sleuthkit/autopsy/ingest/ModuleDataEvent.java index 7b2862f6e6..acfae1a779 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/ModuleDataEvent.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/ModuleDataEvent.java @@ -38,7 +38,6 @@ import org.sleuthkit.datamodel.BlackboardArtifact.ARTIFACT_TYPE; * * By design, only a single type of artifacts can be contained in a single data event. */ -// RJCTODO: Rename public class ModuleDataEvent extends ChangeEvent { private String moduleName; diff --git a/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/FileTypeIdIngestModule.java b/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/FileTypeIdIngestModule.java index d81d2bb6ae..858a4a7d7f 100644 --- a/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/FileTypeIdIngestModule.java +++ b/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/FileTypeIdIngestModule.java @@ -43,7 +43,7 @@ public class FileTypeIdIngestModule extends IngestModuleAdapter implements FileI private static final Logger logger = Logger.getLogger(FileTypeIdIngestModule.class.getName()); private static final long MIN_FILE_SIZE = 512; - private final FileTypeIdentifierModuleSettings settings; + private final FileTypeIdModuleSettings settings; private long matchTime = 0; private int messageId = 0; // RJCTODO: If this is not made a thread safe static, duplicate message ids will be used private long numFiles = 0; @@ -52,7 +52,7 @@ public class FileTypeIdIngestModule extends IngestModuleAdapter implements FileI // actually have a list of detectors which are called in order until a match is found. private FileTypeDetectionInterface detector = new TikaFileTypeDetector(); - FileTypeIdIngestModule(FileTypeIdentifierModuleSettings settings) { + FileTypeIdIngestModule(FileTypeIdModuleSettings settings) { this.settings = settings; } @@ -82,7 +82,7 @@ public class FileTypeIdIngestModule extends IngestModuleAdapter implements FileI if (!fileId.type.isEmpty()) { // add artifact BlackboardArtifact bart = abstractFile.getGenInfoArtifact(); - BlackboardAttribute batt = new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_FILE_TYPE_SIG.getTypeID(), FileTypeIdentifierModuleFactory.getModuleName(), fileId.type); + BlackboardAttribute batt = new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_FILE_TYPE_SIG.getTypeID(), FileTypeIdModuleFactory.getModuleName(), fileId.type); bart.addAttribute(batt); // we don't fire the event because we just updated TSK_GEN_INFO, which isn't displayed in the tree and is vague. @@ -101,7 +101,7 @@ public class FileTypeIdIngestModule extends IngestModuleAdapter implements FileI public void shutDown(boolean ingestJobCancelled) { StringBuilder detailsSb = new StringBuilder(); detailsSb.append(""); - detailsSb.append(""); + detailsSb.append(""); detailsSb.append("\n"); @@ -109,7 +109,7 @@ public class FileTypeIdIngestModule extends IngestModuleAdapter implements FileI .append(NbBundle.getMessage(this.getClass(), "FileTypeIdIngestModule.complete.totalFiles")) .append("\n"); detailsSb.append("
").append(FileTypeIdentifierModuleFactory.getModuleName()).append("
").append(FileTypeIdModuleFactory.getModuleName()).append("
") .append(NbBundle.getMessage(this.getClass(), "FileTypeIdIngestModule.complete.totalProcTime")) .append("").append(matchTime).append("
").append(numFiles).append("
"); - IngestServices.getDefault().postMessage(IngestMessage.createMessage(++messageId, IngestMessage.MessageType.INFO, FileTypeIdentifierModuleFactory.getModuleName(), + IngestServices.getDefault().postMessage(IngestMessage.createMessage(++messageId, IngestMessage.MessageType.INFO, FileTypeIdModuleFactory.getModuleName(), NbBundle.getMessage(this.getClass(), "FileTypeIdIngestModule.complete.srvMsg.text"), detailsSb.toString())); diff --git a/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/FileTypeIdentifierModuleFactory.java b/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/FileTypeIdModuleFactory.java similarity index 77% rename from FileTypeId/src/org/sleuthkit/autopsy/filetypeid/FileTypeIdentifierModuleFactory.java rename to FileTypeId/src/org/sleuthkit/autopsy/filetypeid/FileTypeIdModuleFactory.java index b43c058896..5b8e27a2b9 100755 --- a/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/FileTypeIdentifierModuleFactory.java +++ b/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/FileTypeIdModuleFactory.java @@ -32,7 +32,7 @@ import org.sleuthkit.autopsy.ingest.IngestModuleSettingsPanel; * files. */ @ServiceProvider(service = IngestModuleFactory.class) -public class FileTypeIdentifierModuleFactory extends IngestModuleFactoryAdapter { +public class FileTypeIdModuleFactory extends IngestModuleFactoryAdapter { @Override public String getModuleDisplayName() { @@ -57,7 +57,7 @@ public class FileTypeIdentifierModuleFactory extends IngestModuleFactoryAdapter @Override public IngestModuleSettings getDefaultModuleSettings() { - return new FileTypeIdentifierModuleSettings(); + return new FileTypeIdModuleSettings(); } @Override @@ -67,11 +67,11 @@ public class FileTypeIdentifierModuleFactory extends IngestModuleFactoryAdapter @Override public IngestModuleSettingsPanel getModuleSettingsPanel(IngestModuleSettings settings) { - assert settings instanceof FileTypeIdentifierModuleSettings; - if (!(settings instanceof FileTypeIdentifierModuleSettings)) { - throw new IllegalArgumentException("Expected settings argument to be instanceof FileTypeIdentifierModuleSettings"); + assert settings instanceof FileTypeIdModuleSettings; + if (!(settings instanceof FileTypeIdModuleSettings)) { + throw new IllegalArgumentException("Expected settings argument to be instanceof FileTypeIdModuleSettings"); } - return new FileTypeIdentifierModuleSettingsPanel((FileTypeIdentifierModuleSettings) settings); + return new FileTypeIdModuleSettingsPanel((FileTypeIdModuleSettings) settings); } @Override @@ -81,10 +81,10 @@ public class FileTypeIdentifierModuleFactory extends IngestModuleFactoryAdapter @Override public FileIngestModule createFileIngestModule(IngestModuleSettings settings) { - assert settings instanceof FileTypeIdentifierModuleSettings; - if (!(settings instanceof FileTypeIdentifierModuleSettings)) { - throw new IllegalArgumentException("Expected settings argument to be instanceof FileTypeIdentifierModuleSettings"); + assert settings instanceof FileTypeIdModuleSettings; + if (!(settings instanceof FileTypeIdModuleSettings)) { + throw new IllegalArgumentException("Expected settings argument to be instanceof FileTypeIdModuleSettings"); } - return new FileTypeIdIngestModule((FileTypeIdentifierModuleSettings) settings); + return new FileTypeIdIngestModule((FileTypeIdModuleSettings) settings); } } diff --git a/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/FileTypeIdentifierModuleSettings.java b/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/FileTypeIdModuleSettings.java similarity index 85% rename from FileTypeId/src/org/sleuthkit/autopsy/filetypeid/FileTypeIdentifierModuleSettings.java rename to FileTypeId/src/org/sleuthkit/autopsy/filetypeid/FileTypeIdModuleSettings.java index b33b379a1c..d5a962c8d4 100755 --- a/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/FileTypeIdentifierModuleSettings.java +++ b/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/FileTypeIdModuleSettings.java @@ -23,14 +23,14 @@ import org.sleuthkit.autopsy.ingest.IngestModuleSettings; /** * Ingest job options for the file type identifier ingest module instances. */ -public class FileTypeIdentifierModuleSettings implements IngestModuleSettings { +public class FileTypeIdModuleSettings implements IngestModuleSettings { private boolean skipKnownFiles = true; - FileTypeIdentifierModuleSettings() { + FileTypeIdModuleSettings() { } - FileTypeIdentifierModuleSettings(boolean skipKnownFiles) { + FileTypeIdModuleSettings(boolean skipKnownFiles) { this.skipKnownFiles = skipKnownFiles; } diff --git a/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/FileTypeIdentifierModuleSettingsPanel.form b/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/FileTypeIdModuleSettingsPanel.form similarity index 100% rename from FileTypeId/src/org/sleuthkit/autopsy/filetypeid/FileTypeIdentifierModuleSettingsPanel.form rename to FileTypeId/src/org/sleuthkit/autopsy/filetypeid/FileTypeIdModuleSettingsPanel.form diff --git a/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/FileTypeIdentifierModuleSettingsPanel.java b/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/FileTypeIdModuleSettingsPanel.java similarity index 87% rename from FileTypeId/src/org/sleuthkit/autopsy/filetypeid/FileTypeIdentifierModuleSettingsPanel.java rename to FileTypeId/src/org/sleuthkit/autopsy/filetypeid/FileTypeIdModuleSettingsPanel.java index e8455d4344..f2d9a69655 100644 --- a/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/FileTypeIdentifierModuleSettingsPanel.java +++ b/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/FileTypeIdModuleSettingsPanel.java @@ -25,11 +25,11 @@ import org.sleuthkit.autopsy.ingest.IngestModuleSettingsPanel; * UI component used to set ingest job options for file type identifier ingest * modules. */ -final class FileTypeIdentifierModuleSettingsPanel extends IngestModuleSettingsPanel { +final class FileTypeIdModuleSettingsPanel extends IngestModuleSettingsPanel { - private final FileTypeIdentifierModuleSettings settings; + private final FileTypeIdModuleSettings settings; - public FileTypeIdentifierModuleSettingsPanel(FileTypeIdentifierModuleSettings settings) { + public FileTypeIdModuleSettingsPanel(FileTypeIdModuleSettings settings) { this.settings = settings; initComponents(); customizeComponents(); @@ -56,8 +56,8 @@ final class FileTypeIdentifierModuleSettingsPanel extends IngestModuleSettingsPa skipKnownCheckBox = new javax.swing.JCheckBox(); skipKnownCheckBox.setSelected(true); - skipKnownCheckBox.setText(org.openide.util.NbBundle.getMessage(FileTypeIdSimpleConfigPanel.class, "FileTypeIdSimpleConfigPanel.skipKnownCheckBox.text")); // NOI18N - skipKnownCheckBox.setToolTipText(org.openide.util.NbBundle.getMessage(FileTypeIdSimpleConfigPanel.class, "FileTypeIdSimpleConfigPanel.skipKnownCheckBox.toolTipText")); // NOI18N + skipKnownCheckBox.setText(org.openide.util.NbBundle.getMessage(FileTypeIdModuleSettingsPanel.class, "FileTypeIdSimpleConfigPanel.skipKnownCheckBox.text")); // NOI18N + skipKnownCheckBox.setToolTipText(org.openide.util.NbBundle.getMessage(FileTypeIdModuleSettingsPanel.class, "FileTypeIdSimpleConfigPanel.skipKnownCheckBox.toolTipText")); // NOI18N skipKnownCheckBox.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { skipKnownCheckBoxActionPerformed(evt); diff --git a/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbIngestModule.java b/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbIngestModule.java index b7e1785808..553bf2dfea 100644 --- a/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbIngestModule.java +++ b/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbIngestModule.java @@ -44,7 +44,6 @@ import org.sleuthkit.autopsy.ingest.IngestModuleAdapter; import org.sleuthkit.autopsy.ingest.FileIngestModule; import org.sleuthkit.datamodel.HashInfo; -// RJCTODO: Create stories for a) peristing context-sensitive module settings and b) adapt core modules to use module settings (more important) public class HashDbIngestModule extends IngestModuleAdapter implements FileIngestModule { private static final Logger logger = Logger.getLogger(HashDbIngestModule.class.getName()); private static final int MAX_COMMENT_SIZE = 500; diff --git a/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashLookupModuleFactory.java b/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashLookupModuleFactory.java index cf4436d862..92b7708524 100755 --- a/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashLookupModuleFactory.java +++ b/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashLookupModuleFactory.java @@ -86,7 +86,7 @@ public class HashLookupModuleFactory extends IngestModuleFactoryAdapter { if (moduleSettingsPanel == null) { moduleSettingsPanel = new HashLookupModuleSettingsPanel(); } - moduleSettingsPanel.load(); // RJCTODO: Fix this + moduleSettingsPanel.load(); // RJCTODO: Fix this, use passed in settings return moduleSettingsPanel; } diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordListsManager.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordListsManager.java index 46e91a77c8..ddddf76115 100755 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordListsManager.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordListsManager.java @@ -29,7 +29,6 @@ import org.sleuthkit.autopsy.coreutils.Logger; // Note: This is a first step towards a keyword lists manager; it consists of // the portion of the keyword list management code that resided in the keyword // search file ingest module. -// RJCTODO: How to keyword lists get initialized final class KeywordListsManager { private static KeywordListsManager instance = null; diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchIngestModule.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchIngestModule.java index 19c4b75a9c..ab383e5776 100755 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchIngestModule.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchIngestModule.java @@ -74,9 +74,6 @@ import org.sleuthkit.datamodel.TskData.FileKnown; * ingest update interval) Runs a periodic keyword / regular expression search * on currently configured lists for ingest and writes results to blackboard * Reports interesting events to Inbox and to viewers - * - * Registered as a module in layer.xml RJCTODO: Track this down, does not seem - * to be true */ public final class KeywordSearchIngestModule extends IngestModuleAdapter implements FileIngestModule { diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchListsManagementPanel.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchListsManagementPanel.java index 90e74ee10c..83348f6bd3 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchListsManagementPanel.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchListsManagementPanel.java @@ -303,7 +303,7 @@ class KeywordSearchListsManagementPanel extends javax.swing.JPanel implements Op @Override public void store() { // Implemented by parent panel - // RJCTODO: The parent panel calls save on the XML doc thing + // RJCTODO: The parent panel calls save on the XML doc thing, does this still work? } @Override diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchListsXML.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchListsXML.java index 618e8fd997..367e5a98e7 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchListsXML.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchListsXML.java @@ -102,7 +102,7 @@ class KeywordSearchListsXML extends KeywordSearchListsAbstract { listEl.setAttribute(LIST_MOD_ATTR, modified); // only write the 'useForIngest' and 'ingestMessages' attributes - // if we're not exporting the list // RJCTODO: What? These should be ingest options... + // if we're not exporting the list. if (!isExport) { listEl.setAttribute(LIST_USE_FOR_INGEST, useForIngest); listEl.setAttribute(LIST_INGEST_MSGS, ingestMessages); diff --git a/ScalpelCarver/src/org/sleuthkit/autopsy/scalpel/ScalpelCarverIngestModule.java b/ScalpelCarver/src/org/sleuthkit/autopsy/scalpel/ScalpelCarverIngestModule.java index 1cea9e9896..295f26e8b1 100644 --- a/ScalpelCarver/src/org/sleuthkit/autopsy/scalpel/ScalpelCarverIngestModule.java +++ b/ScalpelCarver/src/org/sleuthkit/autopsy/scalpel/ScalpelCarverIngestModule.java @@ -78,7 +78,7 @@ class ScalpelCarverIngestModule extends IngestModuleAdapter implements FileInges if (!carver.isInitialized()) { String message = "Error initializing scalpel carver."; logger.log(Level.SEVERE, message); - throw new IngestModuleException(message); // RJCTODO: Needs additional internationalization + throw new IngestModuleException(message); } // make sure module output directory exists; create it if it doesn't