Merge branch 'develop' of github.com:sleuthkit/autopsy into develop

This commit is contained in:
Brian Carrier
2014-05-09 00:14:57 -04:00
63 changed files with 1927 additions and 1881 deletions
@@ -106,8 +106,6 @@ public final class AddImageAction extends CallableSystemAction implements Presen
*/
@Override
public void actionPerformed(ActionEvent e) {
Logger.noteAction(AddImageAction.class);
if (IngestManager.getInstance().isIngestRunning()) {
final String msg = NbBundle.getMessage(this.getClass(), "AddImageAction.ingestConfig.ongoingIngest.msg");
if (JOptionPane.showConfirmDialog(null, msg,
@@ -19,7 +19,7 @@
package org.sleuthkit.autopsy.casemodule;
import org.sleuthkit.autopsy.ingest.IngestJobLauncher;
import org.sleuthkit.autopsy.ingest.IngestJobConfigurator;
import org.openide.util.NbBundle;
import java.awt.Color;
import java.awt.Component;
@@ -46,7 +46,7 @@ import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessor;
class AddImageWizardIngestConfigPanel implements WizardDescriptor.Panel<WizardDescriptor> {
private static final Logger logger = Logger.getLogger(AddImageWizardIngestConfigPanel.class.getName());
private IngestJobLauncher ingestConfig;
private IngestJobConfigurator ingestConfig;
/**
* The visual component that displays this panel. If you need to access the
* component from this class, just use getComponent().
@@ -73,7 +73,7 @@ class AddImageWizardIngestConfigPanel implements WizardDescriptor.Panel<WizardDe
this.progressPanel = proPanel;
this.dataSourcePanel = dsPanel;
ingestConfig = new IngestJobLauncher(AddImageWizardIngestConfigPanel.class.getCanonicalName());
ingestConfig = new IngestJobConfigurator(AddImageWizardIngestConfigPanel.class.getCanonicalName());
List<String> messages = ingestConfig.getIngestJobConfigWarnings();
if (messages.isEmpty() == false) {
StringBuilder warning = new StringBuilder();
@@ -1,7 +1,7 @@
/*
* Autopsy Forensic Browser
*
* Copyright 2011 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");
@@ -23,7 +23,16 @@ import java.awt.Component;
import java.awt.EventQueue;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.logging.Level;;
import java.util.logging.Level;import org.sleuthkit.autopsy.coreutils.Logger;
import javax.swing.Action;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import org.openide.util.HelpCtx;
import org.openide.util.NbBundle;
import org.openide.util.actions.CallableSystemAction;
import org.openide.util.actions.Presenter;
;
import org.sleuthkit.autopsy.coreutils.Logger;
import javax.swing.Action;
import javax.swing.ImageIcon;
import javax.swing.JButton;
@@ -40,7 +49,6 @@ import org.openide.util.NbBundle;
import org.openide.util.actions.CallableSystemAction;
import org.openide.util.actions.Presenter;
/**
* The action to close the current Case. This class should be disabled on
* creation and it will be enabled on new case creation or case opened.
@@ -75,8 +83,6 @@ import org.openide.util.actions.Presenter;
*/
@Override
public void actionPerformed(ActionEvent e) {
Logger.noteAction(this.getClass());
if (Case.existsCurrentCase() == false)
return;
@@ -1,7 +1,7 @@
/*
* Autopsy Forensic Browser
*
* Copyright 2011 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");
@@ -21,7 +21,7 @@ package org.sleuthkit.autopsy.casemodule;
import java.awt.event.ActionEvent;
import java.io.File;
import java.util.logging.Level;;
import java.util.logging.Level;import org.sleuthkit.autopsy.coreutils.Logger;
import javax.swing.Action;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
@@ -31,6 +31,7 @@ import org.openide.NotifyDescriptor;
import org.openide.util.HelpCtx;
import org.openide.util.NbBundle;
import org.openide.util.actions.CallableSystemAction;
;
import org.sleuthkit.autopsy.coreutils.Logger;
import javax.swing.Action;
import javax.swing.JOptionPane;
@@ -38,16 +39,6 @@ import javax.swing.JPanel;
import org.openide.DialogDescriptor;
import org.openide.DialogDisplayer;
import org.openide.NotifyDescriptor;
import org.openide.util.Exceptions;
import org.openide.util.HelpCtx;
import org.openide.util.NbBundle;
import org.openide.util.actions.CallableSystemAction;
import javax.swing.Action;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import org.openide.DialogDescriptor;
import org.openide.DialogDisplayer;
import org.openide.NotifyDescriptor;
import org.openide.util.HelpCtx;
import org.openide.util.NbBundle;
import org.openide.util.actions.CallableSystemAction;
@@ -86,8 +77,6 @@ import org.openide.util.actions.CallableSystemAction;
*/
@Override
public void actionPerformed(ActionEvent e) {
Logger.noteAction(this.getClass());
Case currentCase = Case.getCurrentCase();
File configFile = new File(currentCase.getConfigFilePath());
File caseFolder = new File(configFile.getParent());
@@ -1,7 +1,7 @@
/*
* Autopsy Forensic Browser
*
* Copyright 2011 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");
@@ -20,10 +20,8 @@
package org.sleuthkit.autopsy.casemodule;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import org.openide.util.actions.SystemAction;
import org.openide.util.lookup.ServiceProvider;
import org.sleuthkit.autopsy.coreutils.Logger;
/**
* The action to create a new case. This action class is always enabled.
@@ -41,8 +39,6 @@ public final class CaseNewAction implements CaseNewActionInterface {
*/
@Override
public void actionPerformed(ActionEvent e) {
Logger.noteAction(this.getClass());
wizard.performAction();
}
}
@@ -1,7 +1,7 @@
/*
* Autopsy Forensic Browser
*
* Copyright 2011 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");
@@ -27,7 +27,6 @@ import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
import javax.swing.filechooser.FileFilter;
import javax.swing.filechooser.FileNameExtensionFilter;
import org.openide.util.NbBundle;
import org.openide.util.lookup.ServiceProvider;
import org.sleuthkit.autopsy.coreutils.ModuleSettings;
@@ -72,9 +71,6 @@ public final class CaseOpenAction implements ActionListener {
*/
@Override
public void actionPerformed(ActionEvent e) {
Logger.noteAction(this.getClass());
int retval = fc.showOpenDialog((Component) e.getSource());
if (retval == JFileChooser.APPROVE_OPTION) {
@@ -1,7 +1,7 @@
/*
* Autopsy Forensic Browser
*
* Copyright 2011 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");
@@ -58,8 +58,6 @@ import org.sleuthkit.autopsy.coreutils.Logger;
*/
@Override
public void performAction() {
Logger.noteAction(this.getClass());
try {
// create the popUp window for it
String title = NbBundle.getMessage(this.getClass(), "CasePropertiesAction.window.title");
@@ -1,7 +1,7 @@
/*
* Autopsy Forensic Browser
*
* Copyright 2011 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");
@@ -21,7 +21,6 @@ package org.sleuthkit.autopsy.casemodule;
import java.awt.Component;
import java.awt.Dialog;
import java.awt.event.ActionListener;
import java.io.File;
import java.text.MessageFormat;
import java.util.logging.Level;
@@ -47,9 +46,6 @@ import org.sleuthkit.autopsy.coreutils.Logger;
@Override
public void performAction() {
Logger.noteAction(this.getClass());
// there's a case open
if (Case.existsCurrentCase()) {
// show the confirmation first to close the current case and open the "New Case" wizard panel
@@ -1,7 +1,7 @@
/*
* Autopsy Forensic Browser
*
* Copyright 2011 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");
@@ -35,7 +35,6 @@ import org.openide.util.NbBundle;
import org.openide.util.actions.CallableSystemAction;
import org.openide.util.actions.Presenter;
import org.openide.filesystems.FileUtil;
import org.openide.util.Exceptions;
import org.sleuthkit.autopsy.coreutils.ModuleSettings;
import org.sleuthkit.autopsy.coreutils.Logger;
@@ -253,8 +252,6 @@ import org.sleuthkit.autopsy.coreutils.Logger;
*/
@Override
public void actionPerformed(ActionEvent e) {
Logger.noteAction(this.getClass());
UpdateRecentCases.hasRecentCase = false;
recentCases.clear();
@@ -1,7 +1,7 @@
/*
* Autopsy Forensic Browser
*
* Copyright 2011 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");
@@ -26,7 +26,6 @@ import java.io.File;
import java.util.logging.Level;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import org.openide.util.NbBundle;
import org.sleuthkit.autopsy.coreutils.Logger;
@@ -53,8 +52,6 @@ class RecentItems implements ActionListener {
*/
@Override
public void actionPerformed(ActionEvent e) {
Logger.noteAction(this.getClass());
// check if the file exists
if(caseName.equals("") || casePath.equals("") || (!new File(casePath).exists())){
// throw an error here
+89
View File
@@ -0,0 +1,89 @@
/*
* 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.core;
import java.util.prefs.PreferenceChangeListener;
import java.util.prefs.Preferences;
import org.openide.util.NbPreferences;
/**
* Provides convenient access to a Preferences node for user preferences with
* default values.
*/
public final class UserPreferences {
private static final Preferences preferences = NbPreferences.forModule(UserPreferences.class);
public static final String KEEP_PREFERRED_VIEWER = "KeepPreferredViewer"; // NON-NLS
public static final String HIDE_KNOWN_FILES_IN_DATA_SOURCES_TREE = "HideKnownFilesInDataSourcesTree"; //NON-NLS
public static final String HIDE_KNOWN_FILES_IN_VIEWS_TREE = "HideKnownFilesInViewsTree"; //NON-NLS
public static final String DISPLAY_TIMES_IN_LOCAL_TIME = "DisplayTimesInLocalTime"; //NON-NLS
public static final String NUMBER_OF_FILE_INGEST_THREADS = "NumberOfFileIngestThreads"; //NON-NLS
// Prevent instantiation.
private UserPreferences() {
}
public static void addChangeListener(PreferenceChangeListener listener) {
preferences.addPreferenceChangeListener(listener);
}
public static void removeChangeListener(PreferenceChangeListener listener) {
preferences.removePreferenceChangeListener(listener);
}
public static boolean keepPreferredContentViewer() {
return preferences.getBoolean(KEEP_PREFERRED_VIEWER, false);
}
public static void setKeepPreferredContentViewer(boolean value) {
preferences.putBoolean(KEEP_PREFERRED_VIEWER, value);
}
public static boolean hideKnownFilesInDataSourcesTree() {
return preferences.getBoolean(HIDE_KNOWN_FILES_IN_DATA_SOURCES_TREE, false);
}
public static void setHideKnownFilesInDataSourcesTree(boolean value) {
preferences.putBoolean(HIDE_KNOWN_FILES_IN_DATA_SOURCES_TREE, value);
}
public static boolean hideKnownFilesInViewsTree() {
return preferences.getBoolean(HIDE_KNOWN_FILES_IN_VIEWS_TREE, true);
}
public static void setHideKnownFilesInViewsTree(boolean value) {
preferences.putBoolean(HIDE_KNOWN_FILES_IN_VIEWS_TREE, value);
}
public static boolean displayTimesInLocalTime() {
return preferences.getBoolean(DISPLAY_TIMES_IN_LOCAL_TIME, true);
}
public static void setDisplayTimesInLocalTime(boolean value) {
preferences.putBoolean(DISPLAY_TIMES_IN_LOCAL_TIME, value);
}
public static int numberOfFileIngestThreads() {
return preferences.getInt(NUMBER_OF_FILE_INGEST_THREADS, 2);
}
public static void setNumberOfFileIngestThreads(int value) {
preferences.putInt(NUMBER_OF_FILE_INGEST_THREADS, value);
}
}
@@ -18,6 +18,13 @@
<folder name="Keymaps.instance_hidden"/> <!-- Keymap -->
<folder name="Java.instance_hidden"/>
<folder name="Advanced.instance_hidden"/> <!-- Miscellaneous -->
<file name="org-sleuthkit-autopsy-corecomponents-AutopsyOptionsPanelController.instance">
<attr name="iconBase" stringvalue="org/sleuthkit/autopsy/corecomponents/checkbox.png"/>
<attr name="instanceCreate" methodvalue="org.netbeans.spi.options.OptionsCategory.createCategory"/>
<attr name="keywordsCategory" stringvalue="General"/>
<attr name="position" intvalue="1"/>
</file>
<file name="org-sleuthkit-autopsy-corecomponents-GeneralOptionsPanelController.instance_hidden"/>
</folder>
<file name="OptionsExport_hidden"/> <!-- Hide import/export in Options -->
@@ -1,7 +1,7 @@
/*
* Autopsy Forensic Browser
*
* Copyright 2011 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");
@@ -23,7 +23,6 @@ import org.openide.util.NbBundle;
import org.netbeans.core.actions.AboutAction;
import org.openide.DialogDescriptor;
import org.openide.DialogDisplayer;
import org.sleuthkit.autopsy.coreutils.Logger;
/**
* Action to open custom implementation of the "About" window from the Help menu.
@@ -32,8 +31,6 @@ import org.sleuthkit.autopsy.coreutils.Logger;
@Override
public void performAction() {
Logger.noteAction(this.getClass());
AboutWindowPanel pip = new AboutWindowPanel();
DialogDescriptor descriptor = new DialogDescriptor(
pip,
@@ -96,10 +96,10 @@
</Property>
<Property name="selected" type="boolean" value="true"/>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="GeneralPanel.useBestViewerRB.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="AutopsyOptionsPanel.useBestViewerRB.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="GeneralPanel.useBestViewerRB.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="AutopsyOptionsPanel.useBestViewerRB.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Events>
@@ -112,24 +112,27 @@
<ComponentRef name="buttonGroup1"/>
</Property>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="GeneralPanel.keepCurrentViewerRB.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="AutopsyOptionsPanel.keepCurrentViewerRB.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="GeneralPanel.keepCurrentViewerRB.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="AutopsyOptionsPanel.keepCurrentViewerRB.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="keepCurrentViewerRBActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JLabel" name="jLabel1">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="GeneralPanel.jLabel1.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="AutopsyOptionsPanel.jLabel1.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLabel2">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="GeneralPanel.jLabel2.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="AutopsyOptionsPanel.jLabel2.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
@@ -140,7 +143,7 @@
</Property>
<Property name="selected" type="boolean" value="true"/>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="GeneralPanel.useLocalTimeRB.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="AutopsyOptionsPanel.useLocalTimeRB.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
@@ -150,7 +153,7 @@
<ComponentRef name="buttonGroup3"/>
</Property>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="GeneralPanel.useGMTTimeRB.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="AutopsyOptionsPanel.useGMTTimeRB.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Events>
@@ -160,43 +163,40 @@
<Component class="javax.swing.JLabel" name="jLabel3">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="GeneralPanel.jLabel3.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="AutopsyOptionsPanel.jLabel3.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JCheckBox" name="dataSourcesHideKnownCB">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="GeneralPanel.dataSourcesHideKnownCB.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="AutopsyOptionsPanel.dataSourcesHideKnownCB.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JCheckBox" name="viewsHideKnownCB">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="GeneralPanel.viewsHideKnownCB.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="AutopsyOptionsPanel.viewsHideKnownCB.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLabel4">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="GeneralPanel.jLabel4.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="AutopsyOptionsPanel.jLabel4.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JComboBox" name="numberOfFileIngestThreadsComboBox">
<Properties>
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
<StringArray count="4">
<StringItem index="0" value="1"/>
<StringItem index="1" value="2"/>
<StringItem index="2" value="3"/>
<StringItem index="3" value="4"/>
</StringArray>
<StringArray count="0"/>
</Property>
<Property name="selectedIndex" type="int" value="1"/>
</Properties>
<AuxValues>
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="&lt;Integer&gt;"/>
</AuxValues>
</Component>
</SubComponents>
</Form>
@@ -18,25 +18,44 @@
*/
package org.sleuthkit.autopsy.corecomponents;
import java.util.prefs.Preferences;
import org.openide.util.NbPreferences;
import org.sleuthkit.autopsy.datamodel.ContentUtils;
import org.sleuthkit.autopsy.ingest.IngestManager;
import javax.swing.DefaultComboBoxModel;
import org.sleuthkit.autopsy.core.UserPreferences;
final class GeneralPanel extends javax.swing.JPanel {
/**
* Options panel that allow users to set application preferences.
*/
final class AutopsyOptionsPanel extends javax.swing.JPanel {
private static final String KEEP_PREFERRED_VIEWER = "keepPreferredViewer"; //NON-NLS
private static final String USE_LOCAL_TIME = "useLocalTime"; //NON-NLS
private static final String DS_HIDE_KNOWN = "dataSourcesHideKnown"; // Default false NON-NLS
private static final String VIEWS_HIDE_KNOWN = "viewsHideKnown"; // Default true NON-NLS
private final Preferences prefs = NbPreferences.forModule(this.getClass());
GeneralPanel(GeneralOptionsPanelController controller) {
AutopsyOptionsPanel(AutopsyOptionsPanelController controller) {
initComponents();
ContentUtils.setDisplayInLocalTime(useLocalTimeRB.isSelected());
numberOfFileIngestThreadsComboBox.setModel(new DefaultComboBoxModel<>(new Integer[]{1, 2, 4, 8, 16}));
// TODO listen to changes in form fields and call controller.changed()
}
void load() {
boolean keepPreferredViewer = UserPreferences.keepPreferredContentViewer();
keepCurrentViewerRB.setSelected(keepPreferredViewer);
useBestViewerRB.setSelected(!keepPreferredViewer);
dataSourcesHideKnownCB.setSelected(UserPreferences.hideKnownFilesInDataSourcesTree());
viewsHideKnownCB.setSelected(UserPreferences.hideKnownFilesInViewsTree());
boolean useLocalTime = UserPreferences.displayTimesInLocalTime();
useLocalTimeRB.setSelected(useLocalTime);
useGMTTimeRB.setSelected(!useLocalTime);
numberOfFileIngestThreadsComboBox.setSelectedItem(UserPreferences.numberOfFileIngestThreads());
}
void store() {
UserPreferences.setKeepPreferredContentViewer(keepCurrentViewerRB.isSelected());
UserPreferences.setHideKnownFilesInDataSourcesTree(dataSourcesHideKnownCB.isSelected());
UserPreferences.setHideKnownFilesInViewsTree(viewsHideKnownCB.isSelected());
UserPreferences.setDisplayTimesInLocalTime(useLocalTimeRB.isSelected());
UserPreferences.setNumberOfFileIngestThreads((Integer) numberOfFileIngestThreadsComboBox.getSelectedItem());
}
boolean valid() {
return true;
}
/**
* 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
@@ -57,48 +76,35 @@ final class GeneralPanel extends javax.swing.JPanel {
dataSourcesHideKnownCB = new javax.swing.JCheckBox();
viewsHideKnownCB = new javax.swing.JCheckBox();
jLabel4 = new javax.swing.JLabel();
numberOfFileIngestThreadsComboBox = new javax.swing.JComboBox();
numberOfFileIngestThreadsComboBox = new javax.swing.JComboBox<Integer>();
buttonGroup1.add(useBestViewerRB);
useBestViewerRB.setSelected(true);
org.openide.awt.Mnemonics.setLocalizedText(useBestViewerRB, org.openide.util.NbBundle.getMessage(GeneralPanel.class, "GeneralPanel.useBestViewerRB.text")); // NOI18N
useBestViewerRB.setToolTipText(org.openide.util.NbBundle.getMessage(GeneralPanel.class, "GeneralPanel.useBestViewerRB.toolTipText")); // NOI18N
useBestViewerRB.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
useBestViewerRBActionPerformed(evt);
}
});
org.openide.awt.Mnemonics.setLocalizedText(useBestViewerRB, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.useBestViewerRB.text")); // NOI18N
useBestViewerRB.setToolTipText(org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.useBestViewerRB.toolTipText")); // NOI18N
buttonGroup1.add(keepCurrentViewerRB);
org.openide.awt.Mnemonics.setLocalizedText(keepCurrentViewerRB, org.openide.util.NbBundle.getMessage(GeneralPanel.class, "GeneralPanel.keepCurrentViewerRB.text")); // NOI18N
keepCurrentViewerRB.setToolTipText(org.openide.util.NbBundle.getMessage(GeneralPanel.class, "GeneralPanel.keepCurrentViewerRB.toolTipText")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(keepCurrentViewerRB, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.keepCurrentViewerRB.text")); // NOI18N
keepCurrentViewerRB.setToolTipText(org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.keepCurrentViewerRB.toolTipText")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(GeneralPanel.class, "GeneralPanel.jLabel1.text")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.jLabel1.text")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(jLabel2, org.openide.util.NbBundle.getMessage(GeneralPanel.class, "GeneralPanel.jLabel2.text")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(jLabel2, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.jLabel2.text")); // NOI18N
buttonGroup3.add(useLocalTimeRB);
useLocalTimeRB.setSelected(true);
org.openide.awt.Mnemonics.setLocalizedText(useLocalTimeRB, org.openide.util.NbBundle.getMessage(GeneralPanel.class, "GeneralPanel.useLocalTimeRB.text")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(useLocalTimeRB, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.useLocalTimeRB.text")); // NOI18N
buttonGroup3.add(useGMTTimeRB);
org.openide.awt.Mnemonics.setLocalizedText(useGMTTimeRB, org.openide.util.NbBundle.getMessage(GeneralPanel.class, "GeneralPanel.useGMTTimeRB.text")); // NOI18N
useGMTTimeRB.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
useGMTTimeRBActionPerformed(evt);
}
});
org.openide.awt.Mnemonics.setLocalizedText(useGMTTimeRB, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.useGMTTimeRB.text")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(jLabel3, org.openide.util.NbBundle.getMessage(GeneralPanel.class, "GeneralPanel.jLabel3.text")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(jLabel3, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.jLabel3.text")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(dataSourcesHideKnownCB, org.openide.util.NbBundle.getMessage(GeneralPanel.class, "GeneralPanel.dataSourcesHideKnownCB.text")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(dataSourcesHideKnownCB, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.dataSourcesHideKnownCB.text")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(viewsHideKnownCB, org.openide.util.NbBundle.getMessage(GeneralPanel.class, "GeneralPanel.viewsHideKnownCB.text")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(viewsHideKnownCB, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.viewsHideKnownCB.text")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(jLabel4, org.openide.util.NbBundle.getMessage(GeneralPanel.class, "GeneralPanel.jLabel4.text")); // NOI18N
numberOfFileIngestThreadsComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "1", "2", "3", "4" }));
numberOfFileIngestThreadsComboBox.setSelectedIndex(1);
org.openide.awt.Mnemonics.setLocalizedText(jLabel4, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.jLabel4.text")); // NOI18N
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
@@ -157,39 +163,6 @@ final class GeneralPanel extends javax.swing.JPanel {
.addComponent(numberOfFileIngestThreadsComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
);
}// </editor-fold>//GEN-END:initComponents
private void useBestViewerRBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_useBestViewerRBActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_useBestViewerRBActionPerformed
private void useGMTTimeRBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_useGMTTimeRBActionPerformed
ContentUtils.setDisplayInLocalTime(useLocalTimeRB.isSelected());
}//GEN-LAST:event_useGMTTimeRBActionPerformed
void load() {
boolean keepPreferredViewer = prefs.getBoolean(KEEP_PREFERRED_VIEWER, false);
keepCurrentViewerRB.setSelected(keepPreferredViewer);
useBestViewerRB.setSelected(!keepPreferredViewer);
boolean useLocalTime = prefs.getBoolean(USE_LOCAL_TIME, true);
useLocalTimeRB.setSelected(useLocalTime);
useGMTTimeRB.setSelected(!useLocalTime);
dataSourcesHideKnownCB.setSelected(prefs.getBoolean(DS_HIDE_KNOWN, false));
viewsHideKnownCB.setSelected(prefs.getBoolean(VIEWS_HIDE_KNOWN, true));
numberOfFileIngestThreadsComboBox.setSelectedItem(IngestManager.getInstance().getNumberOfFileIngestThreads());
}
void store() {
prefs.putBoolean(KEEP_PREFERRED_VIEWER, keepCurrentViewerRB.isSelected());
prefs.putBoolean(USE_LOCAL_TIME, useLocalTimeRB.isSelected());
prefs.putBoolean(DS_HIDE_KNOWN, dataSourcesHideKnownCB.isSelected());
prefs.putBoolean(VIEWS_HIDE_KNOWN, viewsHideKnownCB.isSelected());
IngestManager.getInstance().setNumberOfFileIngestThreads(Integer.valueOf(numberOfFileIngestThreadsComboBox.getSelectedItem().toString()));
}
boolean valid() {
// TODO check whether form is consistent and complete
return true;
}
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.ButtonGroup buttonGroup1;
private javax.swing.ButtonGroup buttonGroup3;
@@ -199,7 +172,7 @@ final class GeneralPanel extends javax.swing.JPanel {
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JRadioButton keepCurrentViewerRB;
private javax.swing.JComboBox numberOfFileIngestThreadsComboBox;
private javax.swing.JComboBox<Integer> numberOfFileIngestThreadsComboBox;
private javax.swing.JRadioButton useBestViewerRB;
private javax.swing.JRadioButton useGMTTimeRB;
private javax.swing.JRadioButton useLocalTimeRB;
@@ -34,12 +34,12 @@ import org.sleuthkit.autopsy.coreutils.Logger;
position = 1,
keywords = "#OptionsCategory_Keywords_General",
keywordsCategory = "General")
public final class GeneralOptionsPanelController extends OptionsPanelController {
public final class AutopsyOptionsPanelController extends OptionsPanelController {
private GeneralPanel panel;
private AutopsyOptionsPanel panel;
private final PropertyChangeSupport pcs = new PropertyChangeSupport(this);
private boolean changed;
private static final Logger logger = Logger.getLogger(GeneralOptionsPanelController.class.getName());
private static final Logger logger = Logger.getLogger(AutopsyOptionsPanelController.class.getName());
@Override
public void update() {
@@ -87,9 +87,9 @@ public final class GeneralOptionsPanelController extends OptionsPanelController
pcs.removePropertyChangeListener(l);
}
private GeneralPanel getPanel() {
private AutopsyOptionsPanel getPanel() {
if (panel == null) {
panel = new GeneralPanel(this);
panel = new AutopsyOptionsPanel(this);
}
return panel;
}
@@ -60,11 +60,6 @@ DataResultViewerThumbnail.pageNumLabel.text=-
DataResultViewerThumbnail.filePathLabel.text=\ \ \
DataResultViewerThumbnail.goToPageLabel.text=Go to Page:
DataResultViewerThumbnail.goToPageField.text=
GeneralPanel.jLabel1.text=When selecting a file:
GeneralPanel.useBestViewerRB.text=Change to the most specific file viewer
GeneralPanel.keepCurrentViewerRB.text=Stay on the same file viewer
GeneralPanel.useBestViewerRB.toolTipText=For example, change from Hex to Media when a JPEG is selected.
GeneralPanel.keepCurrentViewerRB.toolTipText=For example, stay in Hex view when a JPEG is selected.
AdvancedConfigurationDialog.cancelButton.text=Cancel
DataResultPanel.directoryTablePath.text=directoryPath
DataResultPanel.numberMatchLabel.text=0
@@ -73,12 +68,6 @@ MediaViewVideoPanel.pauseButton.text=\u25ba
MediaViewVideoPanel.progressLabel.text=00:00
DataContentViewerMedia.AccessibleContext.accessibleDescription=
MediaViewVideoPanel.infoLabel.text=info
GeneralPanel.jLabel2.text=When displaying times:
GeneralPanel.useLocalTimeRB.text=Use local time zone
GeneralPanel.useGMTTimeRB.text=Use GMT
GeneralPanel.jLabel3.text=Hide known files (i.e. those in the NIST NSRL) in the:
GeneralPanel.viewsHideKnownCB.text= Views area
GeneralPanel.dataSourcesHideKnownCB.text=Data Sources area (the directory hierarchy)
DataContentViewerArtifact.waitText=Retrieving and preparing data, please wait...
DataContentViewerArtifact.errorText=Error retrieving result
DataContentViewerArtifact.title=Results
@@ -137,5 +126,16 @@ DataResultViewerThumbnail.switchPage.done.errMsg=Error making thumbnails\: {0}
FXVideoPanel.pauseButton.infoLabel.playbackErr=Playback error.
GstVideoPanel.progress.infoLabel.updateErr=Error updating video progress\: {0}
GstVideoPanel.ExtractMedia.progress.buffering=Buffering {0}
GeneralPanel.jLabel4.text=Number of threads to use for file ingest:
AboutWindowPanel.actVerboseLogging.text=Activate verbose logging
AutopsyOptionsPanel.jLabel4.text=Number of threads to use for file ingest:
AutopsyOptionsPanel.viewsHideKnownCB.text=Views area
AutopsyOptionsPanel.dataSourcesHideKnownCB.text=Data Sources area (the directory hierarchy)
AutopsyOptionsPanel.jLabel3.text=Hide known files (i.e. those in the NIST NSRL) in the:
AutopsyOptionsPanel.useBestViewerRB.toolTipText=For example, change from Hex to Media when a JPEG is selected.
AutopsyOptionsPanel.useBestViewerRB.text=Change to the most specific file viewer
AutopsyOptionsPanel.useGMTTimeRB.text=Use GMT
AutopsyOptionsPanel.useLocalTimeRB.text=Use local time zone
AutopsyOptionsPanel.keepCurrentViewerRB.toolTipText=For example, stay in Hex view when a JPEG is selected.
AutopsyOptionsPanel.keepCurrentViewerRB.text=Stay on the same file viewer
AutopsyOptionsPanel.jLabel1.text=When selecting a file:
AutopsyOptionsPanel.jLabel2.text=When displaying times:
@@ -1,123 +1,134 @@
CTL_DataContentAction=\u30C7\u30FC\u30BF\u30B3\u30F3\u30C6\u30F3\u30C4
CTL_DataContentAction=\u30c7\u30fc\u30bf\u30b3\u30f3\u30c6\u30f3\u30c4
OptionsCategory_Name_General=Autopsy
OptionsCategory_Keywords_General=Autopsy\u30AA\u30D7\u30B7\u30E7\u30F3
CTL_CustomAboutAction=Autopsy\u306B\u3064\u3044\u3066
CTL_DataContentTopComponent=\u30C7\u30FC\u30BF\u30B3\u30F3\u30C6\u30F3\u30C4
HINT_DataContentTopComponent=\u3053\u308C\u306F\u30C7\u30FC\u30BF\u30B3\u30F3\u30C6\u30F3\u30C4\u306E\u30A6\u30A3\u30F3\u30C9\u30A6\u3067\u3059
HINT_NodeTableTopComponent=\u3053\u308C\u306F\u30C7\u30FC\u30BF\u7D50\u679C\u306E\u30A6\u30A3\u30F3\u30C9\u30A6\u3067\u3059
OpenIDE-Module-Name=\u4E3B\u8981\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8
DataContentViewerHex.pageLabel.text_1=\u30DA\u30FC\u30B8\uFF1A
OptionsCategory_Keywords_General=Autopsy\u30aa\u30d7\u30b7\u30e7\u30f3
CTL_CustomAboutAction=Autopsy\u306b\u3064\u3044\u3066
CTL_DataContentTopComponent=\u30c7\u30fc\u30bf\u30b3\u30f3\u30c6\u30f3\u30c4
HINT_DataContentTopComponent=\u3053\u308c\u306f\u30c7\u30fc\u30bf\u30b3\u30f3\u30c6\u30f3\u30c4\u306e\u30a6\u30a3\u30f3\u30c9\u30a6\u3067\u3059
HINT_NodeTableTopComponent=\u3053\u308c\u306f\u30c7\u30fc\u30bf\u7d50\u679c\u306e\u30a6\u30a3\u30f3\u30c9\u30a6\u3067\u3059
OpenIDE-Module-Name=\u4e3b\u8981\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8
DataContentViewerHex.pageLabel.text_1=\u30da\u30fc\u30b8\uff1a
DataContentViewerHex.currentPageLabel.text_1=1
DataContentViewerHex.totalPageLabel.text_1=100
DataContentViewerString.pageLabel.text_1=\u30DA\u30FC\u30B8\uFF1A
DataContentViewerString.pageLabel.text_1=\u30da\u30fc\u30b8\uff1a
DataContentViewerString.currentPageLabel.text_1=1
DataContentViewerString.totalPageLabel.text_1=100
DataContentViewerHex.pageLabel2.text=\u30DA\u30FC\u30B8
DataContentViewerString.pageLabel2.text=\u30DA\u30FC\u30B8
Format_OperatingSystem_Value={0} \u30D0\u30FC\u30B8\u30E7\u30F3 {1} \u30A2\u30FC\u30AD\u30C6\u30AF\u30C1\u30E3 {2}
DataContentViewerHex.pageLabel2.text=\u30da\u30fc\u30b8
DataContentViewerString.pageLabel2.text=\u30da\u30fc\u30b8
Format_OperatingSystem_Value={0} \u30d0\u30fc\u30b8\u30e7\u30f3 {1} \u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3 {2}
URL_ON_IMG=http\://www.sleuthkit.org/
LBL_Close=\u9589\u3058\u308B
DataContentViewerString.copyMenuItem.text=\u30B3\u30D4\u30FC
DataContentViewerHex.copyMenuItem.text=\u30B3\u30D4\u30FC
DataContentViewerString.selectAllMenuItem.text=\u3059\u3079\u3066\u9078\u629E
DataContentViewerHex.selectAllMenuItem.text=\u3059\u3079\u3066\u9078\u629E
LBL_Close=\u9589\u3058\u308b
DataContentViewerString.copyMenuItem.text=\u30b3\u30d4\u30fc
DataContentViewerHex.copyMenuItem.text=\u30b3\u30d4\u30fc
DataContentViewerString.selectAllMenuItem.text=\u3059\u3079\u3066\u9078\u629e
DataContentViewerHex.selectAllMenuItem.text=\u3059\u3079\u3066\u9078\u629e
DataContentViewerArtifact.totalPageLabel.text=100
DataContentViewerArtifact.pageLabel2.text=\u7D50\u679C
DataContentViewerArtifact.pageLabel2.text=\u7d50\u679c
DataContentViewerArtifact.currentPageLabel.text=1
DataContentViewerArtifact.copyMenuItem.text=\u30B3\u30D4\u30FC
DataContentViewerArtifact.selectAllMenuItem.text=\u3059\u3079\u3066\u9078\u629E
DataContentViewerArtifact.pageLabel.text=\u7D50\u679C\uFF1A
DataContentViewerArtifact.copyMenuItem.text=\u30b3\u30d4\u30fc
DataContentViewerArtifact.selectAllMenuItem.text=\u3059\u3079\u3066\u9078\u629e
DataContentViewerArtifact.pageLabel.text=\u7d50\u679c\uff1a
AdvancedConfigurationDialog.applyButton.text=OK
DataContentViewerString.goToPageLabel.text=\u4E0B\u8A18\u306E\u30DA\u30FC\u30B8\u3078\u79FB\u52D5\uFF1A
DataContentViewerHex.goToPageLabel.text=\u4E0B\u8A18\u306E\u30DA\u30FC\u30B8\u3078\u79FB\u52D5\uFF1A
DataContentViewerString.languageLabel.text=\u30B9\u30AF\u30EA\u30D7\u30C8\uFF1A
DataContentViewerString.languageCombo.toolTipText=\u30D0\u30A4\u30CA\u30EA\u30B9\u30C8\u30EA\u30F3\u30B0\u306E\u51E6\u7406\uFF08\u62BD\u51FA\u304A\u3088\u3073\u30C7\u30B3\u30FC\u30C9\uFF09\u306B\u4F7F\u7528\u3059\u308B\u8A00\u8A9E
DataResultViewerThumbnail.pageLabel.text=\u30DA\u30FC\u30B8\uFF1A
DataResultViewerThumbnail.pagesLabel.text=\u30DA\u30FC\u30B8\uFF1A
DataResultViewerThumbnail.imagesLabel.text=\u30A4\u30E1\u30FC\u30B8\uFF1A
DataContentViewerString.goToPageLabel.text=\u4e0b\u8a18\u306e\u30da\u30fc\u30b8\u3078\u79fb\u52d5\uff1a
DataContentViewerHex.goToPageLabel.text=\u4e0b\u8a18\u306e\u30da\u30fc\u30b8\u3078\u79fb\u52d5\uff1a
DataContentViewerString.languageLabel.text=\u30b9\u30af\u30ea\u30d7\u30c8\uff1a
DataContentViewerString.languageCombo.toolTipText=\u30d0\u30a4\u30ca\u30ea\u30b9\u30c8\u30ea\u30f3\u30b0\u306e\u51e6\u7406\uff08\u62bd\u51fa\u304a\u3088\u3073\u30c7\u30b3\u30fc\u30c9\uff09\u306b\u4f7f\u7528\u3059\u308b\u8a00\u8a9e
DataResultViewerThumbnail.pageLabel.text=\u30da\u30fc\u30b8\uff1a
DataResultViewerThumbnail.pagesLabel.text=\u30da\u30fc\u30b8\uff1a
DataResultViewerThumbnail.imagesLabel.text=\u30a4\u30e1\u30fc\u30b8\uff1a
DataResultViewerThumbnail.imagesRangeLabel.text=-
DataResultViewerThumbnail.pageNumLabel.text=-
DataResultViewerThumbnail.goToPageLabel.text=\u4E0B\u8A18\u306E\u30DA\u30FC\u30B8\u306B\u79FB\u52D5\uFF1A
GeneralPanel.jLabel1.text=\u30D5\u30A1\u30A4\u30EB\u3092\u9078\u629E\u3059\u308B\u5834\u5408\uFF1A
GeneralPanel.useBestViewerRB.text=\u6700\u3082\u5C02\u9580\u7684\u306A\u30D5\u30A1\u30A4\u30EB\u30D3\u30E5\u30FC\u30A2\u306B\u5909\u66F4
GeneralPanel.keepCurrentViewerRB.text=\u305D\u306E\u307E\u307E\u540C\u3058\u30D5\u30A1\u30A4\u30EB\u30D3\u30E5\u30FC\u30A2\u3092\u4F7F\u7528
GeneralPanel.useBestViewerRB.toolTipText=\u4F8B\u3048\u3070\u3001JPEG\u304C\u9078\u629E\u3055\u308C\u305F\u5834\u5408\u306B\u306FHEX\u304B\u3089\u30E1\u30C7\u30A3\u30A2\u306B\u5909\u66F4\u3059\u308B\u3002
GeneralPanel.keepCurrentViewerRB.toolTipText=\u4F8B\u3048\u3070\u3001JPEG\u304C\u9078\u629E\u3055\u308C\u305F\u5834\u5408\u306B\u305D\u306E\u307E\u307EHEX\u30D3\u30E5\u30FC\u3092\u4F7F\u7528\u3002
AdvancedConfigurationDialog.cancelButton.text=\u30AD\u30E3\u30F3\u30BB\u30EB
DataResultPanel.directoryTablePath.text=\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u30D1\u30B9
DataResultViewerThumbnail.goToPageLabel.text=\u4e0b\u8a18\u306e\u30da\u30fc\u30b8\u306b\u79fb\u52d5\uff1a
AdvancedConfigurationDialog.cancelButton.text=\u30ad\u30e3\u30f3\u30bb\u30eb
DataResultPanel.directoryTablePath.text=\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30d1\u30b9
DataResultPanel.numberMatchLabel.text=0
DataResultPanel.matchLabel.text=\u7D50\u679C
MediaViewVideoPanel.pauseButton.text=\u25BA
DataResultPanel.matchLabel.text=\u7d50\u679c
MediaViewVideoPanel.pauseButton.text=\u25ba
MediaViewVideoPanel.progressLabel.text=00\:00
MediaViewVideoPanel.infoLabel.text=\u60C5\u5831
GeneralPanel.jLabel2.text=\u30A2\u30A4\u30C6\u30E0\u3092\u8868\u793A\u3059\u308B\u5834\u5408\uFF1A
GeneralPanel.useLocalTimeRB.text=\u30ED\u30FC\u30AB\u30EB\u30BF\u30A4\u30E0\u30BE\u30FC\u30F3\u3092\u4F7F\u7528
GeneralPanel.useGMTTimeRB.text=GMT\u3092\u4F7F\u7528
GeneralPanel.jLabel3.text=\u65E2\u77E5\u30D5\u30A1\u30A4\u30EB\uFF08NIST NSRL\u5185\u306E\uFF09\u3092\u4E0B\u8A18\u306B\u96A0\u3059\uFF1A
GeneralPanel.viewsHideKnownCB.text=\u30D3\u30E5\u30FC\u304B\u3089\u9078\u629E\u3057\u3066\u3044\u308B\u5834\u5408
GeneralPanel.dataSourcesHideKnownCB.text=\u30C7\u30FC\u30BF\u30BD\u30FC\u30B9\u30A8\u30EA\u30A2\uFF08\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u968E\u5C64\uFF09
DataContentViewerArtifact.waitText=\u30C7\u30FC\u30BF\u3092\u53D6\u8FBC\u307F\u304A\u3088\u3073\u6E96\u5099\u4E2D\u3002\u3057\u3070\u3089\u304F\u304A\u5F85\u3061\u4E0B\u3055\u3044\u2026
DataContentViewerArtifact.errorText=\u7D50\u679C\u306E\u53D6\u8FBC\u307F\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F
DataContentViewerArtifact.title=\u7D50\u679C
DataContentViewerArtifact.toolTip=\u30D5\u30A1\u30A4\u30EB\u306B\u95A2\u9023\u3059\u308B\u7D50\u679C\u3092\u8868\u793A\u3057\u307E\u3059
DataContentViewerHex.goToPageTextField.msgDlg=\uFF11\u304B\u3089 {0}\u306E\u9593\u306E\u6709\u52B9\u306A\u30DA\u30FC\u30B8\u6570\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044
DataContentViewerHex.goToPageTextField.err=\u7121\u52B9\u306A\u30DA\u30FC\u30B8\u6570
DataContentViewerHex.setDataView.errorText=\uFF08\u30AA\u30D5\u30BB\u30C3\u30C8{0}-{1}\u306F\u8AAD\u307F\u53D6\u308C\u307E\u305B\u3093\u3067\u3057\u305F\uFF09
MediaViewVideoPanel.infoLabel.text=\u60c5\u5831
DataContentViewerArtifact.waitText=\u30c7\u30fc\u30bf\u3092\u53d6\u8fbc\u307f\u304a\u3088\u3073\u6e96\u5099\u4e2d\u3002\u3057\u3070\u3089\u304f\u304a\u5f85\u3061\u4e0b\u3055\u3044\u2026
DataContentViewerArtifact.errorText=\u7d50\u679c\u306e\u53d6\u8fbc\u307f\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f
DataContentViewerArtifact.title=\u7d50\u679c
DataContentViewerArtifact.toolTip=\u30d5\u30a1\u30a4\u30eb\u306b\u95a2\u9023\u3059\u308b\u7d50\u679c\u3092\u8868\u793a\u3057\u307e\u3059
DataContentViewerHex.goToPageTextField.msgDlg=\uff11\u304b\u3089 {0}\u306e\u9593\u306e\u6709\u52b9\u306a\u30da\u30fc\u30b8\u6570\u3092\u5165\u529b\u3057\u3066\u4e0b\u3055\u3044
DataContentViewerHex.goToPageTextField.err=\u7121\u52b9\u306a\u30da\u30fc\u30b8\u6570
DataContentViewerHex.setDataView.errorText=\uff08\u30aa\u30d5\u30bb\u30c3\u30c8{0}-{1}\u306f\u8aad\u307f\u53d6\u308c\u307e\u305b\u3093\u3067\u3057\u305f\uff09
DataContentViewerHex.title=HEX
DataContentViewerHex.toolTip=\u30D0\u30A4\u30CA\u30EA\u30B3\u30F3\u30C6\u30F3\u30C4\u3092HEX\u30D5\u30A1\u30A4\u30EB\u3068\u3057\u3066\u8868\u793A\u3057\u3001ASCII\u3068\u3057\u3066\u8868\u793A\u3067\u304D\u308B\u30D0\u30A4\u30C8\u306F\u53F3\u5074\u306B\u8868\u793A\u3057\u307E\u3059\u3002
DataContentViewerMedia.title=\u30E1\u30C7\u30A3\u30A2
DataContentViewerMedia.toolTip=\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u308B\u30DE\u30EB\u30C1\u30E1\u30C7\u30A3\u30A2\u30D5\u30A1\u30A4\u30EB\uFF08\u30A4\u30E1\u30FC\u30B8\u3001\u30D3\u30C7\u30AA\u3001\u30AA\u30FC\u30C7\u30A3\u30AA\uFF09\u3092\u8868\u793A\u3057\u307E\u3059\u3002
DataContentViewerString.goToPageTextField.msgDlg=\uFF11\u304B\u3089{0}\u306E\u9593\u306E\u6709\u52B9\u306A\u30DA\u30FC\u30B8\u6570\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044
DataContentViewerString.goToPageTextField.err=\u7121\u52B9\u306A\u30DA\u30FC\u30B8\u6570
DataContentViewerString.setDataView.errorText=\uFF08\u30AA\u30D5\u30BB\u30C3\u30C8{0}-{1}\u306F\u8AAD\u307F\u53D6\u308C\u307E\u305B\u3093\u3067\u3057\u305F\uFF09
DataContentViewerString.title=\u30B9\u30C8\u30EA\u30F3\u30B0
DataContentViewerString.toolTip=\u30D5\u30A1\u30A4\u30EB\u304B\u3089\u62BD\u51FA\u3055\u308C\u305FASCII\u304A\u3088\u3073\u30E6\u30CB\u30B3\u30FC\u30C9\u306E\u30B9\u30C8\u30EA\u30F3\u30B0\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002
DataResultPanel.dummyNodeDisplayName=\u3057\u3070\u3089\u304F\u304A\u5F85\u3061\u304F\u3060\u3055\u3044\u2026
DataResultViewerTable.firstColLbl=\u540D\u524D
DataResultViewerTable.illegalArgExc.noChildFromParent=\u6307\u5B9A\u3055\u308C\u305F\u30DA\u30A2\u30EC\u30F3\u30C8\u304B\u3089\u30C1\u30E3\u30A4\u30EB\u30C9\u30CE\u30FC\u30C9\u3092\u53D6\u5F97\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002
DataResultViewerTable.illegalArgExc.childWithoutPropertySet=\u30C1\u30E3\u30A4\u30EB\u30C9\u30CE\u30FC\u30C9\u306F\u901A\u5E38\u306EPropertySet\u3092\u6301\u3063\u3066\u3044\u307E\u305B\u3093\u3002
DataResultViewerTable.title=\u30C6\u30FC\u30D6\u30EB
DataResultViewerTable.dummyNodeDisplayName=\u3057\u3070\u3089\u304F\u304A\u5F85\u3061\u304F\u3060\u3055\u3044\u2026
DataResultViewerThumbnail.title=\u30B5\u30E0\u30CD\u30A4\u30EB
DataResultViewerThumbnail.goToPageTextField.msgDlg=\uFF11\u304B\u3089{0}\u306E\u9593\u306E\u6709\u52B9\u306A\u30DA\u30FC\u30B8\u6570\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044
DataResultViewerThumbnail.goToPageTextField.err=\u7121\u52B9\u306A\u30DA\u30FC\u30B8\u6570
DataResultViewerThumbnail.genThumbs=\u30B5\u30E0\u30CD\u30A4\u30EB\u3092\u4F5C\u6210\u4E2D\u2026
DataResultViewerThumbnail.pageNumbers.curOfTotal={0}\uFF0F{1}\u3064\u76EE
FXVideoPanel.mediaPane.infoLabel=\u524A\u9664\u3055\u308C\u305F\u30D3\u30C7\u30AA\u306E\u518D\u751F\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002\u5916\u90E8\u30D7\u30EC\u30FC\u30E4\u30FC\u3092\u4F7F\u7528\u3057\u3066\u4E0B\u3055\u3044\u3002
FXVideoPanel.progress.bufferingFile={0}\u3092\u30D0\u30C3\u30D5\u30A1\u30EA\u30F3\u30B0
FXVideoPanel.progressLabel.buffering=\u30D0\u30C3\u30D5\u30A1\u30EA\u30F3\u30B0\u4E2D\u2026
FXVideoPanel.media.unsupportedFormat=\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u306A\u3044\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u3067\u3059\u3002
GeneralOptionsPanelController.moduleErr=\u30E2\u30B8\u30E5\u30FC\u30EB\u30A8\u30E9\u30FC
GeneralOptionsPanelController.moduleErr.msg=GeneralOptionsPanelController\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8\u3092\u78BA\u8A8D\u4E2D\u306B\u30E2\u30B8\u30E5\u30FC\u30EB\u304C\u30A8\u30E9\u30FC\u3092\u8D77\u3053\u3057\u307E\u3057\u305F\u3002\u3069\u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u304B\u30ED\u30B0\u3067\u78BA\u8A8D\u3057\u3066\u4E0B\u3055\u3044\u3002\u4E00\u90E8\u306E\u30C7\u30FC\u30BF\u304C\u4E0D\u5B8C\u5168\u304B\u3082\u3057\u308C\u307E\u305B\u3093\u3002
GstVideoPanel.cannotProcFile.err=\u30E1\u30C7\u30A4\u30A2\u30D7\u30EC\u30FC\u30E4\u30FC\u304C\u3053\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u51E6\u7406\u3067\u304D\u307E\u305B\u3093\u3002
GstVideoPanel.initGst.gstException.msg=\u30AA\u30FC\u30C7\u30A3\u30AA\uFF0F\u30D3\u30C7\u30AA\u306E\u518D\u751F\u304A\u3088\u3073\u30D5\u30EC\u30FC\u30E0\u306E\u62BD\u51FA\u306B\u4F7F\u7528\u3059\u308BGStreamer\u306E\u521D\u671F\u5316\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u30D3\u30C7\u30AA\u304A\u3088\u3073\u30AA\u30FC\u30C7\u30A3\u30AA\u518D\u751F\u304C\u7121\u52B9\u5316\u3055\u308C\u307E\u3059\u3002
GstVideoPanel.initGst.otherException.msg=\u30AA\u30FC\u30C7\u30A3\u30AA\uFF0F\u30D3\u30C7\u30AA\u306E\u518D\u751F\u304A\u3088\u3073\u30D5\u30EC\u30FC\u30E0\u306E\u62BD\u51FA\u306B\u4F7F\u7528\u3059\u308BGStreamer\u306E\u521D\u671F\u5316\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u30D3\u30C7\u30AA\u304A\u3088\u3073\u30AA\u30FC\u30C7\u30A3\u30AA\u518D\u751F\u304C\u7121\u52B9\u5316\u3055\u308C\u307E\u3059\u3002
GstVideoPanel.setupVideo.infoLabel.text=\u524A\u9664\u3055\u308C\u305F\u30D3\u30C7\u30AA\u306E\u518D\u751F\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002\u5916\u90E8\u30D7\u30EC\u30FC\u30E4\u30FC\u3092\u4F7F\u7528\u3057\u3066\u4E0B\u3055\u3044\u3002
GstVideoPanel.exception.problemFile.msg=\u30D5\u30A1\u30A4\u30EB({0})\u304B\u3089\u306F\u30D5\u30EC\u30FC\u30E0\u3092\u62BD\u51FA\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002
GstVideoPanel.exception.problemPlay.msg=\u30D3\u30C7\u30AA\u30D5\u30A1\u30A4\u30EB\u306B\u554F\u984C\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u9577\u3055\u3092\u78BA\u8A8D\u4E2D\u306B\u518D\u751F\u3092\u3057\u3088\u3046\u3068\u3057\u305F\u969B\u306B\u554F\u984C\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002
LBL_Description=<div style\="font-size\: 12pt; font-family\: Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif;">\n <b>\u88FD\u54C1\u30D0\u30FC\u30B8\u30E7\u30F3\uFF1A</b> {0} ({9}) <br><b>Sleuth Kit\u30D0\u30FC\u30B8\u30E7\u30F3\uFF1A</b> {7} <br><b>Netbeans RCP\u30D3\u30EB\u30C9\:</b> {8} <br> <b>Java\:</b> {1}; {2}<br> <b>\u30B7\u30B9\u30C6\u30E0\uFF1A</b> {3}; {4}; {5}<br><b>\u30E6\u30FC\u30B6\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u540D</b> {6}</div>
LBL_Copyright=<div style\="font-size\: 12pt; font-family\: Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif; ">Autopsy&trade;\u306FSleuth Kit&trade;\u3084\u305D\u306E\u4ED6\u30C4\u30FC\u30EB\u3092\u57FA\u306B\u3057\u305F\u30C7\u30B8\u30BF\u30EB\u30FB\u30D5\u30A9\u30EC\u30F3\u30B8\u30C3\u30AF\u30FB\u30D7\u30E9\u30C3\u30C8\u30D5\u30A9\u30FC\u30E0\u3067\u3059\u3002<br> <br>Copyright &copy; 2003-2013. \u8A73\u7D30\u306F\u4E0B\u8A18\u3092\u3054\u89A7\u4E0B\u3055\u3044\u3002 <a style\="color\: \#1E2A60;" href\="http\://www.sleuthkit.org">http\://www.sleuthkit.org</a>. </div>
GstVideoPanel.exception.problemPause.msg=\u30D3\u30C7\u30AA\u30D5\u30A1\u30A4\u30EB\u306B\u554F\u984C\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u9577\u3055\u3092\u78BA\u8A8D\u4E2D\u306B\u4E00\u6642\u505C\u6B62\u3092\u3057\u3088\u3046\u3068\u3057\u305F\u969B\u306B\u554F\u984C\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002
GstVideoPanel.exception.problemPauseCaptFrame.msg=\u30D3\u30C7\u30AA\u30D5\u30A1\u30A4\u30EB\u306B\u554F\u984C\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u30D5\u30EC\u30FC\u30E0\u306E\u62BD\u51FA\u4E2D\u306B\u4E00\u6642\u505C\u6B62\u3092\u3057\u3088\u3046\u3068\u3057\u305F\u969B\u306B\u554F\u984C\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002
GstVideoPanel.exception.problemPlayCaptFrame.msg=\u30D3\u30C7\u30AA\u30D5\u30A1\u30A4\u30EB\u306B\u554F\u984C\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u30D5\u30EC\u30FC\u30E0\u306E\u62BD\u51FA\u4E2D\u306B\u518D\u751F\u3057\u3088\u3046\u3068\u3057\u305F\u969B\u306B\u554F\u984C\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002
GstVideoPanel.exception.problemStopCaptFrame.msg=\u30D3\u30C7\u30AA\u30D5\u30A1\u30A4\u30EB\u306B\u554F\u984C\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u30D5\u30EC\u30FC\u30E0\u306E\u62BD\u51FA\u4E2D\u306B\u505C\u6B62\u3057\u3088\u3046\u3068\u3057\u305F\u969B\u306B\u554F\u984C\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002
GstVideoPanel.progress.buffering=\u30D0\u30C3\u30D5\u30A1\u30EA\u30F3\u30B0\u4E2D\u2026
GstVideoPanel.progressLabel.bufferingErr=\u30D5\u30A1\u30A4\u30EB\u306E\u30D0\u30C3\u30D5\u30A1\u30EA\u30F3\u30B0\u30A8\u30E9\u30FC
MediaViewImagePanel.imgFileTooLarge.msg=\u30A4\u30E1\u30FC\u30B8\u30D5\u30A1\u30A4\u30EB\u3092\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093\u3067\u3057\u305F\uFF08\u5927\u304D\u3059\u304E\u3067\u3059\uFF09\uFF1A {0}
ProductInformationPanel.verbLoggingEnabled.text=Verbose\u30ED\u30B0\u304C\u6709\u52B9\u3067\u3059
ProductInformationPanel.propertyUnknown.text=\u4E0D\u660E
DataContentViewerHex.toolTip=\u30d0\u30a4\u30ca\u30ea\u30b3\u30f3\u30c6\u30f3\u30c4\u3092HEX\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u8868\u793a\u3057\u3001ASCII\u3068\u3057\u3066\u8868\u793a\u3067\u304d\u308b\u30d0\u30a4\u30c8\u306f\u53f3\u5074\u306b\u8868\u793a\u3057\u307e\u3059\u3002
DataContentViewerMedia.title=\u30e1\u30c7\u30a3\u30a2
DataContentViewerMedia.toolTip=\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u308b\u30de\u30eb\u30c1\u30e1\u30c7\u30a3\u30a2\u30d5\u30a1\u30a4\u30eb\uff08\u30a4\u30e1\u30fc\u30b8\u3001\u30d3\u30c7\u30aa\u3001\u30aa\u30fc\u30c7\u30a3\u30aa\uff09\u3092\u8868\u793a\u3057\u307e\u3059\u3002
DataContentViewerString.goToPageTextField.msgDlg=\uff11\u304b\u3089{0}\u306e\u9593\u306e\u6709\u52b9\u306a\u30da\u30fc\u30b8\u6570\u3092\u5165\u529b\u3057\u3066\u4e0b\u3055\u3044
DataContentViewerString.goToPageTextField.err=\u7121\u52b9\u306a\u30da\u30fc\u30b8\u6570
DataContentViewerString.setDataView.errorText=\uff08\u30aa\u30d5\u30bb\u30c3\u30c8{0}-{1}\u306f\u8aad\u307f\u53d6\u308c\u307e\u305b\u3093\u3067\u3057\u305f\uff09
DataContentViewerString.title=\u30b9\u30c8\u30ea\u30f3\u30b0
DataContentViewerString.toolTip=\u30d5\u30a1\u30a4\u30eb\u304b\u3089\u62bd\u51fa\u3055\u308c\u305fASCII\u304a\u3088\u3073\u30e6\u30cb\u30b3\u30fc\u30c9\u306e\u30b9\u30c8\u30ea\u30f3\u30b0\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002
DataResultPanel.dummyNodeDisplayName=\u3057\u3070\u3089\u304f\u304a\u5f85\u3061\u304f\u3060\u3055\u3044\u2026
DataResultViewerTable.firstColLbl=\u540d\u524d
DataResultViewerTable.illegalArgExc.noChildFromParent=\u6307\u5b9a\u3055\u308c\u305f\u30da\u30a2\u30ec\u30f3\u30c8\u304b\u3089\u30c1\u30e3\u30a4\u30eb\u30c9\u30ce\u30fc\u30c9\u3092\u53d6\u5f97\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002
DataResultViewerTable.illegalArgExc.childWithoutPropertySet=\u30c1\u30e3\u30a4\u30eb\u30c9\u30ce\u30fc\u30c9\u306f\u901a\u5e38\u306ePropertySet\u3092\u6301\u3063\u3066\u3044\u307e\u305b\u3093\u3002
DataResultViewerTable.title=\u30c6\u30fc\u30d6\u30eb
DataResultViewerTable.dummyNodeDisplayName=\u3057\u3070\u3089\u304f\u304a\u5f85\u3061\u304f\u3060\u3055\u3044\u2026
DataResultViewerThumbnail.title=\u30b5\u30e0\u30cd\u30a4\u30eb
DataResultViewerThumbnail.goToPageTextField.msgDlg=\uff11\u304b\u3089{0}\u306e\u9593\u306e\u6709\u52b9\u306a\u30da\u30fc\u30b8\u6570\u3092\u5165\u529b\u3057\u3066\u4e0b\u3055\u3044
DataResultViewerThumbnail.goToPageTextField.err=\u7121\u52b9\u306a\u30da\u30fc\u30b8\u6570
DataResultViewerThumbnail.genThumbs=\u30b5\u30e0\u30cd\u30a4\u30eb\u3092\u4f5c\u6210\u4e2d\u2026
DataResultViewerThumbnail.pageNumbers.curOfTotal={0}\uff0f{1}\u3064\u76ee
FXVideoPanel.mediaPane.infoLabel=\u524a\u9664\u3055\u308c\u305f\u30d3\u30c7\u30aa\u306e\u518d\u751f\u306f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002\u5916\u90e8\u30d7\u30ec\u30fc\u30e4\u30fc\u3092\u4f7f\u7528\u3057\u3066\u4e0b\u3055\u3044\u3002
FXVideoPanel.progress.bufferingFile={0}\u3092\u30d0\u30c3\u30d5\u30a1\u30ea\u30f3\u30b0
FXVideoPanel.progressLabel.buffering=\u30d0\u30c3\u30d5\u30a1\u30ea\u30f3\u30b0\u4e2d\u2026
FXVideoPanel.media.unsupportedFormat=\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u306a\u3044\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3067\u3059\u3002
GeneralOptionsPanelController.moduleErr=\u30e2\u30b8\u30e5\u30fc\u30eb\u30a8\u30e9\u30fc
GeneralOptionsPanelController.moduleErr.msg=GeneralOptionsPanelController\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3092\u78ba\u8a8d\u4e2d\u306b\u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u30a8\u30e9\u30fc\u3092\u8d77\u3053\u3057\u307e\u3057\u305f\u3002\u3069\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u304b\u30ed\u30b0\u3067\u78ba\u8a8d\u3057\u3066\u4e0b\u3055\u3044\u3002\u4e00\u90e8\u306e\u30c7\u30fc\u30bf\u304c\u4e0d\u5b8c\u5168\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002
GstVideoPanel.cannotProcFile.err=\u30e1\u30c7\u30a4\u30a2\u30d7\u30ec\u30fc\u30e4\u30fc\u304c\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u51e6\u7406\u3067\u304d\u307e\u305b\u3093\u3002
GstVideoPanel.initGst.gstException.msg=\u30aa\u30fc\u30c7\u30a3\u30aa\uff0f\u30d3\u30c7\u30aa\u306e\u518d\u751f\u304a\u3088\u3073\u30d5\u30ec\u30fc\u30e0\u306e\u62bd\u51fa\u306b\u4f7f\u7528\u3059\u308bGStreamer\u306e\u521d\u671f\u5316\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u30d3\u30c7\u30aa\u304a\u3088\u3073\u30aa\u30fc\u30c7\u30a3\u30aa\u518d\u751f\u304c\u7121\u52b9\u5316\u3055\u308c\u307e\u3059\u3002
GstVideoPanel.initGst.otherException.msg=\u30aa\u30fc\u30c7\u30a3\u30aa\uff0f\u30d3\u30c7\u30aa\u306e\u518d\u751f\u304a\u3088\u3073\u30d5\u30ec\u30fc\u30e0\u306e\u62bd\u51fa\u306b\u4f7f\u7528\u3059\u308bGStreamer\u306e\u521d\u671f\u5316\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u30d3\u30c7\u30aa\u304a\u3088\u3073\u30aa\u30fc\u30c7\u30a3\u30aa\u518d\u751f\u304c\u7121\u52b9\u5316\u3055\u308c\u307e\u3059\u3002
GstVideoPanel.setupVideo.infoLabel.text=\u524a\u9664\u3055\u308c\u305f\u30d3\u30c7\u30aa\u306e\u518d\u751f\u306f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002\u5916\u90e8\u30d7\u30ec\u30fc\u30e4\u30fc\u3092\u4f7f\u7528\u3057\u3066\u4e0b\u3055\u3044\u3002
GstVideoPanel.exception.problemFile.msg=\u30d5\u30a1\u30a4\u30eb({0})\u304b\u3089\u306f\u30d5\u30ec\u30fc\u30e0\u3092\u62bd\u51fa\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002
GstVideoPanel.exception.problemPlay.msg=\u30d3\u30c7\u30aa\u30d5\u30a1\u30a4\u30eb\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u9577\u3055\u3092\u78ba\u8a8d\u4e2d\u306b\u518d\u751f\u3092\u3057\u3088\u3046\u3068\u3057\u305f\u969b\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002
LBL_Description=<div style\="font-size\: 12pt; font-family\: Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif;">\n <b>\u88fd\u54c1\u30d0\u30fc\u30b8\u30e7\u30f3\uff1a</b> {0} ({9}) <br><b>Sleuth Kit\u30d0\u30fc\u30b8\u30e7\u30f3\uff1a</b> {7} <br><b>Netbeans RCP\u30d3\u30eb\u30c9\:</b> {8} <br> <b>Java\:</b> {1}; {2}<br> <b>\u30b7\u30b9\u30c6\u30e0\uff1a</b> {3}; {4}; {5}<br><b>\u30e6\u30fc\u30b6\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u540d</b> {6}</div>
LBL_Copyright=<div style\="font-size\: 12pt; font-family\: Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif; ">Autopsy&trade;\u306fSleuth Kit&trade;\u3084\u305d\u306e\u4ed6\u30c4\u30fc\u30eb\u3092\u57fa\u306b\u3057\u305f\u30c7\u30b8\u30bf\u30eb\u30fb\u30d5\u30a9\u30ec\u30f3\u30b8\u30c3\u30af\u30fb\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3067\u3059\u3002<br> <br>Copyright &copy; 2003-2013. \u8a73\u7d30\u306f\u4e0b\u8a18\u3092\u3054\u89a7\u4e0b\u3055\u3044\u3002 <a style\="color\: \#1E2A60;" href\="http\://www.sleuthkit.org">http\://www.sleuthkit.org</a>. </div>
GstVideoPanel.exception.problemPause.msg=\u30d3\u30c7\u30aa\u30d5\u30a1\u30a4\u30eb\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u9577\u3055\u3092\u78ba\u8a8d\u4e2d\u306b\u4e00\u6642\u505c\u6b62\u3092\u3057\u3088\u3046\u3068\u3057\u305f\u969b\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002
GstVideoPanel.exception.problemPauseCaptFrame.msg=\u30d3\u30c7\u30aa\u30d5\u30a1\u30a4\u30eb\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u30d5\u30ec\u30fc\u30e0\u306e\u62bd\u51fa\u4e2d\u306b\u4e00\u6642\u505c\u6b62\u3092\u3057\u3088\u3046\u3068\u3057\u305f\u969b\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002
GstVideoPanel.exception.problemPlayCaptFrame.msg=\u30d3\u30c7\u30aa\u30d5\u30a1\u30a4\u30eb\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u30d5\u30ec\u30fc\u30e0\u306e\u62bd\u51fa\u4e2d\u306b\u518d\u751f\u3057\u3088\u3046\u3068\u3057\u305f\u969b\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002
GstVideoPanel.exception.problemStopCaptFrame.msg=\u30d3\u30c7\u30aa\u30d5\u30a1\u30a4\u30eb\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u30d5\u30ec\u30fc\u30e0\u306e\u62bd\u51fa\u4e2d\u306b\u505c\u6b62\u3057\u3088\u3046\u3068\u3057\u305f\u969b\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002
GstVideoPanel.progress.buffering=\u30d0\u30c3\u30d5\u30a1\u30ea\u30f3\u30b0\u4e2d\u2026
GstVideoPanel.progressLabel.bufferingErr=\u30d5\u30a1\u30a4\u30eb\u306e\u30d0\u30c3\u30d5\u30a1\u30ea\u30f3\u30b0\u30a8\u30e9\u30fc
MediaViewImagePanel.imgFileTooLarge.msg=\u30a4\u30e1\u30fc\u30b8\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u8fbc\u3081\u307e\u305b\u3093\u3067\u3057\u305f\uff08\u5927\u304d\u3059\u304e\u3067\u3059\uff09\uff1a {0}
ProductInformationPanel.verbLoggingEnabled.text=Verbose\u30ed\u30b0\u304c\u6709\u52b9\u3067\u3059
ProductInformationPanel.propertyUnknown.text=\u4e0d\u660e
ProductInformationPanel.getVMValue.text={0} {1}
TableFilterNode.displayName.text=\u540D\u524D
TableFilterNode.displayName.text=\u540d\u524d
DataContentViewerHex.ofLabel.text_1=of
DataContentViewerString.ofLabel.text_1=of
DataContentViewerArtifact.ofLabel.text=of
DataContentViewerString.setDataView.errorNoText=\uFF08\u30AA\u30D5\u30BB\u30C3\u30C8{0}-{1}\u306B\u306F\u30C6\u30AD\u30B9\u30C8\u304C\u3042\u308A\u307E\u305B\u3093\uFF09
DataResultViewerThumbnail.comboBox.smallThumbnails=\u30B5\u30E0\u30CD\u30A4\u30EB\uFF08\u5C0F\uFF09
DataResultViewerThumbnail.comboBox.mediumThumbnails=\u30B5\u30E0\u30CD\u30A4\u30EB\uFF08\u4E2D\uFF09
DataResultViewerThumbnail.comboBox.largeThumbnails=\u30B5\u30E0\u30CD\u30A4\u30EB\uFF08\u5927\uFF09
DataResultViewerThumbnail.switchPage.done.errMsg=\u30B5\u30E0\u30CD\u30A4\u30EB\u4F5C\u6210\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\uFF1A {0}
FXVideoPanel.pauseButton.infoLabel.playbackErr=\u518D\u751F\u30A8\u30E9\u30FC\u3002
GstVideoPanel.progress.infoLabel.updateErr=\u30D3\u30C7\u30AA\u30D7\u30ED\u30B0\u30EC\u30B9\u306E\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\uFF1A {0}
GstVideoPanel.ExtractMedia.progress.buffering={0}\u3092\u30D0\u30C3\u30D5\u30A1\u30EA\u30F3\u30B0\u4E2D
AboutWindowPanel.actVerboseLogging.text=Verbose\u30ED\u30B0\u3092\u30A2\u30AF\u30C6\u30A3\u30D9\u30FC\u30C8
GeneralPanel.jLabel4.text=\u30D5\u30A1\u30A4\u30EB\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u306B\u4F7F\u7528\u3059\u308B\u30B9\u30EC\u30C3\u30C9\u6570\uFF1A
DataContentViewerString.setDataView.errorNoText=\uff08\u30aa\u30d5\u30bb\u30c3\u30c8{0}-{1}\u306b\u306f\u30c6\u30ad\u30b9\u30c8\u304c\u3042\u308a\u307e\u305b\u3093\uff09
DataResultViewerThumbnail.comboBox.smallThumbnails=\u30b5\u30e0\u30cd\u30a4\u30eb\uff08\u5c0f\uff09
DataResultViewerThumbnail.comboBox.mediumThumbnails=\u30b5\u30e0\u30cd\u30a4\u30eb\uff08\u4e2d\uff09
DataResultViewerThumbnail.comboBox.largeThumbnails=\u30b5\u30e0\u30cd\u30a4\u30eb\uff08\u5927\uff09
DataResultViewerThumbnail.switchPage.done.errMsg=\u30b5\u30e0\u30cd\u30a4\u30eb\u4f5c\u6210\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\uff1a {0}
FXVideoPanel.pauseButton.infoLabel.playbackErr=\u518d\u751f\u30a8\u30e9\u30fc\u3002
GstVideoPanel.progress.infoLabel.updateErr=\u30d3\u30c7\u30aa\u30d7\u30ed\u30b0\u30ec\u30b9\u306e\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\uff1a {0}
GstVideoPanel.ExtractMedia.progress.buffering={0}\u3092\u30d0\u30c3\u30d5\u30a1\u30ea\u30f3\u30b0\u4e2d
AboutWindowPanel.actVerboseLogging.text=Verbose\u30ed\u30b0\u3092\u30a2\u30af\u30c6\u30a3\u30d9\u30fc\u30c8
AutopsyOptionsPanel.jLabel4.text=\u30d5\u30a1\u30a4\u30eb\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u306b\u4f7f\u7528\u3059\u308b\u30b9\u30ec\u30c3\u30c9\u6570\uff1a
AutopsyOptionsPanel.viewsHideKnownCB.text=\u30d3\u30e5\u30fc\u304b\u3089\u9078\u629e\u3057\u3066\u3044\u308b\u5834\u5408
AutopsyOptionsPanel.dataSourcesHideKnownCB.text=\u30c7\u30fc\u30bf\u30bd\u30fc\u30b9\u30a8\u30ea\u30a2\uff08\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u968e\u5c64\uff09
AutopsyOptionsPanel.jLabel3.text=\u65e2\u77e5\u30d5\u30a1\u30a4\u30eb\uff08NIST NSRL\u5185\u306e\uff09\u3092\u4e0b\u8a18\u306b\u96a0\u3059\uff1a
AutopsyOptionsPanel.useBestViewerRB.toolTipText=\u4f8b\u3048\u3070\u3001JPEG\u304c\u9078\u629e\u3055\u308c\u305f\u5834\u5408\u306b\u306fHEX\u304b\u3089\u30e1\u30c7\u30a3\u30a2\u306b\u5909\u66f4\u3059\u308b\u3002
AutopsyOptionsPanel.useBestViewerRB.text=\u6700\u3082\u5c02\u9580\u7684\u306a\u30d5\u30a1\u30a4\u30eb\u30d3\u30e5\u30fc\u30a2\u306b\u5909\u66f4
AutopsyOptionsPanel.useGMTTimeRB.text=GMT\u3092\u4f7f\u7528
AutopsyOptionsPanel.useLocalTimeRB.text=\u30ed\u30fc\u30ab\u30eb\u30bf\u30a4\u30e0\u30be\u30fc\u30f3\u3092\u4f7f\u7528
AutopsyOptionsPanel.keepCurrentViewerRB.toolTipText=\u4f8b\u3048\u3070\u3001JPEG\u304c\u9078\u629e\u3055\u308c\u305f\u5834\u5408\u306b\u305d\u306e\u307e\u307eHEX\u30d3\u30e5\u30fc\u3092\u4f7f\u7528\u3002
AutopsyOptionsPanel.keepCurrentViewerRB.text=\u305d\u306e\u307e\u307e\u540c\u3058\u30d5\u30a1\u30a4\u30eb\u30d3\u30e5\u30fc\u30a2\u3092\u4f7f\u7528
AutopsyOptionsPanel.jLabel1.text=\u30d5\u30a1\u30a4\u30eb\u3092\u9078\u629e\u3059\u308b\u5834\u5408\uff1a
AutopsyOptionsPanel.jLabel2.text=\u30a2\u30a4\u30c6\u30e0\u3092\u8868\u793a\u3059\u308b\u5834\u5408\uff1a
@@ -1,6 +1,20 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
* Autopsy Forensic Browser
*
* Copyright 2011-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.corecomponents;
@@ -10,14 +24,13 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.logging.Level;
import java.util.prefs.Preferences;
import javax.swing.JTabbedPane;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import org.openide.nodes.Node;
import org.openide.util.Lookup;
import org.openide.util.NbBundle;
import org.openide.util.NbPreferences;
import org.sleuthkit.autopsy.core.UserPreferences;
import org.sleuthkit.autopsy.corecomponentinterfaces.DataContent;
import org.sleuthkit.autopsy.corecomponentinterfaces.DataContentViewer;
import org.sleuthkit.autopsy.coreutils.Logger;
@@ -34,7 +47,7 @@ import org.sleuthkit.datamodel.TskCoreException;
private Node currentNode;
private final boolean isMain;
private boolean listeningToTabbedPane = false;
/**
* Creates new DataContentPanel panel
* The main data content panel can only be created by the data content top component,
@@ -162,10 +175,6 @@ import org.sleuthkit.datamodel.TskCoreException;
listeningToTabbedPane = true;
}
// get the preference for the preferred viewer
Preferences pref = NbPreferences.forModule(GeneralPanel.class);
boolean keepCurrentViewer = pref.getBoolean("keepPreferredViewer", false); //NON-NLS
int currTabIndex = jTabbedPane1.getSelectedIndex();
int totalTabs = jTabbedPane1.getTabCount();
int maxPreferred = 0;
@@ -190,8 +199,7 @@ import org.sleuthkit.datamodel.TskCoreException;
}
// let the user decide if we should stay with the current viewer
int tabIndex = keepCurrentViewer ? currTabIndex : preferredViewerIndex;
int tabIndex = UserPreferences.keepPreferredContentViewer() ? currTabIndex : preferredViewerIndex;
UpdateWrapper dcv = viewers.get(tabIndex);
// this is really only needed if no tabs were enabled
@@ -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");
@@ -19,161 +19,107 @@
package org.sleuthkit.autopsy.coreutils;
import java.io.IOException;
import java.nio.charset.Charset;
import java.util.logging.*;
import org.openide.modules.Places;
/**
* Custom Autopsy logger wrapper over java.util.logging.Logger with default file
* streams logging to autopsy.log (general high level messages),
* autopsy_traces.log (also including exception traces).
* In development build, those are also redirected to console / messages log.
*
* Contains a utility method to log user actions to autopsy_actions.log via noteAction()
*
* Use like java.util.logging.Logger API, get a
* org.sleuthkit.autopsy.coreutils.Logger handle using factory method
* org.sleuthkit.autopsy.coreutils.Logger.getLogger(String name) passing
* component/module/class name.
*
* If logging behavior is to be customized, you can add or remove handlers or
* filters from the provided Logger object.
* Autopsy specialization of the Java Logger class with custom file handlers.
*/
public class Logger extends java.util.logging.Logger {
public final class Logger extends java.util.logging.Logger {
private static final String LOG_ENCODING = PlatformUtil.getLogFileEncoding();
private static final String LOG_DIR = PlatformUtil.getLogDirectory();
static final int LOG_SIZE = 0; // in bytes, zero is unlimited
static final int LOG_FILE_COUNT = 10;
//File Handlers which point to the output logs
private static final FileHandler traces = initTraces();
private static final FileHandler normal = initNormal();
private static final int LOG_SIZE = 0; // In bytes, zero is unlimited
private static final int LOG_FILE_COUNT = 10;
private static final String LOG_WITHOUT_STACK_TRACES = "autopsy.log"; //NON-NLS
private static final String LOG_WITH_STACK_TRACES = "autopsy_traces.log"; //NON-NLS
private static final FileHandler userFriendlyLogFile = createFileHandler(LOG_WITHOUT_STACK_TRACES);
private static final FileHandler developersLogFile = createFileHandler(LOG_WITH_STACK_TRACES);
private static final Handler console = new java.util.logging.ConsoleHandler();
private static final java.util.logging.Logger actionsLogger = initActionsLogger();
/**
* Main messages log file name
*/
public static final String messagesLog = "autopsy.log"; //NON-NLS
/**
* Detailed exception trace log file name
*/
public static final String tracesLog = "autopsy_traces.log"; //NON-NLS
/**
* Action logger file name
*/
public static final String actionsLog = "autopsy_actions.log"; //NON-NLS
/**
* Static blocks to get around compile errors such as "variable might not
* have been initialized
*
*/
//<editor-fold defaultstate="visible" desc="static block initializers">
private static FileHandler initTraces() {
private static FileHandler createFileHandler(String fileName) {
try {
FileHandler f = new FileHandler(LOG_DIR + tracesLog, LOG_SIZE, LOG_FILE_COUNT);
FileHandler f = new FileHandler(LOG_DIR + fileName, LOG_SIZE, LOG_FILE_COUNT);
f.setEncoding(LOG_ENCODING);
f.setFormatter(new SimpleFormatter());
return f;
} catch (IOException e) {
throw new RuntimeException("Error initializing traces logger", e); //NON-NLS
throw new RuntimeException("Error initializing " + fileName + " file handler", e); //NON-NLS
}
}
private static FileHandler initNormal() {
try {
FileHandler f = new FileHandler(LOG_DIR + messagesLog, LOG_SIZE, LOG_FILE_COUNT);
f.setEncoding(LOG_ENCODING);
f.setFormatter(new SimpleFormatter());
return f;
} catch (IOException e) {
throw new RuntimeException("Error initializing normal logger", e); //NON-NLS
}
}
private static java.util.logging.Logger initActionsLogger() {
try {
FileHandler f = new FileHandler(LOG_DIR + actionsLog, LOG_SIZE, LOG_FILE_COUNT);
f.setEncoding(LOG_ENCODING);
f.setFormatter(new SimpleFormatter());
java.util.logging.Logger _actionsLogger = java.util.logging.Logger.getLogger("Actions"); //NON-NLS
_actionsLogger.setUseParentHandlers(false);
_actionsLogger.addHandler(f);
_actionsLogger.addHandler(console);
return _actionsLogger;
} catch (IOException e) {
throw new RuntimeException("Error initializing actions logger", e); //NON-NLS
}
}
//</editor-fold>
private Logger(java.util.logging.Logger log) {
super(log.getName(), log.getResourceBundleName());
//do forward to messages, so that IDE window shows them
if (Version.getBuildType() == Version.Type.DEVELOPMENT) {
addHandler(console);
}
setUseParentHandlers(false); //do not forward to parent logger, sharing static handlers anyway
//addHandler(new AutopsyExceptionHandler());
addHandler(normal);
addHandler(traces);
}
/**
* Log an action to autopsy_actions.log
* @param actionClass class where user triggered action occurs
*/
public static void noteAction(Class<?> actionClass) {
actionsLogger.log(Level.INFO, "Action performed: {0}", actionClass.getName()); //NON-NLS
}
/**
* Factory method to retrieve a org.sleuthkit.autopsy.coreutils.Logger
* instance The logger logs by default to autopsy.log and
* autopsy_traces.log. Add/remove handlers if the desired behavior should be
* different.
* instance derived from java.util.logging.Logger. Hides the base class
* factory method.
*
* @param name ID for the logger or empty string for a root logger
* @param name A name for the logger. This should be a dot-separated name
* and should normally be based on the package name or class name.
* @return org.sleuthkit.autopsy.coreutils.Logger instance
*/
public static Logger getLogger(String name) {
Logger l = new Logger(java.util.logging.Logger.getLogger(name));
return l;
return new Logger(java.util.logging.Logger.getLogger(name));
}
/**
* Factory method to retrieve a org.sleuthkit.autopsy.coreutils.Logger
* instance
* instance derived from java.util.logging.Logger. Hides the base class
* factory method.
*
* @param name ID for the logger or empty string for a root logger
* @param resourceBundleName bundle name associated with the logger
* @param name A name for the logger. This should be a dot-separated name
* and should normally be based on the package name or class name.
* @param resourceBundleName - name of ResourceBundle to be used for
* localizing messages for this logger. May be null if none of the messages
* require localization.
* @return org.sleuthkit.autopsy.coreutils.Logger instance
*/
public static Logger getLogger(String name, String resourceBundleName) {
return new Logger(Logger.getLogger(name, resourceBundleName));
return new Logger(java.util.logging.Logger.getLogger(name));
}
private Logger(java.util.logging.Logger log) {
super(log.getName(), log.getResourceBundleName());
if (Version.getBuildType() == Version.Type.DEVELOPMENT) {
addHandler(console);
}
setUseParentHandlers(false);
addHandler(userFriendlyLogFile);
addHandler(developersLogFile);
}
@Override
public void log(Level level, String message, Throwable thrown) {
super.log(level, message + "\nException: " + thrown.toString()); //NON-NLS
removeHandler(normal);
logUserFriendlyOnly(level, message, thrown);
removeHandler(userFriendlyLogFile);
super.log(level, message, thrown);
addHandler(normal);
addHandler(userFriendlyLogFile);
}
@Override
public void logp(Level level, String sourceClass, String sourceMethod, String message, Throwable thrown) {
logUserFriendlyOnly(level, message, thrown);
removeHandler(userFriendlyLogFile);
super.logp(level, sourceClass, sourceMethod, message, thrown);
addHandler(userFriendlyLogFile);
}
@Override
public void logrb(Level level, String sourceClass, String sourceMethod, String bundleName, String message, Throwable thrown) {
logUserFriendlyOnly(level, message, thrown);
removeHandler(userFriendlyLogFile);
super.logrb(level, sourceClass, sourceMethod, bundleName, message, thrown);
addHandler(userFriendlyLogFile);
}
private void logUserFriendlyOnly(Level level, String message, Throwable thrown) {
removeHandler(developersLogFile);
super.log(level, "{0}\nException: {1}", new Object[]{message, thrown.toString()}); //NON-NLS
addHandler(developersLogFile);
}
@Override
public void throwing(String sourceClass, String sourceMethod, Throwable thrown) {
removeHandler(normal);
removeHandler(userFriendlyLogFile);
super.throwing(sourceClass, sourceMethod, thrown);
addHandler(normal);
addHandler(userFriendlyLogFile);
}
}
@@ -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");
@@ -45,114 +45,120 @@ import javax.xml.validation.Validator;
import org.w3c.dom.Document;
import org.xml.sax.SAXException;
/**
/**
* XML Utilities
*
*
* This class provides basic utilities for working with XML files, such as
* -Validating XML files against a given schema
* -Saving documents to disk
* -Loading documents from disk
*
* -Validating XML files against a given schema -Saving documents to disk
* -Loading documents from disk
*/
public class XMLUtil {
/**
* Utility to validate XML files against pre-defined schema files.
*
* The schema files are extracted automatically when this function is called, the XML being validated is not.
* Be sure the XML file is already extracted otherwise it will return false.
*
* The schema files are extracted automatically when this function is
* called, the XML being validated is not. Be sure the XML file is already
* extracted otherwise it will return false.
*
* @param xmlfile The XML file to validate, in DOMSource format
* @param clazz class frm package to extract schema file from
* @param schemaFile The file name of the schema to validate against, must exist as a resource in the same package as where this function is being called.
*
* For example usages, please see KeywordSearchListsXML, HashDbXML, or IngestModuleLoader.
*
* @param schemaFile The file name of the schema to validate against, must
* exist as a resource in the same package as where this function is being
* called.
*
* For example usages, please see KeywordSearchListsXML, HashDbXML, or
* IngestModuleLoader.
*
*/
public static <T> boolean xmlIsValid(DOMSource xmlfile, Class<T> clazz, String schemaFile) {
try{
PlatformUtil.extractResourceToUserConfigDir(clazz, schemaFile, false);
File schemaLoc = new File(PlatformUtil.getUserConfigDirectory() + File.separator + schemaFile);
SchemaFactory schm = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
try{
Schema schema = schm.newSchema(schemaLoc);
Validator validator = schema.newValidator();
DOMResult result = new DOMResult();
validator.validate(xmlfile, result);
return true;
}
catch(SAXException e){
Logger.getLogger(clazz.getName()).log(Level.WARNING, "Unable to validate XML file.", e); //NON-NLS
return false;
}
}
catch(IOException e){
Logger.getLogger(clazz.getName()).log(Level.WARNING, "Unable to load XML file [" + xmlfile.toString() + "] of type ["+schemaFile+"]", e); //NON-NLS
try {
PlatformUtil.extractResourceToUserConfigDir(clazz, schemaFile, false);
File schemaLoc = new File(PlatformUtil.getUserConfigDirectory() + File.separator + schemaFile);
SchemaFactory schm = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
try {
Schema schema = schm.newSchema(schemaLoc);
Validator validator = schema.newValidator();
DOMResult result = new DOMResult();
validator.validate(xmlfile, result);
return true;
} catch (SAXException e) {
Logger.getLogger(clazz.getName()).log(Level.WARNING, "Unable to validate XML file.", e); //NON-NLS
return false;
}
} catch (IOException e) {
Logger.getLogger(clazz.getName()).log(Level.WARNING, "Unable to load XML file [" + xmlfile.toString() + "] of type [" + schemaFile + "]", e); //NON-NLS
return false;
}
}
/**
* Evaluates XML files against an XSD.
*
* The schema files are extracted automatically when this function is called, the XML being validated is not.
* Be sure the XML file is already extracted otherwise it will return false.
*
* The schema files are extracted automatically when this function is
* called, the XML being validated is not. Be sure the XML file is already
* extracted otherwise it will return false.
*
* @param doc The XML DOM to validate
* @param clazz class from package to extract schema from
* @param type The file name of the schema to validate against, must exist as a resource in the same package as where this function is being called
*
* For example usages, please see KeywordSearchListsXML, HashDbXML, or IngestModuleLoader.
*
* @param type The file name of the schema to validate against, must exist
* as a resource in the same package as where this function is being called
*
* For example usages, please see KeywordSearchListsXML, HashDbXML, or
* IngestModuleLoader.
*
*/
public static <T> boolean xmlIsValid(Document doc, Class<T> clazz, String type){
DOMSource dms = new DOMSource(doc);
return xmlIsValid(dms, clazz, type);
public static <T> boolean xmlIsValid(Document doc, Class<T> clazz, String type) {
DOMSource dms = new DOMSource(doc);
return xmlIsValid(dms, clazz, type);
}
/**
/**
* Loads XML files from disk
*
*
* @param clazz the class this method is invoked from
* @param xmlPath the full path to the file to load
* @param xsdPath the full path to the file to validate against
*
*/
public static <T> Document loadDoc(Class<T> clazz, String xmlPath, String xsdPath) {
DocumentBuilderFactory builderFactory =
DocumentBuilderFactory.newInstance();
public static <T> Document loadDoc(Class<T> clazz, String xmlPath) {
DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();
Document ret = null;
try {
DocumentBuilder builder = builderFactory.newDocumentBuilder();
ret = builder.parse(
new FileInputStream(xmlPath));
ret = builder.parse(new FileInputStream(xmlPath));
} catch (ParserConfigurationException e) {
Logger.getLogger(clazz.getName()).log(Level.SEVERE, "Error loading XML file: can't initialize parser.", e); //NON-NLS
} catch (SAXException e) {
Logger.getLogger(clazz.getName()).log(Level.SEVERE, "Error loading XML file: can't parse XML.", e); //NON-NLS
} catch (IOException e) {
//error reading file
Logger.getLogger(clazz.getName()).log(Level.SEVERE, "Error loading XML file: can't read file.", e); //NON-NLS
}
if (!XMLUtil.xmlIsValid(ret, clazz, xsdPath)) {
Logger.getLogger(clazz.getName()).log(Level.SEVERE, "Error loading XML file: could not validate against [" + xsdPath + "], results may not be accurate"); //NON-NLS
}
return ret;
}
/**
/**
* Loads XML files from disk
*
* @param clazz the class this method is invoked from
* @param xmlPath the full path to the file to load
* @param xsdPath the full path to the file to validate against
*/
public static <T> Document loadDoc(Class<T> clazz, String xmlPath, String xsdPath) {
DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();
Document ret = loadDoc(clazz, xmlPath);
if (!XMLUtil.xmlIsValid(ret, clazz, xsdPath)) {
Logger.getLogger(clazz.getName()).log(Level.WARNING, "Error loading XML file: could not validate against [{0}], results may not be accurate", xsdPath); //NON-NLS
}
return ret;
}
/**
* Saves XML files to disk
*
*
* @param clazz the class this method is invoked from
* @param xmlPath the full path to save the XML to
* @param encoding to encoding, such as "UTF-8", to encode the file with
* @param doc the document to save
*
*/
public static <T> boolean saveDoc(Class<T> clazz, String xmlPath, String encoding, final Document doc) {
TransformerFactory xf = TransformerFactory.newInstance();
@@ -166,11 +172,11 @@ public class XMLUtil {
xformer.setOutputProperty(OutputKeys.STANDALONE, "yes"); //NON-NLS
xformer.setOutputProperty(OutputKeys.VERSION, "1.0");
File file = new File(xmlPath);
FileOutputStream stream = new FileOutputStream(file);
Result out = new StreamResult(new OutputStreamWriter(stream, encoding));
xformer.transform(new DOMSource(doc), out);
stream.flush();
stream.close();
try (FileOutputStream stream = new FileOutputStream(file)) {
Result out = new StreamResult(new OutputStreamWriter(stream, encoding));
xformer.transform(new DOMSource(doc), out);
stream.flush();
}
success = true;
} catch (UnsupportedEncodingException e) {
@@ -186,5 +192,4 @@ public class XMLUtil {
}
return success;
}
}
@@ -1,7 +1,7 @@
/*
* Autopsy Forensic Browser
*
* Copyright 2011 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");
@@ -24,13 +24,13 @@ import java.io.InputStream;
import java.text.SimpleDateFormat;
import java.util.TimeZone;
import java.util.logging.Level;
import java.util.prefs.Preferences;
import java.util.prefs.PreferenceChangeEvent;
import java.util.prefs.PreferenceChangeListener;
import org.openide.util.NbBundle;
import org.sleuthkit.autopsy.coreutils.Logger;
import javax.swing.SwingWorker;
import org.netbeans.api.progress.ProgressHandle;
import org.openide.util.NbPreferences;
import org.sleuthkit.autopsy.core.UserPreferences;
import org.sleuthkit.datamodel.AbstractFile;
import org.sleuthkit.datamodel.Content;
import org.sleuthkit.datamodel.ContentVisitor;
@@ -50,9 +50,21 @@ import org.sleuthkit.datamodel.VirtualDirectory;
public final class ContentUtils {
private final static Logger logger = Logger.getLogger(ContentUtils.class.getName());
private static boolean displayTimesInLocalTime = UserPreferences.displayTimesInLocalTime();
private static final SimpleDateFormat dateFormatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss z");
private static final SimpleDateFormat dateFormatterISO8601 = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
private static boolean displayInLocalTime;
static {
UserPreferences.addChangeListener(new PreferenceChangeListener() {
@Override
public void preferenceChange(PreferenceChangeEvent evt) {
if (evt.getKey().equals(UserPreferences.DISPLAY_TIMES_IN_LOCAL_TIME)) {
displayTimesInLocalTime = UserPreferences.displayTimesInLocalTime();
}
}
});
}
// don't instantiate
private ContentUtils() {
throw new AssertionError();
@@ -110,7 +122,7 @@ public final class ContentUtils {
public static TimeZone getTimeZone(Content c) {
try {
if (!getDisplayInLocalTime()) {
if (!shouldDisplayTimesInLocalTime()) {
return TimeZone.getTimeZone("GMT");
}
else {
@@ -362,18 +374,13 @@ public final class ContentUtils {
cntnt.getClass().getSimpleName()));
}
}
/**sets displayInlocalTime value based on button in GeneralPanel.java
/**
* Indicates whether or not times should be displayed using local time.
*
* @param flag
* @return True or false.
*/
public static void setDisplayInLocalTime(boolean flag) {
displayInLocalTime = flag;
}
/** get global timezone setting for displaying time values
*
* @return
*/
public static boolean getDisplayInLocalTime(){
return displayInLocalTime;
public static boolean shouldDisplayTimesInLocalTime(){
return displayTimesInLocalTime;
}
}
@@ -1,7 +1,7 @@
/*
* Autopsy Forensic Browser
*
* Copyright 2011 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");
@@ -18,16 +18,14 @@
*/
package org.sleuthkit.autopsy.datamodel;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import org.openide.util.NbBundle;
import org.sleuthkit.autopsy.coreutils.Logger;
import org.openide.nodes.AbstractNode;
import org.openide.nodes.ChildFactory;
import org.openide.nodes.Node;
import org.sleuthkit.datamodel.AbstractFile;
import org.sleuthkit.autopsy.core.UserPreferences;
import org.sleuthkit.datamodel.Content;
import org.sleuthkit.datamodel.ContentVisitor;
import org.sleuthkit.datamodel.DerivedFile;
@@ -40,50 +38,19 @@ import org.sleuthkit.datamodel.TskCoreException;
import org.sleuthkit.datamodel.TskData;
/**
* Children factory for a specific file type - does the database query.
* Child node factory for a specific file type - does the database query.
*/
class FileTypeChildren extends ChildFactory<Content> {
public class FileTypeChildren extends ChildFactory<Content> {
private SleuthkitCase skCase;
private FileTypeExtensionFilters.SearchFilterInterface filter;
private static final Logger logger = Logger.getLogger(FileTypeChildren.class.getName());
//private final static int MAX_OBJECTS = 2000;
public FileTypeChildren(FileTypeExtensionFilters.SearchFilterInterface filter, SleuthkitCase skCase) {
FileTypeChildren(FileTypeExtensionFilters.SearchFilterInterface filter, SleuthkitCase skCase) {
this.filter = filter;
this.skCase = skCase;
}
@Override
protected boolean createKeys(List<Content> list) {
list.addAll(runQuery());
return true;
}
private String createQuery(){
String query = "(dir_type = " + TskData.TSK_FS_NAME_TYPE_ENUM.REG.getValue() + ")" //NON-NLS
+ " AND (known IS NULL OR known != " + TskData.FileKnown.KNOWN.getFileKnownValue() + ") AND (0"; //NON-NLS
for(String s : filter.getFilter()){
query += " OR name LIKE '%" + s + "'"; //NON-NLS
}
query += ')';
// query += " LIMIT " + MAX_OBJECTS;
return query;
}
private List<AbstractFile> runQuery(){
List<AbstractFile> list = new ArrayList<>();
try {
list = skCase.findAllFilesWhere(createQuery());
} catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Couldn't get search results", ex); //NON-NLS
}
return list;
}
/**
* Get children count without actually loading all nodes
* @return
@@ -96,7 +63,31 @@ class FileTypeChildren extends ChildFactory<Content> {
return 0;
}
}
@Override
protected boolean createKeys(List<Content> list) {
try {
list.addAll(skCase.findAllFilesWhere(createQuery()));
} catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Couldn't get search results", ex); //NON-NLS
}
return true;
}
private String createQuery(){
StringBuilder query = new StringBuilder();
query.append("(dir_type = ").append(TskData.TSK_FS_NAME_TYPE_ENUM.REG.getValue()).append(")"); //NON-NLS
if (UserPreferences.hideKnownFilesInViewsTree()) {
query.append(" AND (known IS NULL OR known != ").append(TskData.FileKnown.KNOWN.getFileKnownValue()).append(")"); //NON-NLS
}
query.append(" AND (0"); //NON-NLS
for(String s : filter.getFilter()){
query.append(" OR name LIKE '%").append(s).append("'"); //NON-NLS
}
query.append(')');
return query.toString();
}
@Override
protected Node createNodeForKey(Content key) {
return key.accept(new ContentVisitor.Default<AbstractNode>() {
@@ -1,7 +1,7 @@
/*
* Autopsy Forensic Browser
*
* Copyright 2013 Basis Technology Corp.
* Copyright 2013-2014 Basis Technology Corp.
* Contact: carrier <at> sleuthkit <dot> org
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -20,11 +20,10 @@ package org.sleuthkit.autopsy.datamodel;
import java.util.prefs.PreferenceChangeEvent;
import java.util.prefs.PreferenceChangeListener;
import java.util.prefs.Preferences;
import org.openide.nodes.FilterNode;
import org.openide.nodes.Node;
import org.openide.util.NbBundle;
import org.openide.util.NbPreferences;
import org.sleuthkit.autopsy.core.UserPreferences;
import org.sleuthkit.datamodel.AbstractFile;
import org.sleuthkit.datamodel.TskData;
@@ -39,26 +38,28 @@ import org.sleuthkit.datamodel.TskData;
*/
public class KnownFileFilterNode extends FilterNode {
/** Preference key values. */
private static final String DS_HIDE_KNOWN = "dataSourcesHideKnown"; // Default false NON-NLS
private static final String VIEWS_HIDE_KNOWN = "viewsHideKnown"; // Default true NON-NLS
private static boolean filterFromDataSources = UserPreferences.hideKnownFilesInDataSourcesTree();
private static boolean filterFromViews = UserPreferences.hideKnownFilesInViewsTree();
static {
UserPreferences.addChangeListener(new PreferenceChangeListener() {
@Override
public void preferenceChange(PreferenceChangeEvent evt) {
switch (evt.getKey()) {
case UserPreferences.HIDE_KNOWN_FILES_IN_DATA_SOURCES_TREE:
filterFromDataSources = UserPreferences.hideKnownFilesInDataSourcesTree();
break;
case UserPreferences.HIDE_KNOWN_FILES_IN_VIEWS_TREE:
filterFromViews = UserPreferences.hideKnownFilesInViewsTree();
break;
}
}
});
}
/** True if Nodes selected from the Views Node should filter Known Files. */
private static boolean filterFromViews = true;
/** True if Nodes selected from the DataSources Node should filter Known Files. */
private static boolean filterFromDataSources = false;
/** True if a listener has not been added to the preferences. */
private static boolean addListener = true;
/**
* Represents the top level category the Node this KnownFileFilterNode wraps
* is a sub-node of. (i.e. Data Sources, Views, Results)
*/
public enum SelectionContext {
DATA_SOURCES(NbBundle.getMessage(KnownFileFilterNode.class, "KnownFileFilterNode.selectionContext.dataSources")), // Subnode of DataSources
VIEWS(NbBundle.getMessage(KnownFileFilterNode.class, "KnownFileFilterNode.selectionContext.views")), // Subnode of Views
DATA_SOURCES(NbBundle.getMessage(KnownFileFilterNode.class, "KnownFileFilterNode.selectionContext.dataSources")),
VIEWS(NbBundle.getMessage(KnownFileFilterNode.class, "KnownFileFilterNode.selectionContext.views")),
OTHER(""); // Subnode of another node.
private final String displayName;
@@ -67,13 +68,6 @@ public class KnownFileFilterNode extends FilterNode {
this.displayName = displayName;
}
/**
* Get the SelectionContext from the display name of a Node that is a
* direct child of the root node.
*
* @param name
* @return
*/
public static SelectionContext getContextFromName(String name) {
if (name.equals(DATA_SOURCES.getName())) {
return DATA_SOURCES;
@@ -97,12 +91,7 @@ public class KnownFileFilterNode extends FilterNode {
* @param context
*/
public KnownFileFilterNode(Node arg, SelectionContext context) {
super(arg, new KnownFileFilterChildren(arg, context));
if (addListener) {
addPreferenceListener();
addListener = false;
}
super(arg, new KnownFileFilterChildren(arg, context));
}
private KnownFileFilterNode(Node arg, boolean filter) {
@@ -127,28 +116,6 @@ public class KnownFileFilterNode extends FilterNode {
}
}
private void addPreferenceListener() {
Preferences prefs = NbPreferences.root().node("/org/sleuthkit/autopsy/core"); //NON-NLS
// Initialize with values stored in preferences
filterFromViews = prefs.getBoolean(VIEWS_HIDE_KNOWN, filterFromViews);
filterFromDataSources = prefs.getBoolean(DS_HIDE_KNOWN, filterFromDataSources);
// Add listener
prefs.addPreferenceChangeListener(new PreferenceChangeListener() {
@Override
public void preferenceChange(PreferenceChangeEvent evt) {
switch (evt.getKey()) {
case VIEWS_HIDE_KNOWN:
filterFromViews = evt.getNode().getBoolean(VIEWS_HIDE_KNOWN, filterFromViews);
break;
case DS_HIDE_KNOWN:
filterFromDataSources = evt.getNode().getBoolean(DS_HIDE_KNOWN, filterFromDataSources);
break;
}
}
});
}
/**
* Complementary class to KnownFileFilterNode.
*
@@ -1,7 +1,7 @@
/*
* Autopsy Forensic Browser
*
* Copyright 2011 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");
@@ -28,7 +28,6 @@ import org.openide.util.actions.Presenter;
import org.sleuthkit.autopsy.corecomponents.DataContentTopComponent;
import org.sleuthkit.autopsy.corecomponents.DataContentViewerHex;
import org.sleuthkit.autopsy.corecomponents.DataContentViewerString;
import org.sleuthkit.autopsy.coreutils.Logger;
/**
* The actions to change between the "Hex View" and "String View".
@@ -57,8 +56,6 @@ import org.sleuthkit.autopsy.coreutils.Logger;
*/
@Override
public void actionPerformed(ActionEvent e) {
Logger.noteAction(this.getClass());
DataContentTopComponent dctc = DataContentTopComponent.findInstance();
int totalTabs = dctc.getTabPanels().getTabCount();
@@ -1,7 +1,7 @@
/*
* Autopsy Forensic Browser
*
* Copyright 2011 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");
@@ -24,7 +24,6 @@ import org.openide.explorer.ExplorerManager;
import org.openide.explorer.view.BeanTreeView;
import org.openide.nodes.Children;
import org.openide.nodes.Node;
import org.sleuthkit.autopsy.coreutils.Logger;
/**
*
@@ -38,8 +37,6 @@ class CollapseAction extends AbstractAction {
@Override
public void actionPerformed(ActionEvent e) {
Logger.noteAction(this.getClass());
ExplorerManager em = DirectoryTreeTopComponent.findInstance().getExplorerManager();
Node[] selectedNode = em.getSelectedNodes();
@@ -1,7 +1,7 @@
/*
* Autopsy Forensic Browser
*
* Copyright 2011 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");
@@ -31,6 +31,8 @@ import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import java.util.logging.Level;
import java.util.prefs.PreferenceChangeEvent;
import java.util.prefs.PreferenceChangeListener;
import org.sleuthkit.autopsy.coreutils.Logger;
import javax.swing.Action;
import javax.swing.JPanel;
@@ -49,6 +51,7 @@ import org.openide.nodes.Node;
import org.openide.nodes.NodeNotFoundException;
import org.openide.nodes.NodeOp;
import org.sleuthkit.autopsy.casemodule.Case;
import org.sleuthkit.autopsy.core.UserPreferences;
import org.sleuthkit.autopsy.corecomponentinterfaces.BlackboardResultViewer;
import org.sleuthkit.autopsy.corecomponents.DataResultTopComponent;
import org.sleuthkit.autopsy.corecomponents.TableFilterNode;
@@ -112,27 +115,40 @@ public final class DirectoryTreeTopComponent extends TopComponent implements Dat
setName(NbBundle.getMessage(DirectoryTreeTopComponent.class, "CTL_DirectoryTreeTopComponent"));
setToolTipText(NbBundle.getMessage(DirectoryTreeTopComponent.class, "HINT_DirectoryTreeTopComponent"));
setListener();
subscribeToChangeEvents();
associateLookup(ExplorerUtils.createLookup(em, getActionMap()));
this.pcs = new PropertyChangeSupport(this);
// set the back & forward list and also disable the back & forward button
this.backList = new LinkedList<String[]>();
this.forwardList = new LinkedList<String[]>();
this.backList = new LinkedList<>();
this.forwardList = new LinkedList<>();
backButton.setEnabled(false);
forwardButton.setEnabled(false);
}
/**
* Set the FileBrowserTopComponent as the listener to any property changes
* in the Case.java class
* Make this TopComponent a listener to various change events.
*/
private void setListener() {
Case.addPropertyChangeListener(this);// add this class to listen to any changes in the Case.java class
private void subscribeToChangeEvents() {
UserPreferences.addChangeListener(new PreferenceChangeListener() {
@Override
public void preferenceChange(PreferenceChangeEvent evt) {
switch (evt.getKey()) {
case UserPreferences.HIDE_KNOWN_FILES_IN_DATA_SOURCES_TREE:
refreshContentTreeSafe();
break;
case UserPreferences.HIDE_KNOWN_FILES_IN_VIEWS_TREE:
// TODO: Need a way to refresh the Views subtree
break;
}
}
});
Case.addPropertyChangeListener(this);
this.em.addPropertyChangeListener(this);
IngestManager.addPropertyChangeListener(this);
IngestManager.getInstance().addIngestJobEventListener(this);
IngestManager.getInstance().addIngestModuleEventListener(this);
}
public void setDirectoryListingActive() {
@@ -1,7 +1,7 @@
/*
* Autopsy Forensic Browser
*
* Copyright 2011 - 2013 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");
@@ -54,7 +54,7 @@ public class ExplorerNodeActionVisitor extends ContentVisitor.Default<List<? ext
private static ExplorerNodeActionVisitor instance = new ExplorerNodeActionVisitor();
public static List<Action> getActions(Content c) {
List<Action> actions = new ArrayList<Action>();
List<Action> actions = new ArrayList<>();
actions.addAll(c.accept(instance));
//TODO: fix this
@@ -81,7 +81,7 @@ public class ExplorerNodeActionVisitor extends ContentVisitor.Default<List<? ext
@Override
public List<? extends Action> visit(final Image img) {
List<Action> lst = new ArrayList<Action>();
List<Action> lst = new ArrayList<>();
lst.add(new ImageDetails(
NbBundle.getMessage(this.getClass(), "ExplorerNodeActionVisitor.action.imgDetails.title"), img));
//TODO lst.add(new ExtractAction("Extract Image", img));
@@ -98,7 +98,7 @@ public class ExplorerNodeActionVisitor extends ContentVisitor.Default<List<? ext
@Override
public List<? extends Action> visit(final Volume vol) {
List<AbstractAction> lst = new ArrayList<AbstractAction>();
List<AbstractAction> lst = new ArrayList<>();
lst.add(new VolumeDetails(
NbBundle.getMessage(this.getClass(), "ExplorerNodeActionVisitor.action.volumeDetails.title"), vol));
lst.add(new ExtractUnallocAction(
@@ -171,12 +171,9 @@ public class ExplorerNodeActionVisitor extends ContentVisitor.Default<List<? ext
@Override
public void actionPerformed(ActionEvent e) {
Logger.noteAction(ExplorerNodeActionVisitor.class);
final JFrame frame = new JFrame(title);
final JDialog popUpWindow = new JDialog(frame, title, true); // to make the popUp Window to be modal
Dimension screenDimension = Toolkit.getDefaultToolkit().getScreenSize();
// set the popUp window / JFrame
@@ -239,8 +236,6 @@ public class ExplorerNodeActionVisitor extends ContentVisitor.Default<List<? ext
@Override
public void actionPerformed(ActionEvent e) {
Logger.noteAction(ExplorerNodeActionVisitor.class);
final JFrame frame = new JFrame(title);
final JDialog popUpWindow = new JDialog(frame, title, true); // to make the popUp Window to be modal
// if we select the Image Details menu
@@ -315,8 +310,6 @@ public class ExplorerNodeActionVisitor extends ContentVisitor.Default<List<? ext
public void actionPerformed(ActionEvent e) {
Dimension screenDimension = Toolkit.getDefaultToolkit().getScreenSize();
Logger.noteAction(ExplorerNodeActionVisitor.class);
final JFrame frame = new JFrame(title);
final JDialog popUpWindow = new JDialog(frame, title, true); // to make the popUp Window to be modal
@@ -1,7 +1,7 @@
/*
* Autopsy Forensic Browser
*
* Copyright 2011 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");
@@ -29,7 +29,6 @@ import org.sleuthkit.autopsy.casemodule.Case;
import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.autopsy.datamodel.ContentUtils;
/**
* Extracts a File object to a temporary file in the case directory, and then
* tries to open it in the user's system with the default associated
@@ -70,8 +69,6 @@ public class ExternalViewerAction extends AbstractAction {
@Override
public void actionPerformed(ActionEvent e) {
Logger.noteAction(this.getClass());
// Get the temp folder path of the case
String tempPath = Case.getCurrentCase().getTempDirectory();
tempPath = tempPath + File.separator + this.fileObject.getName();
@@ -1,7 +1,7 @@
/*
* Autopsy Forensic Browser
*
* Copyright 2011 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");
@@ -47,8 +47,6 @@ public class NewWindowViewAction extends AbstractAction{
@Override
public void actionPerformed(ActionEvent e) {
Logger.noteAction(this.getClass());
String name = "DataContent"; //NON-NLS
String s = contentNode.getLookup().lookup(String.class);
if (s != null) {
@@ -52,12 +52,6 @@ Ensure the Case drive has at least 1GB free space and restart ingest.
IngestJobConfigurationPanel.advancedButton.text=Advanced
IngestJobConfigurationPanel.advancedButton.actionCommand=Advanced
IngestScheduler.DataSourceScheduler.toString.size=DataSourceQueue, size\:
IngestScheduler.FileSched.toString.curFiles.text=\
CurFiles, size\:
IngestScheduler.FileSched.toString.curDirs.text=\
CurDirs(stack), size\:
IngestScheduler.FileSched.toString.rootDirs.text=\
RootDirs(sorted), size\:
IngestManager.StartIngestJobsTask.run.displayName=Queueing ingest tasks
IngestManager.StartIngestJobsTask.run.cancelling={0} (Cancelling...)
IngestManager.StartIngestJobsTask.run.catchException.msg=An error occurred while starting ingest. Results may only be partial
@@ -66,13 +60,9 @@ IngestMessagePanel.sortByComboBox.model.priority=Priority
IngestMessagesToolbar.customizeButton.toolTipText=Ingest Messages
IngestMessageTopComponent.initComponents.name=Ingest Inbox
IngestManager.StartIngestJobsTask.run.startupErr.dlgMsg=Unable to start up one or more ingest modules, ingest job cancelled.
IngestManager.StartIngestJobsTask.run.startupErr.dlgSolution=Please disable the failed modules or fix the errors and then restart ingest\
IngestManager.StartIngestJobsTask.run.startupErr.dlgSolution=Please disable the failed modules or fix the errors and then restart ingest \
by right clicking on the data source and selecting Run Ingest Modules.
IngestManager.StartIngestJobsTask.run.startupErr.dlgErrorList=Errors\:\
IngestManager.StartIngestJobsTask.run.startupErr.dlgErrorList=Errors\: \
\
{0}
IngestManager.StartIngestJobsTask.run.startupErr.dlgTitle=Ingest Failure
IngestManager.StartIngestJobsTask.run.progress.msg1=Data source ingest tasks for {0}
IngestManager.StartIngestJobsTask.run.progress.msg2=Data source ingest tasks for {0}
IngestManager.StartIngestJobsTask.run.progress.msg3=Data source ingest tasks for {0}
IngestManager.StartIngestJobsTask.run.progress.msg4=Data source ingest tasks for {0}
@@ -1,74 +1,64 @@
CTL_IngestMessageTopComponent=\u30E1\u30C3\u30BB\u30FC\u30B8
HINT_IngestMessageTopComponent=\u30E1\u30C3\u30BB\u30FC\u30B8\u30A6\u30A3\u30F3\u30C9\u30A6
IngestDialog.closeButton.title=\u9589\u3058\u308B
IngestDialog.startButton.title=\u30B9\u30BF\u30FC\u30C8
IngestDialog.title.text=\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u30E2\u30B8\u30E5\u30FC\u30EB
IngestJob.progress.cancelling={0}\uFF08\u30AD\u30E3\u30F3\u30BB\u30EB\u4E2D\u2026\uFF09
IngestJob.progress.dataSourceIngest.displayName={0}\u306E\u30C7\u30FC\u30BF\u30BD\u30FC\u30B9\u3092\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8
IngestJob.progress.fileIngest.displayName={0}\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8
IngestJobConfigurationPanel.advancedButton.actionCommand=\u30A2\u30C9\u30D0\u30F3\u30B9
IngestJobConfigurationPanel.advancedButton.text=\u30A2\u30C9\u30D0\u30F3\u30B9
IngestJobConfigurationPanel.processUnallocCheckbox.text=\u672A\u5272\u308A\u5F53\u3066\u9818\u57DF\u306E\u51E6\u7406
IngestJobConfigurationPanel.processUnallocCheckbox.toolTipText=\u524A\u9664\u3055\u308C\u305F\u30D5\u30A1\u30A4\u30EB\u7B49\u306E\u672A\u5272\u308A\u5F53\u3066\u9818\u57DF\u3092\u51E6\u7406\u3002\u3088\u308A\u5B8C\u5168\u306A\u7D50\u679C\u304C\u51FA\u307E\u3059\u304C\u3001\u5927\u304D\u3044\u30A4\u30E1\u30FC\u30B8\u3067\u306F\u51E6\u7406\u6642\u9593\u304C\u9577\u304F\u306A\u308B\u304B\u3082\u3057\u308C\u307E\u305B\u3093\u3002
IngestManager.moduleErr=\u30E2\u30B8\u30E5\u30FC\u30EB\u30A8\u30E9\u30FC
IngestManager.moduleErr.errListenToUpdates.msg=Ingest Manager\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8\u3092\u78BA\u8A8D\u4E2D\u306B\u30E2\u30B8\u30E5\u30FC\u30EB\u304C\u30A8\u30E9\u30FC\u3092\u8D77\u3053\u3057\u307E\u3057\u305F\u3002\u3069\u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u304B\u30ED\u30B0\u3067\u78BA\u8A8D\u3057\u3066\u4E0B\u3055\u3044\u3002\u4E00\u90E8\u306E\u30C7\u30FC\u30BF\u304C\u4E0D\u5B8C\u5168\u304B\u3082\u3057\u308C\u307E\u305B\u3093\u3002
IngestManager.StartIngestJobsTask.run.cancelling={0}\uFF08\u30AD\u30E3\u30F3\u30BB\u30EB\u4E2D\u2026\uFF09
IngestManager.StartIngestJobsTask.run.catchException.msg=\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u306E\u958B\u59CB\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u7D50\u679C\u304C\u4E00\u90E8\u306E\u3082\u306E
IngestManager.StartIngestJobsTask.run.displayName=\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u30BF\u30B9\u30AF\u3092\u30AD\u30E5\u30FC\u30A4\u30F3\u30B0
IngestMessage.exception.srcSubjDetailsDataNotNull.msg=\u30BD\u30FC\u30B9\u3001\u30B5\u30D6\u30B8\u30A7\u30AF\u30C8\u3001\u8A73\u7D30\u304A\u3088\u3073\u30C7\u30FC\u30BF\u306F\u30CC\u30EB\u3067\u3042\u3063\u3066\u306F\u3044\u3051\u307E\u305B\u3093
IngestMessage.exception.srcSubjNotNull.msg=\u30BD\u30FC\u30B9\u304A\u3088\u3073\u30B5\u30D6\u30B8\u30A7\u30AF\u30C8\u306F\u30CC\u30EB\u3067\u3042\u3063\u3066\u306F\u3044\u3051\u307E\u305B\u3093
IngestMessage.exception.typeSrcSubjNotNull.msg=\u30E1\u30C3\u30BB\u30FC\u30B8\u30BF\u30A4\u30D7\u3001\u30BD\u30FC\u30B9\u304A\u3088\u3073\u30B5\u30D6\u30B8\u30A7\u30AF\u30C8\u306F\u30CC\u30EB\u3067\u3042\u3063\u3066\u306F\u3044\u3051\u307E\u305B\u3093
IngestMessage.toString.data.text=\ \u30C7\u30FC\u30BF\uFF1A{0}
IngestMessage.toString.date.text=\ \u65E5\u4ED8\uFF1A{0}
IngestMessage.toString.details.text=\ \u8A73\u7D30\uFF1A{0}
IngestMessage.toString.subject.text=\ \u30B5\u30D6\u30B8\u30A7\u30AF\u30C8\uFF1A{0}
IngestMessage.toString.type.text=\u30BF\u30A4\u30D7\uFF1A{0}
IngestMessageDetailsPanel.copyMenuItem.text=\u30B3\u30D4\u30FC
IngestMessageDetailsPanel.messageDetailsPane.contentType=\u30C6\u30AD\u30B9\u30C8\uFF0Fhtml
IngestMessageDetailsPanel.selectAllMenuItem.text=\u3059\u3079\u3066\u9078\u629E
IngestMessageDetailsPanel.viewArtifactButton.text=\u7D50\u679C\u3078\u79FB\u52D5
IngestMessageDetailsPanel.viewContentButton.text=\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3078\u79FB\u52D5
IngestMessagePanel.BooleanRenderer.exception.nonBoolVal.msg=\u30D6\u30FC\u30EB\u5024\u3067\u306F\u306A\u3044\u3082\u306E\u306BBooleanRenderer\u3092\u4F7F\u7528\u3057\u3088\u3046\u3068\u3057\u307E\u3057\u305F
IngestMessagePanel.DateRenderer.exception.nonDateVal.text=\u65E5\u4ED8\u3067\u306F\u306A\u3044\u3082\u306E\u306BDateRenderer\u3092\u4F7F\u7528\u3057\u3088\u3046\u3068\u3057\u307E\u3057\u305F\u3002
IngestMessagePanel.moduleErr=\u30E2\u30B8\u30E5\u30FC\u30EB\u30A8\u30E9\u30FC
IngestMessagePanel.moduleErr.errListenUpdates.text=IngestMessagePanel\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8\u3092\u78BA\u8A8D\u4E2D\u306B\u30E2\u30B8\u30E5\u30FC\u30EB\u304C\u30A8\u30E9\u30FC\u3092\u8D77\u3053\u3057\u307E\u3057\u305F\u3002\u3069\u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u304B\u30ED\u30B0\u3067\u78BA\u8A8D\u3057\u3066\u4E0B\u3055\u3044\u3002\u4E00\u90E8\u306E\u30C7\u30FC\u30BF\u304C\u4E0D\u5B8C\u5168\u304B\u3082\u3057\u308C\u307E\u305B\u3093\u3002
IngestMessagePanel.MsgTableMod.colNames.module=\u30E2\u30B8\u30E5\u30FC\u30EB
IngestMessagePanel.MsgTableMod.colNames.new=\u65B0\u898F\uFF1F
IngestMessagePanel.MsgTableMod.colNames.num=\u756A\u53F7
IngestMessagePanel.MsgTableMod.colNames.subject=\u30B5\u30D6\u30B8\u30A7\u30AF\u30C8
IngestMessagePanel.MsgTableMod.colNames.timestamp=\u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7
IngestMessagePanel.sortByComboBox.model.priority=\u512A\u5148\u5EA6
CTL_IngestMessageTopComponent=\u30e1\u30c3\u30bb\u30fc\u30b8
HINT_IngestMessageTopComponent=\u30e1\u30c3\u30bb\u30fc\u30b8\u30a6\u30a3\u30f3\u30c9\u30a6
IngestDialog.closeButton.title=\u9589\u3058\u308b
IngestDialog.startButton.title=\u30b9\u30bf\u30fc\u30c8
IngestDialog.title.text=\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u30e2\u30b8\u30e5\u30fc\u30eb
IngestJob.progress.cancelling={0}\uff08\u30ad\u30e3\u30f3\u30bb\u30eb\u4e2d\u2026\uff09
IngestJob.progress.dataSourceIngest.displayName={0}\u306e\u30c7\u30fc\u30bf\u30bd\u30fc\u30b9\u3092\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8
IngestJob.progress.fileIngest.displayName={0}\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8
IngestJobConfigurationPanel.advancedButton.actionCommand=\u30a2\u30c9\u30d0\u30f3\u30b9
IngestJobConfigurationPanel.advancedButton.text=\u30a2\u30c9\u30d0\u30f3\u30b9
IngestJobConfigurationPanel.processUnallocCheckbox.text=\u672a\u5272\u308a\u5f53\u3066\u9818\u57df\u306e\u51e6\u7406
IngestJobConfigurationPanel.processUnallocCheckbox.toolTipText=\u524a\u9664\u3055\u308c\u305f\u30d5\u30a1\u30a4\u30eb\u7b49\u306e\u672a\u5272\u308a\u5f53\u3066\u9818\u57df\u3092\u51e6\u7406\u3002\u3088\u308a\u5b8c\u5168\u306a\u7d50\u679c\u304c\u51fa\u307e\u3059\u304c\u3001\u5927\u304d\u3044\u30a4\u30e1\u30fc\u30b8\u3067\u306f\u51e6\u7406\u6642\u9593\u304c\u9577\u304f\u306a\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002
IngestManager.moduleErr=\u30e2\u30b8\u30e5\u30fc\u30eb\u30a8\u30e9\u30fc
IngestManager.moduleErr.errListenToUpdates.msg=Ingest Manager\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3092\u78ba\u8a8d\u4e2d\u306b\u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u30a8\u30e9\u30fc\u3092\u8d77\u3053\u3057\u307e\u3057\u305f\u3002\u3069\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u304b\u30ed\u30b0\u3067\u78ba\u8a8d\u3057\u3066\u4e0b\u3055\u3044\u3002\u4e00\u90e8\u306e\u30c7\u30fc\u30bf\u304c\u4e0d\u5b8c\u5168\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002
IngestManager.StartIngestJobsTask.run.cancelling={0}\uff08\u30ad\u30e3\u30f3\u30bb\u30eb\u4e2d\u2026\uff09
IngestManager.StartIngestJobsTask.run.catchException.msg=\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u306e\u958b\u59cb\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u7d50\u679c\u304c\u4e00\u90e8\u306e\u3082\u306e
IngestManager.StartIngestJobsTask.run.displayName=\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u30bf\u30b9\u30af\u3092\u30ad\u30e5\u30fc\u30a4\u30f3\u30b0
IngestMessage.exception.srcSubjDetailsDataNotNull.msg=\u30bd\u30fc\u30b9\u3001\u30b5\u30d6\u30b8\u30a7\u30af\u30c8\u3001\u8a73\u7d30\u304a\u3088\u3073\u30c7\u30fc\u30bf\u306f\u30cc\u30eb\u3067\u3042\u3063\u3066\u306f\u3044\u3051\u307e\u305b\u3093
IngestMessage.exception.srcSubjNotNull.msg=\u30bd\u30fc\u30b9\u304a\u3088\u3073\u30b5\u30d6\u30b8\u30a7\u30af\u30c8\u306f\u30cc\u30eb\u3067\u3042\u3063\u3066\u306f\u3044\u3051\u307e\u305b\u3093
IngestMessage.exception.typeSrcSubjNotNull.msg=\u30e1\u30c3\u30bb\u30fc\u30b8\u30bf\u30a4\u30d7\u3001\u30bd\u30fc\u30b9\u304a\u3088\u3073\u30b5\u30d6\u30b8\u30a7\u30af\u30c8\u306f\u30cc\u30eb\u3067\u3042\u3063\u3066\u306f\u3044\u3051\u307e\u305b\u3093
IngestMessage.toString.data.text=\ \u30c7\u30fc\u30bf\uff1a{0}
IngestMessage.toString.date.text=\ \u65e5\u4ed8\uff1a{0}
IngestMessage.toString.details.text=\ \u8a73\u7d30\uff1a{0}
IngestMessage.toString.subject.text=\ \u30b5\u30d6\u30b8\u30a7\u30af\u30c8\uff1a{0}
IngestMessage.toString.type.text=\u30bf\u30a4\u30d7\uff1a{0}
IngestMessageDetailsPanel.copyMenuItem.text=\u30b3\u30d4\u30fc
IngestMessageDetailsPanel.messageDetailsPane.contentType=\u30c6\u30ad\u30b9\u30c8\uff0fhtml
IngestMessageDetailsPanel.selectAllMenuItem.text=\u3059\u3079\u3066\u9078\u629e
IngestMessageDetailsPanel.viewArtifactButton.text=\u7d50\u679c\u3078\u79fb\u52d5
IngestMessageDetailsPanel.viewContentButton.text=\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3078\u79fb\u52d5
IngestMessagePanel.BooleanRenderer.exception.nonBoolVal.msg=\u30d6\u30fc\u30eb\u5024\u3067\u306f\u306a\u3044\u3082\u306e\u306bBooleanRenderer\u3092\u4f7f\u7528\u3057\u3088\u3046\u3068\u3057\u307e\u3057\u305f
IngestMessagePanel.DateRenderer.exception.nonDateVal.text=\u65e5\u4ed8\u3067\u306f\u306a\u3044\u3082\u306e\u306bDateRenderer\u3092\u4f7f\u7528\u3057\u3088\u3046\u3068\u3057\u307e\u3057\u305f\u3002
IngestMessagePanel.moduleErr=\u30e2\u30b8\u30e5\u30fc\u30eb\u30a8\u30e9\u30fc
IngestMessagePanel.moduleErr.errListenUpdates.text=IngestMessagePanel\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3092\u78ba\u8a8d\u4e2d\u306b\u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u30a8\u30e9\u30fc\u3092\u8d77\u3053\u3057\u307e\u3057\u305f\u3002\u3069\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u304b\u30ed\u30b0\u3067\u78ba\u8a8d\u3057\u3066\u4e0b\u3055\u3044\u3002\u4e00\u90e8\u306e\u30c7\u30fc\u30bf\u304c\u4e0d\u5b8c\u5168\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002
IngestMessagePanel.MsgTableMod.colNames.module=\u30e2\u30b8\u30e5\u30fc\u30eb
IngestMessagePanel.MsgTableMod.colNames.new=\u65b0\u898f\uff1f
IngestMessagePanel.MsgTableMod.colNames.num=\u756a\u53f7
IngestMessagePanel.MsgTableMod.colNames.subject=\u30b5\u30d6\u30b8\u30a7\u30af\u30c8
IngestMessagePanel.MsgTableMod.colNames.timestamp=\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7
IngestMessagePanel.sortByComboBox.model.priority=\u512a\u5148\u5ea6
IngestMessagePanel.sortByComboBox.model.time=\u6642\u9593
IngestMessagePanel.sortByComboBox.toolTipText=\u6642\u9593\u9806\uFF08\u6642\u7CFB\u5217\uFF09\u307E\u305F\u306F\u30E1\u30C3\u30BB\u30FC\u30B8\u306E\u512A\u5148\u5EA6\u3067\u30BD\u30FC\u30C8
IngestMessagePanel.sortByLabel.text=\u4E0B\u8A18\u3067\u30BD\u30FC\u30C8\uFF1A
IngestMessagePanel.totalMessagesNameLabel.text=\u5408\u8A08\uFF1A
IngestMessagePanel.sortByComboBox.toolTipText=\u6642\u9593\u9806\uff08\u6642\u7cfb\u5217\uff09\u307e\u305f\u306f\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u512a\u5148\u5ea6\u3067\u30bd\u30fc\u30c8
IngestMessagePanel.sortByLabel.text=\u4e0b\u8a18\u3067\u30bd\u30fc\u30c8\uff1a
IngestMessagePanel.totalMessagesNameLabel.text=\u5408\u8a08\uff1a
IngestMessagePanel.totalMessagesNameVal.text=-
IngestMessagePanel.totalUniqueMessagesNameLabel.text=\u30E6\u30CB\u30FC\u30AF\uFF1A
IngestMessagePanel.totalUniqueMessagesNameLabel.text=\u30e6\u30cb\u30fc\u30af\uff1a
IngestMessagePanel.totalUniqueMessagesNameVal.text=-
IngestMessagesToolbar.customizeButton.toolTipText=\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u30E1\u30C3\u30BB\u30FC\u30B8
IngestMessageTopComponent.displayName=\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u30A4\u30F3\u30DC\u30C3\u30AF\u30B9
IngestMessageTopComponent.displayReport.option.GenRpt=\u30EC\u30DD\u30FC\u30C8\u751F\u6210
IngestMessagesToolbar.customizeButton.toolTipText=\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u30e1\u30c3\u30bb\u30fc\u30b8
IngestMessageTopComponent.displayName=\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u30a4\u30f3\u30dc\u30c3\u30af\u30b9
IngestMessageTopComponent.displayReport.option.GenRpt=\u30ec\u30dd\u30fc\u30c8\u751f\u6210
IngestMessageTopComponent.displayReport.option.OK=OK
IngestMessageTopComponent.initComponents.name=\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u30A4\u30F3\u30DC\u30C3\u30AF\u30B9
IngestMessageTopComponent.msgDlg.ingestRpt.text=\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u30EC\u30DD\u30FC\u30C8
IngestMonitor.mgrErrMsg.lowDiskSpace.msg=\u30C7\u30A3\u30B9\u30AF{0}\u306E\u30C7\u30A3\u30B9\u30AF\u9818\u57DF\u4E0D\u8DB3\u306E\u305F\u3081\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u3092\u4E2D\u6B62\u3057\u307E\u3059\u3002\
\u30B1\u30FC\u30B9\u30C9\u30E9\u30A4\u30D6\u306B\u6700\u4F4E1GB\u306E\u7A7A\u304D\u9818\u57DF\u304C\u3042\u308B\u306E\u3092\u78BA\u8A8D\u3057\u3001\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u3092\u518D\u30B9\u30BF\u30FC\u30C8\u3057\u3066\u4E0B\u3055\u3044\u3002
IngestMonitor.mgrErrMsg.lowDiskSpace.title=\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u304C\u4E2D\u6B62\u3055\u308C\u307E\u3057\u305F\u30FC{0}\u306E\u30C7\u30A3\u30B9\u30AF\u9818\u57DF\u4E0D\u8DB3
IngestScheduler.DataSourceScheduler.toString.size=DataSourceQueue, \u30B5\u30A4\u30BA\uFF1A
IngestScheduler.FileSched.toString.curDirs.text=\
CurDirs(stack), \u30B5\u30A4\u30BA\uFF1A
IngestScheduler.FileSched.toString.curFiles.text=\
CurFiles, \u30B5\u30A4\u30BA\uFF1A
IngestScheduler.FileSched.toString.rootDirs.text=\
RootDirs(sorted), \u30B5\u30A4\u30BA\uFF1A
OpenIDE-Module-Name=\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8
IngestManager.StartIngestJobsTask.run.progress.msg1={0}\u306E\u30C7\u30FC\u30BF\u30BD\u30FC\u30B9\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u30BF\u30B9\u30AF
IngestManager.StartIngestJobsTask.run.progress.msg2={0}\u306E\u30C7\u30FC\u30BF\u30BD\u30FC\u30B9\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u30BF\u30B9\u30AF
IngestManager.StartIngestJobsTask.run.progress.msg3={0}\u306E\u30C7\u30FC\u30BF\u30BD\u30FC\u30B9\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u30BF\u30B9\u30AF
IngestManager.StartIngestJobsTask.run.progress.msg4={0}\u306E\u30C7\u30FC\u30BF\u30BD\u30FC\u30B9\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u30BF\u30B9\u30AF
IngestManager.StartIngestJobsTask.run.startupErr.dlgErrorList=\u30A8\u30E9\u30FC\uFF1A\
IngestMessageTopComponent.initComponents.name=\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u30a4\u30f3\u30dc\u30c3\u30af\u30b9
IngestMessageTopComponent.msgDlg.ingestRpt.text=\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u30ec\u30dd\u30fc\u30c8
IngestMonitor.mgrErrMsg.lowDiskSpace.msg=\u30c7\u30a3\u30b9\u30af{0}\u306e\u30c7\u30a3\u30b9\u30af\u9818\u57df\u4e0d\u8db3\u306e\u305f\u3081\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u3092\u4e2d\u6b62\u3057\u307e\u3059\u3002\
\u30b1\u30fc\u30b9\u30c9\u30e9\u30a4\u30d6\u306b\u6700\u4f4e1GB\u306e\u7a7a\u304d\u9818\u57df\u304c\u3042\u308b\u306e\u3092\u78ba\u8a8d\u3057\u3001\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u3092\u518d\u30b9\u30bf\u30fc\u30c8\u3057\u3066\u4e0b\u3055\u3044\u3002
IngestMonitor.mgrErrMsg.lowDiskSpace.title=\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u304c\u4e2d\u6b62\u3055\u308c\u307e\u3057\u305f\u30fc{0}\u306e\u30c7\u30a3\u30b9\u30af\u9818\u57df\u4e0d\u8db3
IngestScheduler.DataSourceScheduler.toString.size=DataSourceQueue, \u30b5\u30a4\u30ba\uff1a
OpenIDE-Module-Name=\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8
IngestManager.StartIngestJobsTask.run.startupErr.dlgErrorList=\u30a8\u30e9\u30fc\uff1a\
\
{0}
IngestManager.StartIngestJobsTask.run.startupErr.dlgMsg=\uFF11\u3064\u307E\u305F\u306F\u8907\u6570\u306E\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u30B9\u30BF\u30FC\u30C8\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u30B8\u30E7\u30D6\u306F\u30AD\u30E3\u30F3\u30BB\u30EB\u3055\u308C\u307E\u3057\u305F\u3002
IngestManager.StartIngestJobsTask.run.startupErr.dlgSolution=\u5931\u6557\u3057\u305F\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u7121\u52B9\u5316\u3059\u308B\u304B\u30A8\u30E9\u30FC\u3092\u89E3\u6C7A\u3057\u3001\u305D\u306E\u5F8C\u30C7\u30FC\u30BF\u30BD\u30FC\u30B9\u3092\u53F3\u30AF\u30EA\u30C3\u30AF\u3057\u3001\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u5B9F\u884C\u3092\u9078\u629E\u3057\u3066\u3001\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u3092\u30EA\u30B9\u30BF\u30FC\u30C8\u3057\u3066\u4E0B\u3055\u3044\u3002
IngestManager.StartIngestJobsTask.run.startupErr.dlgTitle=\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u5931\u6557
IngestManager.StartIngestJobsTask.run.startupErr.dlgMsg=\uff11\u3064\u307e\u305f\u306f\u8907\u6570\u306e\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u30b9\u30bf\u30fc\u30c8\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u30b8\u30e7\u30d6\u306f\u30ad\u30e3\u30f3\u30bb\u30eb\u3055\u308c\u307e\u3057\u305f\u3002
IngestManager.StartIngestJobsTask.run.startupErr.dlgSolution=\u5931\u6557\u3057\u305f\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u7121\u52b9\u5316\u3059\u308b\u304b\u30a8\u30e9\u30fc\u3092\u89e3\u6c7a\u3057\u3001\u305d\u306e\u5f8c\u30c7\u30fc\u30bf\u30bd\u30fc\u30b9\u3092\u53f3\u30af\u30ea\u30c3\u30af\u3057\u3001\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u5b9f\u884c\u3092\u9078\u629e\u3057\u3066\u3001\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u3092\u30ea\u30b9\u30bf\u30fc\u30c8\u3057\u3066\u4e0b\u3055\u3044\u3002
IngestManager.StartIngestJobsTask.run.startupErr.dlgTitle=\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u5931\u6557
@@ -18,16 +18,18 @@
*/
package org.sleuthkit.autopsy.ingest;
import org.netbeans.api.progress.ProgressHandle;
/**
* Used by data source ingest modules to report progress.
*/
public class DataSourceIngestModuleProgress {
private final IngestJob ingestJob;
private final ProgressHandle progress;
private final String moduleDisplayName;
DataSourceIngestModuleProgress(IngestJob ingestJob, String moduleDisplayName) {
this.ingestJob = ingestJob;
DataSourceIngestModuleProgress(ProgressHandle progress, String moduleDisplayName) {
this.progress = progress;
this.moduleDisplayName = moduleDisplayName;
}
@@ -40,7 +42,7 @@ public class DataSourceIngestModuleProgress {
* data source.
*/
public void switchToDeterminate(int workUnits) {
ingestJob.getDataSourceTaskProgressBar().switchToDeterminate(workUnits);
progress.switchToDeterminate(workUnits);
}
/**
@@ -48,7 +50,7 @@ public class DataSourceIngestModuleProgress {
* the total work units to process the data source is unknown.
*/
public void switchToIndeterminate() {
ingestJob.getDataSourceTaskProgressBar().switchToIndeterminate();
progress.switchToIndeterminate();
}
/**
@@ -58,6 +60,6 @@ public class DataSourceIngestModuleProgress {
* @param workUnits Number of work units performed so far by the module.
*/
public void progress(int workUnits) {
ingestJob.getDataSourceTaskProgressBar().progress(this.moduleDisplayName, workUnits);
progress.progress(this.moduleDisplayName, workUnits);
}
}
@@ -22,6 +22,7 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.netbeans.api.progress.ProgressHandle;
import org.sleuthkit.datamodel.Content;
/**
@@ -30,12 +31,12 @@ import org.sleuthkit.datamodel.Content;
*/
final class DataSourceIngestPipeline {
private final IngestJob job;
private final IngestJobContext context;
private final List<IngestModuleTemplate> moduleTemplates;
private List<DataSourceIngestModuleDecorator> modules = new ArrayList<>();
DataSourceIngestPipeline(IngestJob task, List<IngestModuleTemplate> moduleTemplates) {
this.job = task;
DataSourceIngestPipeline(IngestJobContext context, List<IngestModuleTemplate> moduleTemplates) {
this.context = context;
this.moduleTemplates = moduleTemplates;
}
@@ -50,7 +51,6 @@ final class DataSourceIngestPipeline {
for (IngestModuleTemplate template : moduleTemplates) {
if (template.isDataSourceIngestModuleTemplate()) {
DataSourceIngestModuleDecorator module = new DataSourceIngestModuleDecorator(template.createDataSourceIngestModule(), template.getModuleName());
IngestJobContext context = new IngestJobContext(job);
try {
module.startUp(context);
modulesByClass.put(module.getClassName(), module);
@@ -75,26 +75,26 @@ final class DataSourceIngestPipeline {
return errors;
}
List<IngestModuleError> process() {
List<IngestModuleError> process(Content dataSource, ProgressHandle progress) {
List<IngestModuleError> errors = new ArrayList<>();
for (DataSourceIngestModuleDecorator module : this.modules) {
try {
module.process(job.getDataSource(), new DataSourceIngestModuleProgress(job, module.getDisplayName()));
module.process(dataSource, new DataSourceIngestModuleProgress(progress, module.getDisplayName()));
} catch (Exception ex) {
errors.add(new IngestModuleError(module.getDisplayName(), ex));
}
if (job.isCancelled()) {
if (context.isJobCancelled()) {
break;
}
}
return errors;
}
List<IngestModuleError> shutDown(boolean ingestJobCancelled) {
List<IngestModuleError> shutDown() {
List<IngestModuleError> errors = new ArrayList<>();
for (DataSourceIngestModuleDecorator module : this.modules) {
try {
module.shutDown(ingestJobCancelled);
module.shutDown(context.isJobCancelled());
} catch (Exception ex) {
errors.add(new IngestModuleError(module.getDisplayName(), ex));
}
@@ -0,0 +1,40 @@
/*
* Autopsy Forensic Browser
*
* Copyright 2012-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.ingest;
import org.sleuthkit.datamodel.Content;
final class DataSourceIngestTask extends IngestTask {
private final Content dataSource;
DataSourceIngestTask(IngestJob ingestJob, Content dataSource) {
super(ingestJob);
this.dataSource = dataSource;
}
Content getDataSource() {
return dataSource;
}
@Override
void execute() throws InterruptedException {
getIngestJob().process(dataSource);
}
}
@@ -30,12 +30,12 @@ import org.sleuthkit.datamodel.AbstractFile;
*/
final class FileIngestPipeline {
private final IngestJob job;
private final IngestJobContext context;
private final List<IngestModuleTemplate> moduleTemplates;
private List<FileIngestModuleDecorator> modules = new ArrayList<>();
FileIngestPipeline(IngestJob task, List<IngestModuleTemplate> moduleTemplates) {
this.job = task;
FileIngestPipeline(IngestJobContext context, List<IngestModuleTemplate> moduleTemplates) {
this.context = context;
this.moduleTemplates = moduleTemplates;
}
@@ -50,7 +50,6 @@ final class FileIngestPipeline {
for (IngestModuleTemplate template : moduleTemplates) {
if (template.isFileIngestModuleTemplate()) {
FileIngestModuleDecorator module = new FileIngestModuleDecorator(template.createFileIngestModule(), template.getModuleName());
IngestJobContext context = new IngestJobContext(job);
try {
module.startUp(context);
modulesByClass.put(module.getClassName(), module);
@@ -83,22 +82,22 @@ final class FileIngestPipeline {
} catch (Exception ex) {
errors.add(new IngestModuleError(module.getDisplayName(), ex));
}
if (job.isCancelled()) {
if (context.isJobCancelled()) {
break;
}
}
file.close();
if (!job.isCancelled()) {
IngestManager.fireFileIngestDone(file.getId());
if (!context.isJobCancelled()) {
IngestManager.getInstance().fireFileIngestDone(file.getId());
}
return errors;
}
List<IngestModuleError> shutDown(boolean ingestJobCancelled) {
List<IngestModuleError> shutDown() {
List<IngestModuleError> errors = new ArrayList<>();
for (FileIngestModuleDecorator module : this.modules) {
try {
module.shutDown(ingestJobCancelled);
module.shutDown(context.isJobCancelled());
} catch (Exception ex) {
errors.add(new IngestModuleError(module.getDisplayName(), ex));
}
+69
View File
@@ -0,0 +1,69 @@
/*
* Autopsy Forensic Browser
*
* Copyright 2012-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.ingest;
import java.util.Objects;
import org.sleuthkit.datamodel.AbstractFile;
final class FileIngestTask extends IngestTask {
private final AbstractFile file;
FileIngestTask(IngestJob job, AbstractFile file) {
super(job);
this.file = file;
}
AbstractFile getFile() {
return file;
}
@Override
void execute() throws InterruptedException {
getIngestJob().process(file);
}
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
FileIngestTask other = (FileIngestTask) obj;
IngestJob job = getIngestJob();
IngestJob otherJob = other.getIngestJob();
if (job != otherJob && (job == null || !job.equals(otherJob))) {
return false;
}
if (this.file != other.file && (this.file == null || !this.file.equals(other.file))) {
return false;
}
return true;
}
@Override
public int hashCode() {
int hash = 5;
hash = 47 * hash + Objects.hashCode(getIngestJob());
hash = 47 * hash + Objects.hashCode(this.file);
return hash;
}
}
@@ -0,0 +1,100 @@
/*
* Autopsy Forensic Browser
*
* Copyright 2012-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.ingest;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.sleuthkit.autopsy.casemodule.Case;
import org.sleuthkit.datamodel.Content;
import org.sleuthkit.datamodel.ContentVisitor;
import org.sleuthkit.datamodel.FileSystem;
import org.sleuthkit.datamodel.LayoutFile;
import org.sleuthkit.datamodel.SleuthkitCase;
import org.sleuthkit.datamodel.TskCoreException;
import org.sleuthkit.datamodel.TskData;
/**
* Get counts of ingestable files/dirs for the content input source.
*
* Note, also includes counts of all unalloc children files (for the fs, image,
* volume) even if ingest didn't ask for them
*/
final class GetFilesCountVisitor extends ContentVisitor.Default<Long> {
private static final Logger logger = Logger.getLogger(GetFilesCountVisitor.class.getName());
@Override
public Long visit(FileSystem fs) {
//recursion stop here
//case of a real fs, query all files for it
SleuthkitCase sc = Case.getCurrentCase().getSleuthkitCase();
StringBuilder queryB = new StringBuilder();
queryB.append("( (fs_obj_id = ").append(fs.getId()); //NON-NLS
//queryB.append(") OR (fs_obj_id = NULL) )");
queryB.append(") )");
queryB.append(" AND ( (meta_type = ").append(TskData.TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_REG.getValue()); //NON-NLS
queryB.append(") OR (meta_type = ").append(TskData.TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_DIR.getValue()); //NON-NLS
queryB.append(") OR (meta_type = ").append(TskData.TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_VIRT.getValue()); //NON-NLS
queryB.append(" AND (name != '.') AND (name != '..')"); //NON-NLS
queryB.append(") )");
//queryB.append( "AND (type = ");
//queryB.append(TskData.TSK_DB_FILES_TYPE_ENUM.FS.getFileType());
//queryB.append(")");
try {
final String query = queryB.toString();
logger.log(Level.INFO, "Executing count files query: {0}", query); //NON-NLS
return sc.countFilesWhere(query);
} catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Couldn't get count of all files in FileSystem", ex); //NON-NLS
return 0L;
}
}
@Override
public Long visit(LayoutFile lf) {
//recursion stop here
//case of LayoutFile child of Image or Volume
return 1L;
}
private long getCountFromChildren(Content content) {
long count = 0;
try {
List<Content> children = content.getChildren();
if (children.size() > 0) {
for (Content child : children) {
count += child.accept(this);
}
} else {
count = 1;
}
} catch (TskCoreException ex) {
logger.log(Level.WARNING, "Could not get count of objects from children to get num of total files to be ingested", ex); //NON-NLS
}
return count;
}
@Override
protected Long defaultVisit(Content cntnt) {
//recurse assuming this is image/vs/volume
//recursion stops at fs or unalloc file
return getCountFromChildren(cntnt);
}
}
@@ -0,0 +1,88 @@
/*
* Autopsy Forensic Browser
*
* Copyright 2012 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.ingest;
import java.util.ArrayList;
import java.util.Collection;
import org.sleuthkit.datamodel.AbstractFile;
import org.sleuthkit.datamodel.DerivedFile;
import org.sleuthkit.datamodel.Directory;
import org.sleuthkit.datamodel.File;
import org.sleuthkit.datamodel.FileSystem;
import org.sleuthkit.datamodel.LayoutFile;
import org.sleuthkit.datamodel.LocalFile;
import org.sleuthkit.datamodel.VirtualDirectory;
/**
* Finds top level objects such as file system root directories, layout
* files and virtual directories.
*/
final class GetRootDirectoryVisitor extends GetFilesContentVisitor {
@Override
public Collection<AbstractFile> visit(VirtualDirectory ld) {
//case when we hit a layout directoryor local file container, not under a real FS
//or when root virt dir is scheduled
Collection<AbstractFile> ret = new ArrayList<>();
ret.add(ld);
return ret;
}
@Override
public Collection<AbstractFile> visit(LayoutFile lf) {
//case when we hit a layout file, not under a real FS
Collection<AbstractFile> ret = new ArrayList<>();
ret.add(lf);
return ret;
}
@Override
public Collection<AbstractFile> visit(Directory drctr) {
//we hit a real directory, a child of real FS
Collection<AbstractFile> ret = new ArrayList<>();
ret.add(drctr);
return ret;
}
@Override
public Collection<AbstractFile> visit(FileSystem fs) {
return getAllFromChildren(fs);
}
@Override
public Collection<AbstractFile> visit(File file) {
//can have derived files
return getAllFromChildren(file);
}
@Override
public Collection<AbstractFile> visit(DerivedFile derivedFile) {
//can have derived files
//TODO test this and overall scheduler with derived files
return getAllFromChildren(derivedFile);
}
@Override
public Collection<AbstractFile> visit(LocalFile localFile) {
//can have local files
//TODO test this and overall scheduler with local files
return getAllFromChildren(localFile);
}
}
@@ -19,83 +19,111 @@
package org.sleuthkit.autopsy.ingest;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.logging.Level;
import org.netbeans.api.progress.ProgressHandle;
import org.netbeans.api.progress.ProgressHandleFactory;
import org.openide.util.Cancellable;
import org.openide.util.NbBundle;
import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.datamodel.AbstractFile;
import org.sleuthkit.datamodel.Content;
/**
* Encapsulates a data source and the ingest module pipelines to be used to
* ingest the data source.
*/
final class IngestJob {
private static final Logger logger = Logger.getLogger(IngestManager.class.getName());
private final long id;
private final Content dataSource;
private final Content rootDataSource;
private final List<IngestModuleTemplate> ingestModuleTemplates;
private final boolean processUnallocatedSpace;
private final HashMap<Long, FileIngestPipeline> fileIngestPipelines = new HashMap<>();
private final HashMap<Long, DataSourceIngestPipeline> dataSourceIngestPipelines = new HashMap<>();
private final IngestScheduler.FileIngestScheduler fileScheduler = IngestScheduler.getInstance().getFileIngestScheduler();
private FileIngestPipeline initialFileIngestPipeline = null;
private DataSourceIngestPipeline initialDataSourceIngestPipeline = null;
private ProgressHandle dataSourceTaskProgress;
private final LinkedBlockingQueue<DataSourceIngestPipeline> dataSourceIngestPipelines = new LinkedBlockingQueue<>();
private final LinkedBlockingQueue<FileIngestPipeline> fileIngestPipelines = new LinkedBlockingQueue<>();
private long estimatedFilesToProcess = 0L; // Guarded by this
private long processedFiles = 0L; // Guarded by this
private ProgressHandle dataSourceTasksProgress;
private ProgressHandle fileTasksProgress;
int totalEnqueuedFiles = 0;
private int processedFiles = 0;
private volatile boolean cancelled;
private volatile boolean cancelled = false;
IngestJob(long id, Content dataSource, List<IngestModuleTemplate> ingestModuleTemplates, boolean processUnallocatedSpace) {
this.id = id;
this.dataSource = dataSource;
this.rootDataSource = dataSource;
this.ingestModuleTemplates = ingestModuleTemplates;
this.processUnallocatedSpace = processUnallocatedSpace;
this.cancelled = false;
}
long getId() {
return id;
}
Content getDataSource() {
return dataSource;
}
boolean shouldProcessUnallocatedSpace() {
return processUnallocatedSpace;
}
synchronized List<IngestModuleError> startUpIngestPipelines() {
startDataSourceIngestProgressBar();
startFileIngestProgressBar();
return startUpInitialIngestPipelines();
List<IngestModuleError> startUp() throws InterruptedException {
List<IngestModuleError> errors = startUpIngestPipelines();
if (errors.isEmpty()) {
startFileIngestProgressBar();
startDataSourceIngestProgressBar();
}
return errors;
}
private List<IngestModuleError> startUpIngestPipelines() throws InterruptedException {
IngestJobContext context = new IngestJobContext(this);
List<IngestModuleError> errors = new ArrayList<>();
int maxNumberOfPipelines = IngestManager.getMaxNumberOfDataSourceIngestThreads();
for (int i = 0; i < maxNumberOfPipelines; ++i) {
DataSourceIngestPipeline pipeline = new DataSourceIngestPipeline(context, ingestModuleTemplates);
errors.addAll(pipeline.startUp());
dataSourceIngestPipelines.put(pipeline);
if (!errors.isEmpty()) {
// No need to accumulate presumably redundant errors.
break;
}
}
maxNumberOfPipelines = IngestManager.getMaxNumberOfFileIngestThreads();
for (int i = 0; i < maxNumberOfPipelines; ++i) {
FileIngestPipeline pipeline = new FileIngestPipeline(context, ingestModuleTemplates);
errors.addAll(pipeline.startUp());
fileIngestPipelines.put(pipeline);
if (!errors.isEmpty()) {
// No need to accumulate presumably redundant errors.
break;
}
}
logIngestModuleErrors(errors);
return errors; // Returned so UI can report to user.
}
private void startDataSourceIngestProgressBar() {
final String displayName = NbBundle
.getMessage(this.getClass(), "IngestJob.progress.dataSourceIngest.displayName", this.dataSource.getName());
dataSourceTaskProgress = ProgressHandleFactory.createHandle(displayName, new Cancellable() {
final String displayName = NbBundle.getMessage(this.getClass(),
"IngestJob.progress.dataSourceIngest.displayName",
rootDataSource.getName());
dataSourceTasksProgress = ProgressHandleFactory.createHandle(displayName, new Cancellable() {
@Override
public boolean cancel() {
if (dataSourceTaskProgress != null) {
dataSourceTaskProgress.setDisplayName(NbBundle.getMessage(this.getClass(),
if (dataSourceTasksProgress != null) {
dataSourceTasksProgress.setDisplayName(
NbBundle.getMessage(this.getClass(),
"IngestJob.progress.cancelling",
displayName));
}
IngestManager.getInstance().cancelIngestJobs();
IngestJob.this.cancel();
return true;
}
});
dataSourceTaskProgress.start();
dataSourceTaskProgress.switchToIndeterminate();
dataSourceTasksProgress.start();
dataSourceTasksProgress.switchToIndeterminate();
}
private void startFileIngestProgressBar() {
final String displayName = NbBundle
.getMessage(this.getClass(), "IngestJob.progress.fileIngest.displayName", this.dataSource.getName());
final String displayName = NbBundle.getMessage(this.getClass(),
"IngestJob.progress.fileIngest.displayName",
rootDataSource.getName());
fileTasksProgress = ProgressHandleFactory.createHandle(displayName, new Cancellable() {
@Override
public boolean cancel() {
@@ -104,124 +132,84 @@ final class IngestJob {
NbBundle.getMessage(this.getClass(), "IngestJob.progress.cancelling",
displayName));
}
IngestManager.getInstance().cancelIngestJobs();
IngestJob.this.cancel();
return true;
}
});
estimatedFilesToProcess = rootDataSource.accept(new GetFilesCountVisitor());
fileTasksProgress.start();
fileTasksProgress.switchToIndeterminate();
totalEnqueuedFiles = fileScheduler.getFilesEnqueuedEst();
fileTasksProgress.switchToDeterminate(totalEnqueuedFiles);
fileTasksProgress.switchToDeterminate((int) estimatedFilesToProcess);
}
private List<IngestModuleError> startUpInitialIngestPipelines() {
// Create a per thread instance of each pipeline type right now to make
// (reasonably) sure that the ingest modules can be started.
initialDataSourceIngestPipeline = new DataSourceIngestPipeline(this, ingestModuleTemplates);
initialFileIngestPipeline = new FileIngestPipeline(this, ingestModuleTemplates);
void process(Content dataSource) throws InterruptedException {
// If the job is not cancelled, complete the task, otherwise just flush
// it. In either case, the task counter needs to be decremented and the
// shut down check needs to occur.
if (!isCancelled()) {
List<IngestModuleError> errors = new ArrayList<>();
DataSourceIngestPipeline pipeline = dataSourceIngestPipelines.take();
errors.addAll(pipeline.process(dataSource, dataSourceTasksProgress));
if (!errors.isEmpty()) {
logIngestModuleErrors(errors);
}
dataSourceIngestPipelines.put(pipeline);
}
}
void process(AbstractFile file) throws InterruptedException {
// If the job is not cancelled, complete the task, otherwise just flush
// it. In either case, the task counter needs to be decremented and the
// shut down check needs to occur.
if (!isCancelled()) {
List<IngestModuleError> errors = new ArrayList<>();
synchronized (this) {
++processedFiles;
if (processedFiles <= estimatedFilesToProcess) {
fileTasksProgress.progress(file.getName(), (int) processedFiles);
} else {
fileTasksProgress.progress(file.getName(), (int) estimatedFilesToProcess);
}
}
FileIngestPipeline pipeline = fileIngestPipelines.take();
errors.addAll(pipeline.process(file));
fileIngestPipelines.put(pipeline);
if (!errors.isEmpty()) {
logIngestModuleErrors(errors);
}
}
}
void shutDown() {
List<IngestModuleError> errors = new ArrayList<>();
errors.addAll(initialDataSourceIngestPipeline.startUp());
errors.addAll(initialFileIngestPipeline.startUp());
return errors;
while (!dataSourceIngestPipelines.isEmpty()) {
DataSourceIngestPipeline pipeline = dataSourceIngestPipelines.poll();
errors.addAll(pipeline.shutDown());
}
while (!fileIngestPipelines.isEmpty()) {
FileIngestPipeline pipeline = fileIngestPipelines.poll();
errors.addAll(pipeline.shutDown());
}
fileTasksProgress.finish();
dataSourceTasksProgress.finish();
if (!errors.isEmpty()) {
logIngestModuleErrors(errors);
}
}
synchronized DataSourceIngestPipeline getDataSourceIngestPipelineForThread(long threadId) {
DataSourceIngestPipeline pipeline;
if (initialDataSourceIngestPipeline != null) {
pipeline = initialDataSourceIngestPipeline;
initialDataSourceIngestPipeline = null;
dataSourceIngestPipelines.put(threadId, pipeline);
} else if (!dataSourceIngestPipelines.containsKey(threadId)) {
pipeline = new DataSourceIngestPipeline(this, ingestModuleTemplates);
pipeline.startUp();
dataSourceIngestPipelines.put(threadId, pipeline);
} else {
pipeline = dataSourceIngestPipelines.get(threadId);
private void logIngestModuleErrors(List<IngestModuleError> errors) {
for (IngestModuleError error : errors) {
logger.log(Level.SEVERE, error.getModuleDisplayName() + " experienced an error", error.getModuleError());
}
return pipeline;
}
synchronized FileIngestPipeline getFileIngestPipelineForThread(long threadId) {
FileIngestPipeline pipeline;
if (initialFileIngestPipeline != null) {
pipeline = initialFileIngestPipeline;
initialFileIngestPipeline = null;
fileIngestPipelines.put(threadId, pipeline);
} else if (!fileIngestPipelines.containsKey(threadId)) {
pipeline = new FileIngestPipeline(this, ingestModuleTemplates);
pipeline.startUp();
fileIngestPipelines.put(threadId, pipeline);
} else {
pipeline = fileIngestPipelines.get(threadId);
}
return pipeline;
}
synchronized List<IngestModuleError> releaseIngestPipelinesForThread(long threadId) {
List<IngestModuleError> errors = new ArrayList<>();
DataSourceIngestPipeline dataSourceIngestPipeline = dataSourceIngestPipelines.get(threadId);
if (dataSourceIngestPipeline != null) {
errors.addAll(dataSourceIngestPipeline.shutDown(cancelled));
dataSourceIngestPipelines.remove(threadId);
}
if (initialDataSourceIngestPipeline == null && dataSourceIngestPipelines.isEmpty() && dataSourceTaskProgress != null) {
dataSourceTaskProgress.finish();
dataSourceTaskProgress = null;
}
FileIngestPipeline fileIngestPipeline = fileIngestPipelines.get(threadId);
if (fileIngestPipeline != null) {
errors.addAll(fileIngestPipeline.shutDown(cancelled));
fileIngestPipelines.remove(threadId);
}
if (initialFileIngestPipeline == null && fileIngestPipelines.isEmpty() && fileTasksProgress != null) {
fileTasksProgress.finish();
fileTasksProgress = null;
}
return errors;
}
synchronized boolean areIngestPipelinesShutDown() {
return (initialDataSourceIngestPipeline == null
&& dataSourceIngestPipelines.isEmpty()
&& initialFileIngestPipeline == null
&& fileIngestPipelines.isEmpty());
}
synchronized ProgressHandle getDataSourceTaskProgressBar() {
return this.dataSourceTaskProgress;
}
synchronized void updateFileTasksProgressBar(String currentFileName) {
int newTotalEnqueuedFiles = fileScheduler.getFilesEnqueuedEst();
if (newTotalEnqueuedFiles > totalEnqueuedFiles) {
totalEnqueuedFiles = newTotalEnqueuedFiles + 1;
fileTasksProgress.switchToIndeterminate();
fileTasksProgress.switchToDeterminate(totalEnqueuedFiles);
}
if (processedFiles < totalEnqueuedFiles) {
++processedFiles;
}
fileTasksProgress.progress(currentFileName, processedFiles);
}
synchronized void cancel() {
if (initialDataSourceIngestPipeline != null) {
initialDataSourceIngestPipeline.shutDown(true);
initialDataSourceIngestPipeline = null;
}
if (initialFileIngestPipeline != null) {
initialFileIngestPipeline.shutDown(true);
initialFileIngestPipeline = null;
}
cancelled = true;
}
boolean isCancelled() {
return cancelled;
}
void cancel() {
cancelled = true;
fileTasksProgress.finish();
dataSourceTasksProgress.finish();
IngestManager.getInstance().fireIngestJobCancelled(id);
}
}
@@ -41,14 +41,14 @@ import org.sleuthkit.datamodel.Content;
* for a particular context and for launching ingest jobs that process one or
* more data sources using the ingest job configuration.
*/
public final class IngestJobLauncher {
public final class IngestJobConfigurator {
private static final String ENABLED_INGEST_MODULES_KEY = "Enabled_Ingest_Modules"; //NON-NLS
private static final String DISABLED_INGEST_MODULES_KEY = "Disabled_Ingest_Modules"; //NON-NLS
private static final String PARSE_UNALLOC_SPACE_KEY = "Process_Unallocated_Space"; //NON-NLS
private static final String MODULE_SETTINGS_FOLDER_PATH = new StringBuilder(PlatformUtil.getUserConfigDirectory()).append(File.separator).append("IngestModuleSettings").toString(); //NON-NLS
private static final String MODULE_SETTINGS_FILE_EXT = ".settings"; //NON-NLS
private static final Logger logger = Logger.getLogger(IngestJobLauncher.class.getName());
private static final Logger logger = Logger.getLogger(IngestJobConfigurator.class.getName());
private final String launcherContext;
private String moduleSettingsFolderForContext = null;
private final List<String> warnings = new ArrayList<>();
@@ -61,7 +61,7 @@ public final class IngestJobLauncher {
*
* @param launcherContext The context identifier.
*/
public IngestJobLauncher(String launcherContext) {
public IngestJobConfigurator(String launcherContext) {
this.launcherContext = launcherContext;
createModuleSettingsFolderForContext();
@@ -60,7 +60,7 @@ public final class IngestJobContext {
*/
public void addFiles(List<AbstractFile> files) {
for (AbstractFile file : files) {
IngestManager.getInstance().addFileToIngestJob(ingestJob.getId(), file);
IngestScheduler.getInstance().addFileToIngestJob(ingestJob, file);
}
}
}
@@ -20,88 +20,169 @@ package org.sleuthkit.autopsy.ingest;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CancellationException;
import java.util.concurrent.Callable;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.atomic.AtomicLong;
import java.util.logging.Level;
import java.util.prefs.PreferenceChangeEvent;
import java.util.prefs.PreferenceChangeListener;
import org.openide.util.NbBundle;
import org.sleuthkit.autopsy.coreutils.Logger;
import org.netbeans.api.progress.ProgressHandle;
import org.netbeans.api.progress.ProgressHandleFactory;
import org.openide.util.Cancellable;
import org.openide.util.NbPreferences;
import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
import org.sleuthkit.datamodel.AbstractFile;
import org.sleuthkit.datamodel.Content;
import java.util.prefs.Preferences;
import javax.swing.JOptionPane;
import javax.swing.SwingWorker;
import org.sleuthkit.autopsy.ingest.IngestScheduler.FileIngestScheduler.FileIngestTask;
import org.sleuthkit.autopsy.core.UserPreferences;
/**
* Manages the execution of ingest jobs.
*/
public class IngestManager {
private static final String NUMBER_OF_FILE_INGEST_THREADS_KEY = "NumberOfFileingestThreads"; //NON-NLS
private static final int MAX_NUMBER_OF_DATA_SOURCE_INGEST_THREADS = 1;
private static final int MIN_NUMBER_OF_FILE_INGEST_THREADS = 1;
private static final int MAX_NUMBER_OF_FILE_INGEST_THREADS = 4;
private static final int MAX_NUMBER_OF_FILE_INGEST_THREADS = 16;
private static final int DEFAULT_NUMBER_OF_FILE_INGEST_THREADS = 2;
private static final Logger logger = Logger.getLogger(IngestManager.class.getName());
private static final PropertyChangeSupport pcs = new PropertyChangeSupport(IngestManager.class);
private static final Preferences userPreferences = NbPreferences.forModule(IngestManager.class);
private static final IngestManager instance = new IngestManager();
private final PropertyChangeSupport ingestJobEventPublisher = new PropertyChangeSupport(IngestManager.class);
private final PropertyChangeSupport ingestModuleEventPublisher = new PropertyChangeSupport(IngestManager.class);
private final IngestScheduler scheduler = IngestScheduler.getInstance();
private final IngestMonitor ingestMonitor = new IngestMonitor();
private final ExecutorService startIngestJobsExecutor = Executors.newSingleThreadExecutor();
private final ExecutorService dataSourceIngestTasksExecutor = Executors.newSingleThreadExecutor();
private final ExecutorService fileIngestTasksExecutor = Executors.newFixedThreadPool(MAX_NUMBER_OF_FILE_INGEST_THREADS);
private final ExecutorService fireEventTasksExecutor = Executors.newSingleThreadExecutor();
private final ConcurrentHashMap<Long, IngestJob> ingestJobs = new ConcurrentHashMap<>(1, 0.9f, 4); // Maps job ids to jobs.
private final ConcurrentHashMap<Long, Future<?>> ingestTasks = new ConcurrentHashMap<>(); // Maps task ids to task cancellation handles. Guarded by this.
private final AtomicLong ingestJobId = new AtomicLong(0L);
private final AtomicLong ingestTaskId = new AtomicLong(0L);
private final ExecutorService startIngestJobsThreadPool = Executors.newSingleThreadExecutor();
private final ExecutorService dataSourceIngestThreadPool = Executors.newSingleThreadExecutor();
private final ExecutorService fileIngestThreadPool = Executors.newFixedThreadPool(MAX_NUMBER_OF_FILE_INGEST_THREADS);
private final ExecutorService fireIngestEventsThreadPool = Executors.newSingleThreadExecutor();
private final AtomicLong nextThreadId = new AtomicLong(0L);
private final ConcurrentHashMap<Long, Future<Void>> startIngestJobThreads = new ConcurrentHashMap<>(); // Maps thread ids to cancellation handles.
private final ConcurrentHashMap<Long, Future<?>> dataSourceIngestThreads = new ConcurrentHashMap<>(); // Maps thread ids to cancellation handles.
private final ConcurrentHashMap<Long, Future<?>> fileIngestThreads = new ConcurrentHashMap<>(); // Maps thread ids to cancellation handles.
private volatile IngestMessageTopComponent ingestMessageBox;
/**
* Gets the IngestManager singleton, creating it if necessary.
* Gets the ingest manager.
*
* @returns The IngestManager singleton.
* @returns A singleton IngestManager object.
*/
public static IngestManager getInstance() {
return instance;
}
/**
* Starts the ingest monitor and the data source ingest and file ingest
* threads.
*/
private IngestManager() {
startDataSourceIngestThread();
int numberOfFileIngestThreads = UserPreferences.numberOfFileIngestThreads();
if ((numberOfFileIngestThreads < MIN_NUMBER_OF_FILE_INGEST_THREADS) || (numberOfFileIngestThreads > MAX_NUMBER_OF_FILE_INGEST_THREADS)) {
numberOfFileIngestThreads = DEFAULT_NUMBER_OF_FILE_INGEST_THREADS;
UserPreferences.setNumberOfFileIngestThreads(numberOfFileIngestThreads);
}
for (int i = 0; i < numberOfFileIngestThreads; ++i) {
startFileIngestThread();
}
UserPreferences.addChangeListener(new PreferenceChangeListener() {
@Override
public void preferenceChange(PreferenceChangeEvent evt) {
if (evt.getKey().equals(UserPreferences.NUMBER_OF_FILE_INGEST_THREADS)) {
setNumberOfFileIngestThreads();
}
}
});
}
/**
* Signals to the ingest manager that it can go find the top component for
* the ingest messages in box. Called by the custom installer for this
* package once the window system is initialized.
* Signals to the ingest manager that it can go about finding the top
* component for the ingest messages in box. Called by the custom installer
* for this package once the window system is initialized.
*/
void initIngestMessageInbox() {
if (this.ingestMessageBox == null) {
this.ingestMessageBox = IngestMessageTopComponent.findInstance();
if (ingestMessageBox == null) {
ingestMessageBox = IngestMessageTopComponent.findInstance();
}
}
public synchronized static int getNumberOfFileIngestThreads() {
return userPreferences.getInt(NUMBER_OF_FILE_INGEST_THREADS_KEY, DEFAULT_NUMBER_OF_FILE_INGEST_THREADS);
/**
* Gets the maximum number of data source ingest threads the ingest manager
* will use.
*/
public static int getMaxNumberOfDataSourceIngestThreads() {
return MAX_NUMBER_OF_DATA_SOURCE_INGEST_THREADS;
}
public synchronized static void setNumberOfFileIngestThreads(int numberOfThreads) {
if (numberOfThreads < MIN_NUMBER_OF_FILE_INGEST_THREADS
|| numberOfThreads > MAX_NUMBER_OF_FILE_INGEST_THREADS) {
/**
* Gets the maximum number of file ingest threads the ingest manager will
* use.
*/
public static int getMaxNumberOfFileIngestThreads() {
return MAX_NUMBER_OF_FILE_INGEST_THREADS;
}
/**
* Changes the number of file ingest threads the ingest manager will use to
* no more than MAX_NUMBER_OF_FILE_INGEST_THREADS and no less than
* MIN_NUMBER_OF_FILE_INGEST_THREADS. Out of range requests are converted to
* requests for DEFAULT_NUMBER_OF_FILE_INGEST_THREADS.
*
* @param numberOfThreads The desired number of file ingest threads.
*/
public synchronized static void setNumberOfFileIngestThreads() {
int numberOfThreads = UserPreferences.numberOfFileIngestThreads();
if ((numberOfThreads < MIN_NUMBER_OF_FILE_INGEST_THREADS) || (numberOfThreads > MAX_NUMBER_OF_FILE_INGEST_THREADS)) {
numberOfThreads = DEFAULT_NUMBER_OF_FILE_INGEST_THREADS;
UserPreferences.setNumberOfFileIngestThreads(numberOfThreads);
}
if (instance.fileIngestThreads.size() != numberOfThreads) {
if (instance.fileIngestThreads.size() > numberOfThreads) {
Long[] threadIds = instance.fileIngestThreads.keySet().toArray(new Long[instance.fileIngestThreads.size()]);
int numberOfThreadsToCancel = instance.fileIngestThreads.size() - numberOfThreads;
for (int i = 0; i < numberOfThreadsToCancel; ++i) {
instance.cancelFileIngestThread(threadIds[i]);
}
} else if (instance.fileIngestThreads.size() < numberOfThreads) {
int numberOfThreadsToAdd = numberOfThreads - instance.fileIngestThreads.size();
for (int i = 0; i < numberOfThreadsToAdd; ++i) {
instance.startFileIngestThread();
}
}
}
}
userPreferences.putInt(NUMBER_OF_FILE_INGEST_THREADS_KEY, numberOfThreads);
/**
* Submits a DataSourceIngestThread Runnable to the data source ingest
* thread pool.
*/
private void startDataSourceIngestThread() {
long threadId = nextThreadId.incrementAndGet();
Future<?> handle = dataSourceIngestThreadPool.submit(new ExecuteIngestTasksThread(scheduler.getDataSourceIngestTaskQueue()));
dataSourceIngestThreads.put(threadId, handle);
}
/**
* Submits a DataSourceIngestThread Runnable to the data source ingest
* thread pool.
*/
private void startFileIngestThread() {
long threadId = nextThreadId.incrementAndGet();
Future<?> handle = fileIngestThreadPool.submit(new ExecuteIngestTasksThread(scheduler.getFileIngestTaskQueue()));
fileIngestThreads.put(threadId, handle);
}
/**
* Cancels a DataSourceIngestThread Runnable in the file ingest thread pool.
*/
private void cancelFileIngestThread(long threadId) {
Future<?> handle = fileIngestThreads.remove(threadId);
handle.cancel(true);
}
synchronized void startIngestJobs(final List<Content> dataSources, final List<IngestModuleTemplate> moduleTemplates, boolean processUnallocatedSpace) {
@@ -109,9 +190,9 @@ public class IngestManager {
ingestMessageBox.clearMessages();
}
long taskId = ingestTaskId.incrementAndGet();
Future<?> task = startIngestJobsExecutor.submit(new StartIngestJobsTask(taskId, dataSources, moduleTemplates, processUnallocatedSpace));
ingestTasks.put(taskId, task);
long taskId = nextThreadId.incrementAndGet();
Future<Void> task = startIngestJobsThreadPool.submit(new StartIngestJobsThread(taskId, dataSources, moduleTemplates, processUnallocatedSpace));
startIngestJobThreads.put(taskId, task);
if (ingestMessageBox != null) {
ingestMessageBox.restoreMessages();
@@ -121,21 +202,31 @@ public class IngestManager {
/**
* Test if any ingest jobs are in progress.
*
* @return True if any ingest jobs are in progress, false otherwise
* @return True if any ingest jobs are in progress, false otherwise.
*/
public boolean isIngestRunning() {
return (ingestJobs.isEmpty() == false);
return scheduler.ingestJobsAreRunning();
}
void addFileToIngestJob(long ingestJobId, AbstractFile file) {
IngestJob job = ingestJobs.get(ingestJobId);
if (job != null) {
scheduler.getFileIngestScheduler().queueFile(job, file);
public void cancelAllIngestJobs() {
// Stop creating new ingest jobs.
for (Future<Void> handle : startIngestJobThreads.values()) {
handle.cancel(true);
try {
// Blocks until the job starting thread responds. The thread
// removes itself from this collection, which does not disrupt
// this loop since the collection is a ConcurrentHashMap.
handle.get();
} catch (InterruptedException | ExecutionException ex) {
// This should never happen, something is awry, but everything
// should be o.k. anyway.
logger.log(Level.SEVERE, "Unexpected thread interrupt", ex);
}
}
}
void cancelIngestJobs() {
new IngestCancellationWorker().execute();
// Cancel all the jobs already created. This will make the the ingest
// threads flush out any lingering ingest tasks without processing them.
scheduler.cancelAllIngestJobs();
}
/**
@@ -144,20 +235,21 @@ public class IngestManager {
public enum IngestEvent {
/**
* Property change event fired when an ingest job is started. The ingest
* job id is in old value field of the PropertyChangeEvent object.
* Property change event fired when an ingest job is started. The old
* value of the PropertyChangeEvent object is set to the ingest job id,
* and the new value is set to null.
*/
INGEST_JOB_STARTED,
/**
* Property change event fired when an ingest job is completed. The
* ingest job id is in old value field of the PropertyChangeEvent
* object.
* Property change event fired when an ingest job is completed. The old
* value of the PropertyChangeEvent object is set to the ingest job id,
* and the new value is set to null.
*/
INGEST_JOB_COMPLETED,
/**
* Property change event fired when an ingest job is canceled. The
* ingest job id is in old value field of the PropertyChangeEvent
* object.
* Property change event fired when an ingest job is canceled. The old
* value of the PropertyChangeEvent object is set to the ingest job id,
* and the new value is set to null.
*/
INGEST_JOB_CANCELLED,
/**
@@ -182,79 +274,124 @@ public class IngestManager {
};
/**
* Add property change listener to listen to ingest events.
* Add an ingest job event property change listener.
*
* @param listener PropertyChangeListener to register
* @param listener The PropertyChangeListener to register.
*/
public void addIngestJobEventListener(final PropertyChangeListener listener) {
ingestJobEventPublisher.addPropertyChangeListener(listener);
}
/**
* Remove an ingest job event property change listener.
*
* @param listener The PropertyChangeListener to unregister.
*/
public void removeIngestJobEventListener(final PropertyChangeListener listener) {
ingestJobEventPublisher.removePropertyChangeListener(listener);
}
/**
* Add an ingest module event property change listener.
*
* @param listener The PropertyChangeListener to register.
*/
public void addIngestModuleEventListener(final PropertyChangeListener listener) {
ingestModuleEventPublisher.addPropertyChangeListener(listener);
}
/**
* Remove an ingest module event property change listener.
*
* @param listener The PropertyChangeListener to unregister.
*/
public void removeIngestModuleEventListener(final PropertyChangeListener listener) {
ingestModuleEventPublisher.removePropertyChangeListener(listener);
}
/**
* Add an ingest module event property change listener.
*
* @deprecated
* @param listener The PropertyChangeListener to register.
*/
public static void addPropertyChangeListener(final PropertyChangeListener listener) {
pcs.addPropertyChangeListener(listener);
instance.ingestJobEventPublisher.addPropertyChangeListener(listener);
instance.ingestModuleEventPublisher.addPropertyChangeListener(listener);
}
/**
* Remove an ingest module event property change listener.
*
* @deprecated
* @param listener The PropertyChangeListener to unregister.
*/
public static void removePropertyChangeListener(final PropertyChangeListener listener) {
pcs.removePropertyChangeListener(listener);
}
static void fireIngestJobEvent(String eventType, long jobId) {
try {
pcs.firePropertyChange(eventType, jobId, null);
} catch (Exception e) {
logger.log(Level.SEVERE, "Ingest manager listener threw exception", e); //NON-NLS
MessageNotifyUtil.Notify.show(NbBundle.getMessage(IngestManager.class, "IngestManager.moduleErr"),
NbBundle.getMessage(IngestManager.class, "IngestManager.moduleErr.errListenToUpdates.msg"),
MessageNotifyUtil.MessageType.ERROR);
}
instance.ingestJobEventPublisher.removePropertyChangeListener(listener);
instance.ingestModuleEventPublisher.removePropertyChangeListener(listener);
}
/**
* Fire event when file is done with a pipeline run
* Fire an ingest event signifying an ingest job started.
*
* @param fileId ID of file that is done
* @param ingestJobId The ingest job id.
*/
static void fireFileIngestDone(long fileId) {
try {
pcs.firePropertyChange(IngestEvent.FILE_DONE.toString(), fileId, null);
} catch (Exception e) {
logger.log(Level.SEVERE, "Ingest manager listener threw exception", e); //NON-NLS
MessageNotifyUtil.Notify.show(NbBundle.getMessage(IngestManager.class, "IngestManager.moduleErr"),
NbBundle.getMessage(IngestManager.class, "IngestManager.moduleErr.errListenToUpdates.msg"),
MessageNotifyUtil.MessageType.ERROR);
}
void fireIngestJobStarted(long ingestJobId) {
fireIngestEventsThreadPool.submit(new FireIngestEventThread(ingestJobEventPublisher, IngestEvent.INGEST_JOB_STARTED, ingestJobId, null));
}
/**
* Fire event for ModuleDataEvent (when modules post data to blackboard,
* etc.)
* Fire an ingest event signifying an ingest job finished.
*
* @param moduleDataEvent
* @param ingestJobId The ingest job id.
*/
static void fireModuleDataEvent(ModuleDataEvent moduleDataEvent) {
try {
pcs.firePropertyChange(IngestEvent.DATA.toString(), moduleDataEvent, null);
} catch (Exception e) {
logger.log(Level.SEVERE, "Ingest manager listener threw exception", e); //NON-NLS
MessageNotifyUtil.Notify.show(NbBundle.getMessage(IngestManager.class, "IngestManager.moduleErr"),
NbBundle.getMessage(IngestManager.class, "IngestManager.moduleErr.errListenToUpdates.msg"),
MessageNotifyUtil.MessageType.ERROR);
}
void fireIngestJobCompleted(long ingestJobId) {
fireIngestEventsThreadPool.submit(new FireIngestEventThread(ingestJobEventPublisher, IngestEvent.INGEST_JOB_COMPLETED, ingestJobId, null));
}
/**
* Fire event for ModuleContentChanged (when modules create new content that
* needs to be analyzed)
* Fire an ingest event signifying an ingest job was canceled.
*
* @param moduleContentEvent
* @param ingestJobId The ingest job id.
*/
static void fireModuleContentEvent(ModuleContentEvent moduleContentEvent) {
try {
pcs.firePropertyChange(IngestEvent.CONTENT_CHANGED.toString(), moduleContentEvent, null);
} catch (Exception e) {
logger.log(Level.SEVERE, "Ingest manager listener threw exception", e); //NON-NLS
MessageNotifyUtil.Notify.show(NbBundle.getMessage(IngestManager.class, "IngestManager.moduleErr"),
NbBundle.getMessage(IngestManager.class, "IngestManager.moduleErr.errListenToUpdates.msg"),
MessageNotifyUtil.MessageType.ERROR);
}
void fireIngestJobCancelled(long ingestJobId) {
fireIngestEventsThreadPool.submit(new FireIngestEventThread(ingestJobEventPublisher, IngestEvent.INGEST_JOB_CANCELLED, ingestJobId, null));
}
/**
* Fire an ingest event signifying the ingest of a file is completed.
*
* @param fileId The object id of file.
*/
void fireFileIngestDone(long fileId) {
fireIngestEventsThreadPool.submit(new FireIngestEventThread(ingestModuleEventPublisher, IngestEvent.FILE_DONE, fileId, null));
}
/**
* Fire an event signifying a blackboard post by an ingest module.
*
* @param moduleDataEvent A ModuleDataEvent with the details of the posting.
*/
void fireIngestModuleDataEvent(ModuleDataEvent moduleDataEvent) {
fireIngestEventsThreadPool.submit(new FireIngestEventThread(ingestModuleEventPublisher, IngestEvent.DATA, moduleDataEvent, null));
}
/**
* Fire an event signifying discovery of additional content by an ingest
* module.
*
* @param moduleDataEvent A ModuleContentEvent with the details of the new
* content.
*/
void fireIngestModuleContentEvent(ModuleContentEvent moduleContentEvent) {
fireIngestEventsThreadPool.submit(new FireIngestEventThread(ingestModuleEventPublisher, IngestEvent.CONTENT_CHANGED, moduleContentEvent, null));
}
/**
* Post a message to the ingest messages in box.
*
* @param message The message to be posted.
*/
void postIngestMessage(IngestMessage message) {
if (ingestMessageBox != null) {
ingestMessageBox.displayMessage(message);
@@ -262,11 +399,10 @@ public class IngestManager {
}
/**
* Get free disk space of a drive where ingest data are written to That
* drive is being monitored by IngestMonitor thread when ingest is running.
* Use this method to get amount of free disk space anytime.
* Get the free disk space of the drive where to which ingest data is being
* written, as reported by the ingest monitor.
*
* @return amount of disk space, -1 if unknown
* @return Free disk space, -1 if unknown
*/
long getFreeDiskSpace() {
if (ingestMonitor != null) {
@@ -276,40 +412,26 @@ public class IngestManager {
}
}
private void reportRunIngestModulesTaskDone(long taskId) {
ingestTasks.remove(taskId);
/**
* Creates ingest jobs.
*/
private class StartIngestJobsThread implements Callable<Void> {
List<Long> completedJobs = new ArrayList<>();
for (IngestJob job : ingestJobs.values()) {
job.releaseIngestPipelinesForThread(taskId);
if (job.areIngestPipelinesShutDown() == true) {
completedJobs.add(job.getId());
}
}
for (Long jobId : completedJobs) {
IngestJob job = ingestJobs.remove(jobId);
fireEventTasksExecutor.submit(new FireIngestJobEventTask(jobId, job.isCancelled() ? IngestEvent.INGEST_JOB_CANCELLED : IngestEvent.INGEST_JOB_COMPLETED));
}
}
private class StartIngestJobsTask implements Runnable {
private final long id;
private final long threadId;
private final List<Content> dataSources;
private final List<IngestModuleTemplate> moduleTemplates;
private final boolean processUnallocatedSpace;
private ProgressHandle progress;
StartIngestJobsTask(long taskId, List<Content> dataSources, List<IngestModuleTemplate> moduleTemplates, boolean processUnallocatedSpace) {
this.id = taskId;
StartIngestJobsThread(long threadId, List<Content> dataSources, List<IngestModuleTemplate> moduleTemplates, boolean processUnallocatedSpace) {
this.threadId = threadId;
this.dataSources = dataSources;
this.moduleTemplates = moduleTemplates;
this.processUnallocatedSpace = processUnallocatedSpace;
}
@Override
public void run() {
public Void call() {
try {
final String displayName = NbBundle.getMessage(this.getClass(),
"IngestManager.StartIngestJobsTask.run.displayName");
@@ -321,33 +443,29 @@ public class IngestManager {
"IngestManager.StartIngestJobsTask.run.cancelling",
displayName));
}
IngestManager.getInstance().cancelIngestJobs();
cancelFileIngestThread(threadId);
return true;
}
});
progress.start(dataSources.size());
progress.start(2 * dataSources.size());
int workUnitsCompleted = 0;
if (!ingestMonitor.isRunning()) {
ingestMonitor.start();
}
int dataSourceProcessed = 0;
for (Content dataSource : dataSources) {
if (Thread.currentThread().isInterrupted()) {
break;
}
// Create an ingest job.
IngestJob ingestJob = new IngestJob(IngestManager.this.ingestJobId.incrementAndGet(), dataSource, moduleTemplates, processUnallocatedSpace);
ingestJobs.put(ingestJob.getId(), ingestJob);
// Start at least one instance of each kind of ingest
// pipeline for this ingest job. This allows for an early out
// if the full ingest module lineup specified by the user
// cannot be started up.
List<IngestModuleError> errors = ingestJob.startUpIngestPipelines();
// Start an ingest job for the data source.
List<IngestModuleError> errors = scheduler.startIngestJob(dataSource, moduleTemplates, processUnallocatedSpace);
if (!errors.isEmpty()) {
// Report the error to the user.
// Report the errors to the user. They have already been logged.
StringBuilder moduleStartUpErrors = new StringBuilder();
for (IngestModuleError error : errors) {
String moduleName = error.getModuleDisplayName();
logger.log(Level.SEVERE, "The " + moduleName + " module failed to start up", error.getModuleError()); //NON-NLS
moduleStartUpErrors.append(moduleName);
moduleStartUpErrors.append(": ");
moduleStartUpErrors.append(error.getModuleError().getLocalizedMessage());
@@ -367,169 +485,75 @@ public class IngestManager {
JOptionPane.showMessageDialog(null, notifyMessage.toString(),
NbBundle.getMessage(this.getClass(),
"IngestManager.StartIngestJobsTask.run.startupErr.dlgTitle"), JOptionPane.ERROR_MESSAGE);
// Jettison the ingest job and move on to the next one.
ingestJob.cancel();
ingestJobs.remove(ingestJob.getId());
break;
}
// Queue the data source ingest tasks for the ingest job.
final String inputName = dataSource.getName();
progress.progress(
NbBundle.getMessage(this.getClass(), "IngestManager.StartIngestJobsTask.run.progress.msg1",
inputName), workUnitsCompleted);
scheduler.getDataSourceIngestScheduler().queueForIngest(ingestJob);
progress.progress(
NbBundle.getMessage(this.getClass(), "IngestManager.StartIngestJobsTask.run.progress.msg2",
inputName), ++workUnitsCompleted);
// Queue the file ingest tasks for the ingest job.
progress.progress(
NbBundle.getMessage(this.getClass(), "IngestManager.StartIngestJobsTask.run.progress.msg3",
inputName), workUnitsCompleted);
scheduler.getFileIngestScheduler().queueForIngest(ingestJob);
progress.progress(
NbBundle.getMessage(this.getClass(), "IngestManager.StartIngestJobsTask.run.progress.msg4",
inputName), ++workUnitsCompleted);
progress.progress(++dataSourceProcessed);
if (!Thread.currentThread().isInterrupted()) {
if (!ingestMonitor.isRunning()) {
ingestMonitor.start();
}
long taskId = ingestTaskId.incrementAndGet();
Future<?> task = dataSourceIngestTasksExecutor.submit(new RunDataSourceIngestModulesTask(taskId));
ingestTasks.put(taskId, task);
int numberOfFileTasksRequested = getNumberOfFileIngestThreads();
for (int i = 0; i < numberOfFileTasksRequested; ++i) {
taskId = ingestTaskId.incrementAndGet();
task = fileIngestTasksExecutor.submit(new RunFileSourceIngestModulesTask(taskId));
ingestTasks.put(taskId, task);
}
fireEventTasksExecutor.submit(new FireIngestJobEventTask(ingestJob.getId(), IngestEvent.INGEST_JOB_STARTED));
break;
}
}
} catch (Exception ex) {
String message = String.format("StartIngestJobsTask (id=%d) caught exception", id); //NON-NLS
logger.log(Level.SEVERE, message, ex);
MessageNotifyUtil.Message.error(
NbBundle.getMessage(this.getClass(), "IngestManager.StartIngestJobsTask.run.catchException.msg"));
} finally {
progress.finish();
ingestTasks.remove(id);
startIngestJobThreads.remove(threadId);
return null;
}
}
}
private class RunDataSourceIngestModulesTask implements Runnable {
/**
* A consumer for an ingest task queue.
*/
private class ExecuteIngestTasksThread implements Runnable {
private final long id;
private IngestTaskQueue tasks;
RunDataSourceIngestModulesTask(long taskId) {
id = taskId;
ExecuteIngestTasksThread(IngestTaskQueue tasks) {
this.tasks = tasks;
}
@Override
public void run() {
try {
IngestScheduler.DataSourceIngestScheduler scheduler = IngestScheduler.getInstance().getDataSourceIngestScheduler();
IngestJob job = scheduler.getNextTask();
while (job != null) {
if (Thread.currentThread().isInterrupted()) {
break;
}
job.getDataSourceIngestPipelineForThread(id).process();
job = scheduler.getNextTask();
while (true) {
try {
IngestTask task = tasks.getNextTask(); // Blocks.
task.execute();
scheduler.ingestTaskIsCompleted(task);
} catch (InterruptedException ex) {
break;
}
if (Thread.currentThread().isInterrupted()) {
break;
}
} catch (Exception ex) {
String message = String.format("RunDataSourceIngestModulesTask (id=%d) caught exception", id); //NON-NLS
logger.log(Level.SEVERE, message, ex);
} finally {
reportRunIngestModulesTaskDone(id);
}
}
}
private class RunFileSourceIngestModulesTask implements Runnable {
/**
* Fires ingest events to ingest manager property change listeners.
*/
private static class FireIngestEventThread implements Runnable {
private final long id;
RunFileSourceIngestModulesTask(long taskId) {
id = taskId;
}
@Override
public void run() {
try {
IngestScheduler.FileIngestScheduler fileScheduler = IngestScheduler.getInstance().getFileIngestScheduler();
FileIngestTask task = fileScheduler.getNextTask();
while (task != null) {
if (Thread.currentThread().isInterrupted()) {
break;
}
IngestJob job = task.getJob();
job.updateFileTasksProgressBar(task.getFile().getName());
job.getFileIngestPipelineForThread(id).process(task.getFile());
task = fileScheduler.getNextTask();
}
} catch (Exception ex) {
String message = String.format("RunFileSourceIngestModulesTask (id=%d) caught exception", id); //NON-NLS
logger.log(Level.SEVERE, message, ex);
} finally {
reportRunIngestModulesTaskDone(id);
}
}
}
private class FireIngestJobEventTask implements Runnable {
private final long ingestJobId;
private final PropertyChangeSupport publisher;
private final IngestEvent event;
private final Object oldValue;
private final Object newValue;
FireIngestJobEventTask(long ingestJobId, IngestEvent event) {
this.ingestJobId = ingestJobId;
FireIngestEventThread(PropertyChangeSupport publisher, IngestEvent event, Object oldValue, Object newValue) {
this.publisher = publisher;
this.event = event;
this.oldValue = oldValue;
this.newValue = newValue;
}
@Override
public void run() {
fireIngestJobEvent(event.toString(), ingestJobId);
}
}
private class IngestCancellationWorker extends SwingWorker<Void, Void> {
@Override
protected Void doInBackground() throws Exception {
// First mark all of the ingest jobs as cancelled. This way the
// ingest modules will know they are being shut down due to
// cancellation when the cancelled run ingest module tasks release
// their pipelines.
for (IngestJob job : ingestJobs.values()) {
job.cancel();
}
for (Future<?> task : ingestTasks.values()) {
task.cancel(true);
}
// Jettision the remaining data source and file ingest tasks.
scheduler.getFileIngestScheduler().emptyQueues();
scheduler.getDataSourceIngestScheduler().emptyQueues();
return null;
}
@Override
protected void done() {
try {
super.get();
} catch (CancellationException | InterruptedException ex) {
} catch (Exception ex) {
logger.log(Level.SEVERE, "Error while cancelling ingest jobs", ex); //NON-NLS
publisher.firePropertyChange(event.toString(), oldValue, newValue);
} catch (Exception e) {
logger.log(Level.SEVERE, "Ingest manager listener threw exception", e); //NON-NLS
MessageNotifyUtil.Notify.show(NbBundle.getMessage(IngestManager.class, "IngestManager.moduleErr"),
NbBundle.getMessage(IngestManager.class, "IngestManager.moduleErr.errListenToUpdates.msg"),
MessageNotifyUtil.MessageType.ERROR);
}
}
}
@@ -224,7 +224,7 @@ import org.sleuthkit.datamodel.Content;
manager = IngestManager.getInstance();
}
try {
manager.cancelIngestJobs();
manager.cancelAllIngestJobs();
} finally {
//clear inbox
clearMessages();
@@ -44,7 +44,7 @@ final class IngestModuleFactoryLoader {
}
return instance;
}
synchronized List<IngestModuleFactory> getIngestModuleFactories() {
// Discover the ingest module factories, making sure that there are no
// duplicate module display names. The duplicates requirement could be
@@ -58,30 +58,31 @@ final class IngestModuleFactoryLoader {
Collection<? extends IngestModuleFactory> factories = Lookup.getDefault().lookupAll(IngestModuleFactory.class);
for (IngestModuleFactory factory : factories) {
logger.log(Level.INFO, "Found ingest module factory: name = {0}, version = {1}", new Object[]{factory.getModuleDisplayName(), factory.getModuleVersionNumber()}); //NON-NLS
moduleFactoriesByClass.put(factory.getClass().getCanonicalName(), factory);
moduleDisplayNames.add(factory.getModuleDisplayName());
if (!moduleDisplayNames.contains(factory.getModuleDisplayName())) {
moduleFactoriesByClass.put(factory.getClass().getCanonicalName(), factory);
moduleDisplayNames.add(factory.getModuleDisplayName());
} else {
// Not popping up a message box to keep this class UI-indepdent.
logger.log(Level.SEVERE, "Found duplicate ingest module display name, discarding ingest module factory (name = {0}", new Object[]{factory.getModuleDisplayName(), factory.getModuleVersionNumber()}); //NON-NLS
logger.log(Level.SEVERE, "Found duplicate ingest module display name (name = {0})", factory.getModuleDisplayName()); //NON-NLS
}
}
// Kick out the sample modules factory.
moduleFactoriesByClass.remove("org.sleuthkit.autopsy.examples.SampleIngestModuleFactory");
// Do the core ingest module ordering hack described above.
ArrayList<String> coreModuleOrdering = new ArrayList<String>() {{
add("org.sleuthkit.autopsy.recentactivity.RecentActivityExtracterModuleFactory");
add("org.sleuthkit.autopsy.ewfverify.EwfVerifierModuleFactory");
add("org.sleuthkit.autopsy.hashdatabase.HashLookupModuleFactory");
add("org.sleuthkit.autopsy.modules.filetypeid.FileTypeIdModuleFactory");
add("org.sleuthkit.autopsy.modules.sevenzip.ArchiveFileExtractorModuleFactory");
add("org.sleuthkit.autopsy.modules.exif.ExifParserModuleFactory");
add("org.sleuthkit.autopsy.keywordsearch.KeywordSearchModuleFactory");
add("org.sleuthkit.autopsy.thunderbirdparser.EmailParserModuleFactory");
add("org.sleuthkit.autopsy.modules.fileextmismatch.FileExtMismatchDetectorModuleFactory");
}};
ArrayList<String> coreModuleOrdering = new ArrayList<String>() {
{
add("org.sleuthkit.autopsy.recentactivity.RecentActivityExtracterModuleFactory");
add("org.sleuthkit.autopsy.ewfverify.EwfVerifierModuleFactory");
add("org.sleuthkit.autopsy.hashdatabase.HashLookupModuleFactory");
add("org.sleuthkit.autopsy.modules.filetypeid.FileTypeIdModuleFactory");
add("org.sleuthkit.autopsy.modules.sevenzip.ArchiveFileExtractorModuleFactory");
add("org.sleuthkit.autopsy.modules.exif.ExifParserModuleFactory");
add("org.sleuthkit.autopsy.keywordsearch.KeywordSearchModuleFactory");
add("org.sleuthkit.autopsy.thunderbirdparser.EmailParserModuleFactory");
add("org.sleuthkit.autopsy.modules.fileextmismatch.FileExtMismatchDetectorModuleFactory");
}
};
List<IngestModuleFactory> orderedModuleFactories = new ArrayList<>();
for (String className : coreModuleOrdering) {
IngestModuleFactory coreFactory = moduleFactoriesByClass.remove(className);
@@ -89,12 +90,12 @@ final class IngestModuleFactoryLoader {
orderedModuleFactories.add(coreFactory);
}
}
// Add in any non-core factories discovered. Order is not guaranteed!
for (IngestModuleFactory nonCoreFactory : moduleFactoriesByClass.values()) {
orderedModuleFactories.add(nonCoreFactory);
}
return orderedModuleFactories;
}
}
@@ -165,7 +165,7 @@ public final class IngestMonitor {
final String diskPath = root.getAbsolutePath();
MONITOR_LOGGER.log(Level.SEVERE, "Stopping ingest due to low disk space on disk {0}", diskPath); //NON-NLS
logger.log(Level.SEVERE, "Stopping ingest due to low disk space on disk {0}", diskPath); //NON-NLS
manager.cancelIngestJobs();
manager.cancelAllIngestJobs();
IngestServices.getInstance().postMessage(IngestMessage.createManagerErrorMessage(
NbBundle.getMessage(this.getClass(), "IngestMonitor.mgrErrMsg.lowDiskSpace.title", diskPath),
NbBundle.getMessage(this.getClass(), "IngestMonitor.mgrErrMsg.lowDiskSpace.msg", diskPath)));
@@ -89,7 +89,7 @@ final class IngestPipelinesConfiguration {
PlatformUtil.extractResourceToUserConfigDir(IngestPipelinesConfiguration.class, PIPELINES_CONFIG_FILE, overWrite);
String configFilePath = PlatformUtil.getUserConfigDirectory() + File.separator + PIPELINES_CONFIG_FILE;
Document doc = XMLUtil.loadDoc(IngestPipelinesConfiguration.class, configFilePath, PIPELINES_CONFIG_FILE_XSD);
Document doc = XMLUtil.loadDoc(IngestPipelinesConfiguration.class, configFilePath);
if (doc == null) {
return;
}
+375 -677
View File
File diff suppressed because it is too large Load Diff
@@ -95,7 +95,7 @@ public final class IngestServices {
* artifact data
*/
public void fireModuleDataEvent(ModuleDataEvent moduleDataEvent) {
IngestManager.fireModuleDataEvent(moduleDataEvent);
IngestManager.getInstance().fireIngestModuleDataEvent(moduleDataEvent);
}
/**
@@ -107,7 +107,7 @@ public final class IngestServices {
* changed
*/
public void fireModuleContentEvent(ModuleContentEvent moduleContentEvent) {
IngestManager.fireModuleContentEvent(moduleContentEvent);
IngestManager.getInstance().fireIngestModuleContentEvent(moduleContentEvent);
}
/**
+34
View File
@@ -0,0 +1,34 @@
/*
* 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.ingest;
abstract class IngestTask {
private final IngestJob job;
IngestTask(IngestJob job) {
this.job = job;
}
IngestJob getIngestJob() {
return job;
}
abstract void execute() throws InterruptedException;
}
+23
View File
@@ -0,0 +1,23 @@
/*
* 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.ingest;
interface IngestTaskQueue {
IngestTask getNextTask() throws InterruptedException;
}
@@ -45,11 +45,11 @@ public final class RunIngestModulesDialog extends JDialog {
private static final String TITLE = NbBundle.getMessage(RunIngestModulesDialog.class, "IngestDialog.title.text");
private static Dimension DIMENSIONS = new Dimension(500, 300);
private List<Content> dataSources = new ArrayList<>();
private IngestJobLauncher ingestJobLauncher;
private IngestJobConfigurator ingestJobLauncher;
public RunIngestModulesDialog(JFrame frame, String title, boolean modal) {
super(frame, title, modal);
ingestJobLauncher = new IngestJobLauncher(RunIngestModulesDialog.class.getCanonicalName());
ingestJobLauncher = new IngestJobConfigurator(RunIngestModulesDialog.class.getCanonicalName());
List<String> messages = ingestJobLauncher.getIngestJobConfigWarnings();
if (messages.isEmpty() == false) {
StringBuilder warning = new StringBuilder();
@@ -1,7 +1,7 @@
/*
* Autopsy Forensic Browser
*
* Copyright 2011 - 2013 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");
@@ -89,7 +89,7 @@ class FileExtMismatchXML {
try
{
final Document doc = XMLUtil.loadDoc(FileExtMismatchXML.class, filePath, XSDFILE);
final Document doc = XMLUtil.loadDoc(FileExtMismatchXML.class, filePath);
if (doc == null) {
return null;
}
@@ -961,7 +961,7 @@ public class Timeline extends CallableSystemAction implements Presenter.Toolbar,
//conversion to GMT
if (!ContentUtils.getDisplayInLocalTime()) {
if (!ContentUtils.shouldDisplayTimesInLocalTime()) {
calendar.setTimeZone(TimeZone.getTimeZone("GMT"));
}
else{
@@ -32,7 +32,7 @@ import org.openide.util.NbBundle;
import org.openide.util.Utilities;
import org.openide.util.Lookup;
import org.openide.util.actions.Presenter;
import org.sleuthkit.autopsy.ingest.IngestJobLauncher;
import org.sleuthkit.autopsy.ingest.IngestJobConfigurator;
import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.datamodel.AbstractFile;
import org.sleuthkit.datamodel.TskCoreException;
@@ -554,7 +554,7 @@ public class HashDbManager implements PropertyChangeListener {
boolean updatedSchema = false;
// Open the XML document that implements the configuration file.
final Document doc = XMLUtil.loadDoc(HashDbManager.class, configFilePath, XSD_FILE_NAME);
final Document doc = XMLUtil.loadDoc(HashDbManager.class, configFilePath);
if (doc == null) {
return false;
}
@@ -69,7 +69,7 @@ public final class HashLookupSettingsPanel extends IngestModuleGlobalSettingsPan
// Listen to the ingest modules to refresh the enabled/disabled state of
// the components in sync with file ingest.
IngestManager.addPropertyChangeListener(new PropertyChangeListener() {
IngestManager.getInstance().addIngestJobEventListener(new PropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent evt) {
if (isIngestJobEvent(evt)) {
@@ -44,12 +44,11 @@ class AbstractFileStringExtract implements AbstractFileExtract {
private static final int BOM_LEN = 0; //disabled prepending of BOM
private static final Charset INDEX_CHARSET = Server.DEFAULT_INDEXED_TEXT_CHARSET;
private static final SCRIPT DEFAULT_SCRIPT = SCRIPT.LATIN_2;
private final byte[] stringChunkBuf = new byte[(int) MAX_STRING_CHUNK_SIZE];
private KeywordSearchIngestModule module;
private AbstractFile sourceFile;
private int numChunks = 0;
private final List<SCRIPT> extractScripts = new ArrayList<SCRIPT>();
private Map<String, String> extractOptions = new HashMap<String, String>();
private final List<SCRIPT> extractScripts = new ArrayList<>();
private Map<String, String> extractOptions = new HashMap<>();
//disabled prepending of BOM
//static {
@@ -73,7 +72,7 @@ class AbstractFileStringExtract implements AbstractFileExtract {
@Override
public List<SCRIPT> getScripts() {
return new ArrayList<SCRIPT>(extractScripts);
return new ArrayList<>(extractScripts);
}
@Override
@@ -114,7 +113,7 @@ class AbstractFileStringExtract implements AbstractFileExtract {
return true;
}
InputStream stringStream = null;
InputStream stringStream;
//check which extract stream to use
if (extractScripts.size() == 1 && extractScripts.get(0).equals(SCRIPT.LATIN_1)) {
//optimal for english, english only
@@ -129,7 +128,8 @@ class AbstractFileStringExtract implements AbstractFileExtract {
success = true;
//break input stream into chunks
long readSize = 0;
final byte[] stringChunkBuf = new byte[(int) MAX_STRING_CHUNK_SIZE];
long readSize;
while ((readSize = stringStream.read(stringChunkBuf, BOM_LEN, (int) MAX_STRING_CHUNK_SIZE - BOM_LEN)) != -1) {
//FileOutputStream debug = new FileOutputStream("c:\\temp\\" + sourceFile.getName() + Integer.toString(this.numChunks+1));
//debug.write(stringChunkBuf, 0, (int)readSize);
@@ -126,7 +126,7 @@ class KeywordSearchEditListPanel extends javax.swing.JPanel implements ListSelec
setButtonStates();
IngestManager.addPropertyChangeListener(new PropertyChangeListener() {
IngestManager.getInstance().addIngestJobEventListener(new PropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent evt) {
String changed = evt.getPropertyName();
@@ -118,7 +118,7 @@ class KeywordSearchListsViewerPanel extends AbstractKeywordSearchPerformer {
ingestRunning = IngestManager.getInstance().isIngestRunning();
updateComponents();
IngestManager.addPropertyChangeListener(new PropertyChangeListener() {
IngestManager.getInstance().addIngestJobEventListener(new PropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent evt) {
String changed = evt.getPropertyName();
@@ -147,7 +147,7 @@ final class KeywordSearchListsXML extends KeywordSearchListsAbstract {
*/
@Override
public boolean load() {
final Document doc = XMLUtil.loadDoc(KeywordSearchListsXML.class, filePath, XSDFILE);
final Document doc = XMLUtil.loadDoc(KeywordSearchListsXML.class, filePath);
if (doc == null) {
return false;
}
+12 -11
View File
@@ -819,7 +819,7 @@ class TestResultsDiffer(object):
logging.critical(traceback.format_exc())
return False
def _compare_report_files(a_path, b_path):
def _compare_report_files(gold_path, output_path):
"""Compares the two specified report html files.
Args:
@@ -831,17 +831,18 @@ class TestResultsDiffer(object):
unordered list in the html report files, or (0, 0) if the
lenghts are the same.
"""
a_file = open(a_path)
b_file = open(b_path)
a = a_file.read()
b = b_file.read()
a = a[a.find("<ul>"):]
b = b[b.find("<ul>"):]
gold_file = open(gold_path)
output_file = open(output_path)
goldHtml = gold_file.read()
outputHtml = output_file.read()
goldHtml = goldHtml[goldHtml.find("<ul>"):]
outputHtml = outputHtml[outputHtml.find("<ul>"):]
a_list = TestResultsDiffer._split(a, 50)
b_list = TestResultsDiffer._split(b, 50)
if not len(a_list) == len(b_list):
ex = (len(a_list), len(b_list))
gold_list = TestResultsDiffer._split(goldHtml, 50)
output_list = TestResultsDiffer._split(outputHtml, 50)
if not len(gold_list) == len(output_list):
ex = (len(gold_list), len(output_list))
print("846 ex is " + str(ex))
return ex
else:
return (0, 0)
Regular → Executable
+38 -11
View File
@@ -43,8 +43,8 @@ class TskDbDiff(object):
self.output_dir = output_dir
self.gold_bb_dump = gold_bb_dump
self.gold_dump = gold_dump
self._generate_gold_dump = gold_dump is None
self._generate_gold_bb_dump = gold_bb_dump is None
self._generate_gold_dump = True
self._generate_gold_bb_dump = True
self._bb_dump_diff = ""
self._dump_diff = ""
self._bb_dump = ""
@@ -244,6 +244,10 @@ class TskDbDiff(object):
for line in conn.iterdump():
line = replace_id(line, id_path_table)
db_log.write('%s\n' % line)
# Now sort the file
srtcmdlst = ["sort", dump_file, "-o", dump_file]
subprocess.call(srtcmdlst)
conn.close()
# cleanup the backup
@@ -275,15 +279,38 @@ def replace_id(line, table):
line: a String, the line to remove the object id from.
table: a map from object ids to file paths.
"""
index = line.find('INSERT INTO "tsk_files"')
if (index != -1):
# take the portion of the string between the open parenthesis and the comma (ie, the object id)
obj_id = line[line.find('(') + 1 : line.find(',')]
# takes everything from the beginning of the string up to the opening
# parenthesis, the path associated with the object id, and everything after
# the first comma, and concactenate it
newLine = (line[:line.find('('):] + '(' + table[int(obj_id)] + line[line.find(','):])
files_index = line.find('INSERT INTO "tsk_files"')
path_index = line.find('INSERT INTO "tsk_files_path"')
object_index = line.find('INSERT INTO "tsk_objects"')
parens = line[line.find('(') + 1 : line.find(')')]
fields_list = parens.replace(" ", "").split(',')
if (files_index != -1):
obj_id = fields_list[0]
path = table[int(obj_id)]
newLine = ('INSERT INTO "tsk_files" VALUES(' + path + ', '.join(fields_list[1:]) + ');')
return newLine
elif (path_index != -1):
obj_id = fields_list[0]
path = table[int(obj_id)]
newLine = ('INSERT INTO "tsk_files_path" VALUES(' + path + ', '.join(fields_list[1:]) + ');')
return newLine
elif (object_index != -1):
obj_id = fields_list[0]
parent_id = fields_list[1]
try:
path = table[int(obj_id)]
parent_path = table[int(parent_id)]
newLine = ('INSERT INTO "tsk_objects" VALUES(' + path + ', ' + parent_path + ', '.join(fields_list[2:]) + ');')
return newLine
except Exception as e:
# objects table has things that aren't files. if lookup fails, don't replace anything.
return line
else:
return line
@@ -308,7 +335,7 @@ def main():
print("usage: tskdbdiff [OUPUT DB PATH] [GOLD DB PATH]")
sys.exit()
db_diff = TskDbDiff(output_db, gold_db, output_dir=".")
db_diff = TskDbDiff(output_db, gold_db, output_dir=".")
dump_passed, bb_dump_passed = db_diff.run_diff()
if dump_passed and bb_dump_passed: