diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/Case.java b/Core/src/org/sleuthkit/autopsy/casemodule/Case.java
index 9ef5f6e3b8..474ffa18ff 100644
--- a/Core/src/org/sleuthkit/autopsy/casemodule/Case.java
+++ b/Core/src/org/sleuthkit/autopsy/casemodule/Case.java
@@ -682,10 +682,8 @@ public class Case {
* Delete the text index.
*/
progressIndicator.start(Bundle.Case_progressMessage_deletingTextIndex());
-
- for (KeywordSearchService searchService : Lookup.getDefault().lookupAll(KeywordSearchService.class
- )) {
- searchService.deleteTextIndex(metadata.getTextIndexName());
+ for (KeywordSearchService searchService : Lookup.getDefault().lookupAll(KeywordSearchService.class)) {
+ searchService.deleteTextIndex(metadata);
}
if (CaseType.MULTI_USER_CASE == metadata.getCaseType()) {
diff --git a/Core/src/org/sleuthkit/autopsy/ingest/ProfileSettingsPanel.form b/Core/src/org/sleuthkit/autopsy/ingest/ProfileSettingsPanel.form
index e9c71501e5..a03fa2cd75 100644
--- a/Core/src/org/sleuthkit/autopsy/ingest/ProfileSettingsPanel.form
+++ b/Core/src/org/sleuthkit/autopsy/ingest/ProfileSettingsPanel.form
@@ -33,11 +33,11 @@
-
+
-
+
-
+
@@ -118,25 +118,25 @@
-
+
-
-
+
+
-
+
-
+
@@ -181,16 +181,16 @@
-
+
-
+
-
+
-
+
@@ -206,16 +206,16 @@
-
+
-
+
-
+
-
+
@@ -231,10 +231,16 @@
-
+
+
+
+
+
+
+
-
+
diff --git a/Core/src/org/sleuthkit/autopsy/ingest/ProfileSettingsPanel.java b/Core/src/org/sleuthkit/autopsy/ingest/ProfileSettingsPanel.java
index 249f77cbfd..3dcbb6dc16 100644
--- a/Core/src/org/sleuthkit/autopsy/ingest/ProfileSettingsPanel.java
+++ b/Core/src/org/sleuthkit/autopsy/ingest/ProfileSettingsPanel.java
@@ -110,10 +110,10 @@ class ProfileSettingsPanel extends IngestModuleGlobalSettingsPanel implements Op
newProfileButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/add16.png"))); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(newProfileButton, org.openide.util.NbBundle.getMessage(ProfileSettingsPanel.class, "ProfileSettingsPanel.newProfileButton.text")); // NOI18N
- newProfileButton.setMargin(new java.awt.Insets(2, 8, 2, 8));
- newProfileButton.setMaximumSize(new java.awt.Dimension(97, 23));
- newProfileButton.setMinimumSize(new java.awt.Dimension(97, 23));
- newProfileButton.setPreferredSize(new java.awt.Dimension(97, 23));
+ newProfileButton.setMargin(new java.awt.Insets(2, 6, 2, 6));
+ newProfileButton.setMaximumSize(new java.awt.Dimension(111, 25));
+ newProfileButton.setMinimumSize(new java.awt.Dimension(111, 25));
+ newProfileButton.setPreferredSize(new java.awt.Dimension(111, 25));
newProfileButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
newProfileButtonActionPerformed(evt);
@@ -122,10 +122,10 @@ class ProfileSettingsPanel extends IngestModuleGlobalSettingsPanel implements Op
editProfileButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/edit16.png"))); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(editProfileButton, org.openide.util.NbBundle.getMessage(ProfileSettingsPanel.class, "ProfileSettingsPanel.editProfileButton.text")); // NOI18N
- editProfileButton.setMargin(new java.awt.Insets(2, 8, 2, 8));
- editProfileButton.setMaximumSize(new java.awt.Dimension(97, 23));
- editProfileButton.setMinimumSize(new java.awt.Dimension(97, 23));
- editProfileButton.setPreferredSize(new java.awt.Dimension(97, 23));
+ editProfileButton.setMargin(new java.awt.Insets(2, 6, 2, 6));
+ editProfileButton.setMaximumSize(new java.awt.Dimension(111, 25));
+ editProfileButton.setMinimumSize(new java.awt.Dimension(111, 25));
+ editProfileButton.setPreferredSize(new java.awt.Dimension(111, 25));
editProfileButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
editProfileButtonActionPerformed(evt);
@@ -134,8 +134,10 @@ class ProfileSettingsPanel extends IngestModuleGlobalSettingsPanel implements Op
deleteProfileButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/delete16.png"))); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(deleteProfileButton, org.openide.util.NbBundle.getMessage(ProfileSettingsPanel.class, "ProfileSettingsPanel.deleteProfileButton.text")); // NOI18N
- deleteProfileButton.setMargin(new java.awt.Insets(2, 8, 2, 8));
- deleteProfileButton.setPreferredSize(new java.awt.Dimension(97, 23));
+ deleteProfileButton.setMargin(new java.awt.Insets(2, 6, 2, 6));
+ deleteProfileButton.setMaximumSize(new java.awt.Dimension(111, 25));
+ deleteProfileButton.setMinimumSize(new java.awt.Dimension(111, 25));
+ deleteProfileButton.setPreferredSize(new java.awt.Dimension(111, 25));
deleteProfileButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
deleteProfileButtonActionPerformed(evt);
@@ -210,11 +212,11 @@ class ProfileSettingsPanel extends IngestModuleGlobalSettingsPanel implements Op
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
- .addComponent(newProfileButton, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(newProfileButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(editProfileButton, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(editProfileButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(deleteProfileButton, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addComponent(deleteProfileButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 346, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(profileListLabel))
.addGap(6, 6, 6))
@@ -279,21 +281,21 @@ class ProfileSettingsPanel extends IngestModuleGlobalSettingsPanel implements Op
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(selectedModulesLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(selectedModulesPane, javax.swing.GroupLayout.DEFAULT_SIZE, 170, Short.MAX_VALUE))
+ .addComponent(selectedModulesPane, javax.swing.GroupLayout.DEFAULT_SIZE, 171, Short.MAX_VALUE))
.addGroup(layout.createSequentialGroup()
.addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(profileListLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(profileListPane, javax.swing.GroupLayout.DEFAULT_SIZE, 346, Short.MAX_VALUE)
- .addGap(9, 9, 9)))
- .addGap(4, 4, 4)
+ .addComponent(profileListPane, javax.swing.GroupLayout.DEFAULT_SIZE, 356, Short.MAX_VALUE)
+ .addGap(0, 0, 0)))
+ .addGap(6, 6, 6)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(newProfileButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(editProfileButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(deleteProfileButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(ingestWarningLabel))
- .addContainerGap())
+ .addGap(6, 6, 6))
.addComponent(jSeparator2)))
);
}// //GEN-END:initComponents
diff --git a/Core/src/org/sleuthkit/autopsy/keywordsearchservice/KeywordSearchService.java b/Core/src/org/sleuthkit/autopsy/keywordsearchservice/KeywordSearchService.java
index 412d23251b..4a702b6df5 100644
--- a/Core/src/org/sleuthkit/autopsy/keywordsearchservice/KeywordSearchService.java
+++ b/Core/src/org/sleuthkit/autopsy/keywordsearchservice/KeywordSearchService.java
@@ -19,6 +19,7 @@
package org.sleuthkit.autopsy.keywordsearchservice;
import java.io.Closeable;
+import org.sleuthkit.autopsy.casemodule.CaseMetadata;
import org.sleuthkit.datamodel.BlackboardArtifact;
import org.sleuthkit.datamodel.TskCoreException;
@@ -52,10 +53,10 @@ public interface KeywordSearchService extends Closeable {
/**
* Deletes the keyword search text index for a case.
*
- * @param textIndexName The text index name.
- *
+ * @param metadata The CaseMetadata which will have its core deleted.
+ *
* @throws KeywordSearchServiceException if unable to delete.
*/
- public void deleteTextIndex(String textIndexName) throws KeywordSearchServiceException;
+ public void deleteTextIndex(CaseMetadata metadata) throws KeywordSearchServiceException;
}
diff --git a/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesSetDefsPanel.form b/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesSetDefsPanel.form
index d6ecd9bfc7..bffb00f33b 100755
--- a/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesSetDefsPanel.form
+++ b/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesSetDefsPanel.form
@@ -68,20 +68,20 @@
-
+
-
+
-
+
-
+
-
-
+
+
@@ -285,9 +285,9 @@
-
-
-
+
+
+
@@ -459,6 +459,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
@@ -648,6 +660,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
@@ -685,6 +709,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
@@ -892,6 +928,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
@@ -905,6 +953,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
@@ -919,6 +979,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesSetDefsPanel.java b/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesSetDefsPanel.java
index 93b8bc52ed..1741f43064 100755
--- a/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesSetDefsPanel.java
+++ b/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesSetDefsPanel.java
@@ -675,6 +675,10 @@ public final class FilesSetDefsPanel extends IngestModuleGlobalSettingsPanel imp
editSetButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/edit16.png"))); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(editSetButton, org.openide.util.NbBundle.getMessage(FilesSetDefsPanel.class, "FilesSetDefsPanel.interesting.editSetButton.text")); // NOI18N
editSetButton.setEnabled(false);
+ editSetButton.setMargin(new java.awt.Insets(2, 6, 2, 6));
+ editSetButton.setMaximumSize(new java.awt.Dimension(111, 25));
+ editSetButton.setMinimumSize(new java.awt.Dimension(111, 25));
+ editSetButton.setPreferredSize(new java.awt.Dimension(111, 25));
editSetButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
editSetButtonActionPerformed(evt);
@@ -733,6 +737,10 @@ public final class FilesSetDefsPanel extends IngestModuleGlobalSettingsPanel imp
deleteSetButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/delete16.png"))); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(deleteSetButton, org.openide.util.NbBundle.getMessage(FilesSetDefsPanel.class, "FilesSetDefsPanel.interesting.deleteSetButton.text")); // NOI18N
deleteSetButton.setEnabled(false);
+ deleteSetButton.setMargin(new java.awt.Insets(2, 6, 2, 6));
+ deleteSetButton.setMaximumSize(new java.awt.Dimension(111, 25));
+ deleteSetButton.setMinimumSize(new java.awt.Dimension(111, 25));
+ deleteSetButton.setPreferredSize(new java.awt.Dimension(111, 25));
deleteSetButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
deleteSetButtonActionPerformed(evt);
@@ -752,6 +760,10 @@ public final class FilesSetDefsPanel extends IngestModuleGlobalSettingsPanel imp
newSetButton.setFont(newSetButton.getFont().deriveFont(newSetButton.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
newSetButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/add16.png"))); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(newSetButton, org.openide.util.NbBundle.getMessage(FilesSetDefsPanel.class, "FilesSetDefsPanel.interesting.newSetButton.text")); // NOI18N
+ newSetButton.setMargin(new java.awt.Insets(2, 6, 2, 6));
+ newSetButton.setMaximumSize(new java.awt.Dimension(111, 25));
+ newSetButton.setMinimumSize(new java.awt.Dimension(111, 25));
+ newSetButton.setPreferredSize(new java.awt.Dimension(111, 25));
newSetButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
newSetButtonActionPerformed(evt);
@@ -818,6 +830,10 @@ public final class FilesSetDefsPanel extends IngestModuleGlobalSettingsPanel imp
copySetButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/new16.png"))); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(copySetButton, org.openide.util.NbBundle.getMessage(FilesSetDefsPanel.class, "FilesSetDefsPanel.interesting.copySetButton.text")); // NOI18N
copySetButton.setEnabled(false);
+ copySetButton.setMargin(new java.awt.Insets(2, 6, 2, 6));
+ copySetButton.setMaximumSize(new java.awt.Dimension(111, 25));
+ copySetButton.setMinimumSize(new java.awt.Dimension(111, 25));
+ copySetButton.setPreferredSize(new java.awt.Dimension(111, 25));
copySetButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
copySetButtonActionPerformed(evt);
@@ -826,6 +842,10 @@ public final class FilesSetDefsPanel extends IngestModuleGlobalSettingsPanel imp
importSetButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/import16.png"))); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(importSetButton, org.openide.util.NbBundle.getMessage(FilesSetDefsPanel.class, "FilesSetDefsPanel.interesting.importSetButton.text")); // NOI18N
+ importSetButton.setMargin(new java.awt.Insets(2, 6, 2, 6));
+ importSetButton.setMaximumSize(new java.awt.Dimension(111, 25));
+ importSetButton.setMinimumSize(new java.awt.Dimension(111, 25));
+ importSetButton.setPreferredSize(new java.awt.Dimension(111, 25));
importSetButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
importSetButtonActionPerformed(evt);
@@ -835,6 +855,10 @@ public final class FilesSetDefsPanel extends IngestModuleGlobalSettingsPanel imp
exportSetButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/export16.png"))); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(exportSetButton, org.openide.util.NbBundle.getMessage(FilesSetDefsPanel.class, "FilesSetDefsPanel.interesting.exportSetButton.text")); // NOI18N
exportSetButton.setEnabled(false);
+ exportSetButton.setMargin(new java.awt.Insets(2, 6, 2, 6));
+ exportSetButton.setMaximumSize(new java.awt.Dimension(111, 25));
+ exportSetButton.setMinimumSize(new java.awt.Dimension(111, 25));
+ exportSetButton.setPreferredSize(new java.awt.Dimension(111, 25));
exportSetButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
exportSetButtonActionPerformed(evt);
@@ -851,17 +875,17 @@ public final class FilesSetDefsPanel extends IngestModuleGlobalSettingsPanel imp
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
- .addComponent(copySetButton, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(copySetButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(importSetButton, javax.swing.GroupLayout.PREFERRED_SIZE, 1, Short.MAX_VALUE))
+ .addComponent(importSetButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
- .addComponent(newSetButton, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(newSetButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(editSetButton, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE)))
+ .addComponent(editSetButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(exportSetButton, javax.swing.GroupLayout.PREFERRED_SIZE, 112, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addComponent(deleteSetButton, javax.swing.GroupLayout.DEFAULT_SIZE, 111, Short.MAX_VALUE)))
+ .addComponent(exportSetButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(deleteSetButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
.addComponent(setsListScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 346, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 346, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(setsListLabel))
@@ -946,7 +970,7 @@ public final class FilesSetDefsPanel extends IngestModuleGlobalSettingsPanel imp
.addGap(8, 8, 8))))
);
- jPanel1Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {copySetButton, deleteSetButton, editSetButton, newSetButton});
+ jPanel1Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {copySetButton, deleteSetButton, editSetButton, exportSetButton, importSetButton, newSetButton});
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
@@ -1019,18 +1043,18 @@ public final class FilesSetDefsPanel extends IngestModuleGlobalSettingsPanel imp
.addComponent(setsListScrollPane)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
- .addComponent(newSetButton)
- .addComponent(editSetButton)
- .addComponent(deleteSetButton))
+ .addComponent(newSetButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(editSetButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(deleteSetButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
- .addComponent(copySetButton, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addComponent(importSetButton, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addComponent(exportSetButton, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addComponent(copySetButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(importSetButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(exportSetButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(6, 6, 6))))
);
- jPanel1Layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {deleteRuleButton, deleteSetButton, editRuleButton, editSetButton, newRuleButton, newSetButton});
+ jPanel1Layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {copySetButton, deleteRuleButton, deleteSetButton, editRuleButton, editSetButton, exportSetButton, importSetButton, newRuleButton, newSetButton});
jScrollPane1.setViewportView(jPanel1);
diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties
index e784e4888a..050e2d687e 100644
--- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties
+++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties
@@ -312,7 +312,7 @@ GlobalEditListPanel.keywordErrorsPlural.text={0} keywords could not be parsed. P
GlobalListsManagementPanel.exportButton.text=Export List
GlobalListsManagementPanel.deleteListButton.text=Delete List
GlobalListsManagementPanel.copyListButton.text=Copy List
-GlobalListsManagementPanel.renameListButton.text=Edit List
+GlobalListsManagementPanel.renameListButton.text=Edit List Name
GlobalEditListPanel.editWordButton.text=Edit Keyword
SolrSearchService.ServiceName=Solr Keyword Search Service
SolrSearchService.IndexUpgradeDialog.title=Text Index Upgrade Required In Order To Open Case
diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalEditListPanel.form b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalEditListPanel.form
index 6ccf9f6836..cbfad12e0b 100644
--- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalEditListPanel.form
+++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalEditListPanel.form
@@ -151,7 +151,7 @@
-
+
diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalEditListPanel.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalEditListPanel.java
index 4aa42cae2e..cb8f55f1aa 100644
--- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalEditListPanel.java
+++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalEditListPanel.java
@@ -282,7 +282,7 @@ class GlobalEditListPanel extends javax.swing.JPanel implements ListSelectionLis
keywordsLabel.setText(org.openide.util.NbBundle.getMessage(GlobalEditListPanel.class, "KeywordSearchEditListPanel.keywordsLabel.text")); // NOI18N
- newKeywordsButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/new16.png"))); // NOI18N
+ newKeywordsButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/add16.png"))); // NOI18N
newKeywordsButton.setText(org.openide.util.NbBundle.getMessage(GlobalEditListPanel.class, "GlobalEditListPanel.newKeywordsButton.text")); // NOI18N
newKeywordsButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListSettingsPanel.form b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListSettingsPanel.form
index ba8a541eba..18c416a00f 100644
--- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListSettingsPanel.form
+++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListSettingsPanel.form
@@ -41,7 +41,7 @@
-
+
@@ -50,8 +50,9 @@
-
+
+
@@ -62,7 +63,7 @@
-
+
@@ -87,7 +88,7 @@
-
+
diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListSettingsPanel.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListSettingsPanel.java
index 9be40c184a..f0c8162d8f 100644
--- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListSettingsPanel.java
+++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListSettingsPanel.java
@@ -95,10 +95,9 @@ final class GlobalListSettingsPanel extends javax.swing.JPanel implements Option
* Duplicates the selected keyword list, returns whether or not the keyword
* list was duplicated.
*
- * @return true or false
+ * @return true if the list was copied false if it was not
*/
private boolean copyAction() {
- boolean shouldAdd = false;
final String FEATURE_NAME = NbBundle.getMessage(this.getClass(),
"KeywordSearchGlobalListSettingsPanel.component.featureName.text");
KeywordList currentKeywordList = editListPanel.getCurrentKeywordList();
@@ -114,31 +113,30 @@ final class GlobalListSettingsPanel extends javax.swing.JPanel implements Option
null,
null,
currentKeywordList.getName());
- if (listName == null || listName.trim().equals("")) {
- return shouldAdd;
- }
+ if (listName == null) {
+ return false;
+ }
+ //remove trailing and leading spaces so lists can't have visually identical names
+ listName = listName.trim();
+ //if the name is empty or unchanged return without changing anything
+ if (listName.equals("") || listName.equals(currentKeywordList.getName())) {
+ return false;
+ }
XmlKeywordSearchList writer = XmlKeywordSearchList.getCurrent();
if (writer.listExists(listName) && writer.getList(listName).isEditable()) {
KeywordSearchUtil.displayDialog(FEATURE_NAME, NbBundle.getMessage(this.getClass(), "KeywordSearchConfigurationPanel1.customizeComponents.noOwDefaultMsg"), KeywordSearchUtil.DIALOG_MESSAGE_TYPE.WARN);
- return shouldAdd;
+ return false;
}
if (writer.listExists(listName)) {
- boolean replace = KeywordSearchUtil.displayConfirmDialog(FEATURE_NAME, NbBundle.getMessage(this.getClass(), "KeywordSearchConfigurationPanel1.customizeComponents.kwListExistMsg", listName),
- KeywordSearchUtil.DIALOG_MESSAGE_TYPE.WARN);
- if (replace) {
- shouldAdd = true;
+ if (!KeywordSearchUtil.displayConfirmDialog(FEATURE_NAME, NbBundle.getMessage(this.getClass(), "KeywordSearchConfigurationPanel1.customizeComponents.kwListExistMsg", listName),
+ KeywordSearchUtil.DIALOG_MESSAGE_TYPE.WARN)) {
+ return false;
}
-
- } else {
- shouldAdd = true;
}
-
- if (shouldAdd) {
- writer.addList(listName, keywords);
- KeywordSearchUtil.displayDialog(FEATURE_NAME, NbBundle.getMessage(this.getClass(), "KeywordSearchConfigurationPanel1.customizeComponents.kwListSavedMsg", listName), KeywordSearchUtil.DIALOG_MESSAGE_TYPE.INFO);
- }
- return shouldAdd;
+ writer.addList(listName, keywords);
+ KeywordSearchUtil.displayDialog(FEATURE_NAME, NbBundle.getMessage(this.getClass(), "KeywordSearchConfigurationPanel1.customizeComponents.kwListSavedMsg", listName), KeywordSearchUtil.DIALOG_MESSAGE_TYPE.INFO);
+ return true;
}
@Override
@@ -187,16 +185,17 @@ final class GlobalListSettingsPanel extends javax.swing.JPanel implements Option
rightPanel = new javax.swing.JPanel();
mainSplitPane.setBorder(null);
- mainSplitPane.setDividerLocation(300);
+ mainSplitPane.setDividerLocation(361);
mainSplitPane.setDividerSize(1);
- leftPanel.setPreferredSize(new java.awt.Dimension(287, 327));
+ leftPanel.setPreferredSize(new java.awt.Dimension(309, 327));
+ leftPanel.setVerifyInputWhenFocusTarget(false);
javax.swing.GroupLayout leftPanelLayout = new javax.swing.GroupLayout(leftPanel);
leftPanel.setLayout(leftPanelLayout);
leftPanelLayout.setHorizontalGroup(
leftPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGap(0, 300, Short.MAX_VALUE)
+ .addGap(0, 361, Short.MAX_VALUE)
);
leftPanelLayout.setVerticalGroup(
leftPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
@@ -211,7 +210,7 @@ final class GlobalListSettingsPanel extends javax.swing.JPanel implements Option
rightPanel.setLayout(rightPanelLayout);
rightPanelLayout.setHorizontalGroup(
rightPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGap(0, 372, Short.MAX_VALUE)
+ .addGap(0, 311, Short.MAX_VALUE)
);
rightPanelLayout.setVerticalGroup(
rightPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListsManagementPanel.form b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListsManagementPanel.form
index b86ed01a12..6609e672e0 100644
--- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListsManagementPanel.form
+++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListsManagementPanel.form
@@ -22,57 +22,52 @@
-
+
-
-
-
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
+
+
+
+
-
+
-
+
-
-
+
+
-
+
-
+
-
+
-
+
@@ -108,14 +103,23 @@
-
+
-
+
+
+
+
+
+
+
+
+
+
@@ -132,7 +136,16 @@
-
+
+
+
+
+
+
+
+
+
+
@@ -156,7 +169,16 @@
-
+
+
+
+
+
+
+
+
+
+
@@ -166,14 +188,23 @@
-
+
-
+
+
+
+
+
+
+
+
+
+
@@ -190,7 +221,16 @@
-
+
+
+
+
+
+
+
+
+
+
@@ -207,7 +247,16 @@
-
+
+
+
+
+
+
+
+
+
+
diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListsManagementPanel.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListsManagementPanel.java
index 730bfc1170..f7aa622d62 100644
--- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListsManagementPanel.java
+++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListsManagementPanel.java
@@ -203,10 +203,13 @@ class GlobalListsManagementPanel extends javax.swing.JPanel implements OptionsPa
});
jScrollPane1.setViewportView(listsTable);
- newListButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/new16.png"))); // NOI18N
+ newListButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/add16.png"))); // NOI18N
newListButton.setText(org.openide.util.NbBundle.getMessage(GlobalListsManagementPanel.class, "GlobalListsManagementPanel.newListButton.text")); // NOI18N
newListButton.setIconTextGap(2);
- newListButton.setMargin(new java.awt.Insets(2, 2, 2, 2));
+ newListButton.setMargin(new java.awt.Insets(2, 6, 2, 6));
+ newListButton.setMaximumSize(new java.awt.Dimension(111, 25));
+ newListButton.setMinimumSize(new java.awt.Dimension(111, 25));
+ newListButton.setPreferredSize(new java.awt.Dimension(111, 25));
newListButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
newListButtonActionPerformed(evt);
@@ -216,7 +219,10 @@ class GlobalListsManagementPanel extends javax.swing.JPanel implements OptionsPa
importButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/import16.png"))); // NOI18N
importButton.setText(org.openide.util.NbBundle.getMessage(GlobalListsManagementPanel.class, "GlobalListsManagementPanel.importButton.text")); // NOI18N
importButton.setIconTextGap(2);
- importButton.setMargin(new java.awt.Insets(2, 2, 2, 2));
+ importButton.setMargin(new java.awt.Insets(2, 6, 2, 6));
+ importButton.setMaximumSize(new java.awt.Dimension(111, 25));
+ importButton.setMinimumSize(new java.awt.Dimension(111, 25));
+ importButton.setPreferredSize(new java.awt.Dimension(111, 25));
importButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
importButtonActionPerformed(evt);
@@ -228,17 +234,23 @@ class GlobalListsManagementPanel extends javax.swing.JPanel implements OptionsPa
exportButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/export16.png"))); // NOI18N
exportButton.setText(org.openide.util.NbBundle.getMessage(GlobalListsManagementPanel.class, "GlobalListsManagementPanel.exportButton.text")); // NOI18N
exportButton.setIconTextGap(2);
- exportButton.setMargin(new java.awt.Insets(2, 2, 2, 2));
+ exportButton.setMargin(new java.awt.Insets(2, 6, 2, 6));
+ exportButton.setMaximumSize(new java.awt.Dimension(111, 25));
+ exportButton.setMinimumSize(new java.awt.Dimension(111, 25));
+ exportButton.setPreferredSize(new java.awt.Dimension(111, 25));
exportButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
exportButtonActionPerformed(evt);
}
});
- copyListButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/add16.png"))); // NOI18N
+ copyListButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/new16.png"))); // NOI18N
copyListButton.setText(org.openide.util.NbBundle.getMessage(GlobalListsManagementPanel.class, "GlobalListsManagementPanel.copyListButton.text")); // NOI18N
copyListButton.setIconTextGap(2);
- copyListButton.setMargin(new java.awt.Insets(2, 2, 2, 2));
+ copyListButton.setMargin(new java.awt.Insets(2, 6, 2, 6));
+ copyListButton.setMaximumSize(new java.awt.Dimension(111, 25));
+ copyListButton.setMinimumSize(new java.awt.Dimension(111, 25));
+ copyListButton.setPreferredSize(new java.awt.Dimension(111, 25));
copyListButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
copyListButtonActionPerformed(evt);
@@ -248,7 +260,10 @@ class GlobalListsManagementPanel extends javax.swing.JPanel implements OptionsPa
deleteListButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/delete16.png"))); // NOI18N
deleteListButton.setText(org.openide.util.NbBundle.getMessage(GlobalListsManagementPanel.class, "GlobalListsManagementPanel.deleteListButton.text")); // NOI18N
deleteListButton.setIconTextGap(2);
- deleteListButton.setMargin(new java.awt.Insets(2, 2, 2, 2));
+ deleteListButton.setMargin(new java.awt.Insets(2, 6, 2, 6));
+ deleteListButton.setMaximumSize(new java.awt.Dimension(111, 25));
+ deleteListButton.setMinimumSize(new java.awt.Dimension(111, 25));
+ deleteListButton.setPreferredSize(new java.awt.Dimension(111, 25));
deleteListButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
deleteListButtonActionPerformed(evt);
@@ -258,7 +273,10 @@ class GlobalListsManagementPanel extends javax.swing.JPanel implements OptionsPa
renameListButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/edit16.png"))); // NOI18N
renameListButton.setText(org.openide.util.NbBundle.getMessage(GlobalListsManagementPanel.class, "GlobalListsManagementPanel.renameListButton.text")); // NOI18N
renameListButton.setIconTextGap(2);
- renameListButton.setMargin(new java.awt.Insets(2, 2, 2, 2));
+ renameListButton.setMargin(new java.awt.Insets(2, 6, 2, 6));
+ renameListButton.setMaximumSize(new java.awt.Dimension(111, 25));
+ renameListButton.setMinimumSize(new java.awt.Dimension(111, 25));
+ renameListButton.setPreferredSize(new java.awt.Dimension(111, 25));
renameListButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
renameListButtonActionPerformed(evt);
@@ -270,27 +288,24 @@ class GlobalListsManagementPanel extends javax.swing.JPanel implements OptionsPa
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
- .addContainerGap()
+ .addGap(10, 10, 10)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
- .addComponent(keywordListsLabel)
+ .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 345, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(layout.createSequentialGroup()
+ .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
+ .addComponent(newListButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(copyListButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addGap(6, 6, 6)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(newListButton, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addComponent(deleteListButton, javax.swing.GroupLayout.PREFERRED_SIZE, 1, Short.MAX_VALUE))
- .addGap(12, 12, 12)
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
- .addComponent(renameListButton, javax.swing.GroupLayout.PREFERRED_SIZE, 75, Short.MAX_VALUE)
- .addComponent(importButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
- .addGap(12, 12, 12)
+ .addComponent(importButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(renameListButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addGap(6, 6, 6)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
- .addComponent(copyListButton, javax.swing.GroupLayout.PREFERRED_SIZE, 1, Short.MAX_VALUE)
- .addGap(0, 1, Short.MAX_VALUE))
- .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
- .addGap(0, 0, Short.MAX_VALUE)
- .addComponent(exportButton, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)))))
- .addContainerGap())
+ .addComponent(exportButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(deleteListButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+ .addGap(0, 0, Short.MAX_VALUE))
+ .addComponent(keywordListsLabel))
+ .addGap(6, 6, 6))
);
layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {copyListButton, deleteListButton, exportButton, importButton, newListButton, renameListButton});
@@ -298,21 +313,21 @@ class GlobalListsManagementPanel extends javax.swing.JPanel implements OptionsPa
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
- .addContainerGap()
+ .addGap(22, 22, 22)
.addComponent(keywordListsLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 316, Short.MAX_VALUE)
+ .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 305, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
- .addComponent(newListButton)
- .addComponent(renameListButton)
- .addComponent(copyListButton))
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(newListButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(renameListButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(deleteListButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addGap(6, 6, 6)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
- .addComponent(importButton)
- .addComponent(exportButton)
- .addComponent(deleteListButton))
- .addContainerGap())
+ .addComponent(importButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(exportButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(copyListButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addGap(6, 6, 6))
);
layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {copyListButton, deleteListButton, exportButton, importButton, newListButton, renameListButton});
diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java
index df1cb2668d..3ff7c7cfe9 100644
--- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java
+++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java
@@ -37,6 +37,7 @@ import org.openide.util.NbBundle;
import org.openide.util.lookup.ServiceProvider;
import org.openide.util.lookup.ServiceProviders;
import org.sleuthkit.autopsy.casemodule.Case;
+import org.sleuthkit.autopsy.casemodule.CaseMetadata;
import org.sleuthkit.autopsy.core.RuntimeProperties;
import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.autopsy.framework.AutopsyService;
@@ -143,14 +144,38 @@ public class SolrSearchService implements KeywordSearchService, AutopsyService {
}
}
+ @NbBundle.Messages({"# {0} - case directory",
+ "SolrSearchService.exceptionMessage.noIndexMetadata=Unable to create IndexMetaData from caseDirectory: {0}",
+ "# {0} - case directory",
+ "SolrSearchService.exceptionMessage.noCurrentSolrCore=IndexMetadata did not contain a current Solr core so could not delete the case"
+ })
/**
* Deletes Solr core for a case.
*
- * @param coreName The core name.
+ * @param metadata The CaseMetadata which will have its core deleted.
*/
@Override
- public void deleteTextIndex(String coreName) throws KeywordSearchServiceException {
- KeywordSearch.getServer().deleteCore(coreName);
+ public void deleteTextIndex(CaseMetadata metadata) throws KeywordSearchServiceException {
+ String caseDirectory = metadata.getCaseDirectory();
+ IndexMetadata indexMetadata;
+ try {
+ indexMetadata = new IndexMetadata(caseDirectory);
+ } catch (IndexMetadata.TextIndexMetadataException ex) {
+ logger.log(Level.WARNING, NbBundle.getMessage(SolrSearchService.class, "SolrSearchService.exceptionMessage.noIndexMetadata", caseDirectory), ex);
+ throw new KeywordSearchServiceException(NbBundle.getMessage(SolrSearchService.class, "SolrSearchService.exceptionMessage.noIndexMetadata", caseDirectory), ex);
+ }
+ //find the index for the current version of solr (the one we are connected to) and delete its core using the index name
+ String currentSchema = IndexFinder.getCurrentSchemaVersion();
+ String currentSolr = IndexFinder.getCurrentSolrVersion();
+ for (Index index : indexMetadata.getIndexes()) {
+ if (index.getSolrVersion().equals(currentSolr) && index.getSchemaVersion().equals(currentSchema)) {
+ KeywordSearch.getServer().deleteCore(index.getIndexName());
+ return; //only one core exists for each combination of solr and schema version
+ }
+ }
+ //this code this code will only execute if an index for the current core was not found
+ logger.log(Level.WARNING, NbBundle.getMessage(SolrSearchService.class, "SolrSearchService.exceptionMessage.noCurrentSolrCore"));
+ throw new KeywordSearchServiceException(NbBundle.getMessage(SolrSearchService.class, "SolrSearchService.exceptionMessage.noCurrentSolrCore"));
}
@Override
@@ -185,7 +210,7 @@ public class SolrSearchService implements KeywordSearchService, AutopsyService {
ProgressIndicator progress = context.getProgressIndicator();
int totalNumProgressUnits = 8;
int progressUnitsCompleted = 0;
-
+
String caseDirPath = context.getCase().getCaseDirectory();
Case theCase = context.getCase();
List indexes = new ArrayList<>();
@@ -212,7 +237,7 @@ public class SolrSearchService implements KeywordSearchService, AutopsyService {
indexes.add(oldIndex);
}
}
-
+
if (context.cancelRequested()) {
return;
}
@@ -323,14 +348,13 @@ public class SolrSearchService implements KeywordSearchService, AutopsyService {
}
return;
}
-
+
// add current index to the list of indexes that exist for this case
indexes.add(currentVersionIndex);
}
}
}
-
try {
// update text index metadata file
if (!indexes.isEmpty()) {
@@ -346,7 +370,7 @@ public class SolrSearchService implements KeywordSearchService, AutopsyService {
KeywordSearch.getServer().openCoreForCase(theCase, currentVersionIndex);
} catch (KeywordSearchModuleException ex) {
throw new AutopsyServiceException(String.format("Failed to open or create core for %s", caseDirPath), ex);
- }
+ }
progress.progress(Bundle.SolrSearch_complete_msg(), totalNumProgressUnits);
}