From c3b5765ba7611a4480fdf35988754a6f68966c92 Mon Sep 17 00:00:00 2001 From: Oliver Spohngellert Date: Fri, 6 May 2016 15:01:45 -0400 Subject: [PATCH 1/4] Made global settings panel expandable. --- .../org/sleuthkit/autopsy/ingest/IngestJobSettingsPanel.java | 2 +- .../autopsy/ingest/IngestModuleGlobalSettingsPanel.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestJobSettingsPanel.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestJobSettingsPanel.java index f947c28359..11e60567b3 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestJobSettingsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestJobSettingsPanel.java @@ -286,7 +286,7 @@ public final class IngestJobSettingsPanel extends javax.swing.JPanel { }// //GEN-END:initComponents private void globalSettingsButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_globalSettingsButtonActionPerformed - final AdvancedConfigurationDialog dialog = new AdvancedConfigurationDialog(); + final AdvancedConfigurationDialog dialog = new AdvancedConfigurationDialog(true); dialog.addApplyButtonListener(new ActionListener() { @Override diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestModuleGlobalSettingsPanel.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestModuleGlobalSettingsPanel.java index 837bccc847..f05ed5409a 100755 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestModuleGlobalSettingsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestModuleGlobalSettingsPanel.java @@ -25,5 +25,6 @@ import javax.swing.JPanel; */ public abstract class IngestModuleGlobalSettingsPanel extends JPanel { + public abstract void saveSettings(); } From 047a8b78316b442e4ed45d31a0d85d84c3368209 Mon Sep 17 00:00:00 2001 From: Oliver Spohngellert Date: Thu, 12 May 2016 12:16:59 -0400 Subject: [PATCH 2/4] Fixed expansion behavior problems. --- .../AdvancedConfigurationDialog.form | 3 +- .../FileTypeIdGlobalSettingsPanel.form | 491 +++++++++--------- .../FileTypeIdGlobalSettingsPanel.java | 52 +- 3 files changed, 292 insertions(+), 254 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/AdvancedConfigurationDialog.form b/Core/src/org/sleuthkit/autopsy/corecomponents/AdvancedConfigurationDialog.form index c43b3f6718..15993c7cfe 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/AdvancedConfigurationDialog.form +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/AdvancedConfigurationDialog.form @@ -6,6 +6,7 @@ + @@ -17,7 +18,7 @@ - + diff --git a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/FileTypeIdGlobalSettingsPanel.form b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/FileTypeIdGlobalSettingsPanel.form index 6c562d5325..741c775f3c 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/FileTypeIdGlobalSettingsPanel.form +++ b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/FileTypeIdGlobalSettingsPanel.form @@ -3,7 +3,7 @@
- + @@ -24,294 +24,315 @@ - - - - - - - - - + + + - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - - - - - - + + - - - - - + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - - - - - - - - + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + - - - - - - - - - + + + + + + + + + + + - + - - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - - - - + + - + - - - - - - - - + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/FileTypeIdGlobalSettingsPanel.java b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/FileTypeIdGlobalSettingsPanel.java index 1361169c45..7f5457abee 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/FileTypeIdGlobalSettingsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/FileTypeIdGlobalSettingsPanel.java @@ -302,6 +302,7 @@ final class FileTypeIdGlobalSettingsPanel extends IngestModuleGlobalSettingsPane // //GEN-BEGIN:initComponents private void initComponents() { + jPanel3 = new javax.swing.JPanel(); ingestRunningWarningLabel = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jScrollPane2 = new javax.swing.JScrollPane(); @@ -318,7 +319,7 @@ final class FileTypeIdGlobalSettingsPanel extends IngestModuleGlobalSettingsPane jScrollPane1 = new javax.swing.JScrollPane(); signatureList = new javax.swing.JList<>(); - setMaximumSize(new java.awt.Dimension(752, 507)); + setMaximumSize(null); setPreferredSize(new java.awt.Dimension(752, 507)); ingestRunningWarningLabel.setFont(ingestRunningWarningLabel.getFont().deriveFont(ingestRunningWarningLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11)); @@ -391,7 +392,7 @@ final class FileTypeIdGlobalSettingsPanel extends IngestModuleGlobalSettingsPane .addGap(12, 12, 12) .addComponent(jLabel2) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(typesScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 385, Short.MAX_VALUE) + .addComponent(typesScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 397, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(newTypeButton) @@ -436,7 +437,7 @@ final class FileTypeIdGlobalSettingsPanel extends IngestModuleGlobalSettingsPane .addContainerGap() .addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 388, Short.MAX_VALUE) + .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE) .addGap(40, 40, 40)) ); @@ -444,29 +445,43 @@ final class FileTypeIdGlobalSettingsPanel extends IngestModuleGlobalSettingsPane jScrollPane2.setViewportView(jSplitPane1); - javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); - this.setLayout(layout); - layout.setHorizontalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() + javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); + jPanel3.setLayout(jPanel3Layout); + jPanel3Layout.setHorizontalGroup( + jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel3Layout.createSequentialGroup() .addContainerGap() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(ingestRunningWarningLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() - .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, 753, Short.MAX_VALUE) - .addContainerGap()))) - .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 761, Short.MAX_VALUE)) + .addContainerGap()) ); - layout.setVerticalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addGap(6, 6, 6) + jPanel3Layout.setVerticalGroup( + jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel3Layout.createSequentialGroup() + .addContainerGap() .addComponent(jLabel3) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(ingestRunningWarningLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(12, 12, 12)) + .addContainerGap()) + ); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); + this.setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGap(0, 0, 0)) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGap(0, 0, 0)) ); }// //GEN-END:initComponents @@ -512,6 +527,7 @@ final class FileTypeIdGlobalSettingsPanel extends IngestModuleGlobalSettingsPane private javax.swing.JLabel jLabel3; private javax.swing.JPanel jPanel1; private javax.swing.JPanel jPanel2; + private javax.swing.JPanel jPanel3; private javax.swing.JScrollPane jScrollPane1; private javax.swing.JScrollPane jScrollPane2; private javax.swing.JSplitPane jSplitPane1; From 1b82966bbb3290c6d5909fe824deeddf1da07424 Mon Sep 17 00:00:00 2001 From: Oliver Spohngellert Date: Tue, 17 May 2016 09:06:33 -0400 Subject: [PATCH 3/4] Updated documentation for indexing artifacts and recommended panel size. --- docs/doxygen/modIngest.dox | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/docs/doxygen/modIngest.dox b/docs/doxygen/modIngest.dox index 8584bd2f0c..85cf165c86 100755 --- a/docs/doxygen/modIngest.dox +++ b/docs/doxygen/modIngest.dox @@ -206,6 +206,20 @@ for the latest data. However, if you are writing a large number of blackboard artifacts in a loop, it is better to invoke org.sleuthkit.autopsy.ingest.IngestServices.fireModuleDataEvent() only once after the bulk write, so as not to flood the system with events. +Further, when modules create artifacts, they should be indexed for keyword search, +using the method Blackboard.indexArtifact(BlackboardArtifact artifact). This can be done +in the following way: + +\code +Blackboard blackboard = Case.getCurrentCase().getServices().getBlackboard(); +try { + blackboard.indexArtifact(artifact); //Your artifact as the parameter. +} +catch (BlackboardException ex) { + //YOUR EXCEPTION BEHAVIOR HERE. +} +\endcode + \subsection ingest_modules_making_results_report Making a Report @@ -277,7 +291,7 @@ Autopsy allows you to provide a graphical panel that will be displayed when the To provide options for each ingest job: - Update org.sleuthkit.autopsy.ingest.IngestModuleFactory.hasIngestJobSettingsPanel() in your factory class to return true. -- Update org.sleuthkit.autopsy.ingest.IngestModuleFactory.getIngestJobSettingsPanel() in your factory class to return a IngestModuleIngestJobSettingsPanel that displays the needed configuration options. The org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettingsPanel.getSettings() method should return an instance of a org.sleutkit.autopsy.ingest.IngestModuleIngestJobSettings object based on the user-specified settings (see next bullet). +- Update org.sleuthkit.autopsy.ingest.IngestModuleFactory.getIngestJobSettingsPanel() in your factory class to return a IngestModuleIngestJobSettingsPanel that displays the needed configuration options. The recommended size for this panel is 300 x 300. The org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettingsPanel.getSettings() method should return an instance of a org.sleutkit.autopsy.ingest.IngestModuleIngestJobSettings object based on the user-specified settings (see next bullet). - Create a class that implements org.sleutkit.autopsy.ingest.IngestModuleIngestJobSettings. Your IngestModuleIngestJobSettingsPanel should store settings in here. This class needs to be Serializable, so keep all data types simple or mark them as transient with some custom deserialization code. You should also set the serialVersionUID (see http://stackoverflow.com/questions/285793/what-is-a-serialversionuid-and-why-should-i-use-it). - If you decide to store settings internal to the module (NOT RECOMMENDED), the getSettings() method can return an instance of NoIngestModuleIngestJobSettings. - Your instance of IngestModuleIngestJobSettings will be saved and passed to your panel the next time so that you can pre-populate it accordingly. @@ -380,4 +394,4 @@ except that now Autopsy persists the settings in a context-sensitive fashion. the former singletons and receive a IngestModuleIngestJobSettings object that should be passed to the constructors of the module instances the factory creates. -*/ +*/ \ No newline at end of file From c46d805b53f69ab7068a817aa00854373eafef7a Mon Sep 17 00:00:00 2001 From: Oliver Spohngellert Date: Tue, 17 May 2016 09:20:53 -0400 Subject: [PATCH 4/4] Updated wording. --- docs/doxygen/modIngest.dox | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/doxygen/modIngest.dox b/docs/doxygen/modIngest.dox index 85cf165c86..ff4f051479 100755 --- a/docs/doxygen/modIngest.dox +++ b/docs/doxygen/modIngest.dox @@ -207,13 +207,13 @@ artifacts in a loop, it is better to invoke org.sleuthkit.autopsy.ingest.IngestS only once after the bulk write, so as not to flood the system with events. Further, when modules create artifacts, they should be indexed for keyword search, -using the method Blackboard.indexArtifact(BlackboardArtifact artifact). This can be done +using the method org.sleuthkit.autopsy.casemodule.services.Blackboard.indexArtifact(BlackboardArtifact artifact). This can be done in the following way: \code Blackboard blackboard = Case.getCurrentCase().getServices().getBlackboard(); try { - blackboard.indexArtifact(artifact); //Your artifact as the parameter. + blackboard.indexArtifact(artifact); //Your artifact as the argument. } catch (BlackboardException ex) { //YOUR EXCEPTION BEHAVIOR HERE. @@ -291,7 +291,7 @@ Autopsy allows you to provide a graphical panel that will be displayed when the To provide options for each ingest job: - Update org.sleuthkit.autopsy.ingest.IngestModuleFactory.hasIngestJobSettingsPanel() in your factory class to return true. -- Update org.sleuthkit.autopsy.ingest.IngestModuleFactory.getIngestJobSettingsPanel() in your factory class to return a IngestModuleIngestJobSettingsPanel that displays the needed configuration options. The recommended size for this panel is 300 x 300. The org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettingsPanel.getSettings() method should return an instance of a org.sleutkit.autopsy.ingest.IngestModuleIngestJobSettings object based on the user-specified settings (see next bullet). +- Update org.sleuthkit.autopsy.ingest.IngestModuleFactory.getIngestJobSettingsPanel() in your factory class to return a IngestModuleIngestJobSettingsPanel that displays the needed configuration options. The recommended size for this panel is 300 x 300 pixels. The org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettingsPanel.getSettings() method should return an instance of a org.sleutkit.autopsy.ingest.IngestModuleIngestJobSettings object based on the user-specified settings (see next bullet). - Create a class that implements org.sleutkit.autopsy.ingest.IngestModuleIngestJobSettings. Your IngestModuleIngestJobSettingsPanel should store settings in here. This class needs to be Serializable, so keep all data types simple or mark them as transient with some custom deserialization code. You should also set the serialVersionUID (see http://stackoverflow.com/questions/285793/what-is-a-serialversionuid-and-why-should-i-use-it). - If you decide to store settings internal to the module (NOT RECOMMENDED), the getSettings() method can return an instance of NoIngestModuleIngestJobSettings. - Your instance of IngestModuleIngestJobSettings will be saved and passed to your panel the next time so that you can pre-populate it accordingly.