mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-15 09:17:42 +00:00
Merge pull request #1 from rcordovano/parallel_file_ingest
Made keyword search classes use ingest job settings
This commit is contained in:
commit
ad875af2d0
@ -58,7 +58,7 @@ class IngestJobConfigurationPanel extends javax.swing.JPanel {
|
||||
for (IngestModuleModel module : modules) {
|
||||
IngestModuleTemplate moduleTemplate = module.getIngestModuleTemplate();
|
||||
if (module.hasModuleSettingsPanel()) {
|
||||
IngestModuleSettings settings = module.getModuleSettingsPanel().getSettings();
|
||||
IngestModuleIngestJobSettings settings = module.getModuleSettingsPanel().getSettings();
|
||||
moduleTemplate.setModuleSettings(settings);
|
||||
}
|
||||
moduleTemplates.add(moduleTemplate);
|
||||
@ -295,7 +295,7 @@ class IngestJobConfigurationPanel extends javax.swing.JPanel {
|
||||
|
||||
private final IngestModuleTemplate moduleTemplate;
|
||||
private IngestModuleGlobalSetttingsPanel globalSettingsPanel = null;
|
||||
private IngestModuleSettingsPanel moduleSettingsPanel = null;
|
||||
private IngestModuleIngestJobSettingsPanel moduleSettingsPanel = null;
|
||||
|
||||
IngestModuleModel(IngestModuleTemplate moduleTemplate) {
|
||||
this.moduleTemplate = moduleTemplate;
|
||||
@ -331,7 +331,7 @@ class IngestJobConfigurationPanel extends javax.swing.JPanel {
|
||||
return moduleTemplate.hasModuleSettingsPanel();
|
||||
}
|
||||
|
||||
IngestModuleSettingsPanel getModuleSettingsPanel() {
|
||||
IngestModuleIngestJobSettingsPanel getModuleSettingsPanel() {
|
||||
return moduleSettingsPanel;
|
||||
}
|
||||
|
||||
|
@ -117,7 +117,7 @@ public interface IngestModuleFactory {
|
||||
*
|
||||
* @return The ingest options.
|
||||
*/
|
||||
IngestModuleSettings getDefaultModuleSettings();
|
||||
IngestModuleIngestJobSettings getDefaultModuleSettings();
|
||||
|
||||
/**
|
||||
* Queries the factory to determine if it provides user interface panels to
|
||||
@ -152,7 +152,7 @@ public interface IngestModuleFactory {
|
||||
* @param ingestOptions Per ingest job options to initialize the panel.
|
||||
* @return A user interface panel.
|
||||
*/
|
||||
IngestModuleSettingsPanel getModuleSettingsPanel(IngestModuleSettings settings);
|
||||
IngestModuleIngestJobSettingsPanel getModuleSettingsPanel(IngestModuleIngestJobSettings settings);
|
||||
|
||||
/**
|
||||
* Queries the factory to determine if it is capable of creating file ingest
|
||||
@ -182,7 +182,7 @@ public interface IngestModuleFactory {
|
||||
* @param ingestOptions The ingest options for the module instance.
|
||||
* @return A data source ingest module instance.
|
||||
*/
|
||||
DataSourceIngestModule createDataSourceIngestModule(IngestModuleSettings settings);
|
||||
DataSourceIngestModule createDataSourceIngestModule(IngestModuleIngestJobSettings settings);
|
||||
|
||||
/**
|
||||
* Queries the factory to determine if it is capable of creating file ingest
|
||||
@ -212,5 +212,5 @@ public interface IngestModuleFactory {
|
||||
* @param ingestOptions The ingest options for the module instance.
|
||||
* @return A file ingest module instance.
|
||||
*/
|
||||
FileIngestModule createFileIngestModule(IngestModuleSettings settings);
|
||||
FileIngestModule createFileIngestModule(IngestModuleIngestJobSettings settings);
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ public abstract class IngestModuleFactoryAdapter implements IngestModuleFactory
|
||||
}
|
||||
|
||||
@Override
|
||||
public IngestModuleSettings getDefaultModuleSettings() {
|
||||
public IngestModuleIngestJobSettings getDefaultModuleSettings() {
|
||||
return new NoIngestModuleSettings();
|
||||
}
|
||||
|
||||
@ -54,7 +54,7 @@ public abstract class IngestModuleFactoryAdapter implements IngestModuleFactory
|
||||
}
|
||||
|
||||
@Override
|
||||
public IngestModuleSettingsPanel getModuleSettingsPanel(IngestModuleSettings ingestOptions) {
|
||||
public IngestModuleIngestJobSettingsPanel getModuleSettingsPanel(IngestModuleIngestJobSettings ingestOptions) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@ -64,7 +64,7 @@ public abstract class IngestModuleFactoryAdapter implements IngestModuleFactory
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataSourceIngestModule createDataSourceIngestModule(IngestModuleSettings ingestOptions) {
|
||||
public DataSourceIngestModule createDataSourceIngestModule(IngestModuleIngestJobSettings ingestOptions) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@ -74,7 +74,7 @@ public abstract class IngestModuleFactoryAdapter implements IngestModuleFactory
|
||||
}
|
||||
|
||||
@Override
|
||||
public FileIngestModule createFileIngestModule(IngestModuleSettings ingestOptions) {
|
||||
public FileIngestModule createFileIngestModule(IngestModuleIngestJobSettings ingestOptions) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
|
@ -21,9 +21,9 @@ package org.sleuthkit.autopsy.ingest;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* Interface for per ingest job options for ingest modules. Options are
|
||||
* serializable to support persistence of options between invocations of the
|
||||
* application.
|
||||
* Interface for per ingest job settings for ingest modules. The settings are
|
||||
* serializable to support persistence of settings for different contexts and
|
||||
* between invocations of the application.
|
||||
*/
|
||||
public interface IngestModuleSettings extends Serializable {
|
||||
public interface IngestModuleIngestJobSettings extends Serializable {
|
||||
}
|
@ -21,14 +21,15 @@ package org.sleuthkit.autopsy.ingest;
|
||||
import javax.swing.JPanel;
|
||||
|
||||
/**
|
||||
* Abstract base class for ingest module job settings panels.
|
||||
* Abstract base class for panels that allow users to specify per ingest job
|
||||
* settings for ingest modules.
|
||||
*/
|
||||
public abstract class IngestModuleSettingsPanel extends JPanel {
|
||||
public abstract class IngestModuleIngestJobSettingsPanel extends JPanel {
|
||||
|
||||
/**
|
||||
* Gets the ingest job settings for an ingest module.
|
||||
*
|
||||
* @return The ingest settings.
|
||||
*/
|
||||
public abstract IngestModuleSettings getSettings();
|
||||
public abstract IngestModuleIngestJobSettings getSettings();
|
||||
}
|
@ -25,10 +25,10 @@ package org.sleuthkit.autopsy.ingest;
|
||||
final class IngestModuleTemplate {
|
||||
|
||||
private final IngestModuleFactory moduleFactory;
|
||||
private IngestModuleSettings settings = null;
|
||||
private IngestModuleIngestJobSettings settings = null;
|
||||
private boolean enabled = true;
|
||||
|
||||
IngestModuleTemplate(IngestModuleFactory moduleFactory, IngestModuleSettings settings) {
|
||||
IngestModuleTemplate(IngestModuleFactory moduleFactory, IngestModuleIngestJobSettings settings) {
|
||||
this.moduleFactory = moduleFactory;
|
||||
this.settings = settings;
|
||||
}
|
||||
@ -41,11 +41,11 @@ final class IngestModuleTemplate {
|
||||
return moduleFactory.getModuleDescription();
|
||||
}
|
||||
|
||||
IngestModuleSettings getModuleSettings() {
|
||||
IngestModuleIngestJobSettings getModuleSettings() {
|
||||
return settings;
|
||||
}
|
||||
|
||||
void setModuleSettings(IngestModuleSettings settings) {
|
||||
void setModuleSettings(IngestModuleIngestJobSettings settings) {
|
||||
this.settings = settings;
|
||||
}
|
||||
|
||||
@ -53,7 +53,7 @@ final class IngestModuleTemplate {
|
||||
return moduleFactory.hasModuleSettingsPanel();
|
||||
}
|
||||
|
||||
IngestModuleSettingsPanel getModuleSettingsPanel() {
|
||||
IngestModuleIngestJobSettingsPanel getModuleSettingsPanel() {
|
||||
return moduleFactory.getModuleSettingsPanel(settings);
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@ package org.sleuthkit.autopsy.ingest;
|
||||
* Implementation of the IngestModuleOptions interface for use by ingest modules
|
||||
* that do not have per ingest job options.
|
||||
*/
|
||||
public final class NoIngestModuleSettings implements IngestModuleSettings {
|
||||
public final class NoIngestModuleSettings implements IngestModuleIngestJobSettings {
|
||||
|
||||
private final String setting = "None";
|
||||
|
||||
|
@ -23,7 +23,7 @@ import org.sleuthkit.autopsy.coreutils.Version;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleFactoryAdapter;
|
||||
import org.sleuthkit.autopsy.ingest.FileIngestModule;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleFactory;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleSettings;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettings;
|
||||
import org.openide.util.NbBundle;
|
||||
|
||||
/**
|
||||
@ -60,7 +60,7 @@ public class ExifParserModuleFactory extends IngestModuleFactoryAdapter {
|
||||
}
|
||||
|
||||
@Override
|
||||
public FileIngestModule createFileIngestModule(IngestModuleSettings ingestOptions) {
|
||||
public FileIngestModule createFileIngestModule(IngestModuleIngestJobSettings ingestOptions) {
|
||||
return new ExifParserFileIngestModule();
|
||||
}
|
||||
}
|
||||
|
@ -24,8 +24,8 @@ import org.sleuthkit.autopsy.coreutils.Version;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleFactoryAdapter;
|
||||
import org.sleuthkit.autopsy.ingest.FileIngestModule;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleFactory;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleSettings;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleSettingsPanel;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettings;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettingsPanel;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleGlobalSetttingsPanel;
|
||||
|
||||
/**
|
||||
@ -57,7 +57,7 @@ public class FileExtMismatchDetectorModuleFactory extends IngestModuleFactoryAda
|
||||
}
|
||||
|
||||
@Override
|
||||
public IngestModuleSettings getDefaultModuleSettings() {
|
||||
public IngestModuleIngestJobSettings getDefaultModuleSettings() {
|
||||
return new FileExtMismatchDetectorModuleSettings();
|
||||
}
|
||||
|
||||
@ -67,7 +67,7 @@ public class FileExtMismatchDetectorModuleFactory extends IngestModuleFactoryAda
|
||||
}
|
||||
|
||||
@Override
|
||||
public IngestModuleSettingsPanel getModuleSettingsPanel(IngestModuleSettings settings) {
|
||||
public IngestModuleIngestJobSettingsPanel getModuleSettingsPanel(IngestModuleIngestJobSettings settings) {
|
||||
assert settings instanceof FileExtMismatchDetectorModuleSettings;
|
||||
if (!(settings instanceof FileExtMismatchDetectorModuleSettings)) {
|
||||
throw new IllegalArgumentException("Expected settings argument to be instanceof FileExtMismatchDetectorModuleSettings");
|
||||
@ -94,7 +94,7 @@ public class FileExtMismatchDetectorModuleFactory extends IngestModuleFactoryAda
|
||||
}
|
||||
|
||||
@Override
|
||||
public FileIngestModule createFileIngestModule(IngestModuleSettings settings) {
|
||||
public FileIngestModule createFileIngestModule(IngestModuleIngestJobSettings settings) {
|
||||
assert settings instanceof FileExtMismatchDetectorModuleSettings;
|
||||
if (!(settings instanceof FileExtMismatchDetectorModuleSettings)) {
|
||||
throw new IllegalArgumentException("Expected settings argument to be instanceof FileExtMismatchDetectorModuleSettings");
|
||||
|
@ -18,12 +18,12 @@
|
||||
*/
|
||||
package org.sleuthkit.autopsy.fileextmismatch;
|
||||
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleSettings;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettings;
|
||||
|
||||
/**
|
||||
* Ingest options for the file extension mismatch detector ingest module.
|
||||
*/
|
||||
final class FileExtMismatchDetectorModuleSettings implements IngestModuleSettings {
|
||||
final class FileExtMismatchDetectorModuleSettings implements IngestModuleIngestJobSettings {
|
||||
|
||||
private boolean skipKnownFiles = false;
|
||||
private boolean skipFilesWithNoExtension = true;
|
||||
|
@ -18,14 +18,14 @@
|
||||
*/
|
||||
package org.sleuthkit.autopsy.fileextmismatch;
|
||||
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleSettings;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleSettingsPanel;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettings;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettingsPanel;
|
||||
|
||||
/**
|
||||
* UI component used to set ingest job options for file extension mismatch
|
||||
* detector ingest modules.
|
||||
*/
|
||||
final class FileExtMismatchModuleSettingsPanel extends IngestModuleSettingsPanel {
|
||||
final class FileExtMismatchModuleSettingsPanel extends IngestModuleIngestJobSettingsPanel {
|
||||
|
||||
private final FileExtMismatchDetectorModuleSettings settings;
|
||||
|
||||
@ -42,7 +42,7 @@ final class FileExtMismatchModuleSettingsPanel extends IngestModuleSettingsPanel
|
||||
}
|
||||
|
||||
@Override
|
||||
public IngestModuleSettings getSettings() {
|
||||
public IngestModuleIngestJobSettings getSettings() {
|
||||
return settings;
|
||||
}
|
||||
|
||||
|
@ -24,8 +24,8 @@ import org.sleuthkit.autopsy.coreutils.Version;
|
||||
import org.sleuthkit.autopsy.ingest.FileIngestModule;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleFactory;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleFactoryAdapter;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleSettings;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleSettingsPanel;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettings;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettingsPanel;
|
||||
|
||||
/**
|
||||
* An factory that creates file ingest modules that determine the types of
|
||||
@ -56,7 +56,7 @@ public class FileTypeIdModuleFactory extends IngestModuleFactoryAdapter {
|
||||
}
|
||||
|
||||
@Override
|
||||
public IngestModuleSettings getDefaultModuleSettings() {
|
||||
public IngestModuleIngestJobSettings getDefaultModuleSettings() {
|
||||
return new FileTypeIdModuleSettings();
|
||||
}
|
||||
|
||||
@ -66,7 +66,7 @@ public class FileTypeIdModuleFactory extends IngestModuleFactoryAdapter {
|
||||
}
|
||||
|
||||
@Override
|
||||
public IngestModuleSettingsPanel getModuleSettingsPanel(IngestModuleSettings settings) {
|
||||
public IngestModuleIngestJobSettingsPanel getModuleSettingsPanel(IngestModuleIngestJobSettings settings) {
|
||||
assert settings instanceof FileTypeIdModuleSettings;
|
||||
if (!(settings instanceof FileTypeIdModuleSettings)) {
|
||||
throw new IllegalArgumentException("Expected settings argument to be instanceof FileTypeIdModuleSettings");
|
||||
@ -80,7 +80,7 @@ public class FileTypeIdModuleFactory extends IngestModuleFactoryAdapter {
|
||||
}
|
||||
|
||||
@Override
|
||||
public FileIngestModule createFileIngestModule(IngestModuleSettings settings) {
|
||||
public FileIngestModule createFileIngestModule(IngestModuleIngestJobSettings settings) {
|
||||
assert settings instanceof FileTypeIdModuleSettings;
|
||||
if (!(settings instanceof FileTypeIdModuleSettings)) {
|
||||
throw new IllegalArgumentException("Expected settings argument to be instanceof FileTypeIdModuleSettings");
|
||||
|
@ -18,12 +18,12 @@
|
||||
*/
|
||||
package org.sleuthkit.autopsy.filetypeid;
|
||||
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleSettings;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettings;
|
||||
|
||||
/**
|
||||
* Ingest job options for the file type identifier ingest module instances.
|
||||
*/
|
||||
public class FileTypeIdModuleSettings implements IngestModuleSettings {
|
||||
public class FileTypeIdModuleSettings implements IngestModuleIngestJobSettings {
|
||||
|
||||
private boolean skipKnownFiles = true;
|
||||
|
||||
|
@ -18,14 +18,14 @@
|
||||
*/
|
||||
package org.sleuthkit.autopsy.filetypeid;
|
||||
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleSettings;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleSettingsPanel;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettings;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettingsPanel;
|
||||
|
||||
/**
|
||||
* UI component used to set ingest job options for file type identifier ingest
|
||||
* modules.
|
||||
*/
|
||||
final class FileTypeIdModuleSettingsPanel extends IngestModuleSettingsPanel {
|
||||
final class FileTypeIdModuleSettingsPanel extends IngestModuleIngestJobSettingsPanel {
|
||||
|
||||
private final FileTypeIdModuleSettings settings;
|
||||
|
||||
@ -40,7 +40,7 @@ final class FileTypeIdModuleSettingsPanel extends IngestModuleSettingsPanel {
|
||||
}
|
||||
|
||||
@Override
|
||||
public IngestModuleSettings getSettings() {
|
||||
public IngestModuleIngestJobSettings getSettings() {
|
||||
return settings;
|
||||
}
|
||||
|
||||
|
@ -26,8 +26,8 @@ import org.sleuthkit.autopsy.coreutils.Version;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleFactoryAdapter;
|
||||
import org.sleuthkit.autopsy.ingest.FileIngestModule;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleFactory;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleSettings;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleSettingsPanel;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettings;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettingsPanel;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleGlobalSetttingsPanel;
|
||||
|
||||
/**
|
||||
@ -58,7 +58,7 @@ public class HashLookupModuleFactory extends IngestModuleFactoryAdapter {
|
||||
}
|
||||
|
||||
@Override
|
||||
public IngestModuleSettings getDefaultModuleSettings() {
|
||||
public IngestModuleIngestJobSettings getDefaultModuleSettings() {
|
||||
HashDbManager hashDbManager = HashDbManager.getInstance();
|
||||
List<String> enabledHashSets = new ArrayList<>();
|
||||
List<HashDbManager.HashDb> knownFileHashSets = hashDbManager.getKnownFileHashSets();
|
||||
@ -82,7 +82,7 @@ public class HashLookupModuleFactory extends IngestModuleFactoryAdapter {
|
||||
}
|
||||
|
||||
@Override
|
||||
public IngestModuleSettingsPanel getModuleSettingsPanel(IngestModuleSettings settings) {
|
||||
public IngestModuleIngestJobSettingsPanel getModuleSettingsPanel(IngestModuleIngestJobSettings settings) {
|
||||
if (moduleSettingsPanel == null) {
|
||||
moduleSettingsPanel = new HashLookupModuleSettingsPanel();
|
||||
}
|
||||
@ -108,7 +108,7 @@ public class HashLookupModuleFactory extends IngestModuleFactoryAdapter {
|
||||
}
|
||||
|
||||
@Override
|
||||
public FileIngestModule createFileIngestModule(IngestModuleSettings settings) {
|
||||
public FileIngestModule createFileIngestModule(IngestModuleIngestJobSettings settings) {
|
||||
assert settings instanceof HashLookupModuleSettings;
|
||||
if (!(settings instanceof HashLookupModuleSettings)) {
|
||||
throw new IllegalArgumentException("Expected settings argument to be instanceof HashLookupModuleSettings");
|
||||
|
@ -20,12 +20,12 @@ package org.sleuthkit.autopsy.hashdatabase;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleSettings;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettings;
|
||||
|
||||
/**
|
||||
* Settings for a hash lookup file ingest module instance.
|
||||
*/
|
||||
final class HashLookupModuleSettings implements IngestModuleSettings {
|
||||
final class HashLookupModuleSettings implements IngestModuleIngestJobSettings {
|
||||
|
||||
private final HashSet<String> enabledHashSets = new HashSet<>();
|
||||
private boolean shouldCalculateHashes = true;
|
||||
|
@ -33,14 +33,14 @@ import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.ingest.IngestManager;
|
||||
import org.sleuthkit.datamodel.TskCoreException;
|
||||
import org.sleuthkit.autopsy.hashdatabase.HashDbManager.HashDb;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleSettings;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleSettingsPanel;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettings;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettingsPanel;
|
||||
|
||||
/**
|
||||
* Instances of this class provide a simplified UI for managing the hash sets
|
||||
* configuration.
|
||||
*/
|
||||
public class HashLookupModuleSettingsPanel extends IngestModuleSettingsPanel implements PropertyChangeListener {
|
||||
public class HashLookupModuleSettingsPanel extends IngestModuleIngestJobSettingsPanel implements PropertyChangeListener {
|
||||
|
||||
private final HashDbManager hashDbManager = HashDbManager.getInstance();
|
||||
private HashDatabasesTableModel knownTableModel;
|
||||
@ -88,7 +88,7 @@ public class HashLookupModuleSettingsPanel extends IngestModuleSettingsPanel imp
|
||||
}
|
||||
|
||||
@Override
|
||||
public IngestModuleSettings getSettings() {
|
||||
public IngestModuleIngestJobSettings getSettings() {
|
||||
List<String> enabledHashSets = new ArrayList<>();
|
||||
List<HashDbManager.HashDb> knownFileHashSets = hashDbManager.getKnownFileHashSets();
|
||||
for (HashDb db : knownFileHashSets) {
|
||||
|
@ -32,7 +32,6 @@ KeywordSearchEditListPanel.copyMenuItem.text=Copy
|
||||
KeywordSearchEditListPanel.exportButton.text=Export List
|
||||
KeywordSearchEditListPanel.deleteListButton.text=Delete List
|
||||
KeywordSearchListsManagementPanel.newListButton.text=New List
|
||||
KeywordSearchEditListPanel.useForIngestCheckbox.text=Use during ingest
|
||||
KeywordSearchListsManagementPanel.importButton.text=Import List
|
||||
KeywordSearchListsViewerPanel.searchAddButton.text=Search
|
||||
KeywordSearchListsViewerPanel.manageListsButton.text=Manage Lists
|
||||
@ -46,42 +45,14 @@ ExtractedContentPanel.pageOfLabel.text=of
|
||||
ExtractedContentPanel.pageCurLabel.text=-
|
||||
ExtractedContentPanel.pageTotalLabel.text=-
|
||||
ExtractedContentPanel.hitLabel.toolTipText=
|
||||
KeywordSearchEditListPanel.ingestMessagesCheckbox.text=Send messages to inbox during ingest
|
||||
KeywordSearchEditListPanel.ingestMessagesCheckbox.text=Send ingest inbox messages for each hit
|
||||
KeywordSearchEditListPanel.ingestMessagesCheckbox.toolTipText=Send messages during ingest when hits on keyword from this list occur
|
||||
KeywordSearchConfigurationPanel2.skipNSRLCheckBox.text=Do not add files in NSRL (known files) to keyword index during ingest
|
||||
KeywordSearchConfigurationPanel2.skipNSRLCheckBox.toolTipText=Requires Hash DB service to had run previously, or be selected for next ingest.
|
||||
KeywordSearchConfigurationPanel2.filesIndexedValue.text=-
|
||||
KeywordSearchConfigurationPanel2.filesIndexedLabel.text=Files in keyword index:
|
||||
KeywordSearchIngestSimplePanel.languagesLabel.text=Scripts enabled for string extraction from unknown file types:
|
||||
KeywordSearchIngestSimplePanel.languagesValLabel.text=-
|
||||
KeywordSearchIngestSimplePanel.languagesLabel.toolTipText=Scripts enabled for string extraction from unknown file types. Changes can be done in Advanced Settings.
|
||||
KeywordSearchIngestSimplePanel.languagesValLabel.toolTipText=
|
||||
KeywordSearchConfigurationPanel3.languagesLabel.text=Enabled scripts (languages):
|
||||
KeywordSearchConfigurationPanel2.chunksLabel.text=Chunks in keyword index:
|
||||
KeywordSearchConfigurationPanel2.chunksValLabel.text=-
|
||||
KeywordSearchConfigurationPanel3.enableUTF8Checkbox.text=Enable UTF8 text extraction
|
||||
KeywordSearchConfigurationPanel3.enableUTF16Checkbox.text=Enable UTF16LE and UTF16BE string extraction
|
||||
KeywordSearchEditListPanel.keywordOptionsLabel.text=Keyword Options
|
||||
KeywordSearchEditListPanel.listOptionsLabel.text=List Options
|
||||
KeywordSearchConfigurationPanel3.ingestSettingsLabel.text=Ingest settings for string extraction from unknown file types (changes effective on next ingest):
|
||||
KeywordSearchConfigurationPanel2.settingsLabel.text=Settings
|
||||
KeywordSearchConfigurationPanel2.informationLabel.text=Information
|
||||
KeywordSearchListsManagementPanel.keywordListsLabel.text=Keyword Lists:
|
||||
KeywordSearchEditListPanel.keywordsLabel.text=Keywords:
|
||||
KeywordSearchConfigurationPanel2.timeRadioButton1.toolTipText=20 mins. (fastest ingest time)
|
||||
KeywordSearchConfigurationPanel2.timeRadioButton1.text=20 minutes (slowest feedback, fastest ingest)
|
||||
KeywordSearchConfigurationPanel2.timeRadioButton2.toolTipText=10 minutes (faster overall ingest time than default)
|
||||
KeywordSearchConfigurationPanel2.timeRadioButton2.text=10 minutes (slower feedback, faster ingest)
|
||||
KeywordSearchConfigurationPanel2.timeRadioButton3.toolTipText=5 minutes (overall ingest time will be longer)
|
||||
KeywordSearchConfigurationPanel2.timeRadioButton3.text=5 minutes (default)
|
||||
KeywordSearchIngestSimplePanel.encodingsLabel.text=Encodings:
|
||||
KeywordSearchIngestSimplePanel.keywordSearchEncodings.text=-
|
||||
KeywordSearchIngestSimplePanel.titleLabel.text=Select keyword lists to enable during ingest:
|
||||
OpenIDE-Module-Short-Description=Keyword Search ingest module, extracted text viewer and keyword search tools
|
||||
KeywordSearchListsViewerPanel.manageListsButton.toolTipText=Manage keyword lists, their settings and associated keywords. The settings are shared among all cases.
|
||||
KeywordSearchConfigurationPanel2.frequencyLabel.text=Results update frequency during ingest:
|
||||
KeywordSearchConfigurationPanel2.timeRadioButton4.text_1=1 minute (faster feedback, longest ingest)
|
||||
KeywordSearchConfigurationPanel2.timeRadioButton4.toolTipText=1 minute (overall ingest time will be longest)
|
||||
AbstractKeywordSearchPerformer.search.dialogErrorHeader=Keyword Search Error
|
||||
AbstractKeywordSearchPerformer.search.invalidSyntaxHeader=Invalid query syntax.
|
||||
AbstractKeywordSearchPerformer.search.searchIngestInProgressTitle=Keyword Search Ingest in Progress
|
||||
@ -263,4 +234,32 @@ Server.addDoc.exception.msg2=Could not add document to index via update handler\
|
||||
Server.close.exception.msg=Cannot close Core
|
||||
Server.close.exception.msg2=Cannot close Core
|
||||
Server.solrServerNoPortException.msg=Indexing server could not bind to port {0}, port is not available, consider change the default {1} port.
|
||||
KeywordSearchConfigurationPanel2.showSnippetsCB.text=Show Keyword Preview in Keyword Search Results (will result in longer search times)
|
||||
KeywordSearchJobSettingsPanel.keywordSearchEncodings.text=-
|
||||
KeywordSearchJobSettingsPanel.languagesValLabel.toolTipText=
|
||||
KeywordSearchJobSettingsPanel.languagesValLabel.text=-
|
||||
KeywordSearchJobSettingsPanel.encodingsLabel.text=Encodings:
|
||||
KeywordSearchJobSettingsPanel.titleLabel.text=Select keyword lists to enable during ingest:
|
||||
KeywordSearchJobSettingsPanel.languagesLabel.toolTipText=Scripts enabled for string extraction from unknown file types. Changes can be done in Advanced Settings.
|
||||
KeywordSearchJobSettingsPanel.languagesLabel.text=Scripts enabled for string extraction from unknown file types:
|
||||
KeywordSearchGlobalLanguageSettingsPanel.enableUTF8Checkbox.text=Enable UTF8 text extraction
|
||||
KeywordSearchGlobalLanguageSettingsPanel.ingestSettingsLabel.text=Ingest settings for string extraction from unknown file types (changes effective on next ingest):
|
||||
KeywordSearchGlobalLanguageSettingsPanel.enableUTF16Checkbox.text=Enable UTF16LE and UTF16BE string extraction
|
||||
KeywordSearchGlobalLanguageSettingsPanel.languagesLabel.text=Enabled scripts (languages):
|
||||
KeywordSearchGlobalSearchSettingsPanel.timeRadioButton1.toolTipText=20 mins. (fastest ingest time)
|
||||
KeywordSearchGlobalSearchSettingsPanel.timeRadioButton1.text=20 minutes (slowest feedback, fastest ingest)
|
||||
KeywordSearchGlobalSearchSettingsPanel.timeRadioButton2.toolTipText=10 minutes (faster overall ingest time than default)
|
||||
KeywordSearchGlobalSearchSettingsPanel.timeRadioButton2.text=10 minutes (slower feedback, faster ingest)
|
||||
KeywordSearchGlobalSearchSettingsPanel.frequencyLabel.text=Results update frequency during ingest:
|
||||
KeywordSearchGlobalSearchSettingsPanel.skipNSRLCheckBox.toolTipText=Requires Hash DB service to had run previously, or be selected for next ingest.
|
||||
KeywordSearchGlobalSearchSettingsPanel.skipNSRLCheckBox.text=Do not add files in NSRL (known files) to keyword index during ingest
|
||||
KeywordSearchGlobalSearchSettingsPanel.informationLabel.text=Information
|
||||
KeywordSearchGlobalSearchSettingsPanel.settingsLabel.text=Settings
|
||||
KeywordSearchGlobalSearchSettingsPanel.filesIndexedValue.text=-
|
||||
KeywordSearchGlobalSearchSettingsPanel.filesIndexedLabel.text=Files in keyword index:
|
||||
KeywordSearchGlobalSearchSettingsPanel.showSnippetsCB.text=Show Keyword Preview in Keyword Search Results (will result in longer search times)
|
||||
KeywordSearchGlobalSearchSettingsPanel.chunksValLabel.text=-
|
||||
KeywordSearchGlobalSearchSettingsPanel.timeRadioButton4.toolTipText=1 minute (overall ingest time will be longest)
|
||||
KeywordSearchGlobalSearchSettingsPanel.timeRadioButton4.text_1=1 minute (faster feedback, longest ingest)
|
||||
KeywordSearchGlobalSearchSettingsPanel.chunksLabel.text=Chunks in keyword index:
|
||||
KeywordSearchGlobalSearchSettingsPanel.timeRadioButton3.toolTipText=5 minutes (overall ingest time will be longer)
|
||||
KeywordSearchGlobalSearchSettingsPanel.timeRadioButton3.text=5 minutes (default)
|
||||
|
@ -26,7 +26,6 @@ KeywordSearchEditListPanel.copyMenuItem.text=\u30b3\u30d4\u30fc
|
||||
KeywordSearchEditListPanel.exportButton.text=\u30ea\u30b9\u30c8\u3092\u30a8\u30af\u30b9\u30dd\u30fc\u30c8
|
||||
KeywordSearchEditListPanel.deleteListButton.text=\u30ea\u30b9\u30c8\u3092\u524a\u9664
|
||||
KeywordSearchListsManagementPanel.newListButton.text=\u65b0\u898f\u30ea\u30b9\u30c8
|
||||
KeywordSearchEditListPanel.useForIngestCheckbox.text=\u51e6\u7406\u4e2d\u306b\u4f7f\u7528
|
||||
KeywordSearchListsManagementPanel.importButton.text=\u30ea\u30b9\u30c8\u3092\u30a4\u30f3\u30dd\u30fc\u30c8
|
||||
KeywordSearchPanel.searchBox.text=\u691c\u7d22...
|
||||
KeywordSearchPanel.regExCheckboxMenuItem.text=\u6b63\u898f\u8868\u73fe\u3092\u4f7f\u7528
|
||||
@ -41,35 +40,12 @@ ExtractedContentPanel.pageButtonsLabel.text=\u30da\u30fc\u30b8
|
||||
ExtractedContentPanel.pagesLabel.text=\u30da\u30fc\u30b8\uff1a
|
||||
KeywordSearchEditListPanel.ingestMessagesCheckbox.text=\u51e6\u7406\u4e2d\u306b\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u30a4\u30f3\u30dc\u30c3\u30af\u30b9\u306b\u9001\u4fe1
|
||||
KeywordSearchEditListPanel.ingestMessagesCheckbox.toolTipText=\u3053\u306e\u30ea\u30b9\u30c8\u306e\u30ad\u30fc\u30ef\u30fc\u30c9\u304c\u691c\u7d22\u306b\u30d2\u30c3\u30c8\u3057\u305f\u5834\u5408\u3001\u51e6\u7406\u4e2d\u306b\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u30a4\u30f3\u30dc\u30c3\u30af\u30b9\u306b\u9001\u4fe1
|
||||
KeywordSearchConfigurationPanel2.skipNSRLCheckBox.text=\u51e6\u7406\u4e2d\u306bNSRL\u306e\u30d5\u30a1\u30a4\u30eb\uff08\u65e2\u77e5\u306e\u30d5\u30a1\u30a4\u30eb\uff09\u3092\u30ad\u30fc\u30ef\u30fc\u30c9\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u8ffd\u52a0\u3057\u306a\u3044
|
||||
KeywordSearchConfigurationPanel2.skipNSRLCheckBox.toolTipText=Hash DB\u30b5\u30fc\u30d3\u30b9\u3092\u4e8b\u524d\u306b\u5b9f\u884c\u3059\u308b\u304b\u3001\u6b21\u56de\u306e\u51e6\u7406\u306b\u9078\u629e\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002
|
||||
KeywordSearchConfigurationPanel2.filesIndexedLabel.text=\u30ad\u30fc\u30ef\u30fc\u30c9\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u5185\u306e\u30d5\u30a1\u30a4\u30eb\uff1a
|
||||
KeywordSearchIngestSimplePanel.languagesLabel.text=\u4e0d\u660e\u306a\u30d5\u30a1\u30a4\u30eb\u5f62\u5f0f\u304b\u3089\u306e\u30b9\u30c8\u30ea\u30f3\u30b0\u62bd\u51fa\u3092\u6709\u52b9\u306b\u3057\u305f\u30b9\u30af\u30ea\u30d7\u30c8\uff1a
|
||||
KeywordSearchIngestSimplePanel.languagesLabel.toolTipText=\u4e0d\u660e\u306a\u30d5\u30a1\u30a4\u30eb\u5f62\u5f0f\u304b\u3089\u306e\u30b9\u30c8\u30ea\u30f3\u30b0\u62bd\u51fa\u3092\u6709\u52b9\u306b\u3057\u305f\u30b9\u30af\u30ea\u30d7\u30c8\u3002\u30a2\u30c9\u30d0\u30f3\u30b9\u8a2d\u5b9a\u304b\u3089\u5909\u66f4\u304c\u53ef\u80fd\u3067\u3059\u3002
|
||||
KeywordSearchConfigurationPanel3.languagesLabel.text=\u6709\u52b9\u306a\u30b9\u30af\u30ea\u30d7\u30c8\uff08\u8a00\u8a9e\uff09\uff1a
|
||||
KeywordSearchConfigurationPanel2.chunksLabel.text=\u30ad\u30fc\u30ef\u30fc\u30c9\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u5185\u306e\u30c1\u30e3\u30f3\u30af\uff1a
|
||||
KeywordSearchConfigurationPanel3.enableUTF8Checkbox.text=UTF8\u30c6\u30ad\u30b9\u30c8\u62bd\u51fa\u306e\u6709\u52b9\u5316
|
||||
KeywordSearchConfigurationPanel3.enableUTF16Checkbox.text=UTF16LE\u3068UTF16BE\u30b9\u30c8\u30ea\u30f3\u30b0\u62bd\u51fa\u306e\u6709\u52b9\u5316
|
||||
KeywordSearchEditListPanel.keywordOptionsLabel.text=\u30ad\u30fc\u30ef\u30fc\u30c9\u30aa\u30d7\u30b7\u30e7\u30f3
|
||||
KeywordSearchEditListPanel.listOptionsLabel.text=\u30ea\u30b9\u30c8\u30aa\u30d7\u30b7\u30e7\u30f3
|
||||
KeywordSearchConfigurationPanel3.ingestSettingsLabel.text=\u4e0d\u660e\u306a\u30d5\u30a1\u30a4\u30eb\u5f62\u5f0f\u304b\u3089\u306e\u30b9\u30c8\u30ea\u30f3\u30b0\u62bd\u51fa\u306e\u51e6\u7406\u65b9\u6cd5\u306e\u8a2d\u5b9a\uff08\u5909\u66f4\u306f\u6b21\u56de\u306e\u51e6\u7406\u304b\u3089\u6709\u52b9\uff09\uff1a
|
||||
KeywordSearchConfigurationPanel2.settingsLabel.text=\u8a2d\u5b9a
|
||||
KeywordSearchConfigurationPanel2.informationLabel.text=\u30a4\u30f3\u30d5\u30a9\u30e1\u30fc\u30b7\u30e7\u30f3
|
||||
KeywordSearchListsManagementPanel.keywordListsLabel.text=\u30ad\u30fc\u30ef\u30fc\u30c9\u30ea\u30b9\u30c8\uff1a
|
||||
KeywordSearchEditListPanel.keywordsLabel.text=\u30ad\u30fc\u30ef\u30fc\u30c9\uff1a
|
||||
KeywordSearchConfigurationPanel2.timeRadioButton1.toolTipText=\uff12\uff10\u5206\uff08\u6700\u77ed\u306e\u51e6\u7406\u6642\u9593\uff09
|
||||
KeywordSearchConfigurationPanel2.timeRadioButton1.text=\uff12\uff10\u5206\uff08\u6700\u3082\u9045\u3044\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u3001\u6700\u77ed\u306e\u51e6\u7406\u6642\u9593\uff09
|
||||
KeywordSearchConfigurationPanel2.timeRadioButton2.toolTipText=\uff11\uff10\u5206\uff08\u30c7\u30d5\u30a9\u30eb\u30c8\u3088\u308a\u5168\u4f53\u7684\u306b\u901f\u3044\u51e6\u7406\u6642\u9593\uff09
|
||||
KeywordSearchConfigurationPanel2.timeRadioButton2.text=\uff11\uff10\u5206\uff08\u3088\u308a\u9045\u3044\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u3001\u3088\u308a\u901f\u3044\u51e6\u7406\u6642\u9593\uff09
|
||||
KeywordSearchConfigurationPanel2.timeRadioButton3.toolTipText=\uff15\u5206\uff08\u5168\u4f53\u7684\u306a\u51e6\u7406\u6642\u9593\u304c\u9577\u304f\u306a\u308a\u307e\u3059\uff09
|
||||
KeywordSearchConfigurationPanel2.timeRadioButton3.text=\uff15\u5206\uff08\u30c7\u30d5\u30a9\u30eb\u30c8\uff09
|
||||
KeywordSearchIngestSimplePanel.encodingsLabel.text=\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\uff1a
|
||||
KeywordSearchIngestSimplePanel.titleLabel.text=\u51e6\u7406\u4e2d\u306b\u6709\u52b9\u306a\u30ad\u30fc\u30ef\u30fc\u30c9\u30ea\u30b9\u30c8\u3092\u9078\u629e\uff1a
|
||||
OpenIDE-Module-Short-Description=\u30ad\u30fc\u30ef\u30fc\u30c9\u691c\u7d22\u51e6\u7406\u30e2\u30b8\u30e5\u30fc\u30eb\u3001\u62bd\u51fa\u3055\u308c\u305f\u30c6\u30ad\u30b9\u30c8\u30d3\u30e5\u30fc\u30a2\u3001\u30ad\u30fc\u30ef\u30fc\u30c9\u691c\u7d22\u30c4\u30fc\u30eb
|
||||
KeywordSearchListsViewerPanel.manageListsButton.toolTipText=\u30ad\u30fc\u30ef\u30fc\u30c9\u30ea\u30b9\u30c8\u3001\u30ea\u30b9\u30c8\u306e\u8a2d\u5b9a\u3068\u95a2\u9023\u3059\u308b\u30ad\u30fc\u30ef\u30fc\u30c9\u306e\u7ba1\u7406\u3002\u3053\u306e\u8a2d\u5b9a\u306f\u5168\u3066\u306e\u30b1\u30fc\u30b9\u306b\u9069\u7528\u3055\u308c\u307e\u3059\u3002
|
||||
KeywordSearchConfigurationPanel2.frequencyLabel.text=\u51e6\u7406\u4e2d\u306e\u7d50\u679c\u66f4\u65b0\u306e\u983b\u5ea6\uff1a
|
||||
KeywordSearchConfigurationPanel2.timeRadioButton4.text_1=\uff11\u5206\uff08\u3088\u308a\u901f\u3044\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u3001\u6700\u3082\u9577\u3044\u51e6\u7406\u6642\u9593\uff09
|
||||
KeywordSearchConfigurationPanel2.timeRadioButton4.toolTipText=\uff11\u5206\uff08\u5168\u4f53\u7684\u306a\u51e6\u7406\u6642\u9593\u304c\u9577\u304f\u306a\u308a\u307e\u3059\uff09
|
||||
AbstractKeywordSearchPerformer.search.dialogErrorHeader=\u30ad\u30fc\u30ef\u30fc\u30c9\u691c\u7d22\u30a8\u30e9\u30fc
|
||||
AbstractKeywordSearchPerformer.search.invalidSyntaxHeader=\u30b7\u30f3\u30bf\u30c3\u30af\u30b9\u30a8\u30e9\u30fc
|
||||
AbstractKeywordSearchPerformer.search.searchIngestInProgressTitle=\u30ad\u30fc\u30ef\u30fc\u30c9\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u5316\u3092\u5b9f\u884c\u4e2d
|
||||
@ -171,10 +147,6 @@ ExtractedContentPanel.pagePreviousButton.actionCommand=
|
||||
ExtractedContentPanel.pageOfLabel.text=of
|
||||
ExtractedContentPanel.pageCurLabel.text=-
|
||||
ExtractedContentPanel.pageTotalLabel.text=-
|
||||
KeywordSearchConfigurationPanel2.filesIndexedValue.text=-
|
||||
KeywordSearchIngestSimplePanel.languagesValLabel.text=-
|
||||
KeywordSearchConfigurationPanel2.chunksValLabel.text=-
|
||||
KeywordSearchIngestSimplePanel.keywordSearchEncodings.text=-
|
||||
AbstractFileChunk.index.exception.msg=\u30d5\u30a1\u30a4\u30eb\u30b9\u30c8\u30ea\u30f3\u30b0\u30c1\u30e3\u30f3\u30af\u306e\u51e6\u7406\u4e2d\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\uff1a {0}, \u30c1\u30e3\u30f3\u30af\: {1}
|
||||
AbstractFileStringContentStream.getSize.exception.msg=\u30b9\u30c8\u30ea\u30f3\u30b0\u5168\u4f53\u304c\u5909\u63db\u3055\u308c\u306a\u3051\u308c\u3070\u3001\u5909\u63db\u3055\u308c\u305f\u30b9\u30c8\u30ea\u30f3\u30b0\u5185\u306e\u30ad\u30e3\u30e9\u30af\u30bf\u30fc\u6570\u306f\u4e0d\u660e\u3067\u3059\u3002
|
||||
AbstractFileStringContentStream.getSrcInfo.text=\u30d5\u30a1\u30a4\u30eb\uff1a{0}
|
||||
@ -255,4 +227,30 @@ KeywordSearchIngestModule.doInBackGround.cancelMsg=\uff08\u30ad\u30e3\u30f3\u30b
|
||||
Server.addDoc.exception.msg2=\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u30cf\u30f3\u30c9\u30e9\u30fc\u3092\u4f7f\u7528\u3057\u307e\u3057\u305f\u304c\u3001\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u4e0b\u8a18\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u8ffd\u52a0\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\uff1a{0}
|
||||
ExtractedContentViewer.getSolrContent.txtBodyItal=<span style\=''font-style\:italic''>{0}</span>
|
||||
Keyword.toString.text=Keyword'{'query\={0}, isLiteral\={1}, keywordType\={2}'}'
|
||||
|
||||
KeywordSearchJobSettingsPanel.keywordSearchEncodings.text=-
|
||||
KeywordSearchJobSettingsPanel.languagesValLabel.text=-
|
||||
KeywordSearchJobSettingsPanel.encodingsLabel.text=\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\uff1a
|
||||
KeywordSearchJobSettingsPanel.titleLabel.text=\u51e6\u7406\u4e2d\u306b\u6709\u52b9\u306a\u30ad\u30fc\u30ef\u30fc\u30c9\u30ea\u30b9\u30c8\u3092\u9078\u629e\uff1a
|
||||
KeywordSearchJobSettingsPanel.languagesLabel.toolTipText=\u4e0d\u660e\u306a\u30d5\u30a1\u30a4\u30eb\u5f62\u5f0f\u304b\u3089\u306e\u30b9\u30c8\u30ea\u30f3\u30b0\u62bd\u51fa\u3092\u6709\u52b9\u306b\u3057\u305f\u30b9\u30af\u30ea\u30d7\u30c8\u3002\u30a2\u30c9\u30d0\u30f3\u30b9\u8a2d\u5b9a\u304b\u3089\u5909\u66f4\u304c\u53ef\u80fd\u3067\u3059\u3002
|
||||
KeywordSearchJobSettingsPanel.languagesLabel.text=\u4e0d\u660e\u306a\u30d5\u30a1\u30a4\u30eb\u5f62\u5f0f\u304b\u3089\u306e\u30b9\u30c8\u30ea\u30f3\u30b0\u62bd\u51fa\u3092\u6709\u52b9\u306b\u3057\u305f\u30b9\u30af\u30ea\u30d7\u30c8\uff1a
|
||||
KeywordSearchGlobalLanguageSettingsPanel.enableUTF8Checkbox.text=UTF8\u30c6\u30ad\u30b9\u30c8\u62bd\u51fa\u306e\u6709\u52b9\u5316
|
||||
KeywordSearchGlobalLanguageSettingsPanel.ingestSettingsLabel.text=\u4e0d\u660e\u306a\u30d5\u30a1\u30a4\u30eb\u5f62\u5f0f\u304b\u3089\u306e\u30b9\u30c8\u30ea\u30f3\u30b0\u62bd\u51fa\u306e\u51e6\u7406\u65b9\u6cd5\u306e\u8a2d\u5b9a\uff08\u5909\u66f4\u306f\u6b21\u56de\u306e\u51e6\u7406\u304b\u3089\u6709\u52b9\uff09\uff1a
|
||||
KeywordSearchGlobalLanguageSettingsPanel.enableUTF16Checkbox.text=UTF16LE\u3068UTF16BE\u30b9\u30c8\u30ea\u30f3\u30b0\u62bd\u51fa\u306e\u6709\u52b9\u5316
|
||||
KeywordSearchGlobalLanguageSettingsPanel.languagesLabel.text=\u6709\u52b9\u306a\u30b9\u30af\u30ea\u30d7\u30c8\uff08\u8a00\u8a9e\uff09\uff1a
|
||||
KeywordSearchGlobalSearchSettingsPanel.timeRadioButton1.toolTipText=\uff12\uff10\u5206\uff08\u6700\u77ed\u306e\u51e6\u7406\u6642\u9593\uff09
|
||||
KeywordSearchGlobalSearchSettingsPanel.timeRadioButton1.text=\uff12\uff10\u5206\uff08\u6700\u3082\u9045\u3044\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u3001\u6700\u77ed\u306e\u51e6\u7406\u6642\u9593\uff09
|
||||
KeywordSearchGlobalSearchSettingsPanel.timeRadioButton2.toolTipText=\uff11\uff10\u5206\uff08\u30c7\u30d5\u30a9\u30eb\u30c8\u3088\u308a\u5168\u4f53\u7684\u306b\u901f\u3044\u51e6\u7406\u6642\u9593\uff09
|
||||
KeywordSearchGlobalSearchSettingsPanel.timeRadioButton2.text=\uff11\uff10\u5206\uff08\u3088\u308a\u9045\u3044\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u3001\u3088\u308a\u901f\u3044\u51e6\u7406\u6642\u9593\uff09
|
||||
KeywordSearchGlobalSearchSettingsPanel.frequencyLabel.text=\u51e6\u7406\u4e2d\u306e\u7d50\u679c\u66f4\u65b0\u306e\u983b\u5ea6\uff1a
|
||||
KeywordSearchGlobalSearchSettingsPanel.skipNSRLCheckBox.toolTipText=Hash DB\u30b5\u30fc\u30d3\u30b9\u3092\u4e8b\u524d\u306b\u5b9f\u884c\u3059\u308b\u304b\u3001\u6b21\u56de\u306e\u51e6\u7406\u306b\u9078\u629e\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002
|
||||
KeywordSearchGlobalSearchSettingsPanel.skipNSRLCheckBox.text=\u51e6\u7406\u4e2d\u306bNSRL\u306e\u30d5\u30a1\u30a4\u30eb\uff08\u65e2\u77e5\u306e\u30d5\u30a1\u30a4\u30eb\uff09\u3092\u30ad\u30fc\u30ef\u30fc\u30c9\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u8ffd\u52a0\u3057\u306a\u3044
|
||||
KeywordSearchGlobalSearchSettingsPanel.informationLabel.text=\u30a4\u30f3\u30d5\u30a9\u30e1\u30fc\u30b7\u30e7\u30f3
|
||||
KeywordSearchGlobalSearchSettingsPanel.settingsLabel.text=\u8a2d\u5b9a
|
||||
KeywordSearchGlobalSearchSettingsPanel.filesIndexedValue.text=-
|
||||
KeywordSearchGlobalSearchSettingsPanel.filesIndexedLabel.text=\u30ad\u30fc\u30ef\u30fc\u30c9\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u5185\u306e\u30d5\u30a1\u30a4\u30eb\uff1a
|
||||
KeywordSearchGlobalSearchSettingsPanel.chunksValLabel.text=-
|
||||
KeywordSearchGlobalSearchSettingsPanel.timeRadioButton4.toolTipText=\uff11\u5206\uff08\u5168\u4f53\u7684\u306a\u51e6\u7406\u6642\u9593\u304c\u9577\u304f\u306a\u308a\u307e\u3059\uff09
|
||||
KeywordSearchGlobalSearchSettingsPanel.timeRadioButton4.text_1=\uff11\u5206\uff08\u3088\u308a\u901f\u3044\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u3001\u6700\u3082\u9577\u3044\u51e6\u7406\u6642\u9593\uff09
|
||||
KeywordSearchGlobalSearchSettingsPanel.chunksLabel.text=\u30ad\u30fc\u30ef\u30fc\u30c9\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u5185\u306e\u30c1\u30e3\u30f3\u30af\uff1a
|
||||
KeywordSearchGlobalSearchSettingsPanel.timeRadioButton3.toolTipText=\uff15\u5206\uff08\u5168\u4f53\u7684\u306a\u51e6\u7406\u6642\u9593\u304c\u9577\u304f\u306a\u308a\u307e\u3059\uff09
|
||||
KeywordSearchGlobalSearchSettingsPanel.timeRadioButton3.text=\uff15\u5206\uff08\u30c7\u30d5\u30a9\u30eb\u30c8\uff09
|
||||
|
@ -1,101 +0,0 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2014 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.keywordsearch;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
|
||||
/**
|
||||
* Keeps track, by name, of the keyword lists to be used for file ingest.
|
||||
*/
|
||||
// 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.
|
||||
final class KeywordListsManager {
|
||||
|
||||
private static KeywordListsManager instance = null;
|
||||
private final Logger logger = Logger.getLogger(KeywordListsManager.class.getName());
|
||||
private final List<String> keywordListNames = new ArrayList<>();
|
||||
private final List<Keyword> keywords = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* Gets the keyword lists manager singleton.
|
||||
*/
|
||||
static synchronized KeywordListsManager getInstance() {
|
||||
if (null == instance) {
|
||||
instance = new KeywordListsManager();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
private KeywordListsManager() {
|
||||
addKeywordListsForFileIngest(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the keyword lists to be used for ingest. The lists that are used
|
||||
* will be the union of the lists enabled using the keyword search global
|
||||
* options panel and a selection, possibly empty, of the disabled lists.
|
||||
*
|
||||
* @param listNames The names of disabled lists to temporarily enable
|
||||
*/
|
||||
synchronized void addKeywordListsForFileIngest(List<String> listNames) {
|
||||
keywords.clear();
|
||||
keywordListNames.clear();
|
||||
|
||||
StringBuilder logMessage = new StringBuilder();
|
||||
KeywordSearchListsXML globalKeywordSearchOptions = KeywordSearchListsXML.getCurrent();
|
||||
for (KeywordList list : globalKeywordSearchOptions.getListsL()) {
|
||||
String listName = list.getName();
|
||||
if ((list.getUseForIngest() == true) || (listNames != null && listNames.contains(listName))) {
|
||||
keywordListNames.add(listName);
|
||||
logMessage.append(listName).append(" ");
|
||||
}
|
||||
|
||||
for (Keyword keyword : list.getKeywords()) {
|
||||
if (!keywords.contains(keyword)) {
|
||||
keywords.add(keyword);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
logger.log(Level.INFO, "Keyword lists for file ingest set to: {0}", logMessage.toString());
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the keyword lists to be used for ingest, by name.
|
||||
*
|
||||
* @return The names of the enabled keyword lists
|
||||
*/
|
||||
synchronized List<String> getNamesOfKeywordListsForFileIngest() {
|
||||
return new ArrayList<>(keywordListNames);
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates whether or not there are currently keywords for which to search
|
||||
* during ingest.
|
||||
*
|
||||
* @return True if there are no keywords specified, false otherwise
|
||||
*/
|
||||
synchronized boolean hasNoKeywordsForSearch() {
|
||||
return (keywords.isEmpty());
|
||||
}
|
||||
}
|
@ -33,11 +33,11 @@ import org.sleuthkit.autopsy.corecomponents.AdvancedConfigurationDialog;
|
||||
class KeywordSearchConfigurationAction extends CallableSystemAction{
|
||||
|
||||
private static final String ACTION_NAME = org.openide.util.NbBundle.getMessage(KeywordSearchPanel.class, "ListBundleConfig");
|
||||
private KeywordSearchConfigurationPanel panel;
|
||||
private KeywordSearchGlobalSettingsPanel panel;
|
||||
|
||||
@Override
|
||||
public void performAction() {
|
||||
final KeywordSearchConfigurationPanel panel = getPanel();
|
||||
final KeywordSearchGlobalSettingsPanel panel = getPanel();
|
||||
panel.load();
|
||||
final AdvancedConfigurationDialog dialog = new AdvancedConfigurationDialog();
|
||||
dialog.addApplyButtonListener(new ActionListener() {
|
||||
@ -60,9 +60,9 @@ class KeywordSearchConfigurationAction extends CallableSystemAction{
|
||||
dialog.display(panel);
|
||||
}
|
||||
|
||||
private KeywordSearchConfigurationPanel getPanel() {
|
||||
private KeywordSearchGlobalSettingsPanel getPanel() {
|
||||
if(panel==null) {
|
||||
panel = new KeywordSearchConfigurationPanel();
|
||||
panel = new KeywordSearchGlobalSettingsPanel();
|
||||
}
|
||||
return panel;
|
||||
}
|
||||
|
@ -103,19 +103,18 @@
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace min="10" pref="10" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="ingestMessagesCheckbox" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="exportButton" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="saveListButton" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="deleteListButton" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="useForIngestCheckbox" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="ingestMessagesCheckbox" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
<EmptySpace min="0" pref="44" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
@ -147,17 +146,15 @@
|
||||
<Component id="listOptionsSeparator" min="-2" pref="6" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="7" max="-2" attributes="0"/>
|
||||
<Component id="useForIngestCheckbox" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="ingestMessagesCheckbox" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<EmptySpace pref="13" max="32767" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="exportButton" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="saveListButton" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="deleteListButton" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="42" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
@ -190,16 +187,6 @@
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Component class="javax.swing.JCheckBox" name="useForIngestCheckbox">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchEditListPanel.useForIngestCheckbox.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="useForIngestCheckboxActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Container class="javax.swing.JPanel" name="addKeywordPanel">
|
||||
|
||||
<Layout>
|
||||
@ -265,9 +252,6 @@
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchEditListPanel.chRegex.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="chRegexActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="deleteWordButton">
|
||||
<Properties>
|
||||
|
@ -16,10 +16,8 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.sleuthkit.autopsy.keywordsearch;
|
||||
|
||||
import java.awt.Component;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.beans.PropertyChangeEvent;
|
||||
@ -33,8 +31,6 @@ import org.openide.util.NbBundle;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.regex.PatternSyntaxException;
|
||||
import javax.swing.DefaultListSelectionModel;
|
||||
import javax.swing.JCheckBox;
|
||||
import javax.swing.JFileChooser;
|
||||
import javax.swing.JMenuItem;
|
||||
import javax.swing.JTable;
|
||||
@ -43,12 +39,10 @@ import javax.swing.event.ListSelectionEvent;
|
||||
import javax.swing.event.ListSelectionListener;
|
||||
import javax.swing.filechooser.FileNameExtensionFilter;
|
||||
import javax.swing.table.AbstractTableModel;
|
||||
import javax.swing.table.TableCellRenderer;
|
||||
import javax.swing.table.TableColumn;
|
||||
import org.sleuthkit.autopsy.corecomponents.OptionsPanel;
|
||||
import org.sleuthkit.autopsy.ingest.IngestManager;
|
||||
import org.sleuthkit.autopsy.ingest.IngestManager.IngestEvent;
|
||||
import org.sleuthkit.datamodel.BlackboardAttribute;
|
||||
|
||||
/**
|
||||
* KeywordSearchEditListPanel widget to manage keywords in lists
|
||||
@ -58,18 +52,17 @@ class KeywordSearchEditListPanel extends javax.swing.JPanel implements ListSelec
|
||||
private static Logger logger = Logger.getLogger(KeywordSearchEditListPanel.class.getName());
|
||||
private KeywordTableModel tableModel;
|
||||
private KeywordList currentKeywordList;
|
||||
|
||||
|
||||
private boolean ingestRunning;
|
||||
|
||||
/** Creates new form KeywordSearchEditListPanel */
|
||||
/**
|
||||
* Creates new form KeywordSearchEditListPanel
|
||||
*/
|
||||
KeywordSearchEditListPanel() {
|
||||
tableModel = new KeywordTableModel();
|
||||
initComponents();
|
||||
customizeComponents();
|
||||
}
|
||||
|
||||
|
||||
private void customizeComponents() {
|
||||
chRegex.setToolTipText(NbBundle.getMessage(this.getClass(), "KeywordSearchEditListPanel.customizeComponents.kwReToolTip"));
|
||||
addWordButton.setToolTipText((NbBundle.getMessage(this.getClass(), "KeywordSearchEditListPanel.customizeComponents.addWordToolTip")));
|
||||
@ -78,17 +71,12 @@ class KeywordSearchEditListPanel extends javax.swing.JPanel implements ListSelec
|
||||
saveListButton.setToolTipText(NbBundle.getMessage(this.getClass(), "KeywordSearchEditListPanel.customizeComponents.saveCurrentWIthNewNameToolTip"));
|
||||
deleteWordButton.setToolTipText(NbBundle.getMessage(this.getClass(), "KeywordSearchEditListPanel.customizeComponents.removeSelectedMsg"));
|
||||
|
||||
//keywordTable.setAutoscrolls(true);
|
||||
//keywordTable.setTableHeader(null);
|
||||
keywordTable.setShowHorizontalLines(false);
|
||||
keywordTable.setShowVerticalLines(false);
|
||||
|
||||
keywordTable.getParent().setBackground(keywordTable.getBackground());
|
||||
|
||||
//customize column witdhs
|
||||
final int width = jScrollPane1.getPreferredSize().width;
|
||||
keywordTable.setAutoResizeMode(JTable.AUTO_RESIZE_NEXT_COLUMN);
|
||||
TableColumn column = null;
|
||||
TableColumn column;
|
||||
for (int i = 0; i < keywordTable.getColumnCount(); i++) {
|
||||
column = keywordTable.getColumnModel().getColumn(i);
|
||||
if (i == 0) {
|
||||
@ -103,41 +91,20 @@ class KeywordSearchEditListPanel extends javax.swing.JPanel implements ListSelec
|
||||
|
||||
final ListSelectionModel lsm = keywordTable.getSelectionModel();
|
||||
lsm.addListSelectionListener(new ListSelectionListener() {
|
||||
|
||||
@Override
|
||||
public void valueChanged(ListSelectionEvent e) {
|
||||
if (lsm.isSelectionEmpty() || currentKeywordList.isLocked()) {
|
||||
deleteWordButton.setEnabled(false);
|
||||
return;
|
||||
} else {
|
||||
deleteWordButton.setEnabled(true);
|
||||
}
|
||||
|
||||
//show selector if available
|
||||
DefaultListSelectionModel selModel = (DefaultListSelectionModel) e.getSource();
|
||||
if (!selModel.getValueIsAdjusting()) {
|
||||
List<Keyword> keywords = currentKeywordList.getKeywords();
|
||||
final int minIndex = selModel.getMinSelectionIndex();
|
||||
final int maxIndex = selModel.getMaxSelectionIndex();
|
||||
int selected = -1;
|
||||
for (int i = minIndex; i <= maxIndex; i++) {
|
||||
if (selModel.isSelectedIndex(i)) {
|
||||
selected = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//loadDefaultKeywords();
|
||||
|
||||
|
||||
initButtons();
|
||||
|
||||
addWordField.setComponentPopupMenu(rightClickMenu);
|
||||
ActionListener actList = new ActionListener() {
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
JMenuItem jmi = (JMenuItem) e.getSource();
|
||||
@ -157,8 +124,6 @@ class KeywordSearchEditListPanel extends javax.swing.JPanel implements ListSelec
|
||||
pasteMenuItem.addActionListener(actList);
|
||||
selectAllMenuItem.addActionListener(actList);
|
||||
|
||||
|
||||
|
||||
if (IngestManager.getDefault().isIngestRunning()) {
|
||||
initIngest(0);
|
||||
} else {
|
||||
@ -166,18 +131,17 @@ class KeywordSearchEditListPanel extends javax.swing.JPanel implements ListSelec
|
||||
}
|
||||
|
||||
IngestManager.addPropertyChangeListener(new PropertyChangeListener() {
|
||||
|
||||
@Override
|
||||
public void propertyChange(PropertyChangeEvent evt) {
|
||||
String changed = evt.getPropertyName();
|
||||
Object oldValue = evt.getOldValue();
|
||||
if (changed.equals(IngestEvent.COMPLETED.toString() )
|
||||
if (changed.equals(IngestEvent.COMPLETED.toString())
|
||||
&& ((String) oldValue).equals(KeywordSearchModuleFactory.getModuleName())) {
|
||||
initIngest(1);
|
||||
} else if (changed.equals(IngestEvent.STARTED.toString() )
|
||||
} else if (changed.equals(IngestEvent.STARTED.toString())
|
||||
&& ((String) oldValue).equals(KeywordSearchModuleFactory.getModuleName())) {
|
||||
initIngest(0);
|
||||
} else if (changed.equals(IngestEvent.STOPPED.toString() )
|
||||
} else if (changed.equals(IngestEvent.STOPPED.toString())
|
||||
&& ((String) oldValue).equals(KeywordSearchModuleFactory.getModuleName())) {
|
||||
initIngest(1);
|
||||
}
|
||||
@ -187,9 +151,8 @@ class KeywordSearchEditListPanel extends javax.swing.JPanel implements ListSelec
|
||||
|
||||
/**
|
||||
* Initialize this panel depending on whether ingest is running
|
||||
* @param running
|
||||
* case 0: ingest running
|
||||
* case 1: ingest not running
|
||||
*
|
||||
* @param running case 0: ingest running case 1: ingest not running
|
||||
*/
|
||||
private void initIngest(int running) {
|
||||
switch (running) {
|
||||
@ -204,43 +167,22 @@ class KeywordSearchEditListPanel extends javax.swing.JPanel implements ListSelec
|
||||
}
|
||||
|
||||
void initButtons() {
|
||||
//initialize buttons
|
||||
// Certain buttons will be disabled if no list is set
|
||||
boolean listSet = currentKeywordList != null;
|
||||
// Certain buttons will be disabled if ingest is ongoing
|
||||
boolean ingestOngoing = this.ingestRunning;
|
||||
// Certain buttons will be disabled if ingest is ongoing on this list
|
||||
boolean useForIngest = !listSet ? false : currentKeywordList.getUseForIngest();
|
||||
// Certain buttons will be disabled if the list shouldn't send ingest messages
|
||||
boolean sendIngestMessages = !listSet ? false : currentKeywordList.getIngestMessages();
|
||||
// Certain buttons will be disabled if the selected list is locked
|
||||
boolean isLocked = !listSet ? true : currentKeywordList.isLocked();
|
||||
// Certain buttons will be disabled if no keywords are set
|
||||
boolean noKeywords = !listSet ? true : currentKeywordList.getKeywords().isEmpty();
|
||||
|
||||
// Certain buttons will be disabled if ingest is ongoing on this list
|
||||
List<String> ingestLists = new ArrayList<>();
|
||||
if (ingestOngoing) {
|
||||
ingestLists = KeywordListsManager.getInstance().getNamesOfKeywordListsForFileIngest();
|
||||
}
|
||||
boolean inIngest = !listSet ? false : ingestLists.contains(currentKeywordList.getName());
|
||||
|
||||
addWordButton.setEnabled(listSet && (!ingestOngoing || !inIngest) && !isLocked);
|
||||
addWordField.setEnabled(listSet && (!ingestOngoing || !inIngest) && !isLocked);
|
||||
chRegex.setEnabled(listSet && (!ingestOngoing || !inIngest) && !isLocked);
|
||||
addWordButton.setEnabled(listSet && !ingestRunning && !isLocked);
|
||||
addWordField.setEnabled(listSet && !ingestRunning && !isLocked);
|
||||
chRegex.setEnabled(listSet && ingestRunning && !isLocked);
|
||||
keywordOptionsLabel.setEnabled(addWordButton.isEnabled() || chRegex.isEnabled());
|
||||
keywordOptionsSeparator.setEnabled(addWordButton.isEnabled() || chRegex.isEnabled());
|
||||
useForIngestCheckbox.setEnabled(listSet && (!ingestOngoing || !inIngest));
|
||||
useForIngestCheckbox.setSelected(useForIngest);
|
||||
ingestMessagesCheckbox.setEnabled(useForIngestCheckbox.isEnabled() && useForIngestCheckbox.isSelected());
|
||||
ingestMessagesCheckbox.setSelected(sendIngestMessages);
|
||||
listOptionsLabel.setEnabled(useForIngestCheckbox.isEnabled() || ingestMessagesCheckbox.isEnabled());
|
||||
listOptionsSeparator.setEnabled(useForIngestCheckbox.isEnabled() || ingestMessagesCheckbox.isEnabled());
|
||||
ingestMessagesCheckbox.setEnabled(listSet && !ingestRunning);
|
||||
ingestMessagesCheckbox.setSelected(!listSet ? false : currentKeywordList.getIngestMessages());
|
||||
listOptionsLabel.setEnabled(ingestMessagesCheckbox.isEnabled());
|
||||
listOptionsSeparator.setEnabled(ingestMessagesCheckbox.isEnabled());
|
||||
saveListButton.setEnabled(listSet);
|
||||
exportButton.setEnabled(listSet);
|
||||
deleteListButton.setEnabled(listSet && (!ingestOngoing || !inIngest) && !isLocked);
|
||||
deleteWordButton.setEnabled(listSet && (!ingestOngoing || !inIngest) && !isLocked);
|
||||
|
||||
deleteListButton.setEnabled(listSet && !ingestRunning && !isLocked);
|
||||
deleteWordButton.setEnabled(listSet && !ingestRunning && !isLocked);
|
||||
if (noKeywords) {
|
||||
saveListButton.setEnabled(false);
|
||||
exportButton.setEnabled(false);
|
||||
@ -251,10 +193,10 @@ class KeywordSearchEditListPanel extends javax.swing.JPanel implements ListSelec
|
||||
}
|
||||
}
|
||||
|
||||
/** This method is called from within the constructor to
|
||||
* initialize the form.
|
||||
* WARNING: Do NOT modify this code. The content of this method is
|
||||
* always regenerated by the Form Editor.
|
||||
/**
|
||||
* This method is called from within the constructor to initialize the form.
|
||||
* WARNING: Do NOT modify this code. The content of this method is always
|
||||
* regenerated by the Form Editor.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
@ -268,7 +210,6 @@ class KeywordSearchEditListPanel extends javax.swing.JPanel implements ListSelec
|
||||
listEditorPanel = new javax.swing.JPanel();
|
||||
jScrollPane1 = new javax.swing.JScrollPane();
|
||||
keywordTable = new javax.swing.JTable();
|
||||
useForIngestCheckbox = new javax.swing.JCheckBox();
|
||||
addKeywordPanel = new javax.swing.JPanel();
|
||||
addWordButton = new javax.swing.JButton();
|
||||
addWordField = new javax.swing.JTextField();
|
||||
@ -308,13 +249,6 @@ class KeywordSearchEditListPanel extends javax.swing.JPanel implements ListSelec
|
||||
keywordTable.getTableHeader().setReorderingAllowed(false);
|
||||
jScrollPane1.setViewportView(keywordTable);
|
||||
|
||||
useForIngestCheckbox.setText(org.openide.util.NbBundle.getMessage(KeywordSearchEditListPanel.class, "KeywordSearchEditListPanel.useForIngestCheckbox.text")); // NOI18N
|
||||
useForIngestCheckbox.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
useForIngestCheckboxActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
addWordButton.setText(org.openide.util.NbBundle.getMessage(KeywordSearchEditListPanel.class, "KeywordSearchEditListPanel.addWordButton.text")); // NOI18N
|
||||
addWordButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
@ -330,11 +264,6 @@ class KeywordSearchEditListPanel extends javax.swing.JPanel implements ListSelec
|
||||
});
|
||||
|
||||
chRegex.setText(org.openide.util.NbBundle.getMessage(KeywordSearchEditListPanel.class, "KeywordSearchEditListPanel.chRegex.text")); // NOI18N
|
||||
chRegex.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
chRegexActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
deleteWordButton.setText(org.openide.util.NbBundle.getMessage(KeywordSearchEditListPanel.class, "KeywordSearchEditListPanel.deleteWordButton.text")); // NOI18N
|
||||
deleteWordButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
@ -427,15 +356,14 @@ class KeywordSearchEditListPanel extends javax.swing.JPanel implements ListSelec
|
||||
.addGroup(listEditorPanelLayout.createSequentialGroup()
|
||||
.addGap(10, 10, 10)
|
||||
.addGroup(listEditorPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(ingestMessagesCheckbox)
|
||||
.addGroup(listEditorPanelLayout.createSequentialGroup()
|
||||
.addComponent(exportButton)
|
||||
.addGap(18, 18, 18)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(saveListButton)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(deleteListButton))
|
||||
.addComponent(useForIngestCheckbox)
|
||||
.addComponent(ingestMessagesCheckbox))))
|
||||
.addGap(0, 0, Short.MAX_VALUE)))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(deleteListButton)))))
|
||||
.addGap(0, 44, Short.MAX_VALUE)))
|
||||
.addContainerGap())))
|
||||
);
|
||||
listEditorPanelLayout.setVerticalGroup(
|
||||
@ -457,16 +385,14 @@ class KeywordSearchEditListPanel extends javax.swing.JPanel implements ListSelec
|
||||
.addGroup(listEditorPanelLayout.createSequentialGroup()
|
||||
.addGap(123, 123, 123)
|
||||
.addComponent(listOptionsSeparator, javax.swing.GroupLayout.PREFERRED_SIZE, 6, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addGap(7, 7, 7)
|
||||
.addComponent(useForIngestCheckbox)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(ingestMessagesCheckbox)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 13, Short.MAX_VALUE)
|
||||
.addGroup(listEditorPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(exportButton)
|
||||
.addComponent(saveListButton)
|
||||
.addComponent(deleteListButton))
|
||||
.addContainerGap())
|
||||
.addGap(42, 42, 42))
|
||||
);
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
@ -494,7 +420,6 @@ class KeywordSearchEditListPanel extends javax.swing.JPanel implements ListSelec
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//check if valid
|
||||
boolean valid = true;
|
||||
try {
|
||||
@ -520,9 +445,7 @@ class KeywordSearchEditListPanel extends javax.swing.JPanel implements ListSelec
|
||||
}//GEN-LAST:event_addWordButtonActionPerformed
|
||||
|
||||
private void deleteWordButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deleteWordButtonActionPerformed
|
||||
if (KeywordSearchUtil.displayConfirmDialog(NbBundle.getMessage(this.getClass(), "KeywordSearchEditListPanel.removeKwMsg")
|
||||
, NbBundle.getMessage(this.getClass(), "KeywordSearchEditListPanel.deleteWordButtonActionPerformed.delConfirmMsg")
|
||||
, KeywordSearchUtil.DIALOG_MESSAGE_TYPE.WARN) ) {
|
||||
if (KeywordSearchUtil.displayConfirmDialog(NbBundle.getMessage(this.getClass(), "KeywordSearchEditListPanel.removeKwMsg"), NbBundle.getMessage(this.getClass(), "KeywordSearchEditListPanel.deleteWordButtonActionPerformed.delConfirmMsg"), KeywordSearchUtil.DIALOG_MESSAGE_TYPE.WARN)) {
|
||||
|
||||
tableModel.deleteSelected(keywordTable.getSelectedRows());
|
||||
KeywordSearchListsXML.getCurrent().addList(currentKeywordList);
|
||||
@ -570,10 +493,9 @@ class KeywordSearchEditListPanel extends javax.swing.JPanel implements ListSelec
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
KeywordSearchListsXML reader = KeywordSearchListsXML.getCurrent();
|
||||
|
||||
List<KeywordList> toWrite = new ArrayList<KeywordList>();
|
||||
List<KeywordList> toWrite = new ArrayList<>();
|
||||
toWrite.add(reader.getList(currentKeywordList.getName()));
|
||||
final KeywordSearchListsXML exporter = new KeywordSearchListsXML(fileAbs);
|
||||
boolean written = exporter.saveLists(toWrite);
|
||||
@ -585,22 +507,11 @@ class KeywordSearchEditListPanel extends javax.swing.JPanel implements ListSelec
|
||||
}
|
||||
}//GEN-LAST:event_exportButtonActionPerformed
|
||||
|
||||
private void chRegexActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chRegexActionPerformed
|
||||
}//GEN-LAST:event_chRegexActionPerformed
|
||||
|
||||
private void useForIngestCheckboxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_useForIngestCheckboxActionPerformed
|
||||
ingestMessagesCheckbox.setEnabled(useForIngestCheckbox.isSelected());
|
||||
currentKeywordList.setUseForIngest(useForIngestCheckbox.isSelected());
|
||||
KeywordSearchListsXML updater = KeywordSearchListsXML.getCurrent();
|
||||
updater.addList(currentKeywordList);
|
||||
}//GEN-LAST:event_useForIngestCheckboxActionPerformed
|
||||
|
||||
private void ingestMessagesCheckboxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ingestMessagesCheckboxActionPerformed
|
||||
currentKeywordList.setIngestMessages(ingestMessagesCheckbox.isSelected());
|
||||
KeywordSearchListsXML updater = KeywordSearchListsXML.getCurrent();
|
||||
updater.addList(currentKeywordList);
|
||||
}//GEN-LAST:event_ingestMessagesCheckboxActionPerformed
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JPanel addKeywordPanel;
|
||||
private javax.swing.JButton addWordButton;
|
||||
@ -624,7 +535,6 @@ private void useForIngestCheckboxActionPerformed(java.awt.event.ActionEvent evt)
|
||||
private javax.swing.JPopupMenu rightClickMenu;
|
||||
private javax.swing.JButton saveListButton;
|
||||
private javax.swing.JMenuItem selectAllMenuItem;
|
||||
private javax.swing.JCheckBox useForIngestCheckbox;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
@Override
|
||||
@ -673,9 +583,7 @@ private void useForIngestCheckboxActionPerformed(java.awt.event.ActionEvent evt)
|
||||
saveListButton.addActionListener(l);
|
||||
}
|
||||
|
||||
|
||||
private class KeywordTableModel extends AbstractTableModel {
|
||||
//data
|
||||
|
||||
@Override
|
||||
public int getColumnCount() {
|
||||
@ -708,7 +616,7 @@ private void useForIngestCheckboxActionPerformed(java.awt.event.ActionEvent evt)
|
||||
@Override
|
||||
public Object getValueAt(int rowIndex, int columnIndex) {
|
||||
Object ret = null;
|
||||
if(currentKeywordList == null) {
|
||||
if (currentKeywordList == null) {
|
||||
return "";
|
||||
}
|
||||
Keyword word = currentKeywordList.getKeywords().get(rowIndex);
|
||||
@ -720,7 +628,7 @@ private void useForIngestCheckboxActionPerformed(java.awt.event.ActionEvent evt)
|
||||
ret = (Object) !word.isLiteral();
|
||||
break;
|
||||
default:
|
||||
logger.log(Level.SEVERE, "Invalid table column index: " + columnIndex);
|
||||
logger.log(Level.SEVERE, "Invalid table column index: {0}", columnIndex);
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
@ -741,7 +649,7 @@ private void useForIngestCheckboxActionPerformed(java.awt.event.ActionEvent evt)
|
||||
}
|
||||
|
||||
void addKeyword(Keyword keyword) {
|
||||
if(!currentKeywordList.hasKeyword(keyword)) {
|
||||
if (!currentKeywordList.hasKeyword(keyword)) {
|
||||
currentKeywordList.getKeywords().add(keyword);
|
||||
}
|
||||
fireTableDataChanged();
|
||||
@ -755,37 +663,10 @@ private void useForIngestCheckboxActionPerformed(java.awt.event.ActionEvent evt)
|
||||
void deleteSelected(int[] selected) {
|
||||
List<Keyword> words = currentKeywordList.getKeywords();
|
||||
Arrays.sort(selected);
|
||||
for(int arrayi = selected.length-1; arrayi >= 0; arrayi--) {
|
||||
for (int arrayi = selected.length - 1; arrayi >= 0; arrayi--) {
|
||||
words.remove(selected[arrayi]);
|
||||
}
|
||||
resync();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private class CheckBoxRenderer extends JCheckBox implements TableCellRenderer {
|
||||
|
||||
@Override
|
||||
public Component getTableCellRendererComponent(
|
||||
JTable table, Object value,
|
||||
boolean isSelected, boolean hasFocus,
|
||||
int row, int column) {
|
||||
|
||||
this.setHorizontalAlignment(JCheckBox.CENTER);
|
||||
this.setVerticalAlignment(JCheckBox.CENTER);
|
||||
|
||||
Boolean selected = (Boolean) table.getModel().getValueAt(row, 1);
|
||||
setSelected(selected);
|
||||
if (isSelected) {
|
||||
setBackground(keywordTable.getSelectionBackground());
|
||||
setForeground(keywordTable.getSelectionForeground());
|
||||
} else {
|
||||
setBackground(keywordTable.getBackground());
|
||||
setForeground(keywordTable.getForeground());
|
||||
}
|
||||
setEnabled(false);
|
||||
|
||||
return this;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,7 @@
|
||||
<Component class="javax.swing.JLabel" name="languagesLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchConfigurationPanel3.languagesLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchGlobalLanguageSettingsPanel.languagesLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
@ -96,7 +96,7 @@
|
||||
<Component class="javax.swing.JCheckBox" name="enableUTF8Checkbox">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchConfigurationPanel3.enableUTF8Checkbox.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchGlobalLanguageSettingsPanel.enableUTF8Checkbox.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
@ -106,7 +106,7 @@
|
||||
<Component class="javax.swing.JCheckBox" name="enableUTF16Checkbox">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchConfigurationPanel3.enableUTF16Checkbox.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchGlobalLanguageSettingsPanel.enableUTF16Checkbox.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
@ -116,7 +116,7 @@
|
||||
<Component class="javax.swing.JLabel" name="ingestSettingsLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchConfigurationPanel3.ingestSettingsLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchGlobalLanguageSettingsPanel.ingestSettingsLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2012 Basis Technology Corp.
|
||||
* Copyright 2012-2014 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -26,7 +26,6 @@ import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import javax.swing.JCheckBox;
|
||||
import org.sleuthkit.autopsy.corecomponents.OptionsPanel;
|
||||
import org.sleuthkit.autopsy.coreutils.StringExtract;
|
||||
@ -34,38 +33,24 @@ import org.sleuthkit.autopsy.coreutils.StringExtract.StringExtractUnicodeTable.S
|
||||
import org.sleuthkit.autopsy.ingest.IngestManager;
|
||||
|
||||
/**
|
||||
* Advanced configuration panel handling languages config.
|
||||
* Child panel of the global settings panel (Languages tab).
|
||||
*/
|
||||
class KeywordSearchConfigurationPanel3 extends javax.swing.JPanel implements OptionsPanel {
|
||||
class KeywordSearchGlobalLanguageSettingsPanel extends javax.swing.JPanel implements OptionsPanel {
|
||||
|
||||
private static KeywordSearchConfigurationPanel3 instance = null;
|
||||
private final Logger logger = Logger.getLogger(KeywordSearchConfigurationPanel3.class.getName());
|
||||
private final Map<String, StringExtract.StringExtractUnicodeTable.SCRIPT> scripts = new HashMap<String, StringExtract.StringExtractUnicodeTable.SCRIPT>();
|
||||
private final Map<String, StringExtract.StringExtractUnicodeTable.SCRIPT> scripts = new HashMap<>();
|
||||
private ActionListener updateLanguagesAction;
|
||||
private List<SCRIPT> toUpdate;
|
||||
|
||||
/**
|
||||
* Creates new form KeywordSearchConfigurationPanel3
|
||||
*/
|
||||
public KeywordSearchConfigurationPanel3() {
|
||||
KeywordSearchGlobalLanguageSettingsPanel() {
|
||||
initComponents();
|
||||
customizeComponents();
|
||||
}
|
||||
|
||||
public static KeywordSearchConfigurationPanel3 getDefault() {
|
||||
if (instance == null) {
|
||||
instance = new KeywordSearchConfigurationPanel3();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
private void customizeComponents() {
|
||||
|
||||
|
||||
updateLanguagesAction = new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
toUpdate = new ArrayList<SCRIPT>();
|
||||
toUpdate = new ArrayList<>();
|
||||
final int components = checkPanel.getComponentCount();
|
||||
for (int i = 0; i < components; ++i) {
|
||||
JCheckBox ch = (JCheckBox) checkPanel.getComponent(i);
|
||||
@ -79,7 +64,6 @@ class KeywordSearchConfigurationPanel3 extends javax.swing.JPanel implements Opt
|
||||
|
||||
initScriptsCheckBoxes();
|
||||
reloadScriptsCheckBoxes();
|
||||
|
||||
}
|
||||
|
||||
private void activateScriptsCheckboxes(boolean activate) {
|
||||
@ -112,7 +96,6 @@ class KeywordSearchConfigurationPanel3 extends javax.swing.JPanel implements Opt
|
||||
}
|
||||
|
||||
private void reloadScriptsCheckBoxes() {
|
||||
|
||||
boolean utf16 =
|
||||
Boolean.parseBoolean(KeywordSearchSettings.getStringExtractOption(AbstractFileExtract.ExtractOptions.EXTRACT_UTF16.toString()));
|
||||
|
||||
@ -132,13 +115,11 @@ class KeywordSearchConfigurationPanel3 extends javax.swing.JPanel implements Opt
|
||||
|
||||
ch.setSelected(serviceScripts.contains(script));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void activateWidgets() {
|
||||
reloadScriptsCheckBoxes();
|
||||
|
||||
|
||||
boolean utf16 =
|
||||
Boolean.parseBoolean(KeywordSearchSettings.getStringExtractOption(AbstractFileExtract.ExtractOptions.EXTRACT_UTF16.toString()));
|
||||
|
||||
@ -172,7 +153,7 @@ class KeywordSearchConfigurationPanel3 extends javax.swing.JPanel implements Opt
|
||||
enableUTF16Checkbox = new javax.swing.JCheckBox();
|
||||
ingestSettingsLabel = new javax.swing.JLabel();
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(languagesLabel, org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel3.class, "KeywordSearchConfigurationPanel3.languagesLabel.text")); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(languagesLabel, org.openide.util.NbBundle.getMessage(KeywordSearchGlobalLanguageSettingsPanel.class, "KeywordSearchGlobalLanguageSettingsPanel.languagesLabel.text")); // NOI18N
|
||||
|
||||
langPanel.setPreferredSize(new java.awt.Dimension(430, 361));
|
||||
|
||||
@ -191,21 +172,21 @@ class KeywordSearchConfigurationPanel3 extends javax.swing.JPanel implements Opt
|
||||
|
||||
langPanel.setViewportView(checkPanel);
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(enableUTF8Checkbox, org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel3.class, "KeywordSearchConfigurationPanel3.enableUTF8Checkbox.text")); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(enableUTF8Checkbox, org.openide.util.NbBundle.getMessage(KeywordSearchGlobalLanguageSettingsPanel.class, "KeywordSearchGlobalLanguageSettingsPanel.enableUTF8Checkbox.text")); // NOI18N
|
||||
enableUTF8Checkbox.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
enableUTF8CheckboxActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(enableUTF16Checkbox, org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel3.class, "KeywordSearchConfigurationPanel3.enableUTF16Checkbox.text")); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(enableUTF16Checkbox, org.openide.util.NbBundle.getMessage(KeywordSearchGlobalLanguageSettingsPanel.class, "KeywordSearchGlobalLanguageSettingsPanel.enableUTF16Checkbox.text")); // NOI18N
|
||||
enableUTF16Checkbox.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
enableUTF16CheckboxActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(ingestSettingsLabel, org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel3.class, "KeywordSearchConfigurationPanel3.ingestSettingsLabel.text")); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(ingestSettingsLabel, org.openide.util.NbBundle.getMessage(KeywordSearchGlobalLanguageSettingsPanel.class, "KeywordSearchGlobalLanguageSettingsPanel.ingestSettingsLabel.text")); // NOI18N
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
@ -277,11 +258,12 @@ class KeywordSearchConfigurationPanel3 extends javax.swing.JPanel implements Opt
|
||||
KeywordSearchSettings.setStringExtractScripts(toUpdate);
|
||||
}
|
||||
|
||||
// This is a stop-gap way of notifying the job settings panel of potential changes.
|
||||
KeywordSearchListsXML.getCurrent().fireLanguagesEvent(KeywordSearchListsAbstract.LanguagesEvent.LANGUAGES_CHANGED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void load() {
|
||||
activateWidgets();
|
||||
|
||||
}
|
||||
}
|
@ -16,7 +16,6 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.sleuthkit.autopsy.keywordsearch;
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
@ -24,42 +23,30 @@ import java.awt.event.ActionListener;
|
||||
import java.util.List;
|
||||
import javax.swing.JOptionPane;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.corecomponents.OptionsPanel;
|
||||
|
||||
/**
|
||||
* Panel containing all other Keyword search Options panels.
|
||||
*/
|
||||
class KeywordSearchConfigurationPanel1 extends javax.swing.JPanel implements OptionsPanel {
|
||||
final class KeywordSearchGlobalListSettingsPanel extends javax.swing.JPanel implements OptionsPanel {
|
||||
|
||||
KeywordSearchListsManagementPanel listsManagementPanel;
|
||||
KeywordSearchEditListPanel editListPanel;
|
||||
private static final Logger logger = Logger.getLogger(KeywordSearchConfigurationPanel1.class.getName());
|
||||
private static final String KEYWORD_CONFIG_NAME = org.openide.util.NbBundle.getMessage(KeywordSearchPanel.class, "ListBundleConfig");
|
||||
private final KeywordSearchListsManagementPanel listsManagementPanel = new KeywordSearchListsManagementPanel();
|
||||
private final KeywordSearchEditListPanel editListPanel = new KeywordSearchEditListPanel();
|
||||
|
||||
KeywordSearchConfigurationPanel1() {
|
||||
KeywordSearchGlobalListSettingsPanel() {
|
||||
initComponents();
|
||||
customizeComponents();
|
||||
setName(KEYWORD_CONFIG_NAME);
|
||||
setName(org.openide.util.NbBundle.getMessage(KeywordSearchPanel.class, "ListBundleConfig"));
|
||||
}
|
||||
|
||||
private void customizeComponents() {
|
||||
listsManagementPanel = new KeywordSearchListsManagementPanel();
|
||||
editListPanel = new KeywordSearchEditListPanel();
|
||||
|
||||
listsManagementPanel.addListSelectionListener(editListPanel);
|
||||
editListPanel.addDeleteButtonActionPerformed(new ActionListener() {
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
if (KeywordSearchUtil.displayConfirmDialog(NbBundle.getMessage(this.getClass(), "KeywordSearchConfigurationPanel1.customizeComponents.title")
|
||||
, NbBundle.getMessage(this.getClass(), "KeywordSearchConfigurationPanel1.customizeComponents.body" )
|
||||
, KeywordSearchUtil.DIALOG_MESSAGE_TYPE.WARN) ) {
|
||||
|
||||
KeywordSearchListsXML deleter = KeywordSearchListsXML.getCurrent();
|
||||
if (KeywordSearchUtil.displayConfirmDialog(NbBundle.getMessage(this.getClass(), "KeywordSearchConfigurationPanel1.customizeComponents.title"), NbBundle.getMessage(this.getClass(), "KeywordSearchConfigurationPanel1.customizeComponents.body"), KeywordSearchUtil.DIALOG_MESSAGE_TYPE.WARN)) {
|
||||
String toDelete = editListPanel.getCurrentKeywordList().getName();
|
||||
editListPanel.setCurrentKeywordList(null);
|
||||
editListPanel.initButtons();
|
||||
// RJCTODO: Move this into a deleteList method in the manager
|
||||
KeywordSearchListsXML deleter = KeywordSearchListsXML.getCurrent();
|
||||
deleter.deleteList(toDelete);
|
||||
listsManagementPanel.resync();
|
||||
}
|
||||
@ -67,11 +54,9 @@ class KeywordSearchConfigurationPanel1 extends javax.swing.JPanel implements Opt
|
||||
});
|
||||
|
||||
editListPanel.addSaveButtonActionPerformed(new ActionListener() {
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
final String FEATURE_NAME = "Save Keyword List";
|
||||
KeywordSearchListsXML writer = KeywordSearchListsXML.getCurrent();
|
||||
KeywordList currentKeywordList = editListPanel.getCurrentKeywordList();
|
||||
|
||||
List<Keyword> keywords = currentKeywordList.getKeywords();
|
||||
@ -93,6 +78,8 @@ class KeywordSearchConfigurationPanel1 extends javax.swing.JPanel implements Opt
|
||||
return;
|
||||
}
|
||||
|
||||
// RJCTODO: Move chunks of this into manager
|
||||
KeywordSearchListsXML writer = KeywordSearchListsXML.getCurrent();
|
||||
if (writer.listExists(listName) && writer.getList(listName).isLocked()) {
|
||||
KeywordSearchUtil.displayDialog(FEATURE_NAME, NbBundle.getMessage(this.getClass(), "KeywordSearchConfigurationPanel1.customizeComponents.noOwDefaultMsg"), KeywordSearchUtil.DIALOG_MESSAGE_TYPE.WARN);
|
||||
return;
|
||||
@ -136,10 +123,10 @@ class KeywordSearchConfigurationPanel1 extends javax.swing.JPanel implements Opt
|
||||
listsManagementPanel.load();
|
||||
}
|
||||
|
||||
/** This method is called from within the constructor to
|
||||
* initialize the form.
|
||||
* WARNING: Do NOT modify this code. The content of this method is
|
||||
* always regenerated by the Form Editor.
|
||||
/**
|
||||
* This method is called from within the constructor to initialize the form.
|
||||
* WARNING: Do NOT modify this code. The content of this method is always
|
||||
* regenerated by the Form Editor.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
@ -189,11 +176,9 @@ class KeywordSearchConfigurationPanel1 extends javax.swing.JPanel implements Opt
|
||||
.addComponent(mainSplitPane)
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JPanel leftPanel;
|
||||
private javax.swing.JSplitPane mainSplitPane;
|
||||
private javax.swing.JPanel rightPanel;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
}
|
@ -111,24 +111,24 @@
|
||||
<Component class="javax.swing.JCheckBox" name="skipNSRLCheckBox">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchConfigurationPanel2.skipNSRLCheckBox.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchGlobalSearchSettingsPanel.skipNSRLCheckBox.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/keywordsearch/Bundle.properties" key="KeywordSearchConfigurationPanel2.skipNSRLCheckBox.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchGlobalSearchSettingsPanel.skipNSRLCheckBox.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="filesIndexedLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchConfigurationPanel2.filesIndexedLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchGlobalSearchSettingsPanel.filesIndexedLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="filesIndexedValue">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchConfigurationPanel2.filesIndexedValue.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchGlobalSearchSettingsPanel.filesIndexedValue.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="null"/>
|
||||
@ -138,28 +138,28 @@
|
||||
<Component class="javax.swing.JLabel" name="chunksLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchConfigurationPanel2.chunksLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchGlobalSearchSettingsPanel.chunksLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="chunksValLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchConfigurationPanel2.chunksValLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchGlobalSearchSettingsPanel.chunksValLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="settingsLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchConfigurationPanel2.settingsLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchGlobalSearchSettingsPanel.settingsLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="informationLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchConfigurationPanel2.informationLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchGlobalSearchSettingsPanel.informationLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
@ -170,54 +170,54 @@
|
||||
<Component class="javax.swing.JLabel" name="frequencyLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchConfigurationPanel2.frequencyLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchGlobalSearchSettingsPanel.frequencyLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JRadioButton" name="timeRadioButton1">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchConfigurationPanel2.timeRadioButton1.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchGlobalSearchSettingsPanel.timeRadioButton1.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/keywordsearch/Bundle.properties" key="KeywordSearchConfigurationPanel2.timeRadioButton1.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchGlobalSearchSettingsPanel.timeRadioButton1.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JRadioButton" name="timeRadioButton2">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchConfigurationPanel2.timeRadioButton2.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchGlobalSearchSettingsPanel.timeRadioButton2.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/keywordsearch/Bundle.properties" key="KeywordSearchConfigurationPanel2.timeRadioButton2.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchGlobalSearchSettingsPanel.timeRadioButton2.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JRadioButton" name="timeRadioButton3">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchConfigurationPanel2.timeRadioButton3.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchGlobalSearchSettingsPanel.timeRadioButton3.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/keywordsearch/Bundle.properties" key="KeywordSearchConfigurationPanel2.timeRadioButton3.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchGlobalSearchSettingsPanel.timeRadioButton3.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JRadioButton" name="timeRadioButton4">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchConfigurationPanel2.timeRadioButton4.text_1" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchGlobalSearchSettingsPanel.timeRadioButton4.text_1" 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/keywordsearch/Bundle.properties" key="KeywordSearchConfigurationPanel2.timeRadioButton4.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchGlobalSearchSettingsPanel.timeRadioButton4.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="showSnippetsCB">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchConfigurationPanel2.showSnippetsCB.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchGlobalSearchSettingsPanel.showSnippetsCB.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
@ -29,14 +29,14 @@ import org.sleuthkit.autopsy.keywordsearch.KeywordSearchIngestModule.UpdateFrequ
|
||||
/**
|
||||
* General, not per list, keyword search configuration and status display widget
|
||||
*/
|
||||
class KeywordSearchConfigurationPanel2 extends javax.swing.JPanel implements OptionsPanel {
|
||||
class KeywordSearchGlobalSearchSettingsPanel extends javax.swing.JPanel implements OptionsPanel {
|
||||
|
||||
private final Logger logger = Logger.getLogger(KeywordSearchConfigurationPanel2.class.getName());
|
||||
private final Logger logger = Logger.getLogger(KeywordSearchGlobalSearchSettingsPanel.class.getName());
|
||||
|
||||
/**
|
||||
* Creates new form KeywordSearchConfigurationPanel2
|
||||
*/
|
||||
KeywordSearchConfigurationPanel2() {
|
||||
KeywordSearchGlobalSearchSettingsPanel() {
|
||||
initComponents();
|
||||
customizeComponents();
|
||||
}
|
||||
@ -96,37 +96,37 @@ class KeywordSearchConfigurationPanel2 extends javax.swing.JPanel implements Opt
|
||||
timeRadioButton4 = new javax.swing.JRadioButton();
|
||||
showSnippetsCB = new javax.swing.JCheckBox();
|
||||
|
||||
skipNSRLCheckBox.setText(org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel2.class, "KeywordSearchConfigurationPanel2.skipNSRLCheckBox.text")); // NOI18N
|
||||
skipNSRLCheckBox.setToolTipText(org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel2.class, "KeywordSearchConfigurationPanel2.skipNSRLCheckBox.toolTipText")); // NOI18N
|
||||
skipNSRLCheckBox.setText(org.openide.util.NbBundle.getMessage(KeywordSearchGlobalSearchSettingsPanel.class, "KeywordSearchGlobalSearchSettingsPanel.skipNSRLCheckBox.text")); // NOI18N
|
||||
skipNSRLCheckBox.setToolTipText(org.openide.util.NbBundle.getMessage(KeywordSearchGlobalSearchSettingsPanel.class, "KeywordSearchGlobalSearchSettingsPanel.skipNSRLCheckBox.toolTipText")); // NOI18N
|
||||
|
||||
filesIndexedLabel.setText(org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel2.class, "KeywordSearchConfigurationPanel2.filesIndexedLabel.text")); // NOI18N
|
||||
filesIndexedLabel.setText(org.openide.util.NbBundle.getMessage(KeywordSearchGlobalSearchSettingsPanel.class, "KeywordSearchGlobalSearchSettingsPanel.filesIndexedLabel.text")); // NOI18N
|
||||
|
||||
filesIndexedValue.setText(org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel2.class, "KeywordSearchConfigurationPanel2.filesIndexedValue.text")); // NOI18N
|
||||
filesIndexedValue.setText(org.openide.util.NbBundle.getMessage(KeywordSearchGlobalSearchSettingsPanel.class, "KeywordSearchGlobalSearchSettingsPanel.filesIndexedValue.text")); // NOI18N
|
||||
filesIndexedValue.setMaximumSize(null);
|
||||
|
||||
chunksLabel.setText(org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel2.class, "KeywordSearchConfigurationPanel2.chunksLabel.text")); // NOI18N
|
||||
chunksLabel.setText(org.openide.util.NbBundle.getMessage(KeywordSearchGlobalSearchSettingsPanel.class, "KeywordSearchGlobalSearchSettingsPanel.chunksLabel.text")); // NOI18N
|
||||
|
||||
chunksValLabel.setText(org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel2.class, "KeywordSearchConfigurationPanel2.chunksValLabel.text")); // NOI18N
|
||||
chunksValLabel.setText(org.openide.util.NbBundle.getMessage(KeywordSearchGlobalSearchSettingsPanel.class, "KeywordSearchGlobalSearchSettingsPanel.chunksValLabel.text")); // NOI18N
|
||||
|
||||
settingsLabel.setText(org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel2.class, "KeywordSearchConfigurationPanel2.settingsLabel.text")); // NOI18N
|
||||
settingsLabel.setText(org.openide.util.NbBundle.getMessage(KeywordSearchGlobalSearchSettingsPanel.class, "KeywordSearchGlobalSearchSettingsPanel.settingsLabel.text")); // NOI18N
|
||||
|
||||
informationLabel.setText(org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel2.class, "KeywordSearchConfigurationPanel2.informationLabel.text")); // NOI18N
|
||||
informationLabel.setText(org.openide.util.NbBundle.getMessage(KeywordSearchGlobalSearchSettingsPanel.class, "KeywordSearchGlobalSearchSettingsPanel.informationLabel.text")); // NOI18N
|
||||
|
||||
frequencyLabel.setText(org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel2.class, "KeywordSearchConfigurationPanel2.frequencyLabel.text")); // NOI18N
|
||||
frequencyLabel.setText(org.openide.util.NbBundle.getMessage(KeywordSearchGlobalSearchSettingsPanel.class, "KeywordSearchGlobalSearchSettingsPanel.frequencyLabel.text")); // NOI18N
|
||||
|
||||
timeRadioButton1.setText(org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel2.class, "KeywordSearchConfigurationPanel2.timeRadioButton1.text")); // NOI18N
|
||||
timeRadioButton1.setToolTipText(org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel2.class, "KeywordSearchConfigurationPanel2.timeRadioButton1.toolTipText")); // NOI18N
|
||||
timeRadioButton1.setText(org.openide.util.NbBundle.getMessage(KeywordSearchGlobalSearchSettingsPanel.class, "KeywordSearchGlobalSearchSettingsPanel.timeRadioButton1.text")); // NOI18N
|
||||
timeRadioButton1.setToolTipText(org.openide.util.NbBundle.getMessage(KeywordSearchGlobalSearchSettingsPanel.class, "KeywordSearchGlobalSearchSettingsPanel.timeRadioButton1.toolTipText")); // NOI18N
|
||||
|
||||
timeRadioButton2.setText(org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel2.class, "KeywordSearchConfigurationPanel2.timeRadioButton2.text")); // NOI18N
|
||||
timeRadioButton2.setToolTipText(org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel2.class, "KeywordSearchConfigurationPanel2.timeRadioButton2.toolTipText")); // NOI18N
|
||||
timeRadioButton2.setText(org.openide.util.NbBundle.getMessage(KeywordSearchGlobalSearchSettingsPanel.class, "KeywordSearchGlobalSearchSettingsPanel.timeRadioButton2.text")); // NOI18N
|
||||
timeRadioButton2.setToolTipText(org.openide.util.NbBundle.getMessage(KeywordSearchGlobalSearchSettingsPanel.class, "KeywordSearchGlobalSearchSettingsPanel.timeRadioButton2.toolTipText")); // NOI18N
|
||||
|
||||
timeRadioButton3.setText(org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel2.class, "KeywordSearchConfigurationPanel2.timeRadioButton3.text")); // NOI18N
|
||||
timeRadioButton3.setToolTipText(org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel2.class, "KeywordSearchConfigurationPanel2.timeRadioButton3.toolTipText")); // NOI18N
|
||||
timeRadioButton3.setText(org.openide.util.NbBundle.getMessage(KeywordSearchGlobalSearchSettingsPanel.class, "KeywordSearchGlobalSearchSettingsPanel.timeRadioButton3.text")); // NOI18N
|
||||
timeRadioButton3.setToolTipText(org.openide.util.NbBundle.getMessage(KeywordSearchGlobalSearchSettingsPanel.class, "KeywordSearchGlobalSearchSettingsPanel.timeRadioButton3.toolTipText")); // NOI18N
|
||||
|
||||
timeRadioButton4.setText(org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel2.class, "KeywordSearchConfigurationPanel2.timeRadioButton4.text_1")); // NOI18N
|
||||
timeRadioButton4.setToolTipText(org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel2.class, "KeywordSearchConfigurationPanel2.timeRadioButton4.toolTipText")); // NOI18N
|
||||
timeRadioButton4.setText(org.openide.util.NbBundle.getMessage(KeywordSearchGlobalSearchSettingsPanel.class, "KeywordSearchGlobalSearchSettingsPanel.timeRadioButton4.text_1")); // NOI18N
|
||||
timeRadioButton4.setToolTipText(org.openide.util.NbBundle.getMessage(KeywordSearchGlobalSearchSettingsPanel.class, "KeywordSearchGlobalSearchSettingsPanel.timeRadioButton4.toolTipText")); // NOI18N
|
||||
|
||||
showSnippetsCB.setText(org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel2.class, "KeywordSearchConfigurationPanel2.showSnippetsCB.text")); // NOI18N
|
||||
showSnippetsCB.setText(org.openide.util.NbBundle.getMessage(KeywordSearchGlobalSearchSettingsPanel.class, "KeywordSearchGlobalSearchSettingsPanel.showSnippetsCB.text")); // NOI18N
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
@ -25,22 +25,22 @@ import org.sleuthkit.autopsy.ingest.IngestModuleGlobalSetttingsPanel;
|
||||
/**
|
||||
* Global options panel for keyword searching.
|
||||
*/
|
||||
final class KeywordSearchConfigurationPanel extends IngestModuleGlobalSetttingsPanel implements OptionsPanel {
|
||||
final class KeywordSearchGlobalSettingsPanel extends IngestModuleGlobalSetttingsPanel implements OptionsPanel {
|
||||
|
||||
private KeywordSearchConfigurationPanel1 listsPanel;
|
||||
private KeywordSearchConfigurationPanel3 languagesPanel;
|
||||
private KeywordSearchConfigurationPanel2 generalPanel;
|
||||
private KeywordSearchGlobalListSettingsPanel listsPanel;
|
||||
private KeywordSearchGlobalLanguageSettingsPanel languagesPanel;
|
||||
private KeywordSearchGlobalSearchSettingsPanel generalPanel;
|
||||
|
||||
public KeywordSearchConfigurationPanel() {
|
||||
public KeywordSearchGlobalSettingsPanel() {
|
||||
initComponents();
|
||||
customizeComponents();
|
||||
}
|
||||
|
||||
private void customizeComponents() {
|
||||
setName(NbBundle.getMessage(this.getClass(), "KeywordSearchConfigurationPanel.customizeComponents.title"));
|
||||
listsPanel = new KeywordSearchConfigurationPanel1();
|
||||
languagesPanel = new KeywordSearchConfigurationPanel3();
|
||||
generalPanel = new KeywordSearchConfigurationPanel2();
|
||||
listsPanel = new KeywordSearchGlobalListSettingsPanel();
|
||||
languagesPanel = new KeywordSearchGlobalLanguageSettingsPanel();
|
||||
generalPanel = new KeywordSearchGlobalSearchSettingsPanel();
|
||||
tabbedPane.insertTab(NbBundle.getMessage(this.getClass(), "KeywordSearchConfigurationPanel.customizeComponents.listTabTitle"), null,
|
||||
listsPanel, NbBundle.getMessage(this.getClass(), "KeywordSearchConfigurationPanel.customizeComponents.listLabToolTip"), 0);
|
||||
tabbedPane.insertTab(NbBundle.getMessage(this.getClass(), "KeywordSearchConfigurationPanel.customizeComponents.stringExtTitle"), null,
|
||||
@ -63,11 +63,11 @@ final class KeywordSearchConfigurationPanel extends IngestModuleGlobalSetttingsP
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(tabbedPane, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 675, Short.MAX_VALUE)
|
||||
.addComponent(tabbedPane, javax.swing.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE)
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(tabbedPane, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 505, Short.MAX_VALUE)
|
||||
.addComponent(tabbedPane, javax.swing.GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE)
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
@ -113,10 +113,10 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme
|
||||
private static final Lock searcherLock = rwLock.writeLock();
|
||||
private volatile int messageID = 0; // RJCTODO: Despite volatile, this is not thread safe, uses increment (not atomic)
|
||||
private boolean processedFiles;
|
||||
private volatile boolean finalSearcherDone = true; //mark as done, until it's inited
|
||||
private SleuthkitCase caseHandle = null;
|
||||
private static List<AbstractFileExtract> textExtractors;
|
||||
private static AbstractFileStringExtract stringExtractor;
|
||||
private final KeywordSearchJobSettings settings;
|
||||
private boolean initialized = false;
|
||||
private Tika tikaFormatDetector;
|
||||
|
||||
@ -131,7 +131,8 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme
|
||||
};
|
||||
private Map<Long, IngestStatus> ingestStatus;
|
||||
|
||||
KeywordSearchIngestModule() {
|
||||
KeywordSearchIngestModule(KeywordSearchJobSettings settings) {
|
||||
this.settings = settings;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -196,14 +197,20 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme
|
||||
|
||||
ingestStatus = new HashMap<>();
|
||||
|
||||
if (KeywordListsManager.getInstance().hasNoKeywordsForSearch()) {
|
||||
List<KeywordList> keywordLists = KeywordSearchListsXML.getCurrent().getListsL();
|
||||
boolean hasKeywordsForSearch = false;
|
||||
for (KeywordList keywordList : keywordLists) {
|
||||
if (settings.isKeywordListEnabled(keywordList.getName()) && !keywordList.getKeywords().isEmpty()) {
|
||||
hasKeywordsForSearch = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!hasKeywordsForSearch) {
|
||||
services.postMessage(IngestMessage.createWarningMessage(++messageID, KeywordSearchModuleFactory.getModuleName(), NbBundle.getMessage(this.getClass(), "KeywordSearchIngestModule.init.noKwInLstMsg"),
|
||||
NbBundle.getMessage(this.getClass(), "KeywordSearchIngestModule.init.onlyIdxKwSkipMsg")));
|
||||
|
||||
}
|
||||
|
||||
processedFiles = false;
|
||||
finalSearcherDone = false;
|
||||
searcherDone = true; //make sure to start the initial currentSearcher
|
||||
//keeps track of all results per run not to repeat reporting the same hits
|
||||
currentResults = new HashMap<>();
|
||||
@ -298,12 +305,10 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme
|
||||
postIndexSummary();
|
||||
|
||||
//run one last search as there are probably some new files committed
|
||||
List<String> keywordLists = KeywordListsManager.getInstance().getNamesOfKeywordListsForFileIngest();
|
||||
List<String> keywordLists = settings.getNamesOfEnabledKeyWordLists();
|
||||
if (!keywordLists.isEmpty() && processedFiles == true) {
|
||||
finalSearcher = new Searcher(keywordLists, true); //final searcher run
|
||||
finalSearcher.execute();
|
||||
} else {
|
||||
finalSearcherDone = true;
|
||||
}
|
||||
|
||||
//log number of files / chunks in index
|
||||
@ -338,7 +343,6 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme
|
||||
searchTimer.stop();
|
||||
}
|
||||
runSearcher = false;
|
||||
finalSearcherDone = true;
|
||||
|
||||
//commit uncommited files, don't search again
|
||||
commit();
|
||||
@ -466,7 +470,7 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme
|
||||
//in worst case, we will run search next time after commit timer goes off, or at the end of ingest
|
||||
if (searcherDone && runSearcher) {
|
||||
//start search if previous not running
|
||||
List<String> keywordLists = KeywordListsManager.getInstance().getNamesOfKeywordListsForFileIngest();
|
||||
List<String> keywordLists = settings.getNamesOfEnabledKeyWordLists();
|
||||
if (!keywordLists.isEmpty()) {
|
||||
currentSearcher = new Searcher(keywordLists);
|
||||
currentSearcher.execute();//searcher will stop timer and restart timer when done
|
||||
@ -1000,9 +1004,9 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme
|
||||
} catch (InterruptedException | ExecutionException e) {
|
||||
logger.log(Level.SEVERE, "Error performing keyword search: " + e.getMessage());
|
||||
services.postMessage(IngestMessage.createErrorMessage(++messageID, KeywordSearchModuleFactory.getModuleName(), "Error performing keyword search", e.getMessage()));
|
||||
} // catch and ignore if we were cancelled
|
||||
catch (java.util.concurrent.CancellationException ex) {
|
||||
}
|
||||
// catch and ignore if we were cancelled
|
||||
catch (java.util.concurrent.CancellationException ex ) { }
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1047,7 +1051,6 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme
|
||||
if (finalRun) {
|
||||
//this is the final searcher
|
||||
logger.log(Level.INFO, "The final searcher in this ingest done.");
|
||||
finalSearcherDone = true;
|
||||
|
||||
//run module cleanup
|
||||
cleanup();
|
||||
|
@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2014 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.keywordsearch;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettings;
|
||||
|
||||
/**
|
||||
* Settings for a keyword search file ingest module instance.
|
||||
*/
|
||||
final class KeywordSearchJobSettings implements IngestModuleIngestJobSettings {
|
||||
|
||||
private final HashSet<String> namesOfEnabledKeywordLists = new HashSet<>();
|
||||
|
||||
KeywordSearchJobSettings(List<String> namesOfEnabledKeywordLists) {
|
||||
for (String keywordList : namesOfEnabledKeywordLists) {
|
||||
this.namesOfEnabledKeywordLists.add(keywordList);
|
||||
}
|
||||
}
|
||||
|
||||
boolean isKeywordListEnabled(String keywordListName) {
|
||||
return namesOfEnabledKeywordLists.contains(keywordListName);
|
||||
}
|
||||
|
||||
List<String> getNamesOfEnabledKeyWordLists() {
|
||||
return new ArrayList<>(namesOfEnabledKeywordLists);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -105,41 +105,41 @@
|
||||
<Component class="javax.swing.JLabel" name="titleLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchIngestSimplePanel.titleLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchJobSettingsPanel.titleLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="languagesLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchIngestSimplePanel.languagesLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchJobSettingsPanel.languagesLabel.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/keywordsearch/Bundle.properties" key="KeywordSearchIngestSimplePanel.languagesLabel.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchJobSettingsPanel.languagesLabel.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="languagesValLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchIngestSimplePanel.languagesValLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchJobSettingsPanel.languagesValLabel.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/keywordsearch/Bundle.properties" key="KeywordSearchIngestSimplePanel.languagesValLabel.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchJobSettingsPanel.languagesValLabel.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="encodingsLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchIngestSimplePanel.encodingsLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchJobSettingsPanel.encodingsLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="keywordSearchEncodings">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchIngestSimplePanel.keywordSearchEncodings.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/keywordsearch/Bundle.properties" key="KeywordSearchJobSettingsPanel.keywordSearchEncodings.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2011 - 2014 Basis Technology Corp.
|
||||
* Copyright 2011-2014 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -16,45 +16,60 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.sleuthkit.autopsy.keywordsearch;
|
||||
|
||||
import java.beans.PropertyChangeEvent;
|
||||
import java.beans.PropertyChangeListener;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.swing.JTable;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import javax.swing.ListSelectionModel;
|
||||
import javax.swing.table.AbstractTableModel;
|
||||
import javax.swing.table.TableColumn;
|
||||
import org.sleuthkit.autopsy.coreutils.StringExtract.StringExtractUnicodeTable.SCRIPT;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleSettings;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleSettingsPanel;
|
||||
import org.sleuthkit.autopsy.ingest.NoIngestModuleSettings;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettings;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettingsPanel;
|
||||
|
||||
/**
|
||||
* Ingest job options panel for the keyword search file ingest module.
|
||||
* Ingest job settings panel for keyword search file ingest modules.
|
||||
*/
|
||||
public class KeywordSearchIngestSimplePanel extends IngestModuleSettingsPanel {
|
||||
public final class KeywordSearchJobSettingsPanel extends IngestModuleIngestJobSettingsPanel implements PropertyChangeListener {
|
||||
|
||||
private final static Logger logger = Logger.getLogger(KeywordSearchIngestSimplePanel.class.getName());
|
||||
public static final String PROP_OPTIONS = "Keyword Search_Options";
|
||||
private KeywordTableModel tableModel;
|
||||
private List<KeywordList> lists;
|
||||
private final KeywordListsTableModel tableModel = new KeywordListsTableModel();
|
||||
private final List<String> keywordListNames = new ArrayList<>();
|
||||
private final Map<String, Boolean> keywordListStates = new HashMap<>();
|
||||
private final KeywordSearchListsXML keywordListsManager = KeywordSearchListsXML.getCurrent();
|
||||
|
||||
KeywordSearchIngestSimplePanel() {
|
||||
tableModel = new KeywordTableModel();
|
||||
lists = new ArrayList<>();
|
||||
reloadLists();
|
||||
KeywordSearchJobSettingsPanel(KeywordSearchJobSettings initialSettings) {
|
||||
initializeKeywordListSettings(initialSettings);
|
||||
initComponents();
|
||||
customizeComponents();
|
||||
}
|
||||
|
||||
private void customizeComponents() {
|
||||
listsTable.setModel(tableModel);
|
||||
private void initializeKeywordListSettings(KeywordSearchJobSettings settings) {
|
||||
keywordListNames.clear();
|
||||
keywordListStates.clear();
|
||||
List<KeywordList> keywordLists = keywordListsManager.getListsL();
|
||||
for (KeywordList list : keywordLists) {
|
||||
String listName = list.getName();
|
||||
keywordListNames.add(listName);
|
||||
keywordListStates.put(listName, settings.isKeywordListEnabled(listName));
|
||||
}
|
||||
}
|
||||
|
||||
private void customizeComponents() {
|
||||
customizeKeywordListsTable();
|
||||
displayLanguages();
|
||||
displayEncodings();
|
||||
keywordListsManager.addPropertyChangeListener(this);
|
||||
}
|
||||
|
||||
private void customizeKeywordListsTable() {
|
||||
listsTable.setModel(tableModel);
|
||||
listsTable.setTableHeader(null);
|
||||
listsTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
|
||||
//customize column witdhs
|
||||
final int width = listsScrollPane.getPreferredSize().width;
|
||||
listsTable.setAutoResizeMode(JTable.AUTO_RESIZE_NEXT_COLUMN);
|
||||
TableColumn column;
|
||||
@ -66,32 +81,144 @@ public class KeywordSearchIngestSimplePanel extends IngestModuleSettingsPanel {
|
||||
column.setPreferredWidth(((int) (width * 0.92)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
reloadLangs();
|
||||
reloadEncodings();
|
||||
private void displayLanguages() {
|
||||
List<SCRIPT> scripts = KeywordSearchSettings.getStringExtractScripts();
|
||||
StringBuilder langs = new StringBuilder();
|
||||
langs.append("<html>");
|
||||
for (int i = 0; i < scripts.size(); i++) {
|
||||
langs.append(scripts.get(i).toString());
|
||||
if (i + 1 < scripts.size()) {
|
||||
langs.append(", ");
|
||||
}
|
||||
}
|
||||
langs.append("</html>");
|
||||
String langsS = langs.toString();
|
||||
this.languagesValLabel.setText(langsS);
|
||||
this.languagesValLabel.setToolTipText(langsS);
|
||||
}
|
||||
|
||||
private void displayEncodings() {
|
||||
String utf8 = KeywordSearchSettings.getStringExtractOption(AbstractFileExtract.ExtractOptions.EXTRACT_UTF8.toString());
|
||||
String utf16 = KeywordSearchSettings.getStringExtractOption(AbstractFileExtract.ExtractOptions.EXTRACT_UTF16.toString());
|
||||
ArrayList<String> encodingsList = new ArrayList<>();
|
||||
if (utf8 == null || Boolean.parseBoolean(utf8)) {
|
||||
encodingsList.add("UTF8");
|
||||
}
|
||||
if (utf16 == null || Boolean.parseBoolean(utf16)) {
|
||||
encodingsList.add("UTF16");
|
||||
}
|
||||
String encodings = encodingsList.toString();
|
||||
encodings = encodings.substring(1, encodings.length() - 1);
|
||||
keywordSearchEncodings.setText(encodings);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IngestModuleSettings getSettings() {
|
||||
return new NoIngestModuleSettings();
|
||||
public void propertyChange(PropertyChangeEvent event) {
|
||||
if (event.getPropertyName().equals(KeywordSearchListsXML.ListsEvt.LIST_ADDED.name())
|
||||
|| event.getPropertyName().equals(KeywordSearchListsXML.ListsEvt.LIST_DELETED.name())
|
||||
|| event.getPropertyName().equals(KeywordSearchListsXML.ListsEvt.LIST_UPDATED.name())
|
||||
|| event.getPropertyName().equals(KeywordSearchListsXML.LanguagesEvent.LANGUAGES_CHANGED.name())) {
|
||||
update();
|
||||
}
|
||||
}
|
||||
|
||||
public void load() {
|
||||
KeywordSearchListsXML.getCurrent().reload();
|
||||
reloadLists();
|
||||
reloadLangs();
|
||||
reloadEncodings();
|
||||
private void update() {
|
||||
updateKeywordListSettings();
|
||||
displayLanguages();
|
||||
displayEncodings();
|
||||
tableModel.fireTableDataChanged();
|
||||
}
|
||||
|
||||
public void store() {
|
||||
KeywordSearchListsXML.getCurrent().save();
|
||||
private void updateKeywordListSettings() {
|
||||
// Get the names of the current set of keyword lists.
|
||||
List<KeywordList> keywordLists = keywordListsManager.getListsL();
|
||||
List<String> currentListNames = new ArrayList<>();
|
||||
for (KeywordList list : keywordLists) {
|
||||
currentListNames.add(list.getName());
|
||||
}
|
||||
|
||||
/** 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.
|
||||
// Remove deleted lists from the list states map.
|
||||
for (String listName : keywordListNames) {
|
||||
if (!currentListNames.contains(listName)) {
|
||||
keywordListStates.remove(listName);
|
||||
}
|
||||
}
|
||||
|
||||
// Reset the names list and add any new lists to the states map.
|
||||
keywordListNames.clear();
|
||||
for (String currentListName : currentListNames) {
|
||||
keywordListNames.add(currentListName);
|
||||
if (!keywordListStates.containsKey(currentListName)) {
|
||||
keywordListStates.put(currentListName, Boolean.TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public IngestModuleIngestJobSettings getSettings() {
|
||||
List<String> enabledListNames = new ArrayList<>();
|
||||
for (String listName : keywordListNames) {
|
||||
if (keywordListStates.get(listName)) {
|
||||
enabledListNames.add(listName);
|
||||
}
|
||||
}
|
||||
return new KeywordSearchJobSettings(enabledListNames);
|
||||
}
|
||||
|
||||
void reset(KeywordSearchJobSettings newSettings) {
|
||||
initializeKeywordListSettings(newSettings);
|
||||
displayLanguages();
|
||||
displayEncodings();
|
||||
tableModel.fireTableDataChanged();
|
||||
}
|
||||
|
||||
private class KeywordListsTableModel extends AbstractTableModel {
|
||||
|
||||
@Override
|
||||
public int getRowCount() {
|
||||
return KeywordSearchJobSettingsPanel.this.keywordListNames.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getColumnCount() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getValueAt(int rowIndex, int columnIndex) {
|
||||
String listName = KeywordSearchJobSettingsPanel.this.keywordListNames.get(rowIndex);
|
||||
if (columnIndex == 0) {
|
||||
return keywordListStates.get(listName);
|
||||
} else {
|
||||
return listName;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCellEditable(int rowIndex, int columnIndex) {
|
||||
return columnIndex == 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
|
||||
String listName = KeywordSearchJobSettingsPanel.this.keywordListNames.get(rowIndex);
|
||||
if (columnIndex == 0) {
|
||||
keywordListStates.put(listName, (Boolean) aValue);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<?> getColumnClass(int c) {
|
||||
return getValueAt(0, c).getClass();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
@ -123,17 +250,17 @@ public class KeywordSearchIngestSimplePanel extends IngestModuleSettingsPanel {
|
||||
listsTable.setShowVerticalLines(false);
|
||||
listsScrollPane.setViewportView(listsTable);
|
||||
|
||||
titleLabel.setText(org.openide.util.NbBundle.getMessage(KeywordSearchIngestSimplePanel.class, "KeywordSearchIngestSimplePanel.titleLabel.text")); // NOI18N
|
||||
titleLabel.setText(org.openide.util.NbBundle.getMessage(KeywordSearchJobSettingsPanel.class, "KeywordSearchJobSettingsPanel.titleLabel.text")); // NOI18N
|
||||
|
||||
languagesLabel.setText(org.openide.util.NbBundle.getMessage(KeywordSearchIngestSimplePanel.class, "KeywordSearchIngestSimplePanel.languagesLabel.text")); // NOI18N
|
||||
languagesLabel.setToolTipText(org.openide.util.NbBundle.getMessage(KeywordSearchIngestSimplePanel.class, "KeywordSearchIngestSimplePanel.languagesLabel.toolTipText")); // NOI18N
|
||||
languagesLabel.setText(org.openide.util.NbBundle.getMessage(KeywordSearchJobSettingsPanel.class, "KeywordSearchJobSettingsPanel.languagesLabel.text")); // NOI18N
|
||||
languagesLabel.setToolTipText(org.openide.util.NbBundle.getMessage(KeywordSearchJobSettingsPanel.class, "KeywordSearchJobSettingsPanel.languagesLabel.toolTipText")); // NOI18N
|
||||
|
||||
languagesValLabel.setText(org.openide.util.NbBundle.getMessage(KeywordSearchIngestSimplePanel.class, "KeywordSearchIngestSimplePanel.languagesValLabel.text")); // NOI18N
|
||||
languagesValLabel.setToolTipText(org.openide.util.NbBundle.getMessage(KeywordSearchIngestSimplePanel.class, "KeywordSearchIngestSimplePanel.languagesValLabel.toolTipText")); // NOI18N
|
||||
languagesValLabel.setText(org.openide.util.NbBundle.getMessage(KeywordSearchJobSettingsPanel.class, "KeywordSearchJobSettingsPanel.languagesValLabel.text")); // NOI18N
|
||||
languagesValLabel.setToolTipText(org.openide.util.NbBundle.getMessage(KeywordSearchJobSettingsPanel.class, "KeywordSearchJobSettingsPanel.languagesValLabel.toolTipText")); // NOI18N
|
||||
|
||||
encodingsLabel.setText(org.openide.util.NbBundle.getMessage(KeywordSearchIngestSimplePanel.class, "KeywordSearchIngestSimplePanel.encodingsLabel.text")); // NOI18N
|
||||
encodingsLabel.setText(org.openide.util.NbBundle.getMessage(KeywordSearchJobSettingsPanel.class, "KeywordSearchJobSettingsPanel.encodingsLabel.text")); // NOI18N
|
||||
|
||||
keywordSearchEncodings.setText(org.openide.util.NbBundle.getMessage(KeywordSearchIngestSimplePanel.class, "KeywordSearchIngestSimplePanel.keywordSearchEncodings.text")); // NOI18N
|
||||
keywordSearchEncodings.setText(org.openide.util.NbBundle.getMessage(KeywordSearchJobSettingsPanel.class, "KeywordSearchJobSettingsPanel.keywordSearchEncodings.text")); // NOI18N
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
@ -165,7 +292,7 @@ public class KeywordSearchIngestSimplePanel extends IngestModuleSettingsPanel {
|
||||
.addGap(7, 7, 7)
|
||||
.addComponent(titleLabel)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(listsScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 135, Short.MAX_VALUE)
|
||||
.addComponent(listsScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 62, Short.MAX_VALUE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(languagesLabel)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
@ -177,7 +304,6 @@ public class KeywordSearchIngestSimplePanel extends IngestModuleSettingsPanel {
|
||||
.addContainerGap())
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JLabel encodingsLabel;
|
||||
private javax.swing.JLabel keywordSearchEncodings;
|
||||
@ -187,84 +313,4 @@ public class KeywordSearchIngestSimplePanel extends IngestModuleSettingsPanel {
|
||||
private javax.swing.JTable listsTable;
|
||||
private javax.swing.JLabel titleLabel;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
private void reloadLangs() {
|
||||
List<SCRIPT> scripts = KeywordSearchSettings.getStringExtractScripts();
|
||||
StringBuilder langs = new StringBuilder();
|
||||
langs.append("<html>");
|
||||
for(int i=0; i<scripts.size(); i++) {
|
||||
langs.append(scripts.get(i).toString());
|
||||
if(i+1 < scripts.size()) {
|
||||
langs.append(", ");
|
||||
}
|
||||
}
|
||||
langs.append("</html>");
|
||||
String langsS = langs.toString();
|
||||
this.languagesValLabel.setText(langsS);
|
||||
this.languagesValLabel.setToolTipText(langsS);
|
||||
}
|
||||
|
||||
private void reloadEncodings() {
|
||||
String utf8 = KeywordSearchSettings.getStringExtractOption(AbstractFileExtract.ExtractOptions.EXTRACT_UTF8.toString());
|
||||
String utf16 = KeywordSearchSettings.getStringExtractOption(AbstractFileExtract.ExtractOptions.EXTRACT_UTF16.toString());
|
||||
ArrayList<String> encodingsList = new ArrayList<>();
|
||||
if(utf8==null || Boolean.parseBoolean(utf8)) {
|
||||
encodingsList.add("UTF8");
|
||||
}
|
||||
if(utf16==null || Boolean.parseBoolean(utf16)) {
|
||||
encodingsList.add("UTF16");
|
||||
}
|
||||
String encodings = encodingsList.toString();
|
||||
encodings = encodings.substring(1, encodings.length()-1);
|
||||
keywordSearchEncodings.setText(encodings);
|
||||
}
|
||||
|
||||
private void reloadLists() {
|
||||
lists.clear();
|
||||
lists.addAll(KeywordSearchListsXML.getCurrent().getListsL());
|
||||
}
|
||||
|
||||
private class KeywordTableModel extends AbstractTableModel {
|
||||
|
||||
@Override
|
||||
public int getRowCount() {
|
||||
return KeywordSearchIngestSimplePanel.this.lists.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getColumnCount() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getValueAt(int rowIndex, int columnIndex) {
|
||||
KeywordList list = KeywordSearchIngestSimplePanel.this.lists.get(rowIndex);
|
||||
if(columnIndex == 0) {
|
||||
return list.getUseForIngest();
|
||||
} else {
|
||||
return list.getName();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCellEditable(int rowIndex, int columnIndex) {
|
||||
return columnIndex == 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
|
||||
|
||||
KeywordList list = KeywordSearchIngestSimplePanel.this.lists.get(rowIndex);
|
||||
if(columnIndex == 0){
|
||||
KeywordSearchListsXML loader = KeywordSearchListsXML.getCurrent();
|
||||
loader.addList(list.getName(), list.getKeywords(), (Boolean) aValue, false);
|
||||
reloadLists();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<?> getColumnClass(int c) {
|
||||
return getValueAt(0, c).getClass();
|
||||
}
|
||||
}
|
||||
}
|
@ -27,7 +27,6 @@ import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.coreutils.PlatformUtil;
|
||||
import org.sleuthkit.datamodel.BlackboardAttribute;
|
||||
import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
|
||||
import java.util.logging.Level;
|
||||
@ -39,12 +38,9 @@ abstract class KeywordSearchListsAbstract {
|
||||
|
||||
protected String filePath;
|
||||
Map<String, KeywordList> theLists; //the keyword data
|
||||
static KeywordSearchListsXML currentInstance = null;
|
||||
private static final String CUR_LISTS_FILE_NAME = "keywords.xml"; // RJCTODO: This will go to the manager
|
||||
private static String CUR_LISTS_FILE = PlatformUtil.getUserConfigDirectory() + File.separator + CUR_LISTS_FILE_NAME; // RJCTODO: This will go to the manager
|
||||
protected static final Logger logger = Logger.getLogger(KeywordSearchListsAbstract.class.getName());
|
||||
PropertyChangeSupport changeSupport; // RJCTODO: This will go to the manager, if needed, no listeners right now
|
||||
protected List<String> lockedLists; // RJCTODO: This will go to the manager, if needed
|
||||
PropertyChangeSupport changeSupport;
|
||||
protected List<String> lockedLists;
|
||||
|
||||
KeywordSearchListsAbstract(String filePath) {
|
||||
this.filePath = filePath;
|
||||
@ -53,8 +49,6 @@ abstract class KeywordSearchListsAbstract {
|
||||
changeSupport = new PropertyChangeSupport(this);
|
||||
}
|
||||
|
||||
// RJCTODO: There are no listeners
|
||||
// RJCTODO: For manager
|
||||
/**
|
||||
* Property change event support In events: For all of these enums, the old
|
||||
* value should be null, and the new value should be the keyword list name
|
||||
@ -65,23 +59,26 @@ abstract class KeywordSearchListsAbstract {
|
||||
LIST_ADDED, LIST_DELETED, LIST_UPDATED
|
||||
};
|
||||
|
||||
// RJCTODO: For manager
|
||||
/**
|
||||
* get instance for managing the current keyword list of the application
|
||||
*/
|
||||
static KeywordSearchListsXML getCurrent() {
|
||||
if (currentInstance == null) {
|
||||
currentInstance = new KeywordSearchListsXML(CUR_LISTS_FILE);
|
||||
currentInstance.reload();
|
||||
}
|
||||
return currentInstance;
|
||||
enum LanguagesEvent {
|
||||
LANGUAGES_CHANGED, ENCODINGS_CHANGED
|
||||
}
|
||||
|
||||
void fireLanguagesEvent(LanguagesEvent event) {
|
||||
try {
|
||||
changeSupport.firePropertyChange(event.toString(), null, null);
|
||||
} catch (Exception e) {
|
||||
logger.log(Level.SEVERE, "KeywordSearchListsAbstract listener threw exception", e);
|
||||
}
|
||||
}
|
||||
|
||||
public void addPropertyChangeListener(PropertyChangeListener listener) {
|
||||
changeSupport.addPropertyChangeListener(listener);
|
||||
}
|
||||
|
||||
public void removePropertyChangeListener(PropertyChangeListener listener) {
|
||||
changeSupport.removePropertyChangeListener(listener);
|
||||
}
|
||||
|
||||
// RJCTODO: For manager
|
||||
// RJCTODO: There are no listeners
|
||||
// public void addPropertyChangeListener(PropertyChangeListener listener) {
|
||||
// changeSupport.addPropertyChangeListener(listener);
|
||||
// }
|
||||
private void prepopulateLists() {
|
||||
if (!theLists.isEmpty()) {
|
||||
return;
|
||||
@ -126,8 +123,6 @@ abstract class KeywordSearchListsAbstract {
|
||||
addList(name, urls, false, false, true);
|
||||
}
|
||||
|
||||
// RJCTODO: Manager, reader mixed
|
||||
// RJCTODO: This is only called by config type stuff to affect the global list
|
||||
/**
|
||||
* load the file or create new
|
||||
*/
|
||||
@ -163,7 +158,6 @@ abstract class KeywordSearchListsAbstract {
|
||||
}
|
||||
}
|
||||
|
||||
// RJCTODO: Need a manager and reader version of getting lists
|
||||
public List<KeywordList> getListsL() {
|
||||
List<KeywordList> ret = new ArrayList<>();
|
||||
for (KeywordList list : theLists.values()) {
|
||||
@ -172,8 +166,6 @@ abstract class KeywordSearchListsAbstract {
|
||||
return ret;
|
||||
}
|
||||
|
||||
// RJCTODO: Need a manager of getting lists
|
||||
// RJCTODO: There is one client, KeywordSearchEditListPanel, fetching unlocked lists
|
||||
public List<KeywordList> getListsL(boolean locked) {
|
||||
List<KeywordList> ret = new ArrayList<>();
|
||||
for (KeywordList list : theLists.values()) {
|
||||
@ -184,7 +176,6 @@ abstract class KeywordSearchListsAbstract {
|
||||
return ret;
|
||||
}
|
||||
|
||||
// RJCTODO: Used by KeywordSearchListsManagementPanel; for manager, since global list affected
|
||||
/**
|
||||
* Get list names of all loaded keyword list names
|
||||
*
|
||||
@ -194,7 +185,6 @@ abstract class KeywordSearchListsAbstract {
|
||||
return new ArrayList<>(theLists.keySet());
|
||||
}
|
||||
|
||||
// RJCTODO: Used by KeywordSearchListsManagementPanel; for manager, since global list affected
|
||||
/**
|
||||
* Get list names of all locked or unlocked loaded keyword list names
|
||||
*
|
||||
@ -292,10 +282,6 @@ abstract class KeywordSearchListsAbstract {
|
||||
|
||||
if (curList == null) {
|
||||
theLists.put(name, new KeywordList(name, now, now, useForIngest, ingestMessages, newList, locked));
|
||||
// if (!locked) {
|
||||
// save();
|
||||
// }
|
||||
|
||||
try {
|
||||
changeSupport.firePropertyChange(ListsEvt.LIST_ADDED.toString(), null, name);
|
||||
} catch (Exception e) {
|
||||
@ -304,9 +290,6 @@ abstract class KeywordSearchListsAbstract {
|
||||
}
|
||||
} else {
|
||||
theLists.put(name, new KeywordList(name, curList.getDateCreated(), now, useForIngest, ingestMessages, newList, locked));
|
||||
// if (!locked) {
|
||||
// save();
|
||||
// }
|
||||
replaced = true;
|
||||
|
||||
try {
|
||||
@ -342,10 +325,8 @@ abstract class KeywordSearchListsAbstract {
|
||||
* @return
|
||||
*/
|
||||
boolean saveLists(List<KeywordList> lists) {
|
||||
int oldSize = this.getNumberLists();
|
||||
|
||||
List<KeywordList> overwritten = new ArrayList<KeywordList>();
|
||||
List<KeywordList> newLists = new ArrayList<KeywordList>();
|
||||
List<KeywordList> overwritten = new ArrayList<>();
|
||||
List<KeywordList> newLists = new ArrayList<>();
|
||||
for (KeywordList list : lists) {
|
||||
if (this.listExists(list.getName())) {
|
||||
overwritten.add(list);
|
||||
@ -418,9 +399,8 @@ abstract class KeywordSearchListsAbstract {
|
||||
return true;
|
||||
}
|
||||
|
||||
// RJCTODO: For manager
|
||||
/**
|
||||
* delete list if exists and save new list // RJCTODO: What new list? Nothing is saved (liar!)
|
||||
* delete list if exists and save new list
|
||||
*
|
||||
* @param name of list to delete
|
||||
* @return true if deleted
|
||||
@ -432,13 +412,13 @@ abstract class KeywordSearchListsAbstract {
|
||||
}
|
||||
|
||||
try {
|
||||
changeSupport.firePropertyChange(ListsEvt.LIST_DELETED.toString(), null, name); // RJCTODO: Always fired (liar!)
|
||||
changeSupport.firePropertyChange(ListsEvt.LIST_DELETED.toString(), null, name);
|
||||
} catch (Exception e) {
|
||||
logger.log(Level.SEVERE, "KeywordSearchListsAbstract listener threw exception", e);
|
||||
MessageNotifyUtil.Notify.show("Module Error", "A module caused an error listening to KeywordSearchListsAbstract updates. See log to determine which module. Some data could be incomplete.", MessageNotifyUtil.MessageType.ERROR);
|
||||
}
|
||||
|
||||
return true; // RJCTODO: LOL, reports that it always succeeds (liar!)
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -142,7 +142,6 @@ class KeywordSearchListsViewerPanel extends AbstractKeywordSearchPerformer {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
if (ingestRunning) {
|
||||
KeywordListsManager.getInstance().addKeywordListsForFileIngest(listsTableModel.getSelectedLists());
|
||||
logger.log(Level.INFO, "Submitted enqueued lists to ingest");
|
||||
} else {
|
||||
searchAction(e);
|
||||
@ -396,8 +395,7 @@ class KeywordSearchListsViewerPanel extends AbstractKeywordSearchPerformer {
|
||||
|
||||
@Override
|
||||
public boolean isCellEditable(int rowIndex, int columnIndex) {
|
||||
List<String> locked = KeywordListsManager.getInstance().getNamesOfKeywordListsForFileIngest();
|
||||
return (columnIndex == 0 && (!locked.contains((String) getValueAt(rowIndex, 1))|| !ingestRunning));
|
||||
return (columnIndex == 0 && !ingestRunning);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -606,10 +604,7 @@ class KeywordSearchListsViewerPanel extends AbstractKeywordSearchPerformer {
|
||||
this.setHorizontalAlignment(JCheckBox.CENTER);
|
||||
this.setVerticalAlignment(JCheckBox.CENTER);
|
||||
|
||||
String name = (String) table.getModel().getValueAt(row, 1);
|
||||
List<String> currentIngest = KeywordListsManager.getInstance().getNamesOfKeywordListsForFileIngest();
|
||||
boolean currentIngestUsed = currentIngest.contains(name);
|
||||
setEnabled(!currentIngestUsed || !ingestRunning);
|
||||
setEnabled(!ingestRunning);
|
||||
|
||||
boolean selected = (Boolean) table.getModel().getValueAt(row, 0);
|
||||
setSelected(selected);
|
||||
|
@ -18,6 +18,7 @@
|
||||
*/
|
||||
package org.sleuthkit.autopsy.keywordsearch;
|
||||
|
||||
import java.io.File;
|
||||
import java.text.DateFormat;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
@ -29,6 +30,7 @@ import javax.xml.parsers.DocumentBuilder;
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.coreutils.PlatformUtil;
|
||||
import org.sleuthkit.autopsy.coreutils.XMLUtil;
|
||||
import org.sleuthkit.datamodel.BlackboardAttribute;
|
||||
import org.w3c.dom.Document;
|
||||
@ -39,8 +41,12 @@ import org.w3c.dom.NodeList;
|
||||
* Manages reading and writing of keyword lists to user settings XML file keywords.xml
|
||||
* or to any file provided in constructor
|
||||
*/
|
||||
class KeywordSearchListsXML extends KeywordSearchListsAbstract {
|
||||
final class KeywordSearchListsXML extends KeywordSearchListsAbstract {
|
||||
|
||||
private static final Logger xmlListslogger = Logger.getLogger(KeywordSearchListsXML.class.getName());
|
||||
private static final String CUR_LISTS_FILE_NAME = "keywords.xml";
|
||||
private static String CUR_LISTS_FILE = PlatformUtil.getUserConfigDirectory() + File.separator + CUR_LISTS_FILE_NAME;
|
||||
private static final String XSDFILE = "KeywordsSchema.xsd";
|
||||
private static final String ROOT_EL = "keyword_lists";
|
||||
private static final String LIST_EL = "keyword_list";
|
||||
private static final String LIST_NAME_ATTR = "name";
|
||||
@ -53,10 +59,21 @@ class KeywordSearchListsXML extends KeywordSearchListsAbstract {
|
||||
private static final String KEYWORD_SELECTOR_ATTR = "selector";
|
||||
private static final String DATE_FORMAT = "yyyy-MM-dd HH:mm:ss";
|
||||
private static final String ENCODING = "UTF-8";
|
||||
private static final String XSDFILE = "KeywordsSchema.xsd";
|
||||
private static final Logger logger = Logger.getLogger(KeywordSearchListsXML.class.getName());
|
||||
private static KeywordSearchListsXML currentInstance = null;
|
||||
private DateFormat dateFormatter;
|
||||
|
||||
/**
|
||||
* RJCTODO: Move this one to the manager
|
||||
* @return
|
||||
*/
|
||||
static KeywordSearchListsXML getCurrent() {
|
||||
if (currentInstance == null) {
|
||||
currentInstance = new KeywordSearchListsXML(CUR_LISTS_FILE);
|
||||
currentInstance.reload();
|
||||
}
|
||||
return currentInstance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor to obtain handle on other that the current keyword list
|
||||
* (such as for import or export)
|
||||
@ -124,7 +141,7 @@ class KeywordSearchListsXML extends KeywordSearchListsAbstract {
|
||||
|
||||
success = XMLUtil.saveDoc(KeywordSearchListsXML.class, filePath, ENCODING, doc);
|
||||
} catch (ParserConfigurationException e) {
|
||||
logger.log(Level.SEVERE, "Error saving keyword list: can't initialize parser.", e);
|
||||
xmlListslogger.log(Level.SEVERE, "Error saving keyword list: can't initialize parser.", e);
|
||||
}
|
||||
return success;
|
||||
}
|
||||
@ -141,7 +158,7 @@ class KeywordSearchListsXML extends KeywordSearchListsAbstract {
|
||||
|
||||
Element root = doc.getDocumentElement();
|
||||
if (root == null) {
|
||||
logger.log(Level.SEVERE, "Error loading keyword list: invalid file format.");
|
||||
xmlListslogger.log(Level.SEVERE, "Error loading keyword list: invalid file format.");
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
@ -174,7 +191,7 @@ class KeywordSearchListsXML extends KeywordSearchListsAbstract {
|
||||
Date createdDate = dateFormatter.parse(created);
|
||||
Date modDate = dateFormatter.parse(modified);
|
||||
|
||||
List<Keyword> words = new ArrayList<Keyword>();
|
||||
List<Keyword> words = new ArrayList<>();
|
||||
KeywordList list = new KeywordList(name, createdDate, modDate, useForIngestBool, ingestMessagesBool, words);
|
||||
|
||||
//parse all words
|
||||
@ -197,7 +214,7 @@ class KeywordSearchListsXML extends KeywordSearchListsAbstract {
|
||||
}
|
||||
} catch (ParseException e) {
|
||||
//error parsing dates
|
||||
logger.log(Level.SEVERE, "Error loading keyword list: can't parse dates.", e);
|
||||
xmlListslogger.log(Level.SEVERE, "Error loading keyword list: can't parse dates.", e);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
@ -16,25 +16,29 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.sleuthkit.autopsy.keywordsearch;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.openide.util.lookup.ServiceProvider;
|
||||
import org.sleuthkit.autopsy.coreutils.Version;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleFactoryAdapter;
|
||||
import org.sleuthkit.autopsy.ingest.FileIngestModule;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleFactory;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleSettings;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleSettingsPanel;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettings;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettingsPanel;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleGlobalSetttingsPanel;
|
||||
|
||||
/**
|
||||
* An ingest module factory that creates file ingest modules that do keyword
|
||||
* searching.
|
||||
*/
|
||||
@ServiceProvider(service=IngestModuleFactory.class)
|
||||
@ServiceProvider(service = IngestModuleFactory.class)
|
||||
public class KeywordSearchModuleFactory extends IngestModuleFactoryAdapter {
|
||||
|
||||
private KeywordSearchJobSettingsPanel jobSettingsPanel = null;
|
||||
|
||||
@Override
|
||||
public String getModuleDisplayName() {
|
||||
return getModuleName();
|
||||
@ -54,16 +58,36 @@ public class KeywordSearchModuleFactory extends IngestModuleFactoryAdapter {
|
||||
return Version.getVersion();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IngestModuleIngestJobSettings getDefaultModuleSettings() {
|
||||
KeywordSearchListsXML listManager = KeywordSearchListsXML.getCurrent();
|
||||
List<String> enabledKeywordLists = new ArrayList<>();
|
||||
List<KeywordList> keywordLists = listManager.getListsL();
|
||||
for (KeywordList keywordList : keywordLists) {
|
||||
// All available keyword search lists are enabled by default.
|
||||
enabledKeywordLists.add(keywordList.getName());
|
||||
}
|
||||
return new KeywordSearchJobSettings(enabledKeywordLists);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasModuleSettingsPanel() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IngestModuleSettingsPanel getModuleSettingsPanel(IngestModuleSettings ingestJobOptions) {
|
||||
KeywordSearchIngestSimplePanel ingestOptionsPanel = new KeywordSearchIngestSimplePanel();
|
||||
ingestOptionsPanel.load();
|
||||
return ingestOptionsPanel;
|
||||
public IngestModuleIngestJobSettingsPanel getModuleSettingsPanel(IngestModuleIngestJobSettings settings) {
|
||||
assert settings instanceof KeywordSearchJobSettings;
|
||||
if (!(settings instanceof KeywordSearchJobSettings)) {
|
||||
throw new IllegalArgumentException("Expected settings argument to be instanceof KeywordSearchJobSettings");
|
||||
}
|
||||
|
||||
if (jobSettingsPanel == null) {
|
||||
jobSettingsPanel = new KeywordSearchJobSettingsPanel((KeywordSearchJobSettings) settings);
|
||||
} else {
|
||||
jobSettingsPanel.reset((KeywordSearchJobSettings) settings);
|
||||
}
|
||||
return jobSettingsPanel;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -73,9 +97,9 @@ public class KeywordSearchModuleFactory extends IngestModuleFactoryAdapter {
|
||||
|
||||
@Override
|
||||
public IngestModuleGlobalSetttingsPanel getGlobalSettingsPanel() {
|
||||
KeywordSearchConfigurationPanel globalOptionsPanel = new KeywordSearchConfigurationPanel();
|
||||
globalOptionsPanel.load();
|
||||
return globalOptionsPanel;
|
||||
KeywordSearchGlobalSettingsPanel globalSettingsPanel = new KeywordSearchGlobalSettingsPanel();
|
||||
globalSettingsPanel.load();
|
||||
return globalSettingsPanel;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -84,7 +108,11 @@ public class KeywordSearchModuleFactory extends IngestModuleFactoryAdapter {
|
||||
}
|
||||
|
||||
@Override
|
||||
public FileIngestModule createFileIngestModule(IngestModuleSettings ingestJobOptions) {
|
||||
return new KeywordSearchIngestModule();
|
||||
public FileIngestModule createFileIngestModule(IngestModuleIngestJobSettings settings) {
|
||||
assert settings instanceof KeywordSearchJobSettings;
|
||||
if (!(settings instanceof KeywordSearchJobSettings)) {
|
||||
throw new IllegalArgumentException("Expected settings argument to be instanceof KeywordSearchJobSettings");
|
||||
}
|
||||
return new KeywordSearchIngestModule((KeywordSearchJobSettings) settings);
|
||||
}
|
||||
}
|
||||
|
@ -37,10 +37,10 @@ import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
keywordsCategory = "KeywordSearchOptions")
|
||||
public final class KeywordSearchOptionsPanelController extends OptionsPanelController {
|
||||
|
||||
private KeywordSearchConfigurationPanel panel;
|
||||
private KeywordSearchGlobalSettingsPanel panel;
|
||||
private final PropertyChangeSupport pcs = new PropertyChangeSupport(this);
|
||||
private boolean changed;
|
||||
private static final Logger logger = Logger.getLogger(KeywordSearchConfigurationPanel.class.getName());
|
||||
private static final Logger logger = Logger.getLogger(KeywordSearchGlobalSettingsPanel.class.getName());
|
||||
|
||||
@Override
|
||||
public void update() {
|
||||
@ -89,9 +89,9 @@ public final class KeywordSearchOptionsPanelController extends OptionsPanelContr
|
||||
pcs.removePropertyChangeListener(l);
|
||||
}
|
||||
|
||||
private KeywordSearchConfigurationPanel getPanel() {
|
||||
private KeywordSearchGlobalSettingsPanel getPanel() {
|
||||
if (panel == null) {
|
||||
panel = new KeywordSearchConfigurationPanel();
|
||||
panel = new KeywordSearchGlobalSettingsPanel();
|
||||
}
|
||||
return panel;
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ import org.sleuthkit.autopsy.coreutils.Version;
|
||||
import org.sleuthkit.autopsy.ingest.DataSourceIngestModule;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleFactory;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleFactoryAdapter;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleSettings;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettings;
|
||||
|
||||
/**
|
||||
* A factory that creates data source ingest modules that extract recent
|
||||
@ -58,7 +58,7 @@ public class RecentActivityExtracterModuleFactory extends IngestModuleFactoryAda
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataSourceIngestModule createDataSourceIngestModule(IngestModuleSettings ingestJobOptions) {
|
||||
public DataSourceIngestModule createDataSourceIngestModule(IngestModuleIngestJobSettings ingestJobOptions) {
|
||||
return new RAImageIngestModule();
|
||||
}
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ package org.sleuthkit.autopsy.scalpel;
|
||||
import org.sleuthkit.autopsy.coreutils.Version;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleFactoryAdapter;
|
||||
import org.sleuthkit.autopsy.ingest.FileIngestModule;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleSettings;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettings;
|
||||
import org.openide.util.NbBundle;
|
||||
|
||||
/**
|
||||
@ -60,7 +60,7 @@ public class ScalpelCarverModuleFactory extends IngestModuleFactoryAdapter {
|
||||
}
|
||||
|
||||
@Override
|
||||
public FileIngestModule createFileIngestModule(IngestModuleSettings ingestOptions) {
|
||||
public FileIngestModule createFileIngestModule(IngestModuleIngestJobSettings ingestOptions) {
|
||||
return new ScalpelCarverIngestModule();
|
||||
}
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ import org.sleuthkit.autopsy.coreutils.Version;
|
||||
import org.sleuthkit.autopsy.ingest.FileIngestModule;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleFactory;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleFactoryAdapter;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleSettings;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettings;
|
||||
|
||||
/**
|
||||
* A factory for creating archive extractor file ingest modules and the user
|
||||
@ -59,7 +59,7 @@ public class ArchiveFileExtractorModuleFactory extends IngestModuleFactoryAdapte
|
||||
}
|
||||
|
||||
@Override
|
||||
public FileIngestModule createFileIngestModule(IngestModuleSettings ingestOptions) {
|
||||
public FileIngestModule createFileIngestModule(IngestModuleIngestJobSettings ingestOptions) {
|
||||
return new SevenZipIngestModule();
|
||||
}
|
||||
}
|
@ -24,7 +24,7 @@ import org.sleuthkit.autopsy.coreutils.Version;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleFactoryAdapter;
|
||||
import org.sleuthkit.autopsy.ingest.DataSourceIngestModule;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleFactory;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleSettings;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettings;
|
||||
|
||||
/**
|
||||
* An factory that creates data source ingest modules that verify the integrity
|
||||
@ -60,7 +60,7 @@ public class EwfVerifierModuleFactory extends IngestModuleFactoryAdapter {
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataSourceIngestModule createDataSourceIngestModule(IngestModuleSettings ingestOptions) {
|
||||
public DataSourceIngestModule createDataSourceIngestModule(IngestModuleIngestJobSettings ingestOptions) {
|
||||
return new EwfVerifyIngestModule();
|
||||
}
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ import org.sleuthkit.autopsy.coreutils.Version;
|
||||
import org.sleuthkit.autopsy.ingest.FileIngestModule;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleFactory;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleFactoryAdapter;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleSettings;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettings;
|
||||
|
||||
/**
|
||||
* A factory for creating email parser file ingest module instances.
|
||||
@ -63,7 +63,7 @@ public class EmailParserModuleFactory extends IngestModuleFactoryAdapter {
|
||||
}
|
||||
|
||||
@Override
|
||||
public FileIngestModule createFileIngestModule(IngestModuleSettings settings) {
|
||||
public FileIngestModule createFileIngestModule(IngestModuleIngestJobSettings settings) {
|
||||
return new ThunderbirdMboxFileIngestModule();
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user