diff --git a/.gitignore b/.gitignore index 24fd05a53f..feb9e958e7 100644 --- a/.gitignore +++ b/.gitignore @@ -36,7 +36,6 @@ !/Ingest/nbproject/project.properties /branding_spear /installer_spear -Bundle_*.properties */genfiles.properties genfiles.properties /branding/core/core.jar/org/netbeans/core/startup/Bundle.properties diff --git a/Core/src/org/sleuthkit/autopsy/actions/TagAction.java b/Core/src/org/sleuthkit/autopsy/actions/TagAction.java index 0d6e74efd3..376e52ce62 100755 --- a/Core/src/org/sleuthkit/autopsy/actions/TagAction.java +++ b/Core/src/org/sleuthkit/autopsy/actions/TagAction.java @@ -26,7 +26,7 @@ import org.sleuthkit.datamodel.BlackboardArtifact; /** * Abstract base class for Actions involving tags. */ -public abstract class TagAction extends AbstractAction { + abstract class TagAction extends AbstractAction { public TagAction(String menuText) { super(menuText); } diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/AddImageErrorsDialog.java b/Core/src/org/sleuthkit/autopsy/casemodule/AddImageErrorsDialog.java index 742cb1750c..e18bf56f14 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/AddImageErrorsDialog.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/AddImageErrorsDialog.java @@ -21,7 +21,7 @@ package org.sleuthkit.autopsy.casemodule; /** * Dialog to show add image error messages */ -public class AddImageErrorsDialog extends javax.swing.JDialog { + class AddImageErrorsDialog extends javax.swing.JDialog { /** * Creates new form AddImageErrorsDialog diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/AddImageTask.java b/Core/src/org/sleuthkit/autopsy/casemodule/AddImageTask.java index 9171154ab4..7cc3348ca9 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/AddImageTask.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/AddImageTask.java @@ -43,7 +43,7 @@ import org.sleuthkit.datamodel.TskException; * It updates the given ProgressMonitor as it works through adding the image, * and et the end, calls the specified Callback. */ -public class AddImageTask implements Runnable { + class AddImageTask implements Runnable { private Logger logger = Logger.getLogger(AddImageTask.class.getName()); diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardAddingProgressVisual.java b/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardAddingProgressVisual.java index a37b8cefe3..a7be36a1d7 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardAddingProgressVisual.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardAddingProgressVisual.java @@ -28,7 +28,7 @@ import org.openide.WizardDescriptor; * visual component to display progress bar and status updates while adding an * image in the wizard */ -public class AddImageWizardAddingProgressVisual extends javax.swing.JPanel { + class AddImageWizardAddingProgressVisual extends javax.swing.JPanel { private static final String ADDING_DATA_SOURCE_COMPLETE = "Adding Data Source - Complete"; private String errorLog = ""; diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardIngestConfigVisual.java b/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardIngestConfigVisual.java index d112b6e24f..07aebf2484 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardIngestConfigVisual.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardIngestConfigVisual.java @@ -27,7 +27,7 @@ import javax.swing.JPanel; * * */ -public class AddImageWizardIngestConfigVisual extends javax.swing.JPanel { + class AddImageWizardIngestConfigVisual extends javax.swing.JPanel { //could this be something more specific than JPanel? - jm private JPanel ingestPanel = null; diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/AddLocalFilesTask.java b/Core/src/org/sleuthkit/autopsy/casemodule/AddLocalFilesTask.java index 34b7a32089..0abf9bb75d 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/AddLocalFilesTask.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/AddLocalFilesTask.java @@ -40,7 +40,7 @@ import org.sleuthkit.datamodel.TskCoreException; * manager methods acquire the locks for each transaction when adding * logical files. */ -public class AddLocalFilesTask implements Runnable { + class AddLocalFilesTask implements Runnable { private Logger logger = Logger.getLogger(AddLocalFilesTask.class.getName()); diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/CaseActionException.java b/Core/src/org/sleuthkit/autopsy/casemodule/CaseActionException.java index 6b6cd55201..01bad4a628 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/CaseActionException.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/CaseActionException.java @@ -19,7 +19,8 @@ package org.sleuthkit.autopsy.casemodule; /** - * Exception thrown when case action (such as open, close, create) resulted in an error + * Exception thrown when case action (such as open, close, create) resulted in + * an error */ public class CaseActionException extends Exception { @@ -30,6 +31,4 @@ public class CaseActionException extends Exception { public CaseActionException(String message, Throwable cause) { super(message, cause); } - - } diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/CaseCloseAction.java b/Core/src/org/sleuthkit/autopsy/casemodule/CaseCloseAction.java index 1a3eacffb4..e99844ce66 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/CaseCloseAction.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/CaseCloseAction.java @@ -45,7 +45,7 @@ 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. */ -public final class CaseCloseAction extends CallableSystemAction implements Presenter.Toolbar{ + final class CaseCloseAction extends CallableSystemAction implements Presenter.Toolbar{ JButton toolbarButton = new JButton(); diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/CaseDeleteAction.java b/Core/src/org/sleuthkit/autopsy/casemodule/CaseDeleteAction.java index 93243c1a29..72ed22351b 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/CaseDeleteAction.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/CaseDeleteAction.java @@ -66,7 +66,7 @@ import org.openide.util.actions.CallableSystemAction; * The action to delete the current Case. This class should be disabled on * creation and it will be enabled on new case creation or case opened. */ -public final class CaseDeleteAction extends CallableSystemAction { + final class CaseDeleteAction extends CallableSystemAction { private JPanel caller; // for error handling diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/CaseNewActionInterface.java b/Core/src/org/sleuthkit/autopsy/casemodule/CaseNewActionInterface.java index a99db1aab2..1d84f6c61d 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/CaseNewActionInterface.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/CaseNewActionInterface.java @@ -25,6 +25,6 @@ import java.awt.event.ActionListener; /** * */ -public interface CaseNewActionInterface extends ActionListener { + interface CaseNewActionInterface extends ActionListener { } diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/CasePropertiesAction.java b/Core/src/org/sleuthkit/autopsy/casemodule/CasePropertiesAction.java index 0331635a9d..76ff941278 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/CasePropertiesAction.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/CasePropertiesAction.java @@ -40,7 +40,7 @@ import org.sleuthkit.autopsy.coreutils.Logger; * * @author jantonius */ -public final class CasePropertiesAction extends CallableSystemAction { + final class CasePropertiesAction extends CallableSystemAction { private static JDialog popUpWindow; diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/CueBannerPanel.java b/Core/src/org/sleuthkit/autopsy/casemodule/CueBannerPanel.java index 49c5b313a0..cd30342965 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/CueBannerPanel.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/CueBannerPanel.java @@ -33,7 +33,7 @@ import org.openide.util.Lookup; /** * */ -public class CueBannerPanel extends javax.swing.JPanel { + class CueBannerPanel extends javax.swing.JPanel { final private static String title = "Open Recent Case"; final private static JFrame frame = new JFrame(title); diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.java b/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.java index ba746b7595..efe949ef7f 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.java @@ -47,7 +47,7 @@ import org.sleuthkit.autopsy.coreutils.PlatformUtil; /** * ImageTypePanel for adding a local disk or partition such as PhysicalDrive0 or C:. */ -public class LocalDiskPanel extends JPanel { + class LocalDiskPanel extends JPanel { private static final Logger logger = Logger.getLogger(LocalDiskPanel.class.getName()); private static LocalDiskPanel instance; diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/LocalFilesPanel.java b/Core/src/org/sleuthkit/autopsy/casemodule/LocalFilesPanel.java index c9cff7b1d0..5966775be0 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/LocalFilesPanel.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/LocalFilesPanel.java @@ -30,7 +30,7 @@ import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessor; /** * Add input wizard subpanel for adding local files / dirs to the case */ -public class LocalFilesPanel extends JPanel { + class LocalFilesPanel extends JPanel { private PropertyChangeSupport pcs = null; private Set currentFiles = new TreeSet(); //keep currents in a set to disallow duplicates per add diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/MissingImageDialog.java b/Core/src/org/sleuthkit/autopsy/casemodule/MissingImageDialog.java index d54c52fc4b..d2d865aa0c 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/MissingImageDialog.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/MissingImageDialog.java @@ -39,7 +39,7 @@ import org.sleuthkit.datamodel.TskCoreException; -public class MissingImageDialog extends javax.swing.JDialog { + class MissingImageDialog extends javax.swing.JDialog { private static final Logger logger = Logger.getLogger(MissingImageDialog.class.getName()); long obj_id; SleuthkitCase db; diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/NewCaseVisualPanel2.java b/Core/src/org/sleuthkit/autopsy/casemodule/NewCaseVisualPanel2.java index 8859389aef..5232f17835 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/NewCaseVisualPanel2.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/NewCaseVisualPanel2.java @@ -28,7 +28,7 @@ package org.sleuthkit.autopsy.casemodule; * * @author dfickling */ -public class NewCaseVisualPanel2 extends javax.swing.JPanel { + class NewCaseVisualPanel2 extends javax.swing.JPanel { /** Creates new form NewCaseVisualPanel2 */ public NewCaseVisualPanel2() { diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/NewCaseWizardAction.java b/Core/src/org/sleuthkit/autopsy/casemodule/NewCaseWizardAction.java index b57632a603..63f4ad5c56 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/NewCaseWizardAction.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/NewCaseWizardAction.java @@ -38,7 +38,7 @@ import org.sleuthkit.autopsy.coreutils.Logger; /** * Action to open the New Case wizard. */ -public final class NewCaseWizardAction extends CallableSystemAction { + final class NewCaseWizardAction extends CallableSystemAction { private WizardDescriptor.Panel[] panels; diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/RecentCases.java b/Core/src/org/sleuthkit/autopsy/casemodule/RecentCases.java index 5b9c974253..670b83144e 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/RecentCases.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/RecentCases.java @@ -43,7 +43,7 @@ import org.sleuthkit.autopsy.coreutils.Logger; * The constructor is called when the autopsy is running. * All the method to create and modify the properties file are within this class */ -public final class RecentCases extends CallableSystemAction implements Presenter.Menu { + final class RecentCases extends CallableSystemAction implements Presenter.Menu { static final int LENGTH = 5; static final String NAME_PROP_KEY = "LBL_RecentCase_Name"; diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/StartupWindowInterface.java b/Core/src/org/sleuthkit/autopsy/casemodule/StartupWindowInterface.java index ec11ff3e37..1c7e40f386 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/StartupWindowInterface.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/StartupWindowInterface.java @@ -21,7 +21,7 @@ package org.sleuthkit.autopsy.casemodule; /** * Interface for startup window implementations */ -public interface StartupWindowInterface { + interface StartupWindowInterface { /** * Shows and makes active the startup window diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/StartupWindowProvider.java b/Core/src/org/sleuthkit/autopsy/casemodule/StartupWindowProvider.java index 4cfa6f3b1c..79b12a125e 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/StartupWindowProvider.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/StartupWindowProvider.java @@ -32,7 +32,7 @@ import org.sleuthkit.autopsy.coreutils.Logger; * is to implement StartupWindowInterface and register it with lookup as a ServiceProvider. * The custom startup window is automatically chosen over the default one, given it is the only external module custom startup window. */ -public class StartupWindowProvider implements StartupWindowInterface { + class StartupWindowProvider implements StartupWindowInterface { private static volatile StartupWindowProvider instance; private static final Logger logger = Logger.getLogger(StartupWindowProvider.class.getName()); diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/UpdateRecentCases.java b/Core/src/org/sleuthkit/autopsy/casemodule/UpdateRecentCases.java index 7e219fd5c0..9667768397 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/UpdateRecentCases.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/UpdateRecentCases.java @@ -28,7 +28,7 @@ import org.openide.util.actions.SystemAction; /** * This class is used to change / update the list of recent cases dynamically. */ -public class UpdateRecentCases extends JMenuItem implements DynamicMenuContent { + class UpdateRecentCases extends JMenuItem implements DynamicMenuContent { int length; static boolean hasRecentCase = false; diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/XMLCaseManagement.java b/Core/src/org/sleuthkit/autopsy/casemodule/XMLCaseManagement.java index 0187b93b54..45d8ac4784 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/XMLCaseManagement.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/XMLCaseManagement.java @@ -45,7 +45,7 @@ import org.xml.sax.SAXException; * * @author jantonius */ -public class XMLCaseManagement implements CaseConfigFileInterface { + class XMLCaseManagement implements CaseConfigFileInterface { final static String XSDFILE = "CaseSchema.xsd"; final static String TOP_ROOT_NAME = "AutopsyCase"; diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/AbstractDataResultViewer.java b/Core/src/org/sleuthkit/autopsy/corecomponents/AbstractDataResultViewer.java index 48647023d9..ece4ce5565 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/AbstractDataResultViewer.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/AbstractDataResultViewer.java @@ -36,7 +36,7 @@ import org.sleuthkit.autopsy.coreutils.Logger; * Additionally, the ExplorerManager.Provider interface is implemented to * supply an ExplorerManager to derived classes and their child components. */ -public abstract class AbstractDataResultViewer extends JPanel implements DataResultViewer, Provider { + abstract class AbstractDataResultViewer extends JPanel implements DataResultViewer, Provider { private static final Logger logger = Logger.getLogger(AbstractDataResultViewer.class.getName()); protected transient ExplorerManager em; diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/AdvancedConfigurationCleanDialog.java b/Core/src/org/sleuthkit/autopsy/corecomponents/AdvancedConfigurationCleanDialog.java index 0ae2014ca4..41ff7988b8 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/AdvancedConfigurationCleanDialog.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/AdvancedConfigurationCleanDialog.java @@ -15,7 +15,7 @@ import javax.swing.JPanel; * but the panel given to it. No additional buttons or features, except * the default close operation, which is set to dispose. */ -public class AdvancedConfigurationCleanDialog extends javax.swing.JDialog { + public class AdvancedConfigurationCleanDialog extends javax.swing.JDialog { /** Creates new form AdvancedConfigurationDialog */ public AdvancedConfigurationCleanDialog() { diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/CustomAboutAction.java b/Core/src/org/sleuthkit/autopsy/corecomponents/CustomAboutAction.java index c69feb15b7..37d21e2748 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/CustomAboutAction.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/CustomAboutAction.java @@ -28,7 +28,7 @@ import org.sleuthkit.autopsy.coreutils.Logger; /** * Action to open custom implementation of the "About" window from the Help menu. */ -public class CustomAboutAction extends AboutAction { + class CustomAboutAction extends AboutAction { @Override public void performAction() { diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentPanel.java b/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentPanel.java index 7ebd947691..6f1a061d52 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentPanel.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentPanel.java @@ -27,7 +27,7 @@ import org.sleuthkit.datamodel.TskCoreException; /** * */ -public class DataContentPanel extends javax.swing.JPanel implements DataContent, ChangeListener { + public class DataContentPanel extends javax.swing.JPanel implements DataContent, ChangeListener { private static Logger logger = Logger.getLogger(DataContentPanel.class.getName()); private final List viewers = new ArrayList<>();; diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerTable.java b/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerTable.java index 6d87ee41d7..5723151e53 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerTable.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerTable.java @@ -55,7 +55,7 @@ import org.sleuthkit.autopsy.corecomponentinterfaces.DataResultViewer; // service provider when DataResultViewers can be made compatible with node // multiple selection actions. //@ServiceProvider(service = DataResultViewer.class) -public class DataResultViewerTable extends AbstractDataResultViewer { + class DataResultViewerTable extends AbstractDataResultViewer { private String firstColumnLabel = "Name"; private Set propertiesAcc = new LinkedHashSet<>(); diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerThumbnail.java b/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerThumbnail.java index b83cb21645..bdbe02a4f1 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerThumbnail.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerThumbnail.java @@ -57,7 +57,7 @@ import org.sleuthkit.datamodel.TskCoreException; // service provider when DataResultViewers can be made compatible with node // multi-selection actions. //@ServiceProvider(service = DataResultViewer.class) -public final class DataResultViewerThumbnail extends AbstractDataResultViewer { + final class DataResultViewerThumbnail extends AbstractDataResultViewer { private static final Logger logger = Logger.getLogger(DataResultViewerThumbnail.class.getName()); //flag to keep track if images are being loaded diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/FrameCapture.java b/Core/src/org/sleuthkit/autopsy/corecomponents/FrameCapture.java index 77f7462261..f416403114 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/FrameCapture.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/FrameCapture.java @@ -6,7 +6,7 @@ import java.util.List; /** * Interface used to capture frames from a video file. */ -public interface FrameCapture { + interface FrameCapture { /** * @param file the video file to use diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/MediaViewImagePanel.java b/Core/src/org/sleuthkit/autopsy/corecomponents/MediaViewImagePanel.java index f621c1859f..e5acab4cb7 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/MediaViewImagePanel.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/MediaViewImagePanel.java @@ -44,7 +44,7 @@ import org.sleuthkit.datamodel.ReadContentInputStream; * Container for the image viewer part of media view, on a layered pane. To be * used with JavaFx image viewer only. */ -public class MediaViewImagePanel extends javax.swing.JPanel { + public class MediaViewImagePanel extends javax.swing.JPanel { private JFXPanel fxPanel; private ImageView fxImageView; diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/ProductInformationPanel.java b/Core/src/org/sleuthkit/autopsy/corecomponents/ProductInformationPanel.java index 0499404c42..e42bc9d65a 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/ProductInformationPanel.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/ProductInformationPanel.java @@ -43,7 +43,7 @@ import org.sleuthkit.datamodel.SleuthkitJNI; /** * Custom "About" window panel. */ -public class ProductInformationPanel extends JPanel implements HyperlinkListener { + class ProductInformationPanel extends JPanel implements HyperlinkListener { private URL url = null; private Icon about; diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/VideoFrame.java b/Core/src/org/sleuthkit/autopsy/corecomponents/VideoFrame.java index 95ce2c6d29..ce4080fb2c 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/VideoFrame.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/VideoFrame.java @@ -5,7 +5,7 @@ import java.awt.Image; /** * */ -public class VideoFrame { + class VideoFrame { private Image frame; private long timeMillis; diff --git a/Core/src/org/sleuthkit/autopsy/coreutils/ExecUtil.java b/Core/src/org/sleuthkit/autopsy/coreutils/ExecUtil.java index e5c3b3af27..820eb6b25d 100644 --- a/Core/src/org/sleuthkit/autopsy/coreutils/ExecUtil.java +++ b/Core/src/org/sleuthkit/autopsy/coreutils/ExecUtil.java @@ -30,7 +30,7 @@ import org.sleuthkit.autopsy.coreutils.Logger; * Takes care of forking a process and reading output / error streams to either a * string buffer or directly to a file writer */ -public final class ExecUtil { + public final class ExecUtil { private static final Logger logger = Logger.getLogger(ExecUtil.class.getName()); private Process proc = null; diff --git a/Core/src/org/sleuthkit/autopsy/coreutils/FileUtil.java b/Core/src/org/sleuthkit/autopsy/coreutils/FileUtil.java index d63259d584..2aa8ab7159 100644 --- a/Core/src/org/sleuthkit/autopsy/coreutils/FileUtil.java +++ b/Core/src/org/sleuthkit/autopsy/coreutils/FileUtil.java @@ -27,7 +27,7 @@ import org.openide.filesystems.FileObject; /** * File and dir utilities */ -public class FileUtil { + public class FileUtil { private static final Logger logger = Logger.getLogger(FileUtil.class.getName()); diff --git a/Core/src/org/sleuthkit/autopsy/coreutils/ImageUtils.java b/Core/src/org/sleuthkit/autopsy/coreutils/ImageUtils.java index ea50eebda7..f1fa3714ee 100755 --- a/Core/src/org/sleuthkit/autopsy/coreutils/ImageUtils.java +++ b/Core/src/org/sleuthkit/autopsy/coreutils/ImageUtils.java @@ -27,15 +27,19 @@ import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import java.io.InputStream; +import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.logging.Level; import javax.imageio.ImageIO; import javax.swing.ImageIcon; +import org.openide.util.Exceptions; import org.sleuthkit.autopsy.casemodule.Case; -import org.sleuthkit.autopsy.contentviewers.Utilities; import org.sleuthkit.autopsy.corelibs.ScalrWrapper; import org.sleuthkit.datamodel.AbstractFile; +import org.sleuthkit.datamodel.BlackboardArtifact; +import org.sleuthkit.datamodel.BlackboardAttribute; +import org.sleuthkit.datamodel.BlackboardAttribute.ATTRIBUTE_TYPE; import org.sleuthkit.datamodel.Content; import org.sleuthkit.datamodel.ReadContentInputStream; import org.sleuthkit.datamodel.TskCoreException; @@ -51,7 +55,7 @@ public class ImageUtils { private static final Logger logger = Logger.getLogger(ImageUtils.class.getName()); private static final Image DEFAULT_ICON = new ImageIcon("/org/sleuthkit/autopsy/images/file-icon.png").getImage(); private static final List SUPP_EXTENSIONS = Arrays.asList(ImageIO.getReaderFileSuffixes()); - + private static final List SUPP_MIME_TYPES = Arrays.asList(ImageIO.getReaderMIMETypes()); /** * Get the default Icon, which is the icon for a file. * @return @@ -72,18 +76,37 @@ public class ImageUtils { } AbstractFile f = (AbstractFile) content; - final String fName = f.getName(); - final int dotIdx = fName.lastIndexOf('.'); - if (dotIdx == -1 || dotIdx == (fName.length() - 1)) { - return isJpegFileHeader(f); + if (f.getSize() == 0) { + return false; } - final String ext = fName.substring(dotIdx + 1).toLowerCase(); - - // Note: thumbnail generator only supports JPG, GIF, and PNG for now - return (f.getSize() > 0 - && SUPP_EXTENSIONS.contains(ext)); + // check the blackboard for a file type attribute + try { + ArrayList attributes = f.getGenInfoAttributes(ATTRIBUTE_TYPE.TSK_FILE_TYPE_SIG); + for (BlackboardAttribute attribute : attributes) { + if (SUPP_MIME_TYPES.contains(attribute.getValueString())) { + return true; + } + } + } + catch (TskCoreException ex) { + logger.log(Level.WARNING, "Error while getting file signature from blackboard.", ex); + } + + final String extension = f.getNameExtension(); + + // if we have an extension, check it + if (extension.equals("") == false) { + // Note: thumbnail generator only supports JPG, GIF, and PNG for now + if (SUPP_EXTENSIONS.contains(extension)) { + return true; + } + } + + // if no extension or one that is not for an image, then read the content + return isJpegFileHeader(f); } + /** * Get an icon of a specified size. diff --git a/Core/src/org/sleuthkit/autopsy/coreutils/JLNK.java b/Core/src/org/sleuthkit/autopsy/coreutils/JLNK.java index 5a617c6056..3312ab7b06 100644 --- a/Core/src/org/sleuthkit/autopsy/coreutils/JLNK.java +++ b/Core/src/org/sleuthkit/autopsy/coreutils/JLNK.java @@ -31,7 +31,7 @@ import org.sleuthkit.autopsy.coreutils.LnkEnums.NetworkProviderType; * * @author dick */ -public class JLNK { + public class JLNK { private int header; private byte[] linkClassIdentifier; private List linkFlags; diff --git a/Core/src/org/sleuthkit/autopsy/coreutils/JLnkParser.java b/Core/src/org/sleuthkit/autopsy/coreutils/JLnkParser.java index 9c7177e780..e0f7b341bc 100644 --- a/Core/src/org/sleuthkit/autopsy/coreutils/JLnkParser.java +++ b/Core/src/org/sleuthkit/autopsy/coreutils/JLnkParser.java @@ -38,7 +38,7 @@ import org.sleuthkit.autopsy.coreutils.LnkEnums.NetworkProviderType; * http://msdn.microsoft.com/en-us/library/windows/desktop/cc144090(v=vs.85).aspx#unknown_74413 * http://blog.0x01000000.org/2010/08/10/lnk-parsing-youre-doing-it-wrong-i/ */ -public class JLnkParser { + public class JLnkParser { private byte[] content; private static final Logger logger = Logger.getLogger(JLnkParser.class.getName()); diff --git a/Core/src/org/sleuthkit/autopsy/coreutils/JLnkParserException.java b/Core/src/org/sleuthkit/autopsy/coreutils/JLnkParserException.java index 0998b71d1b..f9e034df42 100755 --- a/Core/src/org/sleuthkit/autopsy/coreutils/JLnkParserException.java +++ b/Core/src/org/sleuthkit/autopsy/coreutils/JLnkParserException.java @@ -22,7 +22,7 @@ package org.sleuthkit.autopsy.coreutils; * * @author jwallace */ -public class JLnkParserException extends Exception { + public class JLnkParserException extends Exception { /** * Constructs an instance of diff --git a/Core/src/org/sleuthkit/autopsy/coreutils/LnkEnums.java b/Core/src/org/sleuthkit/autopsy/coreutils/LnkEnums.java index 7c6c413ce0..5b35043057 100644 --- a/Core/src/org/sleuthkit/autopsy/coreutils/LnkEnums.java +++ b/Core/src/org/sleuthkit/autopsy/coreutils/LnkEnums.java @@ -22,7 +22,7 @@ package org.sleuthkit.autopsy.coreutils; * * @author dick */ -public class LnkEnums { + class LnkEnums { private static final byte[] CDRIVES = new byte[] { (byte)0xe0, 0x4f, (byte)0xd0, 0x20, (byte)0xea, 0x3a, 0x69, 0x10, (byte)0xa2, (byte)0xd8, 0x08, 0x00, 0x2b, 0x30, 0x30, (byte)0x9d }; diff --git a/Core/src/org/sleuthkit/autopsy/coreutils/TestLogger.java b/Core/src/org/sleuthkit/autopsy/coreutils/TestLogger.java index 08942f3221..e03ff9d05a 100644 --- a/Core/src/org/sleuthkit/autopsy/coreutils/TestLogger.java +++ b/Core/src/org/sleuthkit/autopsy/coreutils/TestLogger.java @@ -28,7 +28,7 @@ import java.util.logging.Level; /* * Toolbar button for testing logging. Not a normal part of application. */ -public final class TestLogger implements ActionListener { + final class TestLogger implements ActionListener { static final Logger logger = Logger.getLogger(TestLogger.class.getName()); Formatter fmt; diff --git a/Core/src/org/sleuthkit/autopsy/coreutils/TextUtil.java b/Core/src/org/sleuthkit/autopsy/coreutils/TextUtil.java index 818f54ff42..f910b78ed7 100644 --- a/Core/src/org/sleuthkit/autopsy/coreutils/TextUtil.java +++ b/Core/src/org/sleuthkit/autopsy/coreutils/TextUtil.java @@ -23,7 +23,7 @@ import java.awt.ComponentOrientation; /** * Text utilities */ -public class TextUtil { + public class TextUtil { /** * Determine and return text orientation diff --git a/Core/src/org/sleuthkit/autopsy/coreutils/TimestampingFormatter.java b/Core/src/org/sleuthkit/autopsy/coreutils/TimestampingFormatter.java index 469722aa48..77d2c269cd 100644 --- a/Core/src/org/sleuthkit/autopsy/coreutils/TimestampingFormatter.java +++ b/Core/src/org/sleuthkit/autopsy/coreutils/TimestampingFormatter.java @@ -30,7 +30,7 @@ import java.util.logging.LogRecord; * Formatter to wrap another formatter and prepend a timestampe to each formatted string * Not currently used. */ -public class TimestampingFormatter extends Formatter { + class TimestampingFormatter extends Formatter { Formatter original; DateFormat timestampFormat = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG, Locale.US); diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/AutopsyItemVisitor.java b/Core/src/org/sleuthkit/autopsy/datamodel/AutopsyItemVisitor.java index 27d505b489..3a53552739 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/AutopsyItemVisitor.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/AutopsyItemVisitor.java @@ -22,7 +22,7 @@ package org.sleuthkit.autopsy.datamodel; * * @author dfickling */ -public interface AutopsyItemVisitor { + interface AutopsyItemVisitor { T visit(ExtractedContent ec); diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/AutopsyVisitableItem.java b/Core/src/org/sleuthkit/autopsy/datamodel/AutopsyVisitableItem.java index bc9a3a1239..90d35b307c 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/AutopsyVisitableItem.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/AutopsyVisitableItem.java @@ -21,7 +21,7 @@ package org.sleuthkit.autopsy.datamodel; /** * Abstraction for certain top level items displayed in the GUI */ -public interface AutopsyVisitableItem { + interface AutopsyVisitableItem { /** * visitor pattern support diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/ContentHierarchyVisitor.java b/Core/src/org/sleuthkit/autopsy/datamodel/ContentHierarchyVisitor.java index 21d421b1fb..f6ebcc78c9 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/ContentHierarchyVisitor.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/ContentHierarchyVisitor.java @@ -38,7 +38,7 @@ import org.sleuthkit.datamodel.VolumeSystem; * past subclasses that aren't part of the exposed hierarchy (VolumeSystem, * FileSystem, and root Directories) */ -public class ContentHierarchyVisitor extends ContentVisitor.Default> { + class ContentHierarchyVisitor extends ContentVisitor.Default> { private static final Logger logger = Logger.getLogger(ContentHierarchyVisitor.class.getName()); private static final ContentHierarchyVisitor INSTANCE = new ContentHierarchyVisitor(); diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/ContentIdHierarchyVisitor.java b/Core/src/org/sleuthkit/autopsy/datamodel/ContentIdHierarchyVisitor.java index 72ded24b36..dbce27c925 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/ContentIdHierarchyVisitor.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/ContentIdHierarchyVisitor.java @@ -38,7 +38,7 @@ import org.sleuthkit.datamodel.VolumeSystem; * past subclasses that aren't part of the exposed hierarchy (VolumeSystem, * FileSystem, and root Directories) */ -public class ContentIdHierarchyVisitor extends ContentVisitor.Default> { + class ContentIdHierarchyVisitor extends ContentVisitor.Default> { private static final Logger logger = Logger.getLogger(ContentHierarchyVisitor.class.getName()); private static final ContentIdHierarchyVisitor INSTANCE = new ContentIdHierarchyVisitor(); diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/ContentNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/ContentNode.java index a11b001f12..89b7876015 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/ContentNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/ContentNode.java @@ -26,7 +26,7 @@ import org.openide.util.Lookup; * Provides basic information such as ID, parent ID, etc. */ -public abstract class ContentNode extends DisplayableItemNode{ + abstract class ContentNode extends DisplayableItemNode{ public ContentNode(Children children) { super(children); diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/ContentNodeVisitor.java b/Core/src/org/sleuthkit/autopsy/datamodel/ContentNodeVisitor.java index 7685f0cdc5..4fd9d12c54 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/ContentNodeVisitor.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/ContentNodeVisitor.java @@ -22,7 +22,7 @@ package org.sleuthkit.autopsy.datamodel; * Interface for visitor pattern on ContentNodes * @param visit method return type */ -public interface ContentNodeVisitor { + interface ContentNodeVisitor { T visit(DirectoryNode dn); diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/ContentTagNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/ContentTagNode.java index 352b040888..5749b53aa3 100755 --- a/Core/src/org/sleuthkit/autopsy/datamodel/ContentTagNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/ContentTagNode.java @@ -36,7 +36,7 @@ import org.sleuthkit.datamodel.TskCoreException; * consisting of content and blackboard artifact tags, grouped first by tag * type, then by tag name. */ -public class ContentTagNode extends DisplayableItemNode { + class ContentTagNode extends DisplayableItemNode { private static final String ICON_PATH = "org/sleuthkit/autopsy/images/blue-tag-icon-16.png"; private final ContentTag tag; diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/ExtractedContent.java b/Core/src/org/sleuthkit/autopsy/datamodel/ExtractedContent.java index 81bc791adf..394eb2228e 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/ExtractedContent.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/ExtractedContent.java @@ -24,7 +24,7 @@ import org.sleuthkit.datamodel.SleuthkitCase; * Parent of the "extracted content" artifacts to be displayed in the tree. Other * artifacts are displayed under other more specific parents. */ -public class ExtractedContent implements AutopsyVisitableItem{ + class ExtractedContent implements AutopsyVisitableItem{ SleuthkitCase skCase; diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/ExtractedContentChildren.java b/Core/src/org/sleuthkit/autopsy/datamodel/ExtractedContentChildren.java index 41ae98a2d0..d5d92183b2 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/ExtractedContentChildren.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/ExtractedContentChildren.java @@ -37,7 +37,7 @@ import org.sleuthkit.datamodel.TskCoreException; * has all of the blackboard artifacts that are not displayed in a more specific form elsewhere * in the tree. */ -public class ExtractedContentChildren extends ChildFactory { +class ExtractedContentChildren extends ChildFactory { private SleuthkitCase skCase; private final ArrayList doNotShow; diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/FileTypeExtensionFilters.java b/Core/src/org/sleuthkit/autopsy/datamodel/FileTypeExtensionFilters.java index 3f08fd807e..b90a257419 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/FileTypeExtensionFilters.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/FileTypeExtensionFilters.java @@ -25,7 +25,7 @@ import org.sleuthkit.datamodel.SleuthkitCase; /** * Filters database results by file extension. */ -public class FileTypeExtensionFilters implements AutopsyVisitableItem { + class FileTypeExtensionFilters implements AutopsyVisitableItem { private SleuthkitCase skCase; diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/FileTypeExtensions.java b/Core/src/org/sleuthkit/autopsy/datamodel/FileTypeExtensions.java index 0b067a4678..f24272ef01 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/FileTypeExtensions.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/FileTypeExtensions.java @@ -25,7 +25,7 @@ import java.util.List; * Contains Lists of commonly known and used file type extensions * and 'getters' to obtain them. */ -public class FileTypeExtensions { + class FileTypeExtensions { private final static List IMAGE_EXTENSIONS = Arrays.asList(".jpg", ".jpeg", ".png", ".psd", ".nef", ".tiff", ".bmp"); private final static List VIDEO_EXTENSIONS = Arrays.asList(".aaf", ".3gp", ".asf", ".avi", ".m1v", ".m2v", ".m4v", ".mp4", ".mov", ".mpeg", ".mpg", ".mpe", ".mp4", ".rm", ".wmv", ".mpv", ".flv", ".swf"); diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/FilterNodeLeaf.java b/Core/src/org/sleuthkit/autopsy/datamodel/FilterNodeLeaf.java index 59fc78b0a2..cd715a88d5 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/FilterNodeLeaf.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/FilterNodeLeaf.java @@ -24,7 +24,7 @@ import org.openide.nodes.Node; /** * AbstractFile filter node that filters out the children */ -public class FilterNodeLeaf extends FilterNode { + public class FilterNodeLeaf extends FilterNode { public FilterNodeLeaf(Node node) { super(node, Children.LEAF); diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/HighlightLookup.java b/Core/src/org/sleuthkit/autopsy/datamodel/HighlightLookup.java index 5aa38d9825..ab9f2c768f 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/HighlightLookup.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/HighlightLookup.java @@ -29,6 +29,6 @@ import org.sleuthkit.datamodel.Content; * @param isRegex whether the original query was a regex query * @param originalQuery (regex or literal) that may need to be performed again to get all ContentHit results */ -public interface HighlightLookup { + public interface HighlightLookup { public HighlightLookup createInstance(Content c, String keywordHitQuery, boolean isRegex, String originalQuery); } diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/KeyValueNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/KeyValueNode.java index a0d30ae1fe..e1330f0f92 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/KeyValueNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/KeyValueNode.java @@ -33,7 +33,7 @@ import org.sleuthkit.datamodel.AbstractFile; * * @author alawrence */ -public class KeyValueNode extends AbstractNode { + public class KeyValueNode extends AbstractNode { private KeyValue data; diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/RecentFiles.java b/Core/src/org/sleuthkit/autopsy/datamodel/RecentFiles.java index a61899597f..2745951574 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/RecentFiles.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/RecentFiles.java @@ -23,7 +23,7 @@ import org.sleuthkit.datamodel.SleuthkitCase; /** * Recent files node support */ -public class RecentFiles implements AutopsyVisitableItem { + class RecentFiles implements AutopsyVisitableItem { SleuthkitCase skCase; diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/RecentFilesChildren.java b/Core/src/org/sleuthkit/autopsy/datamodel/RecentFilesChildren.java index 759e906a4e..b2247873df 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/RecentFilesChildren.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/RecentFilesChildren.java @@ -34,7 +34,7 @@ import org.sleuthkit.datamodel.SleuthkitCase; * * @author dfickling */ -public class RecentFilesChildren extends ChildFactory { + class RecentFilesChildren extends ChildFactory { private SleuthkitCase skCase; private Calendar lastDay; diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/RecentFilesFilterChildren.java b/Core/src/org/sleuthkit/autopsy/datamodel/RecentFilesFilterChildren.java index fba8171840..374fe54db2 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/RecentFilesFilterChildren.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/RecentFilesFilterChildren.java @@ -42,7 +42,7 @@ import org.sleuthkit.datamodel.TskData; * * @author dfickling */ -public class RecentFilesFilterChildren extends ChildFactory { + class RecentFilesFilterChildren extends ChildFactory { private SleuthkitCase skCase; private RecentFilesFilter filter; diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/TagsNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/TagsNode.java index 37669308bd..b9acc010e7 100755 --- a/Core/src/org/sleuthkit/autopsy/datamodel/TagsNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/TagsNode.java @@ -36,7 +36,7 @@ import org.sleuthkit.datamodel.TskCoreException; * content and blackboard artifact tags, grouped first by tag type, then by * tag name. */ -public class TagsNode extends DisplayableItemNode { + class TagsNode extends DisplayableItemNode { private static final String DISPLAY_NAME = "Tags"; private static final String ICON_PATH = "org/sleuthkit/autopsy/images/tag-folder-blue-icon-16.png"; diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/TagsNodeKey.java b/Core/src/org/sleuthkit/autopsy/datamodel/TagsNodeKey.java index cfdd31731d..dad36cfa34 100755 --- a/Core/src/org/sleuthkit/autopsy/datamodel/TagsNodeKey.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/TagsNodeKey.java @@ -23,7 +23,7 @@ package org.sleuthkit.autopsy.datamodel; * RootContentChildren class. RootContentChildren is a NetBeans child node * factory built on top of the NetBeans Children.Keys class. */ -public class TagsNodeKey implements AutopsyVisitableItem { + class TagsNodeKey implements AutopsyVisitableItem { // Creation of a TagsNode object corresponding to a TagsNodeKey object is done // by a CreateAutopsyNodeVisitor dispatched from the AbstractContentChildren // override of Children.Keys.createNodes(). diff --git a/Core/src/org/sleuthkit/autopsy/directorytree/ChangeViewAction.java b/Core/src/org/sleuthkit/autopsy/directorytree/ChangeViewAction.java index 2b5b7d80a9..1c6c42ce58 100644 --- a/Core/src/org/sleuthkit/autopsy/directorytree/ChangeViewAction.java +++ b/Core/src/org/sleuthkit/autopsy/directorytree/ChangeViewAction.java @@ -34,7 +34,7 @@ import org.sleuthkit.autopsy.coreutils.Logger; * * @author jantonius */ -public class ChangeViewAction extends AbstractAction implements Presenter.Popup { + class ChangeViewAction extends AbstractAction implements Presenter.Popup { private int type; // type 1 = hex view, 2 = string view private Node node; diff --git a/Core/src/org/sleuthkit/autopsy/directorytree/DataResultFilterChildren.java b/Core/src/org/sleuthkit/autopsy/directorytree/DataResultFilterChildren.java index e81cd2dfbc..2dfa1380dc 100644 --- a/Core/src/org/sleuthkit/autopsy/directorytree/DataResultFilterChildren.java +++ b/Core/src/org/sleuthkit/autopsy/directorytree/DataResultFilterChildren.java @@ -27,7 +27,7 @@ import org.openide.nodes.Node; * DataResultFilterNode that created in the DataResultFilterNode.java. * */ -public class DataResultFilterChildren extends FilterNode.Children { + class DataResultFilterChildren extends FilterNode.Children { ExplorerManager sourceEm; diff --git a/Core/src/org/sleuthkit/autopsy/directorytree/ExtractUnallocAction.java b/Core/src/org/sleuthkit/autopsy/directorytree/ExtractUnallocAction.java index 82b162d5e5..5469db6581 100644 --- a/Core/src/org/sleuthkit/autopsy/directorytree/ExtractUnallocAction.java +++ b/Core/src/org/sleuthkit/autopsy/directorytree/ExtractUnallocAction.java @@ -55,7 +55,7 @@ import org.sleuthkit.datamodel.VolumeSystem; /** * Extracts all the unallocated space as a single file */ -public final class ExtractUnallocAction extends AbstractAction { + final class ExtractUnallocAction extends AbstractAction { private final List LstUnallocs = new ArrayList(); private static final List lockedVols = new ArrayList(); diff --git a/Core/src/org/sleuthkit/autopsy/directorytree/FileSystemDetailsPanel.java b/Core/src/org/sleuthkit/autopsy/directorytree/FileSystemDetailsPanel.java index 31a51334c9..9363d7f7b5 100644 --- a/Core/src/org/sleuthkit/autopsy/directorytree/FileSystemDetailsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/directorytree/FileSystemDetailsPanel.java @@ -25,7 +25,7 @@ import java.awt.event.ActionListener; * * @author jantonius */ -class FileSystemDetailsPanel extends javax.swing.JPanel { + class FileSystemDetailsPanel extends javax.swing.JPanel { /** Creates new form FileSystemDetailsPanel */ FileSystemDetailsPanel() { diff --git a/Core/src/org/sleuthkit/autopsy/directorytree/HashSearchProvider.java b/Core/src/org/sleuthkit/autopsy/directorytree/HashSearchProvider.java index a69451cc07..3def34f220 100644 --- a/Core/src/org/sleuthkit/autopsy/directorytree/HashSearchProvider.java +++ b/Core/src/org/sleuthkit/autopsy/directorytree/HashSearchProvider.java @@ -23,6 +23,6 @@ import org.openide.nodes.Node; /** * Lookup interface for hash search (to deal with circular deps) */ -public interface HashSearchProvider { + public interface HashSearchProvider { public void search(Node contentNode); } diff --git a/Core/src/org/sleuthkit/autopsy/directorytree/ResultDeleteAction.java b/Core/src/org/sleuthkit/autopsy/directorytree/ResultDeleteAction.java index 0353fdd7cc..05ff64d947 100644 --- a/Core/src/org/sleuthkit/autopsy/directorytree/ResultDeleteAction.java +++ b/Core/src/org/sleuthkit/autopsy/directorytree/ResultDeleteAction.java @@ -36,7 +36,7 @@ import org.sleuthkit.datamodel.SleuthkitCase; * @deprecated do not use, it is here in case we ever pick up on this work */ @Deprecated -public class ResultDeleteAction extends AbstractAction { + class ResultDeleteAction extends AbstractAction { private enum ActionType { diff --git a/Core/src/org/sleuthkit/autopsy/examples/SampleContentViewer.java b/Core/src/org/sleuthkit/autopsy/examples/SampleContentViewer.java index d6f80ffad9..571c556983 100755 --- a/Core/src/org/sleuthkit/autopsy/examples/SampleContentViewer.java +++ b/Core/src/org/sleuthkit/autopsy/examples/SampleContentViewer.java @@ -45,7 +45,7 @@ import org.sleuthkit.datamodel.TskCoreException; * it is compiled each time to ensure that it is compliant with the API. */ // @ServiceProvider(service = DataContentViewer.class) -public class SampleContentViewer extends javax.swing.JPanel implements DataContentViewer { + class SampleContentViewer extends javax.swing.JPanel implements DataContentViewer { /** * Creates new form SampleContentViewer diff --git a/Core/src/org/sleuthkit/autopsy/examples/SampleDataSourceIngestModule.java b/Core/src/org/sleuthkit/autopsy/examples/SampleDataSourceIngestModule.java index 5fa98f65d4..da4a7b99b7 100755 --- a/Core/src/org/sleuthkit/autopsy/examples/SampleDataSourceIngestModule.java +++ b/Core/src/org/sleuthkit/autopsy/examples/SampleDataSourceIngestModule.java @@ -50,7 +50,7 @@ import org.sleuthkit.datamodel.TskCoreException; * Sample DataSource-level ingest module that doesn't do much at all. * Just exists to show basic idea of these modules */ -public class SampleDataSourceIngestModule extends org.sleuthkit.autopsy.ingest.IngestModuleDataSource { + class SampleDataSourceIngestModule extends org.sleuthkit.autopsy.ingest.IngestModuleDataSource { /* Data Source modules operate on a disk or set of logical files. They * are passed in teh data source refernce and query it for things they want. diff --git a/Core/src/org/sleuthkit/autopsy/examples/SampleFileIngestModule.java b/Core/src/org/sleuthkit/autopsy/examples/SampleFileIngestModule.java index 676f9bd79f..464c79888c 100755 --- a/Core/src/org/sleuthkit/autopsy/examples/SampleFileIngestModule.java +++ b/Core/src/org/sleuthkit/autopsy/examples/SampleFileIngestModule.java @@ -53,7 +53,7 @@ import org.sleuthkit.datamodel.TskData; * IngestModuleLoader will not load things from the org.sleuthkit.autopsy.examples package. * Either change the package or the loading code to make this module actually run. */ -public class SampleFileIngestModule extends org.sleuthkit.autopsy.ingest.IngestModuleAbstractFile { + class SampleFileIngestModule extends org.sleuthkit.autopsy.ingest.IngestModuleAbstractFile { private int attrId = -1; private static SampleFileIngestModule defaultInstance = null; diff --git a/Core/src/org/sleuthkit/autopsy/filesearch/FileSearchAction.java b/Core/src/org/sleuthkit/autopsy/filesearch/FileSearchAction.java index 800f51fa7a..52b7f69991 100644 --- a/Core/src/org/sleuthkit/autopsy/filesearch/FileSearchAction.java +++ b/Core/src/org/sleuthkit/autopsy/filesearch/FileSearchAction.java @@ -26,7 +26,7 @@ import org.openide.util.actions.CallableSystemAction; import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.directorytree.FileSearchProvider; -public final class FileSearchAction extends CallableSystemAction implements FileSearchProvider{ + final class FileSearchAction extends CallableSystemAction implements FileSearchProvider{ private static FileSearchAction instance = null; diff --git a/Core/src/org/sleuthkit/autopsy/filesearch/FileSearchDialog.java b/Core/src/org/sleuthkit/autopsy/filesearch/FileSearchDialog.java index a4e9ff340e..726f0826e2 100644 --- a/Core/src/org/sleuthkit/autopsy/filesearch/FileSearchDialog.java +++ b/Core/src/org/sleuthkit/autopsy/filesearch/FileSearchDialog.java @@ -33,7 +33,7 @@ import javax.swing.JFrame; /** * File search dialog */ -public class FileSearchDialog extends javax.swing.JDialog { + class FileSearchDialog extends javax.swing.JDialog { /** Creates new form FileSearchDialog */ public FileSearchDialog() { diff --git a/Core/src/org/sleuthkit/autopsy/filesearch/FileSearchPanel.java b/Core/src/org/sleuthkit/autopsy/filesearch/FileSearchPanel.java index 40993ab2e9..492510e739 100644 --- a/Core/src/org/sleuthkit/autopsy/filesearch/FileSearchPanel.java +++ b/Core/src/org/sleuthkit/autopsy/filesearch/FileSearchPanel.java @@ -56,7 +56,7 @@ import org.sleuthkit.datamodel.TskCoreException; /** * FileSearchPanel that present search options */ -public class FileSearchPanel extends javax.swing.JPanel { + class FileSearchPanel extends javax.swing.JPanel { private List filterAreas = new ArrayList(); private JButton searchButton; diff --git a/Core/src/org/sleuthkit/autopsy/ingest/GeneralIngestConfigurator.java b/Core/src/org/sleuthkit/autopsy/ingest/GeneralIngestConfigurator.java index a9769a5b5b..203e98cbe8 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/GeneralIngestConfigurator.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/GeneralIngestConfigurator.java @@ -197,7 +197,7 @@ public class GeneralIngestConfigurator implements IngestConfigurator { if (!modulesToStart.isEmpty() && contentToIngest != null) { // Queue the ingest process. - manager.execute(modulesToStart, contentToIngest); + manager.scheduleDataSource(modulesToStart, contentToIngest); } } diff --git a/Core/src/org/sleuthkit/autopsy/ingest/GetFilesContentVisitor.java b/Core/src/org/sleuthkit/autopsy/ingest/GetFilesContentVisitor.java index fb25824727..65290a5b3c 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/GetFilesContentVisitor.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/GetFilesContentVisitor.java @@ -39,7 +39,7 @@ import org.sleuthkit.datamodel.LayoutFile; * Abstract visitor for getting all the files from content * TODO should be moved to utility module (needs resolve cyclic deps) */ -public abstract class GetFilesContentVisitor implements ContentVisitor> { + abstract class GetFilesContentVisitor implements ContentVisitor> { private static final Logger logger = Logger.getLogger(GetFilesContentVisitor.class.getName()); diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestDataSourceThread.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestDataSourceThread.java index 40e01c81eb..85f62f8785 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestDataSourceThread.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestDataSourceThread.java @@ -37,7 +37,7 @@ import org.sleuthkit.datamodel.Content; * Worker thread that runs a data source-level ingest module (image, file set virt dir, etc). * Used to process only a single data-source and single module. */ -public class IngestDataSourceThread extends SwingWorker { + class IngestDataSourceThread extends SwingWorker { private final Logger logger = Logger.getLogger(IngestDataSourceThread.class.getName()); private ProgressHandle progress; diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestDialogPanel.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestDialogPanel.java index 198f19da13..ff6ef874e9 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestDialogPanel.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestDialogPanel.java @@ -40,7 +40,7 @@ import org.sleuthkit.autopsy.coreutils.ModuleSettings; /** * main configuration panel for all ingest modules, reusable JPanel component */ -public class IngestDialogPanel extends javax.swing.JPanel { + class IngestDialogPanel extends javax.swing.JPanel { private IngestModuleAbstract currentModule; private ModulesTableModel tableModel; diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestManager.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestManager.java index 671325412d..2c30a8f32e 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestManager.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestManager.java @@ -277,13 +277,13 @@ public class IngestManager { } /** - * Multiple data-sources version of execute() method. Enqueues multiple sources inputs (Content objects) + * Multiple data-sources version of scheduleDataSource() method. Enqueues multiple sources inputs (Content objects) * and associated modules at once * - * @param modules modules to execute on every data source - * @param inputs input data sources to enqueue and execute the ingest modules on + * @param modules modules to scheduleDataSource on every data source + * @param inputs input data sources to enqueue and scheduleDataSource the ingest modules on */ - public void execute(final List modules, final List inputs) { + public void scheduleDataSource(final List modules, final List inputs) { logger.log(Level.INFO, "Will enqueue number of inputs: " + inputs.size() + " to " + modules.size() + " modules."); @@ -310,14 +310,14 @@ public class IngestManager { * not block and can be called multiple times to enqueue more work to * already running background ingest process. * - * @param modules modules to execute on the data source input - * @param input input data source Content objects to execute the ingest modules on + * @param modules modules to scheduleDataSource on the data source input + * @param input input data source Content objects to scheduleDataSource the ingest modules on */ - public void execute(final List modules, final Content input) { + public void scheduleDataSource(final List modules, final Content input) { List inputs = new ArrayList(); inputs.add(input); logger.log(Level.INFO, "Will enqueue input: " + input.getName()); - execute(modules, inputs); + scheduleDataSource(modules, inputs); } /** diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestMessageMainPanel.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestMessageMainPanel.java index f950c9f807..5e0bf81fec 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestMessageMainPanel.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestMessageMainPanel.java @@ -25,7 +25,7 @@ import org.sleuthkit.autopsy.coreutils.Logger; * the main layered pane container for messages table (IngestMessagePanel) and * details view (IngestMessageDetailsPanel) */ -public class IngestMessageMainPanel extends javax.swing.JPanel { + class IngestMessageMainPanel extends javax.swing.JPanel { private IngestMessagePanel messagePanel; private IngestMessageDetailsPanel detailsPanel; diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestMessageTopComponent.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestMessageTopComponent.java index f45987a96d..d4a9ab9cce 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestMessageTopComponent.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestMessageTopComponent.java @@ -44,7 +44,7 @@ import org.sleuthkit.datamodel.Content; /** * Top component which displays something. */ -public final class IngestMessageTopComponent extends TopComponent implements IngestUI { + final class IngestMessageTopComponent extends TopComponent implements IngestUI { private static IngestMessageTopComponent instance; private static final Logger logger = Logger.getLogger(IngestMessageTopComponent.class.getName()); diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestMessagesAction.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestMessagesAction.java index 06f31f5ffa..11ed44cf7f 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestMessagesAction.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestMessagesAction.java @@ -31,7 +31,7 @@ import org.openide.util.actions.Presenter; // @ActionReference(path = "Toolbars/File", position = 575) //}) //@Messages("CTL_IngestMessagesAction=Messages") -public final class IngestMessagesAction extends AbstractAction implements Presenter.Toolbar { + final class IngestMessagesAction extends AbstractAction implements Presenter.Toolbar { @Override public void actionPerformed(ActionEvent e) { diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestMessagesToolbar.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestMessagesToolbar.java index 2914cfd05b..f817383595 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestMessagesToolbar.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestMessagesToolbar.java @@ -34,7 +34,7 @@ import org.sleuthkit.autopsy.casemodule.Case; * Toolbar for Ingest * */ -public class IngestMessagesToolbar extends javax.swing.JPanel { + class IngestMessagesToolbar extends javax.swing.JPanel { private IngestMessagesButton ingestMessagesButton = new IngestMessagesButton(); private static volatile IngestMessagesToolbar instance; diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestModuleAbstract.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestModuleAbstract.java index 7165640b75..6bf6b36f57 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestModuleAbstract.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestModuleAbstract.java @@ -23,7 +23,7 @@ package org.sleuthkit.autopsy.ingest; /** * Base interface for ingest modules */ -public abstract class IngestModuleAbstract { + abstract class IngestModuleAbstract { private String args; diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestModuleLoader.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestModuleLoader.java index 69701ac033..b1cee5482e 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestModuleLoader.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestModuleLoader.java @@ -90,7 +90,7 @@ import org.w3c.dom.NodeList; * NOTE: this will be part of future IngestPipelineManager with IngestManager * code refactored */ -public final class IngestModuleLoader { + final class IngestModuleLoader { private static final String PIPELINE_CONFIG_XML = "pipeline_config.xml"; private static final String XSDFILE = "PipelineConfigSchema.xsd"; diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestMonitor.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestMonitor.java index dd059b271e..b483c3d35c 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestMonitor.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestMonitor.java @@ -36,7 +36,7 @@ import org.sleuthkit.autopsy.coreutils.PlatformUtil; /** * Monitor health of the system and stop ingest if necessary */ -public class IngestMonitor { + public class IngestMonitor { private static final int INITIAL_INTERVAL_MS = 60000; //1 min. private final Logger logger = Logger.getLogger(IngestMonitor.class.getName()); diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestUI.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestUI.java index eb42dd4fec..e4984bf38e 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestUI.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestUI.java @@ -24,7 +24,7 @@ import org.sleuthkit.datamodel.Content; /** * UI support for ingest */ -public interface IngestUI { + interface IngestUI { void displayMessage(final IngestMessage message); int getMessagesCount(); void clearMessages(); diff --git a/Core/src/org/sleuthkit/autopsy/menuactions/DataContentDynamicMenu.java b/Core/src/org/sleuthkit/autopsy/menuactions/DataContentDynamicMenu.java index 890bbbd6ef..8c09bef862 100644 --- a/Core/src/org/sleuthkit/autopsy/menuactions/DataContentDynamicMenu.java +++ b/Core/src/org/sleuthkit/autopsy/menuactions/DataContentDynamicMenu.java @@ -34,7 +34,7 @@ import org.sleuthkit.autopsy.corecomponents.DataContentTopComponent; * * @author jantonius */ -public class DataContentDynamicMenu extends JMenuItem implements DynamicMenuContent { + class DataContentDynamicMenu extends JMenuItem implements DynamicMenuContent { @Override public JComponent[] getMenuPresenters() { diff --git a/Core/src/org/sleuthkit/autopsy/menuactions/DataContentMenu.java b/Core/src/org/sleuthkit/autopsy/menuactions/DataContentMenu.java index 4468794852..c68b9f84c2 100644 --- a/Core/src/org/sleuthkit/autopsy/menuactions/DataContentMenu.java +++ b/Core/src/org/sleuthkit/autopsy/menuactions/DataContentMenu.java @@ -27,7 +27,7 @@ import org.openide.util.actions.Presenter; /** * Menu item that displays DataContentViewers */ -public class DataContentMenu extends CallableSystemAction implements Presenter.Menu { + class DataContentMenu extends CallableSystemAction implements Presenter.Menu { DataContentMenu(){} diff --git a/Core/src/org/sleuthkit/autopsy/menuactions/DataExplorerDynamicMenu.java b/Core/src/org/sleuthkit/autopsy/menuactions/DataExplorerDynamicMenu.java index 6566146880..3ed7e67b76 100644 --- a/Core/src/org/sleuthkit/autopsy/menuactions/DataExplorerDynamicMenu.java +++ b/Core/src/org/sleuthkit/autopsy/menuactions/DataExplorerDynamicMenu.java @@ -33,7 +33,7 @@ import org.sleuthkit.autopsy.corecomponentinterfaces.DataExplorer; * * @author jantonius */ -public class DataExplorerDynamicMenu extends JMenuItem implements DynamicMenuContent{ + class DataExplorerDynamicMenu extends JMenuItem implements DynamicMenuContent{ DataExplorerDynamicMenu(){ } diff --git a/Core/src/org/sleuthkit/autopsy/menuactions/DataExplorerMenu.java b/Core/src/org/sleuthkit/autopsy/menuactions/DataExplorerMenu.java index 6106690768..947b754e70 100644 --- a/Core/src/org/sleuthkit/autopsy/menuactions/DataExplorerMenu.java +++ b/Core/src/org/sleuthkit/autopsy/menuactions/DataExplorerMenu.java @@ -28,7 +28,7 @@ import org.openide.util.actions.Presenter; * Menu item that tracks available DataExplorers. * @author jantonius */ -public class DataExplorerMenu extends CallableSystemAction implements Presenter.Menu { +class DataExplorerMenu extends CallableSystemAction implements Presenter.Menu { @Override public JMenuItem getMenuPresenter() { diff --git a/Core/src/org/sleuthkit/autopsy/menuactions/DataResultMenu.java b/Core/src/org/sleuthkit/autopsy/menuactions/DataResultMenu.java index 06c67001df..098f6fd0b5 100644 --- a/Core/src/org/sleuthkit/autopsy/menuactions/DataResultMenu.java +++ b/Core/src/org/sleuthkit/autopsy/menuactions/DataResultMenu.java @@ -31,7 +31,7 @@ import org.sleuthkit.autopsy.casemodule.Case; /** * Menu item tracks the DataResult windows */ -public class DataResultMenu extends CallableSystemAction implements Presenter.Menu, PropertyChangeListener { + class DataResultMenu extends CallableSystemAction implements Presenter.Menu, PropertyChangeListener { JMenu menu = new JMenu("DataResult Windows"); diff --git a/Core/src/org/sleuthkit/autopsy/menuactions/OpenTopComponentAction.java b/Core/src/org/sleuthkit/autopsy/menuactions/OpenTopComponentAction.java index 9eafc5fe7c..998f0549c5 100644 --- a/Core/src/org/sleuthkit/autopsy/menuactions/OpenTopComponentAction.java +++ b/Core/src/org/sleuthkit/autopsy/menuactions/OpenTopComponentAction.java @@ -27,7 +27,7 @@ import org.openide.windows.WindowManager; /** * This action opens the TopComponent passed to the constructor */ -public class OpenTopComponentAction extends AbstractAction{ + class OpenTopComponentAction extends AbstractAction{ private TopComponent tc; diff --git a/Core/src/org/sleuthkit/autopsy/menuactions/SearchResultMenu.java b/Core/src/org/sleuthkit/autopsy/menuactions/SearchResultMenu.java index 6830c24f4a..851405e880 100644 --- a/Core/src/org/sleuthkit/autopsy/menuactions/SearchResultMenu.java +++ b/Core/src/org/sleuthkit/autopsy/menuactions/SearchResultMenu.java @@ -31,7 +31,7 @@ import org.sleuthkit.autopsy.directorytree.DirectoryTreeTopComponent; /** * Menu item lists DataResult tabs. */ -public class SearchResultMenu extends JMenuItem implements DynamicMenuContent { + class SearchResultMenu extends JMenuItem implements DynamicMenuContent { SearchResultMenu(){ diff --git a/Core/src/org/sleuthkit/autopsy/menuactions/SpacerPanel.java b/Core/src/org/sleuthkit/autopsy/menuactions/SpacerPanel.java index 88caf19714..46a0252ced 100644 --- a/Core/src/org/sleuthkit/autopsy/menuactions/SpacerPanel.java +++ b/Core/src/org/sleuthkit/autopsy/menuactions/SpacerPanel.java @@ -28,7 +28,7 @@ import org.openide.util.actions.Presenter; * * @author dfickling */ -public class SpacerPanel extends javax.swing.JPanel{ + class SpacerPanel extends javax.swing.JPanel{ SpacerPanel() { this.setPreferredSize(new Dimension(2000, 20)); } diff --git a/Core/src/org/sleuthkit/autopsy/report/FileReportDataTypes.java b/Core/src/org/sleuthkit/autopsy/report/FileReportDataTypes.java index c46c59ca7d..ef6eb1c0ba 100755 --- a/Core/src/org/sleuthkit/autopsy/report/FileReportDataTypes.java +++ b/Core/src/org/sleuthkit/autopsy/report/FileReportDataTypes.java @@ -29,7 +29,7 @@ import org.sleuthkit.datamodel.TskData; * * @author jwallace */ -public enum FileReportDataTypes { + enum FileReportDataTypes { NAME("Name") { @Override diff --git a/Core/src/org/sleuthkit/autopsy/report/FileReportModule.java b/Core/src/org/sleuthkit/autopsy/report/FileReportModule.java index 50c74a55c0..e69f4c0ac8 100755 --- a/Core/src/org/sleuthkit/autopsy/report/FileReportModule.java +++ b/Core/src/org/sleuthkit/autopsy/report/FileReportModule.java @@ -26,7 +26,7 @@ import org.sleuthkit.datamodel.AbstractFile; * * @author jwallace */ -public interface FileReportModule extends ReportModule { + interface FileReportModule extends ReportModule { /** * Initialize the report which will be stored at the given path. * @param path diff --git a/Core/src/org/sleuthkit/autopsy/report/FileReportText.java b/Core/src/org/sleuthkit/autopsy/report/FileReportText.java index 45ef9d736c..de9144e626 100755 --- a/Core/src/org/sleuthkit/autopsy/report/FileReportText.java +++ b/Core/src/org/sleuthkit/autopsy/report/FileReportText.java @@ -35,7 +35,7 @@ import org.sleuthkit.datamodel.AbstractFile; * * @author jwallace */ -public class FileReportText implements FileReportModule { + class FileReportText implements FileReportModule { private static final Logger logger = Logger.getLogger(FileReportText.class.getName()); private String reportPath; private Writer out; @@ -123,7 +123,7 @@ public class FileReportText implements FileReportModule { @Override public String getDescription() { - return "A tab delimited text file containing information about files in the case."; + return "A tab delimited text file containing information about individual files in the case."; } @Override diff --git a/Core/src/org/sleuthkit/autopsy/report/GeneralReportModule.java b/Core/src/org/sleuthkit/autopsy/report/GeneralReportModule.java index 08aa476b9f..8baa4e5050 100644 --- a/Core/src/org/sleuthkit/autopsy/report/GeneralReportModule.java +++ b/Core/src/org/sleuthkit/autopsy/report/GeneralReportModule.java @@ -20,7 +20,7 @@ package org.sleuthkit.autopsy.report; import javax.swing.JPanel; -public interface GeneralReportModule extends ReportModule { + interface GeneralReportModule extends ReportModule { /** * Called to generate the report. Method is responsible for saving the file at the diff --git a/Core/src/org/sleuthkit/autopsy/report/ReportBodyFile.java b/Core/src/org/sleuthkit/autopsy/report/ReportBodyFile.java index c0ea754aa5..d31af46908 100644 --- a/Core/src/org/sleuthkit/autopsy/report/ReportBodyFile.java +++ b/Core/src/org/sleuthkit/autopsy/report/ReportBodyFile.java @@ -40,7 +40,7 @@ import org.sleuthkit.datamodel.*; * ReportBodyFile generates a report in the body file format specified on * The Sleuth Kit wiki as MD5|name|inode|mode_as_string|UID|GID|size|atime|mtime|ctime|crtime. */ -public class ReportBodyFile implements GeneralReportModule { + class ReportBodyFile implements GeneralReportModule { private static final Logger logger = Logger.getLogger(ReportBodyFile.class.getName()); private static ReportBodyFile instance = null; diff --git a/Core/src/org/sleuthkit/autopsy/report/ReportBranding.java b/Core/src/org/sleuthkit/autopsy/report/ReportBranding.java index e8759358e7..173821542b 100644 --- a/Core/src/org/sleuthkit/autopsy/report/ReportBranding.java +++ b/Core/src/org/sleuthkit/autopsy/report/ReportBranding.java @@ -37,7 +37,7 @@ import org.sleuthkit.autopsy.coreutils.PlatformUtil; * * Uses module settings property files to store customizations. */ -public final class ReportBranding implements ReportBrandingProviderI { + final class ReportBranding implements ReportBrandingProviderI { //property names private static final String GENERATOR_LOGO_PATH_PROP = "GeneratorLogoPath"; diff --git a/Core/src/org/sleuthkit/autopsy/report/ReportBrandingProviderI.java b/Core/src/org/sleuthkit/autopsy/report/ReportBrandingProviderI.java index f7814f001c..3bdb762dd7 100644 --- a/Core/src/org/sleuthkit/autopsy/report/ReportBrandingProviderI.java +++ b/Core/src/org/sleuthkit/autopsy/report/ReportBrandingProviderI.java @@ -21,7 +21,7 @@ package org.sleuthkit.autopsy.report; /** * Interface to implement by reports to add on custom branding, logos, etc */ -public interface ReportBrandingProviderI { + interface ReportBrandingProviderI { /** * Get the generator logo path on the local disk (previously set or default), diff --git a/Core/src/org/sleuthkit/autopsy/report/ReportExcel.java b/Core/src/org/sleuthkit/autopsy/report/ReportExcel.java index 5a221e6ef6..ecb97ac83c 100644 --- a/Core/src/org/sleuthkit/autopsy/report/ReportExcel.java +++ b/Core/src/org/sleuthkit/autopsy/report/ReportExcel.java @@ -29,7 +29,7 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook; import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.coreutils.Logger; -public class ReportExcel implements TableReportModule { + class ReportExcel implements TableReportModule { private static final Logger logger = Logger.getLogger(ReportExcel.class.getName()); private static ReportExcel instance; @@ -282,7 +282,7 @@ public class ReportExcel implements TableReportModule { @Override public String getDescription() { - return "An XLS formatted report which is meant to be viewed in Excel."; + return "A report about results and tagged items in Excel (XLS) format."; } @Override diff --git a/Core/src/org/sleuthkit/autopsy/report/ReportGenerationPanel.java b/Core/src/org/sleuthkit/autopsy/report/ReportGenerationPanel.java index 22ac783432..f4bf9cc14c 100644 --- a/Core/src/org/sleuthkit/autopsy/report/ReportGenerationPanel.java +++ b/Core/src/org/sleuthkit/autopsy/report/ReportGenerationPanel.java @@ -29,7 +29,7 @@ import javax.swing.Box; import javax.swing.JOptionPane; import org.sleuthkit.autopsy.report.ReportProgressPanel.ReportStatus; -public class ReportGenerationPanel extends javax.swing.JPanel { + class ReportGenerationPanel extends javax.swing.JPanel { private GridBagConstraints c; private List progressPanels; private Component glue; diff --git a/Core/src/org/sleuthkit/autopsy/report/ReportGenerator.java b/Core/src/org/sleuthkit/autopsy/report/ReportGenerator.java index d43b344b13..4406cbda0d 100644 --- a/Core/src/org/sleuthkit/autopsy/report/ReportGenerator.java +++ b/Core/src/org/sleuthkit/autopsy/report/ReportGenerator.java @@ -46,6 +46,7 @@ import javax.swing.JDialog; import javax.swing.JFrame; import javax.swing.SwingWorker; import org.openide.filesystems.FileUtil; +import org.openide.util.Exceptions; import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.coreutils.EscapeUtil; import org.sleuthkit.autopsy.coreutils.ImageUtils; @@ -71,7 +72,7 @@ import org.sleuthkit.datamodel.TskException; * can be called to show report generation progress using ReportProgressPanel * objects displayed using a dialog box. */ -public class ReportGenerator { + class ReportGenerator { private static final Logger logger = Logger.getLogger(ReportGenerator.class.getName()); private Case currentCase = Case.getCurrentCase(); @@ -87,7 +88,7 @@ public class ReportGenerator { static final String REPORTS_DIR = "Reports"; ReportGenerator(Map tableModuleStates, Map generalModuleStates, Map fileListModuleStates) { - // Create the root reports directory path of the form: /Reports/ / + // Create the root reports directory path of the form: /Reports/ / DateFormat dateFormat = new SimpleDateFormat("MM-dd-yyyy-HH-mm-ss"); Date date = new Date(); String dateNoTime = dateFormat.format(date); @@ -383,12 +384,19 @@ public class ReportGenerator { progress.setMaximumProgress(ARTIFACT_TYPE.values().length + 2); // +2 for content and blackboard artifact tags } } - + + + // report on the blackboard results makeBlackboardArtifactTables(); + + // report on the tagged files and artifacts makeContentTagsTables(); makeBlackboardArtifactTagsTables(); + + // report on the tagged images makeThumbnailTable(); + // finish progress, wrap up for (TableReportModule module : tableModules) { tableProgress.get(module).complete(); module.endReport(); @@ -397,11 +405,14 @@ public class ReportGenerator { return 0; } + /** + * Generate the tables for the selected blackboard artifacts + */ private void makeBlackboardArtifactTables() { // Make a comment string describing the tag names filter in effect. StringBuilder comment = new StringBuilder(); if (!tagNamesFilter.isEmpty()) { - comment.append("This report only includes results tagged with: "); + comment.append("Contains results that were tagged with one of the following: "); comment.append(makeCommaSeparatedList(tagNamesFilter)); } @@ -483,6 +494,9 @@ public class ReportGenerator { } } + /** + * Make table for tagged files + */ private void makeContentTagsTables() { // Check for cancellaton. removeCancelledTableReportModules(); @@ -508,7 +522,7 @@ public class ReportGenerator { ArrayList columnHeaders = new ArrayList<>(Arrays.asList("File", "Tag", "Comment")); StringBuilder comment = new StringBuilder(); if (!tagNamesFilter.isEmpty()) { - comment.append("This report only includes file tagged with: "); + comment.append("Contains files that were tagged with one of the following: "); comment.append(makeCommaSeparatedList(tagNamesFilter)); } if (module instanceof ReportHTML) { @@ -524,20 +538,32 @@ public class ReportGenerator { // Give the modules the rows for the content tags. for (ContentTag tag : tags) { - if (passesTagNamesFilter(tag.getName().getDisplayName())) { - checkIfTagHasImage(tag); - ArrayList rowData = new ArrayList<>(Arrays.asList(tag.getContent().getName(), tag.getName().getDisplayName(), tag.getComment())); - for (TableReportModule module : tableModules) { - // @@@ This casting is a tricky little workaround to allow the HTML report module to slip in a content hyperlink. - if (module instanceof ReportHTML) { - ReportHTML htmlReportModule = (ReportHTML)module; - htmlReportModule.addRowWithTaggedContentHyperlink(rowData, tag); - } - else { - module.addRow(rowData); - } - } + // skip tags that we are not reporting on + if (passesTagNamesFilter(tag.getName().getDisplayName()) == false) { + continue; } + + String fileName; + try { + fileName = tag.getContent().getUniquePath(); + } catch (TskCoreException ex) { + fileName = tag.getContent().getName(); + } + + ArrayList rowData = new ArrayList<>(Arrays.asList(fileName, tag.getName().getDisplayName(), tag.getComment())); + for (TableReportModule module : tableModules) { + // @@@ This casting is a tricky little workaround to allow the HTML report module to slip in a content hyperlink. + if (module instanceof ReportHTML) { + ReportHTML htmlReportModule = (ReportHTML)module; + htmlReportModule.addRowWithTaggedContentHyperlink(rowData, tag); + } + else { + module.addRow(rowData); + } + } + + // see if it is for an image so that we later report on it + checkIfTagHasImage(tag); } // The the modules content tags reporting is ended. @@ -548,6 +574,9 @@ public class ReportGenerator { } } + /** + * Generate the tables for the tagged artifacts + */ private void makeBlackboardArtifactTagsTables() { // Check for cancellaton. removeCancelledTableReportModules(); @@ -579,14 +608,18 @@ public class ReportGenerator { // Give the modules the rows for the content tags. for (BlackboardArtifactTag tag : tags) { - if (passesTagNamesFilter(tag.getName().getDisplayName())) { - checkIfTagHasImage(tag); - List row; - for (TableReportModule module : tableModules) { - row = new ArrayList<>(Arrays.asList(tag.getArtifact().getArtifactTypeName(), tag.getName().getDisplayName(), tag.getComment(), tag.getContent().getName())); - module.addRow(row); - } + if (passesTagNamesFilter(tag.getName().getDisplayName()) == false) { + continue; } + + List row; + for (TableReportModule module : tableModules) { + row = new ArrayList<>(Arrays.asList(tag.getArtifact().getArtifactTypeName(), tag.getName().getDisplayName(), tag.getComment(), tag.getContent().getName())); + module.addRow(row); + } + + // check if the tag is an image that we should later make a thumbnail for + checkIfTagHasImage(tag); } // The the modules blackboard artifact tags reporting is ended. @@ -597,7 +630,12 @@ public class ReportGenerator { } } - boolean passesTagNamesFilter(String tagName) { + /** + * Test if the user requested that this tag be reported on + * @param tagName + * @return true if it should be reported on + */ + private boolean passesTagNamesFilter(String tagName) { return tagNamesFilter.isEmpty() || tagNamesFilter.contains(tagName); } @@ -611,25 +649,36 @@ public class ReportGenerator { } } + /** + * Make a report for the files that were previously found to + * be images. + */ private void makeThumbnailTable() { for (TableReportModule module : tableModules) { - tableProgress.get(module).updateStatusLabel("Now processing Tagged Images..."); + tableProgress.get(module).updateStatusLabel("Creating thumbnails..."); if (module instanceof ReportHTML) { ReportHTML htmlModule = (ReportHTML) module; - htmlModule.startDataType("Tagged Images", "Tagged Results and Contents that contain images."); + htmlModule.startDataType("Thumbnails", "Contains thumbnails of images that are associated with tagged files and results."); List emptyHeaders = new ArrayList<>(); for (int i = 0; i < ReportHTML.THUMBNAIL_COLUMNS; i++) { emptyHeaders.add(""); } htmlModule.startTable(emptyHeaders); + htmlModule.addThumbnailRows(images); + htmlModule.endTable(); htmlModule.endDataType(); } } } + /** + * Analyze artifact associated with tag and add to internal list if it is associated + * with an image. + * @param artifactTag + */ private void checkIfTagHasImage(BlackboardArtifactTag artifactTag) { AbstractFile file; try { @@ -638,34 +687,37 @@ public class ReportGenerator { logger.log(Level.WARNING, "Error while getting content from a blackboard artifact to report on.", ex); return; } - - if (file.isDir() || - file.getType() == TskData.TSK_DB_FILES_TYPE_ENUM.UNALLOC_BLOCKS || - file.getType() == TskData.TSK_DB_FILES_TYPE_ENUM.UNUSED_BLOCKS) { - return; - } - - // Only include content for images - if (ImageUtils.thumbnailSupported(file)) { - images.add(file); - } + checkIfFileIsImage(file); } + /** + * Analyze file that tag is associated with and determine if + * it is an image and should have a thumbnail reported for it. + * Images are added to internal list. + * @param contentTag + */ private void checkIfTagHasImage(ContentTag contentTag) { Content c = contentTag.getContent(); if (c instanceof AbstractFile == false) { return; } - AbstractFile file = (AbstractFile) c; + checkIfFileIsImage((AbstractFile) c); + } + /** + * If file is an image file, add it to the internal 'images' list. + * @param file + */ + private void checkIfFileIsImage(AbstractFile file) { + if (file.isDir() || file.getType() == TskData.TSK_DB_FILES_TYPE_ENUM.UNALLOC_BLOCKS || file.getType() == TskData.TSK_DB_FILES_TYPE_ENUM.UNUSED_BLOCKS) { return; } - if (ImageUtils.thumbnailSupported(c)) { - images.add(c); + if (ImageUtils.thumbnailSupported(file)) { + images.add(file); } } } diff --git a/Core/src/org/sleuthkit/autopsy/report/ReportHTML.java b/Core/src/org/sleuthkit/autopsy/report/ReportHTML.java index 5eef5996dd..857037fa72 100644 --- a/Core/src/org/sleuthkit/autopsy/report/ReportHTML.java +++ b/Core/src/org/sleuthkit/autopsy/report/ReportHTML.java @@ -44,6 +44,8 @@ import org.openide.filesystems.FileObject; import org.openide.util.Exceptions; import org.sleuthkit.autopsy.casemodule.Case; import org.openide.filesystems.FileUtil; +import org.sleuthkit.autopsy.casemodule.services.Services; +import org.sleuthkit.autopsy.casemodule.services.TagsManager; import org.sleuthkit.autopsy.coreutils.ImageUtils; import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.datamodel.ContentUtils.ExtractFscContentVisitor; @@ -58,7 +60,7 @@ import org.sleuthkit.datamodel.Content; import org.sleuthkit.datamodel.ContentTag; import org.sleuthkit.datamodel.TskData.TSK_DB_FILES_TYPE_ENUM; -public class ReportHTML implements TableReportModule { + class ReportHTML implements TableReportModule { private static final Logger logger = Logger.getLogger(ReportHTML.class.getName()); private static final String THUMBS_REL_PATH = "thumbs" + File.separator; private static ReportHTML instance; @@ -533,42 +535,13 @@ public class ReportHTML implements TableReportModule { return; } - // Make a folder for the local file with the same tagName as the tag. - StringBuilder localFilePath = new StringBuilder(); - localFilePath.append(path); - localFilePath.append(contentTag.getName().getDisplayName()); - File localFileFolder = new File(localFilePath.toString()); - if (!localFileFolder.exists()) { - localFileFolder.mkdirs(); - } - - // Construct a file tagName for the local file that incorporates the file id to ensure uniqueness. - String fileName = file.getName(); - String objectIdSuffix = "_" + file.getId(); - int lastDotIndex = fileName.lastIndexOf("."); - if (lastDotIndex != -1 && lastDotIndex != 0) { - // The file tagName has a conventional extension. Insert the object id before the '.' of the extension. - fileName = fileName.substring(0, lastDotIndex) + objectIdSuffix + fileName.substring(lastDotIndex, fileName.length()); - } - else { - // The file has no extension or the only '.' in the file is an initial '.', as in a hidden file. - // Add the object id to the end of the file tagName. - fileName += objectIdSuffix; - } - localFilePath.append(File.separator); - localFilePath.append(fileName); - - // If the local file doesn't already exist, create it now. - // The existence check is necessary because it is possible to apply multiple tags with the same tagName to a file. - File localFile = new File(localFilePath.toString()); - if (!localFile.exists()) { - ExtractFscContentVisitor.extract(file, localFile, null, null); - } + // save it in a folder based on the tag name + String localFilePath = saveContent(file, contentTag.getName().getDisplayName()); // Add the hyperlink to the row. A column header for it was created in startTable(). StringBuilder localFileLink = new StringBuilder(); - localFileLink.append("View File"); row.add(localFileLink.toString()); @@ -628,17 +601,45 @@ public class ReportHTML implements TableReportModule { AbstractFile file = (AbstractFile) content; - String contentPath = saveContent(file); + // save copies of the orginal image and thumbnail image String thumbnailPath = prepareThumbnail(file); if (thumbnailPath == null) { continue; } + String contentPath = saveContent(file, "thumbs_fullsize"); + String nameInImage; + try { + nameInImage = file.getUniquePath(); + } catch (TskCoreException ex) { + nameInImage = file.getName(); + } + StringBuilder linkToThumbnail = new StringBuilder(); - linkToThumbnail.append(""); - linkToThumbnail.append(""); - linkToThumbnail.append(""); + linkToThumbnail.append(""); + linkToThumbnail.append("
"); + linkToThumbnail.append(file.getName()).append("
"); + + Services services = currentCase.getServices(); + TagsManager tagsManager = services.getTagsManager(); + try { + List tags = tagsManager.getContentTagsByContent(content); + if (tags.size() > 0) { + linkToThumbnail.append("Tags: " ); + } + for (int i = 0; i < tags.size(); i++) { + ContentTag tag = tags.get(i); + linkToThumbnail.append(tag.getName().getDisplayName()); + if (i != tags.size() - 1) { + linkToThumbnail.append(", "); + } + } + } catch (TskCoreException ex) { + logger.log(Level.WARNING, "Could not find get tags for file.", ex); + } + currentRow.add(linkToThumbnail.toString()); totalCount++; @@ -670,11 +671,22 @@ public class ReportHTML implements TableReportModule { return false; } - public String saveContent(AbstractFile file) { + /** + * Save a local copy of the given file in the reports folder. + * @param file File to save + * @param dirName Custom top-level folder to use to store the files in (tag name, etc.) + * @return Path to where file was stored (relative to root of HTML folder) + */ + public String saveContent(AbstractFile file, String dirName) { + // clean up the dir name passed in + String dirName2 = dirName.replace("/", "_"); + dirName2 = dirName2.replace("\\", "_"); + // Make a folder for the local file with the same tagName as the tag. - StringBuilder localFilePath = new StringBuilder(); - localFilePath.append(path); - localFilePath.append("tagged_images"); + StringBuilder localFilePath = new StringBuilder(); // full path + + localFilePath.append(path); + localFilePath.append(dirName2); File localFileFolder = new File(localFilePath.toString()); if (!localFileFolder.exists()) { localFileFolder.mkdirs(); @@ -702,7 +714,9 @@ public class ReportHTML implements TableReportModule { if (!localFile.exists()) { ExtractFscContentVisitor.extract(file, localFile, null, null); } - return localFilePath.toString(); + + // get the relative path + return localFilePath.toString().substring(path.length()); } /** @@ -730,7 +744,7 @@ public class ReportHTML implements TableReportModule { @Override public String getDescription() { - return "An HTML formatted report, designed to be viewed in a modern browser."; + return "A report about results and tagged items in HTML format."; } diff --git a/Core/src/org/sleuthkit/autopsy/report/ReportModule.java b/Core/src/org/sleuthkit/autopsy/report/ReportModule.java index 2a3a677b29..615770bd69 100644 --- a/Core/src/org/sleuthkit/autopsy/report/ReportModule.java +++ b/Core/src/org/sleuthkit/autopsy/report/ReportModule.java @@ -25,7 +25,7 @@ package org.sleuthkit.autopsy.report; /** * Interface got report modules that plug in to the reporting infrastructure. */ -public interface ReportModule { + interface ReportModule { /** * Get the name of the report this module generates. diff --git a/Core/src/org/sleuthkit/autopsy/report/ReportProgressPanel.java b/Core/src/org/sleuthkit/autopsy/report/ReportProgressPanel.java index af083db23d..3432cc8773 100644 --- a/Core/src/org/sleuthkit/autopsy/report/ReportProgressPanel.java +++ b/Core/src/org/sleuthkit/autopsy/report/ReportProgressPanel.java @@ -27,7 +27,7 @@ import java.awt.event.MouseListener; import java.io.File; import java.io.IOException; -public class ReportProgressPanel extends javax.swing.JPanel { + class ReportProgressPanel extends javax.swing.JPanel { private ReportStatus STATUS; // Enum to represent if a report is waiting, diff --git a/Core/src/org/sleuthkit/autopsy/report/ReportVisualPanel1.form b/Core/src/org/sleuthkit/autopsy/report/ReportVisualPanel1.form index 3ada6ba5e7..aa4e559ef5 100644 --- a/Core/src/org/sleuthkit/autopsy/report/ReportVisualPanel1.form +++ b/Core/src/org/sleuthkit/autopsy/report/ReportVisualPanel1.form @@ -44,11 +44,11 @@ - - + + - + diff --git a/Core/src/org/sleuthkit/autopsy/report/ReportVisualPanel1.java b/Core/src/org/sleuthkit/autopsy/report/ReportVisualPanel1.java index a9da09980a..dc9cb27b74 100644 --- a/Core/src/org/sleuthkit/autopsy/report/ReportVisualPanel1.java +++ b/Core/src/org/sleuthkit/autopsy/report/ReportVisualPanel1.java @@ -36,7 +36,7 @@ import javax.swing.event.ListSelectionListener; import org.openide.util.Lookup; import org.sleuthkit.autopsy.coreutils.Logger; -public final class ReportVisualPanel1 extends JPanel implements ListSelectionListener { + final class ReportVisualPanel1 extends JPanel implements ListSelectionListener { private static final Logger logger = Logger.getLogger(ReportVisualPanel1.class.getName()); private ReportWizardPanel1 wizPanel; private List modules = new ArrayList<>(); @@ -76,6 +76,16 @@ public final class ReportVisualPanel1 extends JPanel implements ListSelectionLis Collections.sort(modules, new Comparator() { @Override public int compare(ReportModule rm1, ReportModule rm2) { + // our theory is that the report table modules are more common, so they go on top + boolean rm1isTable = (rm1 instanceof TableReportModule); + boolean rm2isTable = (rm2 instanceof TableReportModule); + if (rm1isTable && !rm2isTable) { + return -1; + } + if (!rm1isTable && rm2isTable) { + return 1; + } + return rm1.getName().compareTo(rm2.getName()); } }); @@ -207,10 +217,10 @@ public final class ReportVisualPanel1 extends JPanel implements ListSelectionLis .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() - .addComponent(configurationPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(descriptionScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(descriptionScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addComponent(modulesScrollPane)) + .addComponent(configurationPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addComponent(modulesScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 208, Short.MAX_VALUE)) .addContainerGap()) ); }// //GEN-END:initComponents diff --git a/Core/src/org/sleuthkit/autopsy/report/ReportVisualPanel2.java b/Core/src/org/sleuthkit/autopsy/report/ReportVisualPanel2.java index 8ccd2b0770..67a2eb67ae 100644 --- a/Core/src/org/sleuthkit/autopsy/report/ReportVisualPanel2.java +++ b/Core/src/org/sleuthkit/autopsy/report/ReportVisualPanel2.java @@ -43,7 +43,7 @@ import org.sleuthkit.datamodel.BlackboardArtifact.ARTIFACT_TYPE; import org.sleuthkit.datamodel.TagName; import org.sleuthkit.datamodel.TskCoreException; -public final class ReportVisualPanel2 extends JPanel { + final class ReportVisualPanel2 extends JPanel { private ReportWizardPanel2 wizPanel; private Map tagStates = new LinkedHashMap<>(); diff --git a/Core/src/org/sleuthkit/autopsy/report/ReportWizardFileOptionsPanel.java b/Core/src/org/sleuthkit/autopsy/report/ReportWizardFileOptionsPanel.java index f6fcb9afe1..ad56a8dcc8 100755 --- a/Core/src/org/sleuthkit/autopsy/report/ReportWizardFileOptionsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/report/ReportWizardFileOptionsPanel.java @@ -30,7 +30,7 @@ import org.openide.util.HelpCtx; * * @author jwallace */ -public class ReportWizardFileOptionsPanel implements WizardDescriptor.FinishablePanel{ + class ReportWizardFileOptionsPanel implements WizardDescriptor.FinishablePanel{ private WizardDescriptor wiz; private ReportWizardFileOptionsVisualPanel component; private JButton finishButton; diff --git a/Core/src/org/sleuthkit/autopsy/report/ReportWizardFileOptionsVisualPanel.java b/Core/src/org/sleuthkit/autopsy/report/ReportWizardFileOptionsVisualPanel.java index 1afb83cc06..150905f125 100755 --- a/Core/src/org/sleuthkit/autopsy/report/ReportWizardFileOptionsVisualPanel.java +++ b/Core/src/org/sleuthkit/autopsy/report/ReportWizardFileOptionsVisualPanel.java @@ -37,7 +37,7 @@ import javax.swing.event.ListDataListener; * * @author jwallace */ -public class ReportWizardFileOptionsVisualPanel extends javax.swing.JPanel { +class ReportWizardFileOptionsVisualPanel extends javax.swing.JPanel { private List options; private Map optionStates = new EnumMap<>(FileReportDataTypes.class); private ListModel model; diff --git a/Core/src/org/sleuthkit/autopsy/report/ReportWizardIterator.java b/Core/src/org/sleuthkit/autopsy/report/ReportWizardIterator.java index bb5f7ef3d9..cfec65ba81 100644 --- a/Core/src/org/sleuthkit/autopsy/report/ReportWizardIterator.java +++ b/Core/src/org/sleuthkit/autopsy/report/ReportWizardIterator.java @@ -27,7 +27,7 @@ import javax.swing.event.ChangeListener; import org.openide.WizardDescriptor; import org.openide.util.NbPreferences; -public final class ReportWizardIterator implements WizardDescriptor.Iterator { + final class ReportWizardIterator implements WizardDescriptor.Iterator { private int index; private ReportWizardPanel1 firstPanel; diff --git a/Core/src/org/sleuthkit/autopsy/report/ReportWizardPanel1.java b/Core/src/org/sleuthkit/autopsy/report/ReportWizardPanel1.java index 17671d7624..576bfbdd7d 100644 --- a/Core/src/org/sleuthkit/autopsy/report/ReportWizardPanel1.java +++ b/Core/src/org/sleuthkit/autopsy/report/ReportWizardPanel1.java @@ -29,7 +29,7 @@ import org.openide.WizardDescriptor; import org.openide.util.HelpCtx; import org.openide.util.NbPreferences; -public class ReportWizardPanel1 implements WizardDescriptor.FinishablePanel { + class ReportWizardPanel1 implements WizardDescriptor.FinishablePanel { private WizardDescriptor wiz; private ReportVisualPanel1 component; private JButton nextButton; diff --git a/Core/src/org/sleuthkit/autopsy/report/ReportWizardPanel2.java b/Core/src/org/sleuthkit/autopsy/report/ReportWizardPanel2.java index c0612cb6dd..fec8e3c5a2 100644 --- a/Core/src/org/sleuthkit/autopsy/report/ReportWizardPanel2.java +++ b/Core/src/org/sleuthkit/autopsy/report/ReportWizardPanel2.java @@ -26,7 +26,7 @@ import org.openide.WizardDescriptor; import org.openide.util.HelpCtx; import org.openide.util.NbPreferences; -public class ReportWizardPanel2 implements WizardDescriptor.Panel { + class ReportWizardPanel2 implements WizardDescriptor.Panel { private ReportVisualPanel2 component; private JButton finishButton; private JButton nextButton; diff --git a/Core/src/org/sleuthkit/autopsy/report/SQLiteDBConnect.java b/Core/src/org/sleuthkit/autopsy/report/SQLiteDBConnect.java index 23fb5c8b40..97142c840a 100644 --- a/Core/src/org/sleuthkit/autopsy/report/SQLiteDBConnect.java +++ b/Core/src/org/sleuthkit/autopsy/report/SQLiteDBConnect.java @@ -32,7 +32,7 @@ import org.sleuthkit.autopsy.coreutils.Logger; /** * Database connection class & utilities * */ -public class SQLiteDBConnect { + public class SQLiteDBConnect { public String sDriver = ""; public String sUrl = null; diff --git a/Core/src/org/sleuthkit/autopsy/report/TableReportModule.java b/Core/src/org/sleuthkit/autopsy/report/TableReportModule.java index 4a7bc9ac50..61e715f644 100644 --- a/Core/src/org/sleuthkit/autopsy/report/TableReportModule.java +++ b/Core/src/org/sleuthkit/autopsy/report/TableReportModule.java @@ -29,7 +29,7 @@ import java.util.List; * The data sent consists of user-chosen fields such as Blackboard Artifacts * and File/Result Tags. */ -public interface TableReportModule extends ReportModule { + interface TableReportModule extends ReportModule { /** * Start the report. Open any output streams, initialize member variables, diff --git a/CoreLibs/src/org/sleuthkit/autopsy/corelibs/ScalrWrapper.java b/CoreLibs/src/org/sleuthkit/autopsy/corelibs/ScalrWrapper.java index fce800e30b..ef2cf7c876 100644 --- a/CoreLibs/src/org/sleuthkit/autopsy/corelibs/ScalrWrapper.java +++ b/CoreLibs/src/org/sleuthkit/autopsy/corelibs/ScalrWrapper.java @@ -27,7 +27,7 @@ import org.imgscalr.Scalr.Method; * Scalr wrapper to deal with exports and provide thread-safety * */ -public class ScalrWrapper { + public class ScalrWrapper { public static synchronized BufferedImage resize(BufferedImage input, int width, int height) { return Scalr.resize(input, width, height, Scalr.OP_ANTIALIAS); diff --git a/FileExtMismatch/src/org/sleuthkit/autopsy/fileextmismatch/AddFileExtensionAction.java b/FileExtMismatch/src/org/sleuthkit/autopsy/fileextmismatch/AddFileExtensionAction.java index b0e8ea28fb..a2a9f12747 100644 --- a/FileExtMismatch/src/org/sleuthkit/autopsy/fileextmismatch/AddFileExtensionAction.java +++ b/FileExtMismatch/src/org/sleuthkit/autopsy/fileextmismatch/AddFileExtensionAction.java @@ -31,7 +31,7 @@ import javax.swing.JOptionPane; * Do the context menu action for adding a new filename extension to * the mismatch list for the MIME type of the selected node. */ -public class AddFileExtensionAction extends AbstractAction { +class AddFileExtensionAction extends AbstractAction { private String extStr; private String mimeTypeStr; diff --git a/FileExtMismatch/src/org/sleuthkit/autopsy/fileextmismatch/Bundle.properties b/FileExtMismatch/src/org/sleuthkit/autopsy/fileextmismatch/Bundle.properties index 0172466a3d..6b00d4a0ca 100644 --- a/FileExtMismatch/src/org/sleuthkit/autopsy/fileextmismatch/Bundle.properties +++ b/FileExtMismatch/src/org/sleuthkit/autopsy/fileextmismatch/Bundle.properties @@ -16,3 +16,4 @@ FileExtMismatchConfigPanel.mimeRemoveErrLabel.text=\ FileExtMismatchConfigPanel.extRemoveErrLabel.text=\ FileExtMismatchConfigPanel.saveMsgLabel.text=\ FileExtMismatchSimpleConfigPanel.skipNoExtCheckBox.text=Skip Files Without Extensions +FileExtMismatchSimpleConfigPanel.skipTextPlain.text=Skip text/plain MIME type diff --git a/FileExtMismatch/src/org/sleuthkit/autopsy/fileextmismatch/FileExtMismatchConfigPanel.java b/FileExtMismatch/src/org/sleuthkit/autopsy/fileextmismatch/FileExtMismatchConfigPanel.java index 2b2ca04ae1..4a027b6ba2 100644 --- a/FileExtMismatch/src/org/sleuthkit/autopsy/fileextmismatch/FileExtMismatchConfigPanel.java +++ b/FileExtMismatch/src/org/sleuthkit/autopsy/fileextmismatch/FileExtMismatchConfigPanel.java @@ -37,7 +37,7 @@ import org.sleuthkit.autopsy.filetypeid.FileTypeIdIngestModule; /** * Container panel for File Extension Mismatch Ingest Module advanced configuration options */ -public final class FileExtMismatchConfigPanel extends javax.swing.JPanel implements OptionsPanel { +final class FileExtMismatchConfigPanel extends javax.swing.JPanel implements OptionsPanel { private static Logger logger = Logger.getLogger(FileExtMismatchConfigPanel.class.getName()); private HashMap editableMap = new HashMap<>(); private ArrayList mimeList = null; @@ -392,7 +392,11 @@ public final class FileExtMismatchConfigPanel extends javax.swing.JPanel impleme mimeErrLabel.setText("MIME type text is empty!"); return; } - + if (newMime.equals( "application/octet-stream")){ + mimeErrLabel.setForeground(Color.red); + mimeErrLabel.setText("MIME type not supported!"); + return; + } if (mimeList.contains(newMime)) { mimeErrLabel.setForeground(Color.red); mimeErrLabel.setText("MIME type already exists!"); diff --git a/FileExtMismatch/src/org/sleuthkit/autopsy/fileextmismatch/FileExtMismatchIngestModule.java b/FileExtMismatch/src/org/sleuthkit/autopsy/fileextmismatch/FileExtMismatchIngestModule.java index 459f61d694..f4167f758b 100644 --- a/FileExtMismatch/src/org/sleuthkit/autopsy/fileextmismatch/FileExtMismatchIngestModule.java +++ b/FileExtMismatch/src/org/sleuthkit/autopsy/fileextmismatch/FileExtMismatchIngestModule.java @@ -60,7 +60,8 @@ public class FileExtMismatchIngestModule extends org.sleuthkit.autopsy.ingest.In private static long numFiles = 0; private static boolean skipKnown = false; private static boolean skipNoExt = true; - + private static boolean skipTextPlain = false; + private int attrId = -1; private int attrId2 = -1; private FileExtMismatchSimpleConfigPanel simpleConfigPanel; @@ -133,7 +134,7 @@ public class FileExtMismatchIngestModule extends org.sleuthkit.autopsy.ingest.In private boolean compareSigTypeToExt(AbstractFile abstractFile) { try { currActualExt = abstractFile.getNameExtension(); - + // If we are skipping names with no extension if (skipNoExt && currActualExt.isEmpty()) { return false; @@ -148,7 +149,13 @@ public class FileExtMismatchIngestModule extends org.sleuthkit.autopsy.ingest.In for (BlackboardAttribute att : atrList) { if (att.getAttributeTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_FILE_TYPE_SIG.getTypeID()) { currActualSigType = att.getValueString(); - + if (skipTextPlain) + { + if (!currActualExt.isEmpty()&&currActualSigType.equals("text/plain")) + { + return false; + } + } //get known allowed values from the map for this type String[] slist = SigTypeToExtMap.get(att.getValueString()); if (slist != null) { @@ -258,6 +265,8 @@ public class FileExtMismatchIngestModule extends org.sleuthkit.autopsy.ingest.In public static void setSkipNoExt(boolean flag) { skipNoExt = flag; } - + public static void setSkipTextPlain(boolean flag) { + skipTextPlain = flag; + } } diff --git a/FileExtMismatch/src/org/sleuthkit/autopsy/fileextmismatch/FileExtMismatchSimpleConfigPanel.form b/FileExtMismatch/src/org/sleuthkit/autopsy/fileextmismatch/FileExtMismatchSimpleConfigPanel.form index a112c72b72..21d366a524 100644 --- a/FileExtMismatch/src/org/sleuthkit/autopsy/fileextmismatch/FileExtMismatchSimpleConfigPanel.form +++ b/FileExtMismatch/src/org/sleuthkit/autopsy/fileextmismatch/FileExtMismatchSimpleConfigPanel.form @@ -16,24 +16,26 @@ - - - - - + + + + + + - + - - - - + + + + + @@ -64,5 +66,15 @@ + + + + + + + + + + diff --git a/FileExtMismatch/src/org/sleuthkit/autopsy/fileextmismatch/FileExtMismatchSimpleConfigPanel.java b/FileExtMismatch/src/org/sleuthkit/autopsy/fileextmismatch/FileExtMismatchSimpleConfigPanel.java index 526fef6f9b..c490fdce95 100644 --- a/FileExtMismatch/src/org/sleuthkit/autopsy/fileextmismatch/FileExtMismatchSimpleConfigPanel.java +++ b/FileExtMismatch/src/org/sleuthkit/autopsy/fileextmismatch/FileExtMismatchSimpleConfigPanel.java @@ -22,7 +22,7 @@ package org.sleuthkit.autopsy.fileextmismatch; /** * Instances of this class provide a simplified UI for managing the hash sets configuration. */ -public class FileExtMismatchSimpleConfigPanel extends javax.swing.JPanel { +class FileExtMismatchSimpleConfigPanel extends javax.swing.JPanel { public FileExtMismatchSimpleConfigPanel() { initComponents(); @@ -46,6 +46,7 @@ public class FileExtMismatchSimpleConfigPanel extends javax.swing.JPanel { skipKnownCheckBox = new javax.swing.JCheckBox(); skipNoExtCheckBox = new javax.swing.JCheckBox(); + skipTextPlain = new javax.swing.JCheckBox(); skipKnownCheckBox.setSelected(true); skipKnownCheckBox.setText(org.openide.util.NbBundle.getMessage(FileExtMismatchSimpleConfigPanel.class, "FileExtMismatchSimpleConfigPanel.skipKnownCheckBox.text")); // NOI18N @@ -64,25 +65,34 @@ public class FileExtMismatchSimpleConfigPanel extends javax.swing.JPanel { } }); + skipTextPlain.setText(org.openide.util.NbBundle.getMessage(FileExtMismatchSimpleConfigPanel.class, "FileExtMismatchSimpleConfigPanel.skipTextPlain.text")); // NOI18N + skipTextPlain.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + skipTextPlainActionPerformed(evt); + } + }); + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() - .addGap(10, 10, 10) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addComponent(skipKnownCheckBox, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(skipNoExtCheckBox, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addContainerGap(127, Short.MAX_VALUE)) + .addContainerGap() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(skipTextPlain) + .addComponent(skipNoExtCheckBox) + .addComponent(skipKnownCheckBox, javax.swing.GroupLayout.PREFERRED_SIZE, 165, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(0, 327, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() - .addGap(11, 11, 11) - .addComponent(skipKnownCheckBox) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(skipNoExtCheckBox) - .addContainerGap(152, Short.MAX_VALUE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(skipTextPlain) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(skipKnownCheckBox) + .addContainerGap(72, Short.MAX_VALUE)) ); }// //GEN-END:initComponents @@ -94,8 +104,14 @@ public class FileExtMismatchSimpleConfigPanel extends javax.swing.JPanel { FileExtMismatchIngestModule.setSkipNoExt(skipNoExtCheckBox.isSelected()); }//GEN-LAST:event_skipNoExtCheckBoxActionPerformed + private void skipTextPlainActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_skipTextPlainActionPerformed + FileExtMismatchIngestModule.setSkipTextPlain(skipTextPlain.isSelected()); + + }//GEN-LAST:event_skipTextPlainActionPerformed + // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JCheckBox skipKnownCheckBox; private javax.swing.JCheckBox skipNoExtCheckBox; + private javax.swing.JCheckBox skipTextPlain; // End of variables declaration//GEN-END:variables } diff --git a/FileExtMismatch/src/org/sleuthkit/autopsy/fileextmismatch/FileExtMismatchXML.java b/FileExtMismatch/src/org/sleuthkit/autopsy/fileextmismatch/FileExtMismatchXML.java index 8de27f4b6f..5283d5c04f 100644 --- a/FileExtMismatch/src/org/sleuthkit/autopsy/fileextmismatch/FileExtMismatchXML.java +++ b/FileExtMismatch/src/org/sleuthkit/autopsy/fileextmismatch/FileExtMismatchXML.java @@ -42,7 +42,7 @@ import org.w3c.dom.NodeList; * Storage of file extension mismatch configuration, which maps mimetypes to * allowable filename extensions. */ -public class FileExtMismatchXML { +class FileExtMismatchXML { private static final Logger logger = Logger.getLogger(FileExtMismatchXML.class.getName()); private static FileExtMismatchXML defaultInstance = null; @@ -54,7 +54,7 @@ public class FileExtMismatchXML { private static final String EXT_EL = "ext"; private static final String SIG_MIMETYPE_ATTR = "mimetype"; - private static final String DEFAULT_CONFIG_FILE_NAME = "mismatch_config.xml"; + private static final String DEFAULT_CONFIG_FILE_NAME = "mismatch_config.xml"; protected String filePath; @@ -79,7 +79,7 @@ public class FileExtMismatchXML { } return defaultInstance; } - + /** * Load and parse XML * @@ -111,7 +111,7 @@ public class FileExtMismatchXML { for(int sigIndex = 0; sigIndex < numSigs; ++sigIndex) { Element sigEl = (Element)sigNList.item(sigIndex); final String mimetype = sigEl.getAttribute(SIG_MIMETYPE_ATTR); - + NodeList extNList = sigEl.getElementsByTagName(EXT_EL); final int numExts = extNList.getLength(); @@ -181,4 +181,6 @@ public class FileExtMismatchXML { } return success; } + } + diff --git a/FileExtMismatch/src/org/sleuthkit/autopsy/fileextmismatch/mismatch_config.xml b/FileExtMismatch/src/org/sleuthkit/autopsy/fileextmismatch/mismatch_config.xml index bada97fa28..8c88fcb430 100644 --- a/FileExtMismatch/src/org/sleuthkit/autopsy/fileextmismatch/mismatch_config.xml +++ b/FileExtMismatch/src/org/sleuthkit/autopsy/fileextmismatch/mismatch_config.xml @@ -1,5 +1,6 @@ + txt ini @@ -36,7 +37,6 @@ php php3 phtml - adp h hpp hxx @@ -113,7 +113,45 @@ winprf winprf_backup svg - + psp + jsp + oem + map + det + ins + ph + prx + sif + idl + isl + nld + sve + ita + fra + esn + enu + deu + sep + sve + cht + chs + psm + rq0 + old + eng + dlg + org + ic + ths + sig + std + cmp + stp + rst + lng + xdc + tha + sys doc docx @@ -223,11 +261,22 @@ hta wpl htt - adp - + shtml + + jpg - jpeg + jpeg + jpe + jif + jfif + jfi + + + psd + + + nef tif @@ -249,14 +298,19 @@ ico + mp4 + m4r mov qt mp4 - + + + rm + 3gp @@ -273,6 +327,7 @@ wmv asf + wma wma @@ -281,10 +336,17 @@ mpg mpeg + m1v + m2v + mpe + mpv flv - + + + m4v + rm @@ -293,5 +355,90 @@ swf - + + + + aif + aiff + + + aif + aiff + + + flac + + + wav + + + m4a + mp4 + + + mp2 + mp3 + mpa + m2a + + + aac + + + mp2 + mp3 + mpa + m2a + + + mp2 + mp3 + mpa + m2a + + + m3u + + + mid + midi + + + ogg + + + + rar + + + arj + + + tar + + + gz + gzip + tgz + + + bzip + bz + + + cab + + + jar + + + bzip2 + + + cpio + + + + exe + \ No newline at end of file diff --git a/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/FileTypeDetectionInterface.java b/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/FileTypeDetectionInterface.java index 47f4feb77b..a28a10ded7 100644 --- a/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/FileTypeDetectionInterface.java +++ b/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/FileTypeDetectionInterface.java @@ -27,7 +27,7 @@ import org.sleuthkit.datamodel.AbstractFile; * to an extension string list instead of the third-party library's extension * reporting. */ -public interface FileTypeDetectionInterface { + interface FileTypeDetectionInterface { // Struct to hold multiple values for return public class FileIdInfo { diff --git a/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/FileTypeIdIngestModule.java b/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/FileTypeIdIngestModule.java index 9e50ec68bb..15ac19da18 100644 --- a/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/FileTypeIdIngestModule.java +++ b/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/FileTypeIdIngestModule.java @@ -39,7 +39,7 @@ import org.sleuthkit.datamodel.TskException; * Detects the type of a file based on signature (magic) values. * Posts results to the blackboard. */ -public class FileTypeIdIngestModule extends org.sleuthkit.autopsy.ingest.IngestModuleAbstractFile { + public class FileTypeIdIngestModule extends org.sleuthkit.autopsy.ingest.IngestModuleAbstractFile { private static FileTypeIdIngestModule defaultInstance = null; public final static String MODULE_NAME = "File Type Identification"; public final static String MODULE_DESCRIPTION = "Matches file types based on binary signatures."; diff --git a/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/FileTypeIdSimpleConfigPanel.java b/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/FileTypeIdSimpleConfigPanel.java index 43576d8184..cffd6afd5c 100644 --- a/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/FileTypeIdSimpleConfigPanel.java +++ b/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/FileTypeIdSimpleConfigPanel.java @@ -22,7 +22,7 @@ package org.sleuthkit.autopsy.filetypeid; /** * Instances of this class provide a simplified UI for managing the hash sets configuration. */ -public class FileTypeIdSimpleConfigPanel extends javax.swing.JPanel { + class FileTypeIdSimpleConfigPanel extends javax.swing.JPanel { public FileTypeIdSimpleConfigPanel() { initComponents(); diff --git a/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/TikaFileTypeDetector.java b/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/TikaFileTypeDetector.java index ff24f485e5..7822b933e5 100644 --- a/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/TikaFileTypeDetector.java +++ b/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/TikaFileTypeDetector.java @@ -26,7 +26,7 @@ import org.apache.tika.mime.MimeTypes; import org.sleuthkit.datamodel.AbstractFile; -public class TikaFileTypeDetector implements FileTypeDetectionInterface { +class TikaFileTypeDetector implements FileTypeDetectionInterface { private static Tika tikaInst = new Tika(); diff --git a/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbConfigPanel.java b/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbConfigPanel.java index 4fa82d4a2c..bb6df9a6aa 100644 --- a/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbConfigPanel.java +++ b/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbConfigPanel.java @@ -46,7 +46,7 @@ import org.sleuthkit.autopsy.hashdatabase.HashDbManager.HashDb.KnownFilesType; /** * Instances of this class provide a comprehensive UI for managing the hash sets configuration. */ -public final class HashDbConfigPanel extends javax.swing.JPanel implements OptionsPanel { + final class HashDbConfigPanel extends javax.swing.JPanel implements OptionsPanel { private static final String NO_SELECTION_TEXT = "No database selected"; private static final String ERROR_GETTING_PATH_TEXT = "Error occurred getting path"; private static final String ERROR_GETTING_INDEX_STATUS_TEXT = "Error occurred getting status"; diff --git a/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbSearchAction.java b/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbSearchAction.java index 1f815ee60e..960efe949f 100644 --- a/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbSearchAction.java +++ b/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbSearchAction.java @@ -36,7 +36,7 @@ import org.sleuthkit.datamodel.FsContent; * specific Content attached; it is manually programmed into a Node's available * actions. */ -public class HashDbSearchAction extends CallableSystemAction implements HashSearchProvider { +class HashDbSearchAction extends CallableSystemAction implements HashSearchProvider { private static final InitializeContentVisitor initializeCV = new InitializeContentVisitor(); private AbstractFile file; diff --git a/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbSearchManager.java b/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbSearchManager.java index 4a64c42df7..ffe2b99587 100644 --- a/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbSearchManager.java +++ b/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbSearchManager.java @@ -34,7 +34,7 @@ import org.sleuthkit.datamodel.AbstractFile; * Interface/Node manager for hash searching. The manager takes in the raw * map of MD5 hashes to files, flattens the map, and sends it to the HashDbSearchResultFactory. */ -public class HashDbSearchManager { + class HashDbSearchManager { private Map> map; private List kvContents; diff --git a/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbSearchPanel.java b/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbSearchPanel.java index e400c9e14b..be291f91d2 100644 --- a/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbSearchPanel.java +++ b/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbSearchPanel.java @@ -35,7 +35,7 @@ import org.sleuthkit.autopsy.ingest.IngestManager; /** * Searches for files by md5 hash, based off the hash given in this panel. */ -public class HashDbSearchPanel extends javax.swing.JPanel implements ActionListener { + class HashDbSearchPanel extends javax.swing.JPanel implements ActionListener { private static final Logger logger = Logger.getLogger(HashDbSearchPanel.class.getName()); private static HashDbSearchPanel instance; diff --git a/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbSearchResultFactory.java b/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbSearchResultFactory.java index f4cca5075a..e5b4e09f0e 100644 --- a/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbSearchResultFactory.java +++ b/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbSearchResultFactory.java @@ -29,7 +29,7 @@ import org.sleuthkit.datamodel.AbstractFile; /** * Factory class to create a KeyValueFileNode for each KeyValueContent in the Collection. */ -public class HashDbSearchResultFactory extends ChildFactory { + class HashDbSearchResultFactory extends ChildFactory { Collection kvContents; HashDbSearchResultFactory(Collection kvContents) { diff --git a/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbSearcher.java b/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbSearcher.java index 8d1a9ba00d..c775bb5cf1 100644 --- a/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbSearcher.java +++ b/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbSearcher.java @@ -33,7 +33,7 @@ import org.sleuthkit.datamodel.SleuthkitCase; * Searches by MD5 hash to find all files with the same hash, and * subsequently the same content. */ -public class HashDbSearcher { + class HashDbSearcher { /** * Given a string hash value, find all files with that hash. diff --git a/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbSimpleConfigPanel.java b/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbSimpleConfigPanel.java index 4149ccccfd..ae27c7984f 100644 --- a/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbSimpleConfigPanel.java +++ b/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbSimpleConfigPanel.java @@ -36,7 +36,7 @@ import org.sleuthkit.autopsy.hashdatabase.HashDbManager.HashDb; /** * Instances of this class provide a simplified UI for managing the hash sets configuration. */ -public class HashDbSimpleConfigPanel extends javax.swing.JPanel { + class HashDbSimpleConfigPanel extends javax.swing.JPanel { private HashDatabasesTableModel knownTableModel; private HashDatabasesTableModel knownBadTableModel; diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/AbstractFileChunk.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/AbstractFileChunk.java index 9e5e0a2da2..88ce54707c 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/AbstractFileChunk.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/AbstractFileChunk.java @@ -20,6 +20,7 @@ package org.sleuthkit.autopsy.keywordsearch; import java.nio.charset.Charset; + import org.sleuthkit.autopsy.keywordsearch.Ingester.IngesterException; /** @@ -51,7 +52,8 @@ class AbstractFileChunk { return Server.getChunkIdString(this.parent.getSourceFile().getId(), this.chunkID); } - public boolean index(Ingester ingester, byte[] content, long contentSize, Charset indexCharset) throws IngesterException { + public boolean index(Ingester ingester, byte[] content, long contentSize, Charset indexCharset) + throws IngesterException { boolean success = true; ByteContentStream bcs = new ByteContentStream(content, contentSize, parent.getSourceFile(), indexCharset); try { @@ -59,9 +61,11 @@ class AbstractFileChunk { //logger.log(Level.INFO, "Ingesting string chunk: " + this.getName() + ": " + chunkID); } catch (Exception ingEx) { success = false; - throw new IngesterException("Problem ingesting file string chunk: " + parent.getSourceFile().getId() + ", chunk: " + chunkID, ingEx); + throw new IngesterException("Problem ingesting file string chunk: " + + parent.getSourceFile().getId() + + ", chunk: " + chunkID, ingEx); } return success; } - + } diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/AbstractFileExtract.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/AbstractFileExtract.java index dcb8b25728..41fa61801d 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/AbstractFileExtract.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/AbstractFileExtract.java @@ -21,6 +21,7 @@ package org.sleuthkit.autopsy.keywordsearch; import java.util.Arrays; import java.util.List; import java.util.Map; + import org.sleuthkit.autopsy.coreutils.StringExtract.StringExtractUnicodeTable.SCRIPT; import org.sleuthkit.datamodel.AbstractFile; @@ -37,44 +38,46 @@ interface AbstractFileExtract { EXTRACT_UTF16, ///< extract UTF16 text, possible values Boolean.TRUE.toString(), Boolean.FALSE.toString() EXTRACT_UTF8, ///< extract UTF8 text, possible values Boolean.TRUE.toString(), Boolean.FALSE.toString() - }; - + } + + ; + //generally text extractors should ignore archives //and let unpacking modules take case of them static final List ARCHIVE_MIME_TYPES = Arrays.asList( - //ignore unstructured binary and compressed data, for which string extraction or unzipper works better - "application/x-7z-compressed", - "application/x-ace-compressed", - "application/x-alz-compressed", - "application/x-arj", - "application/vnd.ms-cab-compressed", - "application/x-cfs-compressed", - "application/x-dgc-compressed", - "application/x-apple-diskimage", - "application/x-gca-compressed", - "application/x-dar", - "application/x-lzx", - "application/x-lzh", - "application/x-rar-compressed", - "application/x-stuffit", - "application/x-stuffitx", - "application/x-gtar", - "application/x-archive", - "application/x-executable", - "application/x-gzip", - "application/zip", - "application/x-zoo", - "application/x-cpio", - "application/x-shar", - "application/x-tar", - "application/x-bzip", - "application/x-bzip2", - "application/x-lzip", - "application/x-lzma", - "application/x-lzop", - "application/x-z", - "application/x-compress"); + //ignore unstructured binary and compressed data, for which string extraction or unzipper works better + "application/x-7z-compressed", + "application/x-ace-compressed", + "application/x-alz-compressed", + "application/x-arj", + "application/vnd.ms-cab-compressed", + "application/x-cfs-compressed", + "application/x-dgc-compressed", + "application/x-apple-diskimage", + "application/x-gca-compressed", + "application/x-dar", + "application/x-lzx", + "application/x-lzh", + "application/x-rar-compressed", + "application/x-stuffit", + "application/x-stuffitx", + "application/x-gtar", + "application/x-archive", + "application/x-executable", + "application/x-gzip", + "application/zip", + "application/x-zoo", + "application/x-cpio", + "application/x-shar", + "application/x-tar", + "application/x-bzip", + "application/x-bzip2", + "application/x-lzip", + "application/x-lzma", + "application/x-lzop", + "application/x-z", + "application/x-compress"); /** * Get number of chunks resulted from extracting this AbstractFile @@ -143,9 +146,9 @@ interface AbstractFileExtract { * Determines if the file content is supported by the extractor if * isContentTypeSpecific() returns true. * - * @param file to test if its content should be supported + * @param file to test if its content should be supported * @param detectedFormat mime-type with detected format (such as text/plain) - * or null if not detected + * or null if not detected * @return true if the file content is supported, false otherwise */ boolean isSupported(AbstractFile file, String detectedFormat); diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/AbstractFileHtmlExtract.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/AbstractFileHtmlExtract.java index 39e59dbe90..230f67dc96 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/AbstractFileHtmlExtract.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/AbstractFileHtmlExtract.java @@ -26,6 +26,7 @@ import java.util.Arrays; import java.util.List; import java.util.Map; import java.util.logging.Level; + import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.coreutils.StringExtract.StringExtractUnicodeTable.SCRIPT; import org.sleuthkit.autopsy.keywordsearch.Ingester.IngesterException; @@ -37,7 +38,7 @@ import org.sleuthkit.datamodel.ReadContentInputStream; * divided into chunks and indexed with Solr. If HTML extraction succeeds, * chunks are indexed with Solr. */ -public class AbstractFileHtmlExtract implements AbstractFileExtract { +class AbstractFileHtmlExtract implements AbstractFileExtract { private static final Logger logger = Logger.getLogger(AbstractFileHtmlExtract.class.getName()); static final Charset outCharset = Server.DEFAULT_INDEXED_TEXT_CHARSET; @@ -58,7 +59,7 @@ public class AbstractFileHtmlExtract implements AbstractFileExtract { "text/html", "text/javascript" //"application/xml", //"application/xml-dtd", - ); + ); private final TikaLanguageIdentifier tikaLanguageIdentifier; AbstractFileHtmlExtract() { @@ -189,10 +190,12 @@ public class AbstractFileHtmlExtract implements AbstractFileExtract { module.checkRunCommitSearch(); } } catch (IOException ex) { - logger.log(Level.WARNING, "Unable to read content stream from " + sourceFile.getId() + ": " + sourceFile.getName(), ex); + logger.log(Level.WARNING, "Unable to read content stream from " + + sourceFile.getId() + ": " + sourceFile.getName(), ex); success = false; } catch (Exception ex) { - logger.log(Level.WARNING, "Unexpected error, can't read content stream from " + sourceFile.getId() + ": " + sourceFile.getName(), ex); + logger.log(Level.WARNING, "Unexpected error, can't read content stream from " + + sourceFile.getId() + ": " + sourceFile.getName(), ex); success = false; } finally { try { diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/AbstractFileStringContentStream.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/AbstractFileStringContentStream.java index a6e6c49900..d6de6b4dbe 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/AbstractFileStringContentStream.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/AbstractFileStringContentStream.java @@ -23,6 +23,7 @@ import java.io.InputStream; import java.io.InputStreamReader; import java.io.Reader; import java.nio.charset.Charset; + import org.sleuthkit.autopsy.coreutils.Logger; import org.apache.solr.common.util.ContentStream; import org.sleuthkit.datamodel.AbstractContent; @@ -31,7 +32,7 @@ import org.sleuthkit.datamodel.AbstractFile; /** * Wrapper over InputStream that implements ContentStream to feed to Solr. */ -public class AbstractFileStringContentStream implements ContentStream { +class AbstractFileStringContentStream implements ContentStream { //input private AbstractFile content; @@ -69,7 +70,8 @@ public class AbstractFileStringContentStream implements ContentStream { @Override public Long getSize() { //return convertedLength; - throw new UnsupportedOperationException("Cannot tell how many chars in converted string, until entire string is converted"); + throw new UnsupportedOperationException( + "Cannot tell how many chars in converted string, until entire string is converted"); } @Override @@ -85,7 +87,7 @@ public class AbstractFileStringContentStream implements ContentStream { @Override protected void finalize() throws Throwable { super.finalize(); - + stream.close(); } } diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/AbstractFileStringExtract.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/AbstractFileStringExtract.java index 15c6aac52c..1370b9b782 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/AbstractFileStringExtract.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/AbstractFileStringExtract.java @@ -26,6 +26,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.logging.Level; + import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.coreutils.StringExtract.StringExtractUnicodeTable.SCRIPT; import org.sleuthkit.autopsy.keywordsearch.Ingester.IngesterException; @@ -51,7 +52,7 @@ class AbstractFileStringExtract implements AbstractFileExtract { private static final SCRIPT DEFAULT_SCRIPT = SCRIPT.LATIN_2; private final List tags scripts.append(tag.getElement().getContent()).append("\n"); numScripts++; - } else if(tag.getName().equals("a")) { + } else if (tag.getName().equals("a")) { links.append(numLinks).append(") "); links.append(tag.getTagContent()).append("\n"); numLinks++; - } else if(tag.getName().equals("img")) { + } else if (tag.getName().equals("img")) { images.append(numImages).append(") "); images.append(tag.getTagContent()).append("\n"); numImages++; - } else if(tag.getTagType().equals(StartTagType.COMMENT)) { + } else if (tag.getTagType().equals(StartTagType.COMMENT)) { comments.append(numComments).append(") "); comments.append(tag.getTagContent()).append("\n"); numComments++; } else { // Make sure it has an attribute Attributes atts = tag.getAttributes(); - if (atts!=null && atts.length()>0) { + if (atts != null && atts.length() > 0) { others.append(numOthers).append(") "); others.append(tag.getName()).append(":"); others.append(tag.getTagContent()).append("\n"); @@ -119,19 +121,23 @@ public class JerichoParserWrapper { out.append(text).append("\n\n"); out.append("----------NONVISIBLE TEXT----------\n\n"); - if(numScripts>1) { + if (numScripts > 1) { out.append("---Scripts---\n"); out.append(scripts.toString()).append("\n"); - } if(numLinks>1) { + } + if (numLinks > 1) { out.append("---Links---\n"); out.append(links.toString()).append("\n"); - } if(numImages>1) { + } + if (numImages > 1) { out.append("---Images---\n"); out.append(images.toString()).append("\n"); - } if(numComments>1) { + } + if (numComments > 1) { out.append("---Comments---\n"); out.append(comments.toString()).append("\n"); - } if(numOthers>1) { + } + if (numOthers > 1) { out.append("---Others---\n"); out.append(others.toString()).append("\n"); } @@ -141,7 +147,7 @@ public class JerichoParserWrapper { logger.log(Level.WARNING, "Unable to parse the HTML file", ex); } } - + // Extract text from the source, nicely formatted with whitespace and // newlines where appropriate. private String renderHTMLAsPlainText(Source source) { diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Keyword.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Keyword.java index f715a97e87..5c1e27980a 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Keyword.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Keyword.java @@ -24,42 +24,39 @@ import org.sleuthkit.datamodel.BlackboardAttribute; /** * Representation of single keyword to search for */ -public class Keyword { +class Keyword { private String keywordString; // keyword to search for private boolean isLiteral; // false if reg exp private BlackboardAttribute.ATTRIBUTE_TYPE keywordType = null; /** - * - * @param query Keyword to search for + * @param query Keyword to search for * @param isLiteral false if reg exp */ Keyword(String query, boolean isLiteral) { this.keywordString = query; this.isLiteral = isLiteral; } - + /** - * - * @param query Keyword to search for - * @param isLiteral false if reg exp - * @param keywordType + * @param query Keyword to search for + * @param isLiteral false if reg exp + * @param keywordType */ Keyword(String query, boolean isLiteral, BlackboardAttribute.ATTRIBUTE_TYPE keywordType) { this(query, isLiteral); this.keywordType = keywordType; } - + void setType(BlackboardAttribute.ATTRIBUTE_TYPE keywordType) { this.keywordType = keywordType; } - + BlackboardAttribute.ATTRIBUTE_TYPE getType() { return this.keywordType; } /** - * * @return Keyword to search for */ String getQuery() { @@ -72,10 +69,10 @@ public class Keyword { @Override public String toString() { - return "Keyword{" + "query=" + keywordString + ", isLiteral=" + isLiteral + ", keywordType=" + keywordType + '}'; + return "Keyword{" + "query=" + keywordString + ", isLiteral=" + isLiteral + ", keywordType=" + keywordType + + '}'; } - - + @Override public boolean equals(Object obj) { @@ -86,7 +83,8 @@ public class Keyword { return false; } final Keyword other = (Keyword) obj; - if ((this.keywordString == null) ? (other.keywordString != null) : !this.keywordString.equals(other.keywordString)) { + if ((this.keywordString == null) ? (other.keywordString != null) + : !this.keywordString.equals(other.keywordString)) { return false; } if (this.isLiteral != other.isLiteral) { diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordQueryFilter.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordQueryFilter.java index 1afbc464a9..f6cca5df51 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordQueryFilter.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordQueryFilter.java @@ -23,17 +23,16 @@ import java.util.Iterator; import java.util.Set; /** - * * Filter to restrict query only specific files, chunks, images * Single filter supports multiple ids per file/chunk/image, that act as OR filter */ -public class KeywordQueryFilter { +class KeywordQueryFilter { public static enum FilterType { FILE, CHUNK, DATA_SOURCE }; - private SetidFilters; + private Set idFilters; private FilterType filterType; public KeywordQueryFilter(FilterType filterType, long id) { @@ -42,7 +41,7 @@ public class KeywordQueryFilter { this.idFilters.add(id); } - public KeywordQueryFilter(FilterType filterType, Setids) { + public KeywordQueryFilter(FilterType filterType, Set ids) { this.filterType = filterType; this.idFilters = ids; } @@ -59,8 +58,8 @@ public class KeywordQueryFilter { public String toString() { StringBuilder sb = new StringBuilder(); String id = null; - - Iteratorit = idFilters.iterator(); + + Iterator it = idFilters.iterator(); for (int i = 0; it.hasNext(); ++i) { if (i > 0) { sb.append(" "); //OR diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearch.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearch.java index a39961e0a1..e85a62a790 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearch.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearch.java @@ -27,6 +27,7 @@ import java.util.logging.FileHandler; import java.util.logging.Level; import java.util.logging.Logger; import java.util.logging.SimpleFormatter; + import org.openide.util.Exceptions; import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.coreutils.PlatformUtil; @@ -36,7 +37,7 @@ import org.sleuthkit.autopsy.keywordsearch.KeywordSearchResultFactory.ResultWrit * Wrapper over KeywordSearch Solr server singleton. * The class also provides some global types and property change support on the server events. */ -public class KeywordSearch { +class KeywordSearch { private static Server server; //we want a custom java.util.logging.Logger here for a reason @@ -66,7 +67,8 @@ public class KeywordSearch { static { try { final int MAX_TIKA_LOG_FILES = 3; - FileHandler tikaLogHandler = new FileHandler(PlatformUtil.getUserDirectory().getAbsolutePath() + "/var/log/tika.log", + FileHandler tikaLogHandler = new FileHandler( + PlatformUtil.getUserDirectory().getAbsolutePath() + "/var/log/tika.log", 0, MAX_TIKA_LOG_FILES); tikaLogHandler.setFormatter(new SimpleFormatter()); tikaLogHandler.setEncoding(PlatformUtil.getLogFileEncoding()); @@ -88,16 +90,16 @@ public class KeywordSearch { static Logger getTikaLogger() { return TIKA_LOGGER; } - + public static void addNumIndexedFilesChangeListener(PropertyChangeListener l) { changeSupport.addPropertyChangeListener(NUM_FILES_CHANGE_EVT, l); } - + public static void removeNumIndexedFilesChangeListener(PropertyChangeListener l) { changeSupport.removePropertyChangeListener(l); } - + static void fireNumIndexedFilesChange(Integer oldNum, Integer newNum) { changeSupport.firePropertyChange(NUM_FILES_CHANGE_EVT, oldNum, newNum); } diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchAction.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchAction.java index 68b730b550..7ae6086728 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchAction.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchAction.java @@ -21,9 +21,10 @@ package org.sleuthkit.autopsy.keywordsearch; import java.awt.Component; import java.awt.event.ActionEvent; import javax.swing.AbstractAction; + import org.openide.util.actions.Presenter; -public final class KeywordSearchAction extends AbstractAction implements Presenter.Toolbar { +final class KeywordSearchAction extends AbstractAction implements Presenter.Toolbar { @Override public void actionPerformed(ActionEvent e) { diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchConfigurationAction.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchConfigurationAction.java index faa4f9688e..e3898b58b1 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchConfigurationAction.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchConfigurationAction.java @@ -23,6 +23,7 @@ import java.awt.event.ActionListener; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.awt.event.WindowListener; + import org.openide.util.HelpCtx; import org.openide.util.actions.CallableSystemAction; import org.sleuthkit.autopsy.corecomponents.AdvancedConfigurationDialog; @@ -30,9 +31,10 @@ import org.sleuthkit.autopsy.corecomponents.AdvancedConfigurationDialog; /** * System action to open the KeywordSearch Options panel. */ -class KeywordSearchConfigurationAction extends CallableSystemAction{ - - private static final String ACTION_NAME = org.openide.util.NbBundle.getMessage(KeywordSearchPanel.class, "ListBundleConfig"); +class KeywordSearchConfigurationAction extends CallableSystemAction { + + private static final String ACTION_NAME = org.openide.util.NbBundle + .getMessage(KeywordSearchPanel.class, "ListBundleConfig"); private KeywordSearchConfigurationPanel panel; @Override @@ -59,9 +61,9 @@ class KeywordSearchConfigurationAction extends CallableSystemAction{ dialog.addWindowListener(exitListener); dialog.display(panel); } - + private KeywordSearchConfigurationPanel getPanel() { - if(panel==null) { + if (panel == null) { panel = new KeywordSearchConfigurationPanel(); } return panel; @@ -76,7 +78,7 @@ class KeywordSearchConfigurationAction extends CallableSystemAction{ public HelpCtx getHelpCtx() { return HelpCtx.DEFAULT_HELP; } - + @Override protected boolean asynchronous() { return false; diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchConfigurationPanel.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchConfigurationPanel.java index 6fa8618dfc..59f24424cd 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchConfigurationPanel.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchConfigurationPanel.java @@ -19,12 +19,13 @@ package org.sleuthkit.autopsy.keywordsearch; +import org.openide.util.NbBundle; import org.sleuthkit.autopsy.corecomponents.OptionsPanel; /** * Container panel for keyword search advanced configuration options */ -public final class KeywordSearchConfigurationPanel extends javax.swing.JPanel implements OptionsPanel { +final class KeywordSearchConfigurationPanel extends javax.swing.JPanel implements OptionsPanel { private KeywordSearchConfigurationPanel1 listsPanel; private KeywordSearchConfigurationPanel3 languagesPanel; @@ -34,15 +35,30 @@ public final class KeywordSearchConfigurationPanel extends javax.swing.JPanel im initComponents(); customizeComponents(); } - + private void customizeComponents() { - setName("Advanced Keyword Search Configuration"); + setName(NbBundle.getMessage(this.getClass(), "KeywordSearchConfigurationPanel.customizeComponents.title")); listsPanel = new KeywordSearchConfigurationPanel1(); languagesPanel = new KeywordSearchConfigurationPanel3(); generalPanel = new KeywordSearchConfigurationPanel2(); - tabbedPane.insertTab("Lists", null, listsPanel, "List configuration", 0); - tabbedPane.insertTab("String Extraction", null, languagesPanel, "String extraction configuration for Keyword Search Ingest", 1); - tabbedPane.insertTab("General", null, generalPanel, "General configuration", 2); + tabbedPane.insertTab(NbBundle.getMessage(this.getClass(), + "KeywordSearchConfigurationPanel.customizeComponents.listTabTitle"), + null, + listsPanel, NbBundle.getMessage(this.getClass(), + "KeywordSearchConfigurationPanel.customizeComponents.listLabToolTip"), + 0); + tabbedPane.insertTab(NbBundle.getMessage(this.getClass(), + "KeywordSearchConfigurationPanel.customizeComponents.stringExtTitle"), + null, + languagesPanel, NbBundle.getMessage(this.getClass(), + "KeywordSearchConfigurationPanel.customizeComponents.stringExtToolTip"), + 1); + tabbedPane.insertTab( + NbBundle.getMessage(this.getClass(), "KeywordSearchConfigurationPanel.customizeComponents.genTabTitle"), + null, + generalPanel, NbBundle.getMessage(this.getClass(), + "KeywordSearchConfigurationPanel.customizeComponents.genTabToolTip"), + 2); } /** @@ -58,12 +74,14 @@ public final class KeywordSearchConfigurationPanel extends javax.swing.JPanel im javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(tabbedPane, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 675, Short.MAX_VALUE) + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(tabbedPane, javax.swing.GroupLayout.Alignment.TRAILING, + javax.swing.GroupLayout.DEFAULT_SIZE, 675, Short.MAX_VALUE) ); layout.setVerticalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(tabbedPane, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 505, Short.MAX_VALUE) + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(tabbedPane, javax.swing.GroupLayout.Alignment.TRAILING, + javax.swing.GroupLayout.DEFAULT_SIZE, 505, Short.MAX_VALUE) ); }// //GEN-END:initComponents @@ -91,14 +109,14 @@ public final class KeywordSearchConfigurationPanel extends javax.swing.JPanel im } public void cancel() { - KeywordSearchListsXML.getCurrent().reload(); + KeywordSearchListsXML.getCurrent().reload(); } - + boolean valid() { // TODO check whether form is consistent and complete return true; } - + // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JTabbedPane tabbedPane; // End of variables declaration//GEN-END:variables diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchConfigurationPanel1.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchConfigurationPanel1.java index f40185e96b..24861675e3 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchConfigurationPanel1.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchConfigurationPanel1.java @@ -28,23 +28,27 @@ import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.List; import javax.swing.JOptionPane; + +import org.openide.util.NbBundle; import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.corecomponents.OptionsPanel; -import org.sleuthkit.autopsy.ingest.IngestManager; /** * Panel containing all other Keyword search Options panels. */ -public class KeywordSearchConfigurationPanel1 extends javax.swing.JPanel implements OptionsPanel { +class KeywordSearchConfigurationPanel1 extends javax.swing.JPanel implements OptionsPanel { KeywordSearchListsManagementPanel listsManagementPanel; KeywordSearchEditListPanel editListPanel; private static final Logger logger = Logger.getLogger(KeywordSearchConfigurationPanel1.class.getName()); - private static final String KEYWORD_CONFIG_NAME = org.openide.util.NbBundle.getMessage(KeywordSearchPanel.class, "ListBundleConfig"); - - /** Creates new form KeywordSearchConfigurationPanel1 */ + private static final String KEYWORD_CONFIG_NAME = org.openide.util.NbBundle.getMessage(KeywordSearchPanel.class, + "ListBundleConfig"); + + /** + * Creates new form KeywordSearchConfigurationPanel1 + */ KeywordSearchConfigurationPanel1() { - + initComponents(); customizeComponents(); setName(KEYWORD_CONFIG_NAME); @@ -56,13 +60,14 @@ public class KeywordSearchConfigurationPanel1 extends javax.swing.JPanel impleme listsManagementPanel.addListSelectionListener(editListPanel); editListPanel.addDeleteButtonActionPerformed(new ActionListener() { - + @Override public void actionPerformed(ActionEvent e) { - if (KeywordSearchUtil.displayConfirmDialog("Delete a keyword list" - , "This will delete the keyword list globally (for all Cases). " - + "Do you want to proceed with the deletion? " - , KeywordSearchUtil.DIALOG_MESSAGE_TYPE.WARN) ) { + if (KeywordSearchUtil.displayConfirmDialog(NbBundle.getMessage(this.getClass(), + "KeywordSearchConfigurationPanel1.customizeComponents.title") + , NbBundle.getMessage(this.getClass(), + "KeywordSearchConfigurationPanel1.customizeComponents.body") + , KeywordSearchUtil.DIALOG_MESSAGE_TYPE.WARN)) { KeywordSearchListsXML deleter = KeywordSearchListsXML.getCurrent(); String toDelete = editListPanel.getCurrentKeywordList().getName(); @@ -73,9 +78,9 @@ public class KeywordSearchConfigurationPanel1 extends javax.swing.JPanel impleme } } }); - + editListPanel.addSaveButtonActionPerformed(new ActionListener() { - + @Override public void actionPerformed(ActionEvent e) { final String FEATURE_NAME = "Save Keyword List"; @@ -84,13 +89,15 @@ public class KeywordSearchConfigurationPanel1 extends javax.swing.JPanel impleme List keywords = currentKeywordList.getKeywords(); if (keywords.isEmpty()) { - KeywordSearchUtil.displayDialog(FEATURE_NAME, "Keyword List is empty and cannot be saved", KeywordSearchUtil.DIALOG_MESSAGE_TYPE.INFO); + KeywordSearchUtil.displayDialog(FEATURE_NAME, NbBundle.getMessage(this.getClass(), + "KeywordSearchConfigurationPanel1.customizeComponents.keywordListEmptyErr"), + KeywordSearchUtil.DIALOG_MESSAGE_TYPE.INFO); return; } String listName = (String) JOptionPane.showInputDialog( null, - "New keyword list name:", + NbBundle.getMessage(this.getClass(), "KeywordSearch.newKwListTitle"), FEATURE_NAME, JOptionPane.PLAIN_MESSAGE, null, @@ -101,13 +108,18 @@ public class KeywordSearchConfigurationPanel1 extends javax.swing.JPanel impleme } if (writer.listExists(listName) && writer.getList(listName).isLocked()) { - KeywordSearchUtil.displayDialog(FEATURE_NAME, "Cannot overwrite default list", KeywordSearchUtil.DIALOG_MESSAGE_TYPE.WARN); + KeywordSearchUtil.displayDialog(FEATURE_NAME, NbBundle.getMessage(this.getClass(), + "KeywordSearchConfigurationPanel1.customizeComponents.noOwDefaultMsg"), + KeywordSearchUtil.DIALOG_MESSAGE_TYPE.WARN); return; } boolean shouldAdd = false; if (writer.listExists(listName)) { - boolean replace = KeywordSearchUtil.displayConfirmDialog(FEATURE_NAME, "Keyword List <" + listName + "> already exists, do you want to replace it?", - KeywordSearchUtil.DIALOG_MESSAGE_TYPE.WARN); + boolean replace = KeywordSearchUtil.displayConfirmDialog(FEATURE_NAME, + NbBundle.getMessage(this.getClass(), + "KeywordSearchConfigurationPanel1.customizeComponents.kwListExistMsg", + listName), + KeywordSearchUtil.DIALOG_MESSAGE_TYPE.WARN); if (replace) { shouldAdd = true; } @@ -118,34 +130,38 @@ public class KeywordSearchConfigurationPanel1 extends javax.swing.JPanel impleme if (shouldAdd) { writer.addList(listName, keywords); - KeywordSearchUtil.displayDialog(FEATURE_NAME, "Keyword List <" + listName + "> saved", KeywordSearchUtil.DIALOG_MESSAGE_TYPE.INFO); + KeywordSearchUtil.displayDialog(FEATURE_NAME, NbBundle.getMessage(this.getClass(), + "KeywordSearchConfigurationPanel1.customizeComponents.kwListSavedMsg", + listName), + KeywordSearchUtil.DIALOG_MESSAGE_TYPE.INFO); } //currentKeywordList = writer.getList(listName); - + listsManagementPanel.resync(); } }); - + mainSplitPane.setLeftComponent(listsManagementPanel); mainSplitPane.setRightComponent(editListPanel); mainSplitPane.revalidate(); mainSplitPane.repaint(); } - + @Override public void store() { KeywordSearchListsXML.getCurrent().save(false); //refresh the list viewer/searcher panel KeywordSearchListsViewerPanel.getDefault().resync(); } - + @Override public void load() { listsManagementPanel.load(); } - /** This method is called from within the constructor to + /** + * This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. @@ -164,12 +180,12 @@ public class KeywordSearchConfigurationPanel1 extends javax.swing.JPanel impleme javax.swing.GroupLayout leftPanelLayout = new javax.swing.GroupLayout(leftPanel); leftPanel.setLayout(leftPanelLayout); leftPanelLayout.setHorizontalGroup( - leftPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 275, Short.MAX_VALUE) + leftPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 275, Short.MAX_VALUE) ); leftPanelLayout.setVerticalGroup( - leftPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 327, Short.MAX_VALUE) + leftPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 327, Short.MAX_VALUE) ); mainSplitPane.setLeftComponent(leftPanel); @@ -177,12 +193,12 @@ public class KeywordSearchConfigurationPanel1 extends javax.swing.JPanel impleme javax.swing.GroupLayout rightPanelLayout = new javax.swing.GroupLayout(rightPanel); rightPanel.setLayout(rightPanelLayout); rightPanelLayout.setHorizontalGroup( - rightPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 318, Short.MAX_VALUE) + rightPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 318, Short.MAX_VALUE) ); rightPanelLayout.setVerticalGroup( - rightPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 327, Short.MAX_VALUE) + rightPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 327, Short.MAX_VALUE) ); mainSplitPane.setRightComponent(rightPanel); @@ -190,12 +206,12 @@ public class KeywordSearchConfigurationPanel1 extends javax.swing.JPanel impleme javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(mainSplitPane) + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(mainSplitPane) ); layout.setVerticalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(mainSplitPane) + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(mainSplitPane) ); }// //GEN-END:initComponents @@ -204,5 +220,5 @@ public class KeywordSearchConfigurationPanel1 extends javax.swing.JPanel impleme private javax.swing.JSplitPane mainSplitPane; private javax.swing.JPanel rightPanel; // End of variables declaration//GEN-END:variables - + } diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchConfigurationPanel2.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchConfigurationPanel2.java index 75ffc4ee32..ea7e4ee49e 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchConfigurationPanel2.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchConfigurationPanel2.java @@ -21,6 +21,7 @@ package org.sleuthkit.autopsy.keywordsearch; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import java.util.logging.Level; + import org.sleuthkit.autopsy.coreutils.Logger; import org.apache.solr.client.solrj.SolrServerException; import org.sleuthkit.autopsy.corecomponents.OptionsPanel; @@ -30,7 +31,7 @@ import org.sleuthkit.autopsy.keywordsearch.KeywordSearchIngestModule.UpdateFrequ /** * General, not per list, keyword search configuration and status display widget */ -public class KeywordSearchConfigurationPanel2 extends javax.swing.JPanel implements OptionsPanel { +class KeywordSearchConfigurationPanel2 extends javax.swing.JPanel implements OptionsPanel { private final Logger logger = Logger.getLogger(KeywordSearchConfigurationPanel2.class.getName()); @@ -97,35 +98,52 @@ public class KeywordSearchConfigurationPanel2 extends javax.swing.JPanel impleme timeRadioButton3 = new javax.swing.JRadioButton(); timeRadioButton4 = new javax.swing.JRadioButton(); - skipNSRLCheckBox.setText(org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel2.class, "KeywordSearchConfigurationPanel2.skipNSRLCheckBox.text")); // NOI18N - skipNSRLCheckBox.setToolTipText(org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel2.class, "KeywordSearchConfigurationPanel2.skipNSRLCheckBox.toolTipText")); // NOI18N + skipNSRLCheckBox.setText(org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel2.class, + "KeywordSearchConfigurationPanel2.skipNSRLCheckBox.text")); // NOI18N + skipNSRLCheckBox.setToolTipText(org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel2.class, + "KeywordSearchConfigurationPanel2.skipNSRLCheckBox.toolTipText")); // NOI18N - filesIndexedLabel.setText(org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel2.class, "KeywordSearchConfigurationPanel2.filesIndexedLabel.text")); // NOI18N + filesIndexedLabel.setText(org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel2.class, + "KeywordSearchConfigurationPanel2.filesIndexedLabel.text")); // NOI18N - filesIndexedValue.setText(org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel2.class, "KeywordSearchConfigurationPanel2.filesIndexedValue.text")); // NOI18N + filesIndexedValue.setText(org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel2.class, + "KeywordSearchConfigurationPanel2.filesIndexedValue.text")); // NOI18N filesIndexedValue.setMaximumSize(null); - chunksLabel.setText(org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel2.class, "KeywordSearchConfigurationPanel2.chunksLabel.text")); // NOI18N + chunksLabel.setText(org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel2.class, + "KeywordSearchConfigurationPanel2.chunksLabel.text")); // NOI18N - chunksValLabel.setText(org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel2.class, "KeywordSearchConfigurationPanel2.chunksValLabel.text")); // NOI18N + chunksValLabel.setText(org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel2.class, + "KeywordSearchConfigurationPanel2.chunksValLabel.text")); // NOI18N - settingsLabel.setText(org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel2.class, "KeywordSearchConfigurationPanel2.settingsLabel.text")); // NOI18N + settingsLabel.setText(org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel2.class, + "KeywordSearchConfigurationPanel2.settingsLabel.text")); // NOI18N - informationLabel.setText(org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel2.class, "KeywordSearchConfigurationPanel2.informationLabel.text")); // NOI18N + informationLabel.setText(org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel2.class, + "KeywordSearchConfigurationPanel2.informationLabel.text")); // NOI18N - frequencyLabel.setText(org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel2.class, "KeywordSearchConfigurationPanel2.frequencyLabel.text")); // NOI18N + frequencyLabel.setText(org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel2.class, + "KeywordSearchConfigurationPanel2.frequencyLabel.text")); // NOI18N - timeRadioButton1.setText(org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel2.class, "KeywordSearchConfigurationPanel2.timeRadioButton1.text")); // NOI18N - timeRadioButton1.setToolTipText(org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel2.class, "KeywordSearchConfigurationPanel2.timeRadioButton1.toolTipText")); // NOI18N + timeRadioButton1.setText(org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel2.class, + "KeywordSearchConfigurationPanel2.timeRadioButton1.text")); // NOI18N + timeRadioButton1.setToolTipText(org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel2.class, + "KeywordSearchConfigurationPanel2.timeRadioButton1.toolTipText")); // NOI18N - timeRadioButton2.setText(org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel2.class, "KeywordSearchConfigurationPanel2.timeRadioButton2.text")); // NOI18N - timeRadioButton2.setToolTipText(org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel2.class, "KeywordSearchConfigurationPanel2.timeRadioButton2.toolTipText")); // NOI18N + timeRadioButton2.setText(org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel2.class, + "KeywordSearchConfigurationPanel2.timeRadioButton2.text")); // NOI18N + timeRadioButton2.setToolTipText(org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel2.class, + "KeywordSearchConfigurationPanel2.timeRadioButton2.toolTipText")); // NOI18N - timeRadioButton3.setText(org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel2.class, "KeywordSearchConfigurationPanel2.timeRadioButton3.text")); // NOI18N - timeRadioButton3.setToolTipText(org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel2.class, "KeywordSearchConfigurationPanel2.timeRadioButton3.toolTipText")); // NOI18N + timeRadioButton3.setText(org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel2.class, + "KeywordSearchConfigurationPanel2.timeRadioButton3.text")); // NOI18N + timeRadioButton3.setToolTipText(org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel2.class, + "KeywordSearchConfigurationPanel2.timeRadioButton3.toolTipText")); // NOI18N - timeRadioButton4.setText(org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel2.class, "KeywordSearchConfigurationPanel2.timeRadioButton4.text_1")); // NOI18N - timeRadioButton4.setToolTipText(org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel2.class, "KeywordSearchConfigurationPanel2.timeRadioButton4.toolTipText")); // NOI18N + timeRadioButton4.setText(org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel2.class, + "KeywordSearchConfigurationPanel2.timeRadioButton4.text_1")); // NOI18N + timeRadioButton4.setToolTipText(org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel2.class, + "KeywordSearchConfigurationPanel2.timeRadioButton4.toolTipText")); // NOI18N javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); @@ -239,14 +257,11 @@ public class KeywordSearchConfigurationPanel2 extends javax.swing.JPanel impleme private UpdateFrequency getSelectedTimeValue() { if (timeRadioButton1.isSelected()) { return UpdateFrequency.FAST; - } - else if (timeRadioButton2.isSelected()) { + } else if (timeRadioButton2.isSelected()) { return UpdateFrequency.AVG; - } - else if (timeRadioButton3.isSelected()) { + } else if (timeRadioButton3.isSelected()) { return UpdateFrequency.SLOW; - } - else if (timeRadioButton4.isSelected()) { + } else if (timeRadioButton4.isSelected()) { return UpdateFrequency.SLOWEST; } return UpdateFrequency.DEFAULT; @@ -282,7 +297,8 @@ public class KeywordSearchConfigurationPanel2 extends javax.swing.JPanel impleme int newFilesIndexed = ((Integer) newValue).intValue(); filesIndexedValue.setText(Integer.toString(newFilesIndexed)); try { - chunksValLabel.setText(Integer.toString(KeywordSearch.getServer().queryNumIndexedChunks())); + chunksValLabel + .setText(Integer.toString(KeywordSearch.getServer().queryNumIndexedChunks())); } catch (KeywordSearchModuleException ex) { logger.log(Level.WARNING, "Could not get number of indexed chunks"); diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchConfigurationPanel3.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchConfigurationPanel3.java index 263e5d860e..ae52c60839 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchConfigurationPanel3.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchConfigurationPanel3.java @@ -26,8 +26,11 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; + import org.sleuthkit.autopsy.coreutils.Logger; + import javax.swing.JCheckBox; + import org.sleuthkit.autopsy.corecomponents.OptionsPanel; import org.sleuthkit.autopsy.coreutils.StringExtract; import org.sleuthkit.autopsy.coreutils.StringExtract.StringExtractUnicodeTable.SCRIPT; @@ -36,11 +39,12 @@ import org.sleuthkit.autopsy.ingest.IngestManager; /** * Advanced configuration panel handling languages config. */ -public class KeywordSearchConfigurationPanel3 extends javax.swing.JPanel implements OptionsPanel { +class KeywordSearchConfigurationPanel3 extends javax.swing.JPanel implements OptionsPanel { private static KeywordSearchConfigurationPanel3 instance = null; private final Logger logger = Logger.getLogger(KeywordSearchConfigurationPanel3.class.getName()); - private final Map scripts = new HashMap(); + private final Map scripts + = new HashMap(); private ActionListener updateLanguagesAction; private List