diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties index 372c091ccf0adce692c1f27880fb7fc92a3b8955..df2f075d77d5d429182ca9224137a8ed212f4007 100755 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties @@ -58,7 +58,7 @@ KeywordSearchIngestSimplePanel.languagesLabel.text=Scripts enabled for string ex KeywordSearchIngestSimplePanel.languagesValLabel.text=- KeywordSearchIngestSimplePanel.languagesLabel.toolTipText=Scripts enabled for string extraction from unknown file types. Changes can be done in Advanced Settings. KeywordSearchIngestSimplePanel.languagesValLabel.toolTipText= -KeywordSearchConfigurationPanel3.languagesLabel.text=Enabled scripts (languages) +KeywordSearchConfigurationPanel3.languagesLabel.text=Enabled scripts (languages): KeywordSearchConfigurationPanel2.chunksLabel.text=Chunks in keyword index: KeywordSearchConfigurationPanel2.chunksValLabel.text=- KeywordSearchConfigurationPanel3.enableUTF8Checkbox.text=Enable UTF8 text extraction diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchConfigurationPanel3.form b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchConfigurationPanel3.form index 86cd53204d72123c0dce19dafaa48227ade0a0e2..828ee693cd0a52c8aea7f6964ea3123a7e0a5c96 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchConfigurationPanel3.form +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchConfigurationPanel3.form @@ -27,12 +27,8 @@ <Component id="enableUTF8Checkbox" alignment="0" min="-2" max="-2" attributes="0"/> </Group> </Group> - <Group type="103" alignment="0" groupAlignment="1" max="-2" attributes="0"> - <Group type="102" alignment="0" attributes="0"> - <Component id="languagesLabel" min="-2" max="-2" attributes="0"/> - <EmptySpace max="-2" attributes="0"/> - <Component id="languagesSeparator" max="32767" attributes="0"/> - </Group> + <Group type="103" alignment="0" groupAlignment="1" attributes="0"> + <Component id="languagesLabel" alignment="0" min="-2" max="-2" attributes="0"/> <Component id="langPanel" min="-2" max="-2" attributes="0"/> </Group> </Group> @@ -50,10 +46,7 @@ <EmptySpace max="-2" attributes="0"/> <Component id="enableUTF8Checkbox" min="-2" max="-2" attributes="0"/> <EmptySpace type="separate" max="-2" attributes="0"/> - <Group type="103" groupAlignment="1" attributes="0"> - <Component id="languagesLabel" min="-2" max="-2" attributes="0"/> - <Component id="languagesSeparator" min="-2" pref="5" max="-2" attributes="0"/> - </Group> + <Component id="languagesLabel" min="-2" max="-2" attributes="0"/> <EmptySpace type="unrelated" max="-2" attributes="0"/> <Component id="langPanel" pref="397" max="32767" attributes="0"/> <EmptySpace max="-2" attributes="0"/> @@ -127,7 +120,5 @@ </Property> </Properties> </Component> - <Component class="javax.swing.JSeparator" name="languagesSeparator"> - </Component> </SubComponents> </Form> diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchConfigurationPanel3.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchConfigurationPanel3.java index 4f0414a04d4ace88384104ebe3180743736851d0..8e085976e28b1bba1290a7b99e11a6d6944becf6 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchConfigurationPanel3.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchConfigurationPanel3.java @@ -176,7 +176,6 @@ private void initComponents() { enableUTF8Checkbox = new javax.swing.JCheckBox(); enableUTF16Checkbox = new javax.swing.JCheckBox(); ingestSettingsLabel = new javax.swing.JLabel(); - languagesSeparator = new javax.swing.JSeparator(); org.openide.awt.Mnemonics.setLocalizedText(languagesLabel, org.openide.util.NbBundle.getMessage(KeywordSearchConfigurationPanel3.class, "KeywordSearchConfigurationPanel3.languagesLabel.text")); // NOI18N @@ -226,11 +225,8 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(enableUTF16Checkbox) .addComponent(enableUTF8Checkbox))) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) - .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() - .addComponent(languagesLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(languagesSeparator)) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(languagesLabel, javax.swing.GroupLayout.Alignment.LEADING) .addComponent(langPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap(255, Short.MAX_VALUE)) ); @@ -244,9 +240,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(enableUTF8Checkbox) .addGap(18, 18, 18) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) - .addComponent(languagesLabel) - .addComponent(languagesSeparator, javax.swing.GroupLayout.PREFERRED_SIZE, 5, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(languagesLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(langPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 397, Short.MAX_VALUE) .addContainerGap()) @@ -275,7 +269,6 @@ private void enableUTF16CheckboxActionPerformed(java.awt.event.ActionEvent evt) private javax.swing.JLabel ingestSettingsLabel; private javax.swing.JScrollPane langPanel; private javax.swing.JLabel languagesLabel; - private javax.swing.JSeparator languagesSeparator; // End of variables declaration//GEN-END:variables @Override diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchListsAbstract.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchListsAbstract.java index 140a4269a9420a52287cec21d60ced9f3b5a7f51..96208e47176091ddd0eb14561ccc70586cbee557 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchListsAbstract.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchListsAbstract.java @@ -18,10 +18,7 @@ */ package org.sleuthkit.autopsy.keywordsearch; -import java.beans.PropertyChangeListener; -import java.beans.PropertyChangeSupport; import java.io.File; -import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.LinkedHashMap; @@ -32,8 +29,7 @@ import org.sleuthkit.datamodel.BlackboardAttribute; /** - * - * @author dfickling + * Keyword list saving, loading, and editing abstract class. */ public abstract class KeywordSearchListsAbstract { @@ -43,20 +39,12 @@ public abstract class KeywordSearchListsAbstract { private static final String CUR_LISTS_FILE_NAME = "keywords.xml"; private static String CUR_LISTS_FILE = AutopsyPropFile.getUserDirPath() + File.separator + CUR_LISTS_FILE_NAME; protected static final Logger logger = Logger.getLogger(KeywordSearchListsAbstract.class.getName()); - PropertyChangeSupport changeSupport; public KeywordSearchListsAbstract(String filePath) { this.filePath = filePath; theLists = new LinkedHashMap<String, KeywordSearchList>(); - changeSupport = new PropertyChangeSupport(this); } - //property support - public enum ListsEvt { - - LIST_ADDED, LIST_DELETED, LIST_UPDATED - }; - /** * get instance for managing the current keyword list of the application */ @@ -68,10 +56,6 @@ static KeywordSearchListsXML getCurrent() { return currentInstance; } - void addPropertyChangeListener(PropertyChangeListener l) { - changeSupport.addPropertyChangeListener(l); - } - private void prepopulateLists() { //phone number List<Keyword> phones = new ArrayList<Keyword>(); @@ -252,14 +236,12 @@ boolean addList(String name, List<Keyword> newList, boolean useForIngest, boolea // if (!locked) { // save(); // } - changeSupport.firePropertyChange(ListsEvt.LIST_ADDED.toString(), null, name); } else { theLists.put(name, new KeywordSearchList(name, curList.getDateCreated(), now, useForIngest, ingestMessages, newList, locked)); // if (!locked) { // save(); // } replaced = true; - changeSupport.firePropertyChange(ListsEvt.LIST_UPDATED.toString(), null, name); } return replaced; @@ -296,14 +278,6 @@ boolean writeLists(List<KeywordSearchList> lists) { theLists.put(list.getName(), list); } //boolean saved = save(); - if (true) { - for (KeywordSearchList list : newLists) { - changeSupport.firePropertyChange(ListsEvt.LIST_ADDED.toString(), null, list.getName()); - } - for (KeywordSearchList over : overwritten) { - changeSupport.firePropertyChange(ListsEvt.LIST_UPDATED.toString(), null, over.getName()); - } - } return true; } @@ -319,7 +293,6 @@ boolean deleteList(String name) { theLists.remove(name); //deleted = save(); } - changeSupport.firePropertyChange(ListsEvt.LIST_DELETED.toString(), null, name); return true; } diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchListsManagementPanel.form b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchListsManagementPanel.form index cb2629ae11b18d6636fc1d4a9d1701444d74177e..f3b8306b066f38addd81c63e485bc00770bbd901 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchListsManagementPanel.form +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchListsManagementPanel.form @@ -37,7 +37,7 @@ <Component id="importButton" min="-2" pref="126" max="-2" attributes="0"/> </Group> </Group> - <EmptySpace min="0" pref="0" max="32767" attributes="0"/> + <EmptySpace min="0" pref="4" max="32767" attributes="0"/> </Group> </Group> <EmptySpace max="-2" attributes="0"/> diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchListsManagementPanel.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchListsManagementPanel.java index 1886a26945dd02640ae9891d46b52cd9e5a17633..a6711eb34ec152ae7196415bd6c0462533ccb1f4 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchListsManagementPanel.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchListsManagementPanel.java @@ -25,18 +25,16 @@ package org.sleuthkit.autopsy.keywordsearch; import java.awt.event.KeyEvent; -import java.beans.PropertyChangeEvent; -import java.beans.PropertyChangeListener; import java.io.File; import java.util.ArrayList; import java.util.List; -import org.sleuthkit.autopsy.coreutils.Logger; import javax.swing.JFileChooser; import javax.swing.JOptionPane; import javax.swing.event.ListSelectionListener; import javax.swing.filechooser.FileNameExtensionFilter; import javax.swing.table.AbstractTableModel; import org.sleuthkit.autopsy.corecomponents.OptionsPanel; +import org.sleuthkit.autopsy.coreutils.Logger; /** * A panel to manage all keyword lists created/imported in Autopsy. @@ -66,29 +64,6 @@ private void customizeComponents() { listsTable.setCellSelectionEnabled(false); listsTable.setRowSelectionAllowed(true); tableModel.resync(); - - KeywordSearchListsXML.getCurrent().addPropertyChangeListener(new PropertyChangeListener() { - - @Override - public void propertyChange(PropertyChangeEvent evt) { - if (evt.getPropertyName().equals(KeywordSearchListsXML.ListsEvt.LIST_ADDED.toString())) { - tableModel.resync(); - for(int i = 0; i<listsTable.getRowCount(); i++) { - String name = (String) listsTable.getValueAt(i, 0); - if(((String) evt.getNewValue()).equals(name)) { - listsTable.getSelectionModel().setSelectionInterval(i, i); - } - } - } else if (evt.getPropertyName().equals(KeywordSearchListsXML.ListsEvt.LIST_DELETED.toString())) { - tableModel.resync(); - if(listsTable.getRowCount() > 0) { - listsTable.getSelectionModel().setSelectionInterval(0, 0); - } else { - listsTable.getSelectionModel().clearSelection(); - } - } - } - }); } @@ -156,7 +131,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .addComponent(newListButton, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(importButton, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE))) - .addGap(0, 0, Short.MAX_VALUE))) + .addGap(0, 4, Short.MAX_VALUE))) .addContainerGap()) ); layout.setVerticalGroup( diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchListsViewerPanel.form b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchListsViewerPanel.form index e3c3f5fb3a10fc8bbf0a94f6ddb68209a173eef0..83f8e3f720dec63a7dc5ea21efb68edcd1134e7c 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchListsViewerPanel.form +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchListsViewerPanel.form @@ -1,4 +1,4 @@ -<?xml version="1.1" encoding="UTF-8" ?> +<?xml version="1.0" encoding="UTF-8" ?> <Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo"> <AuxValues> @@ -17,17 +17,20 @@ <DimensionLayout dim="0"> <Group type="103" groupAlignment="0" attributes="0"> <Component id="jSplitPane1" alignment="0" pref="400" max="32767" attributes="0"/> - <Group type="102" alignment="1" attributes="0"> + <Group type="102" attributes="0"> <EmptySpace max="-2" attributes="0"/> - <Component id="searchAddButton" min="-2" max="-2" attributes="0"/> - <EmptySpace pref="220" max="32767" attributes="0"/> - <Component id="manageListsButton" min="-2" max="-2" attributes="0"/> - <EmptySpace max="-2" attributes="0"/> - </Group> - <Group type="102" alignment="0" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <Component id="searchAddButton" min="-2" max="-2" attributes="0"/> + <EmptySpace pref="220" max="32767" attributes="0"/> + <Component id="manageListsButton" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Component id="ingestIndexLabel" min="-2" max="-2" attributes="0"/> + <EmptySpace min="0" pref="317" max="32767" attributes="0"/> + </Group> + </Group> <EmptySpace max="-2" attributes="0"/> - <Component id="ingestIndexLabel" min="-2" max="-2" attributes="0"/> - <EmptySpace pref="327" max="32767" attributes="0"/> </Group> </Group> </DimensionLayout> diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchListsViewerPanel.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchListsViewerPanel.java index 8ab33ca9afa99fcb278ce2b43f6f2ef60e95c094..a74cd570920ba930be36f8c4d1004fcd226bbaf4 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchListsViewerPanel.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchListsViewerPanel.java @@ -29,7 +29,6 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; -import org.sleuthkit.autopsy.coreutils.Logger; import javax.swing.JCheckBox; import javax.swing.JTable; import javax.swing.ListSelectionModel; @@ -39,6 +38,7 @@ import javax.swing.table.TableCellRenderer; import javax.swing.table.TableColumn; import org.openide.util.actions.SystemAction; +import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.ingest.IngestManager; import org.sleuthkit.autopsy.ingest.IngestManager.IngestModuleEvent; @@ -116,28 +116,6 @@ public void propertyChange(PropertyChangeEvent evt) { }); loader = KeywordSearchListsXML.getCurrent(); - loader.addPropertyChangeListener(new PropertyChangeListener() { - - @Override - public void propertyChange(PropertyChangeEvent evt) { - String changed = evt.getPropertyName(); - Object oldValue = evt.getOldValue(); - Object newValue = evt.getNewValue(); - - if (changed.equals(KeywordSearchListsXML.ListsEvt.LIST_ADDED.toString())) { - listsTableModel.resync(); - } else if (changed.equals(KeywordSearchListsXML.ListsEvt.LIST_DELETED.toString())) { - listsTableModel.resync(); - if(listsTable.getRowCount() > 0) - listsTable.getSelectionModel().setSelectionInterval(0, 0); - else - listsTable.getSelectionModel().clearSelection(); - } else if (changed.equals(KeywordSearchListsXML.ListsEvt.LIST_UPDATED.toString())) { - //keywordsTableModel.resync(loader.getList((String) newValue)); - listsTableModel.resync(); - } - } - }); listsTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() { @Override diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchListsXML.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchListsXML.java index 0cbc6b20730362b66bde7c65a7f07df806826429..65f4337de2eca2ff05ec22b3d448dd96b55a5eff 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchListsXML.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchListsXML.java @@ -18,8 +18,6 @@ */ package org.sleuthkit.autopsy.keywordsearch; -import java.beans.PropertyChangeListener; -import java.beans.PropertyChangeSupport; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; @@ -32,11 +30,8 @@ import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; -import java.util.LinkedHashMap; import java.util.List; -import java.util.Map; import java.util.logging.Level; -import org.sleuthkit.autopsy.coreutils.Logger; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; @@ -48,7 +43,7 @@ import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; -import org.sleuthkit.autopsy.coreutils.AutopsyPropFile; +import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.datamodel.BlackboardAttribute; import org.w3c.dom.Document; import org.w3c.dom.Element;