merge from FilterBugFix Branch resolution

This commit is contained in:
William Schaefer 2017-02-01 15:35:26 -05:00
commit eae04f4474
9 changed files with 64 additions and 38 deletions

View File

@ -1,15 +1,15 @@
/* /*
* Autopsy Forensic Browser * Autopsy Forensic Browser
* *
* Copyright 2011-2016 Basis Technology Corp. * Copyright 2011-2016 Basis Technology Corp.
* Contact: carrier <at> sleuthkit <dot> org * Contact: carrier <at> sleuthkit <dot> org
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -46,6 +46,7 @@ import org.sleuthkit.datamodel.Directory;
import org.sleuthkit.datamodel.File; import org.sleuthkit.datamodel.File;
import org.sleuthkit.datamodel.LayoutFile; import org.sleuthkit.datamodel.LayoutFile;
import org.sleuthkit.datamodel.LocalFile; import org.sleuthkit.datamodel.LocalFile;
import org.sleuthkit.datamodel.SlackFile;
import org.sleuthkit.datamodel.SleuthkitCase; import org.sleuthkit.datamodel.SleuthkitCase;
import org.sleuthkit.datamodel.TskCoreException; import org.sleuthkit.datamodel.TskCoreException;
import org.sleuthkit.datamodel.TskData; import org.sleuthkit.datamodel.TskData;
@ -75,8 +76,8 @@ public final class FileTypesByMimeType extends Observable implements AutopsyVisi
} }
/* /*
* The pcl is in the class because it has the easiest mechanisms to add * The pcl is in the class because it has the easiest mechanisms to add and
* and remove itself during its life cycles. * remove itself during its life cycles.
*/ */
private final PropertyChangeListener pcl = (PropertyChangeEvent evt) -> { private final PropertyChangeListener pcl = (PropertyChangeEvent evt) -> {
String eventType = evt.getPropertyName(); String eventType = evt.getPropertyName();
@ -108,7 +109,7 @@ public final class FileTypesByMimeType extends Observable implements AutopsyVisi
* Retrieve the media types by retrieving the keyset from the hashmap. * Retrieve the media types by retrieving the keyset from the hashmap.
* *
* @return mediaTypes - a list of strings representing all distinct media * @return mediaTypes - a list of strings representing all distinct media
* types of files for this case * types of files for this case
*/ */
private List<String> getMediaTypeList() { private List<String> getMediaTypeList() {
synchronized (existingMimeTypes) { synchronized (existingMimeTypes) {
@ -129,6 +130,9 @@ public final class FileTypesByMimeType extends Observable implements AutopsyVisi
allDistinctMimeTypesQuery.append(" AND (type IN (").append(TskData.TSK_DB_FILES_TYPE_ENUM.FS.ordinal()).append(","); //NON-NLS allDistinctMimeTypesQuery.append(" AND (type IN (").append(TskData.TSK_DB_FILES_TYPE_ENUM.FS.ordinal()).append(","); //NON-NLS
allDistinctMimeTypesQuery.append(TskData.TSK_DB_FILES_TYPE_ENUM.CARVED.ordinal()).append(","); allDistinctMimeTypesQuery.append(TskData.TSK_DB_FILES_TYPE_ENUM.CARVED.ordinal()).append(",");
allDistinctMimeTypesQuery.append(TskData.TSK_DB_FILES_TYPE_ENUM.DERIVED.ordinal()).append(","); allDistinctMimeTypesQuery.append(TskData.TSK_DB_FILES_TYPE_ENUM.DERIVED.ordinal()).append(",");
if (!UserPreferences.hideSlackFilesInViewsTree()) {
allDistinctMimeTypesQuery.append(TskData.TSK_DB_FILES_TYPE_ENUM.SLACK.ordinal()).append(",");
}
allDistinctMimeTypesQuery.append(TskData.TSK_DB_FILES_TYPE_ENUM.LOCAL.ordinal()).append("))"); allDistinctMimeTypesQuery.append(TskData.TSK_DB_FILES_TYPE_ENUM.LOCAL.ordinal()).append("))");
synchronized (existingMimeTypes) { synchronized (existingMimeTypes) {
existingMimeTypes.clear(); existingMimeTypes.clear();
@ -178,8 +182,9 @@ public final class FileTypesByMimeType extends Observable implements AutopsyVisi
* empty. * empty.
* *
* @param node the Node which you wish to check. * @param node the Node which you wish to check.
*
* @return True if originNode is an instance of ByMimeTypeNode and is empty, * @return True if originNode is an instance of ByMimeTypeNode and is empty,
* false otherwise. * false otherwise.
*/ */
public static boolean isEmptyMimeTypeNode(Node node) { public static boolean isEmptyMimeTypeNode(Node node) {
boolean isEmptyMimeNode = false; boolean isEmptyMimeNode = false;
@ -346,7 +351,7 @@ public final class FileTypesByMimeType extends Observable implements AutopsyVisi
* of files which it represents. * of files which it represents.
* *
* @param mimeType - the complete MimeType, needed for accurate query * @param mimeType - the complete MimeType, needed for accurate query
* results * results
*/ */
private void updateDisplayName(String mimeType) { private void updateDisplayName(String mimeType) {
@ -401,7 +406,7 @@ public final class FileTypesByMimeType extends Observable implements AutopsyVisi
* Get children count without actually loading all nodes * Get children count without actually loading all nodes
* *
* @return count(*) - the number of items that will be shown in this * @return count(*) - the number of items that will be shown in this
* items Directory Listing * items Directory Listing
*/ */
private long calculateItems(SleuthkitCase sleuthkitCase, String mime_type) { private long calculateItems(SleuthkitCase sleuthkitCase, String mime_type) {
try { try {
@ -418,7 +423,8 @@ public final class FileTypesByMimeType extends Observable implements AutopsyVisi
* which match this mime type and their information. * which match this mime type and their information.
* *
* @param list - will contain all files and their attributes from the * @param list - will contain all files and their attributes from the
* tsk_files table where mime_type matches the one specified * tsk_files table where mime_type matches the one specified
*
* @return true * @return true
*/ */
@Override @Override
@ -439,8 +445,9 @@ public final class FileTypesByMimeType extends Observable implements AutopsyVisi
* tsk_files. * tsk_files.
* *
* @param mimeType - the complete mimetype of the file mediatype/subtype * @param mimeType - the complete mimetype of the file mediatype/subtype
*
* @return query.toString - portion of SQL query which will follow a * @return query.toString - portion of SQL query which will follow a
* WHERE clause. * WHERE clause.
*/ */
private String createQuery(String mime_type) { private String createQuery(String mime_type) {
StringBuilder query = new StringBuilder(); StringBuilder query = new StringBuilder();
@ -448,6 +455,9 @@ public final class FileTypesByMimeType extends Observable implements AutopsyVisi
query.append(" AND (type IN (").append(TskData.TSK_DB_FILES_TYPE_ENUM.FS.ordinal()).append(","); //NON-NLS query.append(" AND (type IN (").append(TskData.TSK_DB_FILES_TYPE_ENUM.FS.ordinal()).append(","); //NON-NLS
query.append(TskData.TSK_DB_FILES_TYPE_ENUM.CARVED.ordinal()).append(","); query.append(TskData.TSK_DB_FILES_TYPE_ENUM.CARVED.ordinal()).append(",");
query.append(TskData.TSK_DB_FILES_TYPE_ENUM.DERIVED.ordinal()).append(","); query.append(TskData.TSK_DB_FILES_TYPE_ENUM.DERIVED.ordinal()).append(",");
if (!UserPreferences.hideSlackFilesInViewsTree()) {
query.append(TskData.TSK_DB_FILES_TYPE_ENUM.SLACK.ordinal()).append(",");
}
query.append(TskData.TSK_DB_FILES_TYPE_ENUM.LOCAL.ordinal()).append("))"); query.append(TskData.TSK_DB_FILES_TYPE_ENUM.LOCAL.ordinal()).append("))");
if (UserPreferences.hideKnownFilesInViewsTree()) { if (UserPreferences.hideKnownFilesInViewsTree()) {
query.append(" AND (known IS NULL OR known != ").append(TskData.FileKnown.KNOWN.getFileKnownValue()).append(")"); //NON-NLS query.append(" AND (known IS NULL OR known != ").append(TskData.FileKnown.KNOWN.getFileKnownValue()).append(")"); //NON-NLS
@ -466,6 +476,7 @@ public final class FileTypesByMimeType extends Observable implements AutopsyVisi
* each file * each file
* *
* @param key * @param key
*
* @return * @return
*/ */
@Override @Override
@ -496,6 +507,11 @@ public final class FileTypesByMimeType extends Observable implements AutopsyVisi
return new LocalFileNode(lf); return new LocalFileNode(lf);
} }
@Override
public SlackFileNode visit(SlackFile sf) {
return new SlackFileNode(sf, false);
}
@Override @Override
protected AbstractNode defaultVisit(Content di) { protected AbstractNode defaultVisit(Content di) {
throw new UnsupportedOperationException(NbBundle.getMessage(this.getClass(), "FileTypeChildren.exception.notSupported.msg", di.toString())); throw new UnsupportedOperationException(NbBundle.getMessage(this.getClass(), "FileTypeChildren.exception.notSupported.msg", di.toString()));

View File

@ -400,6 +400,7 @@ final class IngestTasksScheduler {
// Skip the task if the file is actually the pseudo-file for the parent // Skip the task if the file is actually the pseudo-file for the parent
// or current directory. // or current directory.
String fileName = file.getName(); String fileName = file.getName();
if (fileName.equals(".") || fileName.equals("..")) { if (fileName.equals(".") || fileName.equals("..")) {
return false; return false;
} }
@ -409,7 +410,7 @@ final class IngestTasksScheduler {
* applied to the current run of ingest, checks if unallocated space * applied to the current run of ingest, checks if unallocated space
* should be processed inside call to fileIsMemberOf * should be processed inside call to fileIsMemberOf
*/ */
if ((task.getIngestJob().getFileIngestFilter().fileIsMemberOf(file)) == null) { if (file.isFile() && task.getIngestJob().getFileIngestFilter().fileIsMemberOf(file) == null) {
return false; return false;
} }

View File

@ -65,7 +65,6 @@ FilesSetDefsPanel.jLabel1.text=Rule Details
FilesSetDefsPanel.dirsRadioButton.text=Directories FilesSetDefsPanel.dirsRadioButton.text=Directories
FilesSetDefsPanel.jLabel2.text=File Type: FilesSetDefsPanel.jLabel2.text=File Type:
FilesSetDefsPanel.deleteRuleButton.text=Delete Rule FilesSetDefsPanel.deleteRuleButton.text=Delete Rule
FilesSetDefsPanel.bothRadioButton.text=Files and Directories
FilesSetDefsPanel.fileNameRegexCheckbox.text=Regex FilesSetDefsPanel.fileNameRegexCheckbox.text=Regex
FilesSetDefsPanel.ignoreKnownFilesCheckbox.text=Ignore Known Files FilesSetDefsPanel.ignoreKnownFilesCheckbox.text=Ignore Known Files
FilesSetDefsPanel.rulePathConditionTextField.text= FilesSetDefsPanel.rulePathConditionTextField.text=
@ -81,3 +80,4 @@ FilesSetRulePanel.allRadioButton.text=All
FilesSetDefsPanel.ingoreUnallocCheckbox.text=Ignore Unallocated Space FilesSetDefsPanel.ingoreUnallocCheckbox.text=Ignore Unallocated Space
FilesSetDefsPanel.ingoreUnallocCheckbox.toolTipText=Ignores unallocated space, such as deleted files. May run faster but produce less complete results. FilesSetDefsPanel.ingoreUnallocCheckbox.toolTipText=Ignores unallocated space, such as deleted files. May run faster but produce less complete results.
FilesSetDefsPanel.ingestWarningLabel.text=Ingest is ongoing, some settings will be unavailable until it finishes. FilesSetDefsPanel.ingestWarningLabel.text=Ingest is ongoing, some settings will be unavailable until it finishes.
FilesSetDefsPanel.allRadioButton.text=All

View File

@ -39,7 +39,6 @@ FilesSetDefsPanel.jLabel1.text=\u30eb\u30fc\u30eb\u8a73\u7d30
FilesSetDefsPanel.dirsRadioButton.text=\u30c7\u30a3\u30ec\u30af\u30c8\u30ea FilesSetDefsPanel.dirsRadioButton.text=\u30c7\u30a3\u30ec\u30af\u30c8\u30ea
FilesSetDefsPanel.jLabel2.text=\u30d5\u30a1\u30a4\u30eb\u30bf\u30a4\u30d7\uff1a FilesSetDefsPanel.jLabel2.text=\u30d5\u30a1\u30a4\u30eb\u30bf\u30a4\u30d7\uff1a
FilesSetDefsPanel.deleteRuleButton.text=\u30eb\u30fc\u30eb\u3092\u524a\u9664 FilesSetDefsPanel.deleteRuleButton.text=\u30eb\u30fc\u30eb\u3092\u524a\u9664
FilesSetDefsPanel.bothRadioButton.text=\u30d5\u30a1\u30a4\u30eb\u304a\u3088\u3073\u30c7\u30a3\u30ec\u30af\u30c8\u30ea
FilesSetDefsPanel.fileNameRegexCheckbox.text=\u6b63\u898f\u8868\u73fe FilesSetDefsPanel.fileNameRegexCheckbox.text=\u6b63\u898f\u8868\u73fe
FilesSetDefsPanel.ignoreKnownFilesCheckbox.text=\u65e2\u77e5\u30d5\u30a1\u30a4\u30eb\u3092\u7121\u8996 FilesSetDefsPanel.ignoreKnownFilesCheckbox.text=\u65e2\u77e5\u30d5\u30a1\u30a4\u30eb\u3092\u7121\u8996
FilesSetDefsPanel.fileNameRadioButton.text=\u30d5\u30a1\u30a4\u30eb\u540d FilesSetDefsPanel.fileNameRadioButton.text=\u30d5\u30a1\u30a4\u30eb\u540d

View File

@ -535,7 +535,7 @@ public final class FilesSet implements Serializable {
public boolean passes(AbstractFile file) { public boolean passes(AbstractFile file) {
switch (this.type) { switch (this.type) {
case FILES: case FILES:
return file.getMetaType() == TskData.TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_REG; return file.isFile();
case DIRECTORIES: case DIRECTORIES:
return file.getMetaType() == TskData.TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_DIR; return file.getMetaType() == TskData.TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_DIR;
case FILES_AND_DIRECTORIES: case FILES_AND_DIRECTORIES:

View File

@ -88,7 +88,7 @@
<EmptySpace type="unrelated" max="-2" attributes="0"/> <EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="dirsRadioButton" min="-2" max="-2" attributes="0"/> <Component id="dirsRadioButton" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Component id="bothRadioButton" min="-2" max="-2" attributes="0"/> <Component id="allRadioButton" min="-2" max="-2" attributes="0"/>
</Group> </Group>
<Group type="102" alignment="0" attributes="0"> <Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="105" max="-2" attributes="0"/> <EmptySpace min="-2" pref="105" max="-2" attributes="0"/>
@ -236,7 +236,7 @@
<Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/> <Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="filesRadioButton" alignment="3" min="-2" max="-2" attributes="0"/> <Component id="filesRadioButton" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="dirsRadioButton" alignment="3" min="-2" max="-2" attributes="0"/> <Component id="dirsRadioButton" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="bothRadioButton" alignment="3" min="-2" max="-2" attributes="0"/> <Component id="allRadioButton" alignment="3" min="-2" max="-2" attributes="0"/>
</Group> </Group>
<EmptySpace min="-2" pref="16" max="-2" attributes="0"/> <EmptySpace min="-2" pref="16" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0"> <Group type="103" groupAlignment="3" attributes="0">
@ -603,18 +603,18 @@
</Property> </Property>
</Properties> </Properties>
</Component> </Component>
<Component class="javax.swing.JRadioButton" name="bothRadioButton"> <Component class="javax.swing.JRadioButton" name="allRadioButton">
<Properties> <Properties>
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor"> <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
<ComponentRef name="typeButtonGroup"/> <ComponentRef name="typeButtonGroup"/>
</Property> </Property>
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor"> <Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
<FontInfo relative="true"> <FontInfo relative="true">
<Font bold="false" component="bothRadioButton" property="font" relativeSize="false" size="11"/> <Font bold="false" component="allRadioButton" property="font" relativeSize="false" size="11"/>
</FontInfo> </FontInfo>
</Property> </Property>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/modules/interestingitems/Bundle.properties" key="FilesSetDefsPanel.bothRadioButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/modules/interestingitems/Bundle.properties" key="FilesSetDefsPanel.allRadioButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property> </Property>
<Property name="enabled" type="boolean" value="false"/> <Property name="enabled" type="boolean" value="false"/>
</Properties> </Properties>

View File

@ -98,6 +98,10 @@ public final class FilesSetDefsPanel extends IngestModuleGlobalSettingsPanel imp
this.jLabel8.setVisible(false); this.jLabel8.setVisible(false);
this.equalitySignComboBox.setVisible(false); this.equalitySignComboBox.setVisible(false);
this.ignoreKnownFilesCheckbox.setVisible(false); this.ignoreKnownFilesCheckbox.setVisible(false);
this.jLabel2.setVisible(false);
this.filesRadioButton.setVisible(false);
this.dirsRadioButton.setVisible(false);
this.allRadioButton.setVisible(false);
this.jTextArea1.setText(org.openide.util.NbBundle.getMessage(FilesSetDefsPanel.class, "FilesSetDefsPanel.ingest.jTextArea1.text")); // NOI18N this.jTextArea1.setText(org.openide.util.NbBundle.getMessage(FilesSetDefsPanel.class, "FilesSetDefsPanel.ingest.jTextArea1.text")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(setsListLabel, org.openide.util.NbBundle.getMessage(FilesSetDefsPanel.class, "FilesSetDefsPanel.ingest.setsListLabel.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(setsListLabel, org.openide.util.NbBundle.getMessage(FilesSetDefsPanel.class, "FilesSetDefsPanel.ingest.setsListLabel.text")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(editSetButton, org.openide.util.NbBundle.getMessage(FilesSetDefsPanel.class, "FilesSetDefsPanel.ingest.editSetButton.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(editSetButton, org.openide.util.NbBundle.getMessage(FilesSetDefsPanel.class, "FilesSetDefsPanel.ingest.editSetButton.text")); // NOI18N
@ -343,7 +347,7 @@ public final class FilesSetDefsPanel extends IngestModuleGlobalSettingsPanel imp
FilesSetDefsPanel.this.dirsRadioButton.setSelected(true); FilesSetDefsPanel.this.dirsRadioButton.setSelected(true);
break; break;
case FILES_AND_DIRECTORIES: case FILES_AND_DIRECTORIES:
FilesSetDefsPanel.this.bothRadioButton.setSelected(true); FilesSetDefsPanel.this.allRadioButton.setSelected(true);
break; break;
} }
if (pathCondition != null) { if (pathCondition != null) {
@ -556,7 +560,7 @@ public final class FilesSetDefsPanel extends IngestModuleGlobalSettingsPanel imp
fileNameRegexCheckbox = new javax.swing.JCheckBox(); fileNameRegexCheckbox = new javax.swing.JCheckBox();
separator = new javax.swing.JSeparator(); separator = new javax.swing.JSeparator();
setsListLabel = new javax.swing.JLabel(); setsListLabel = new javax.swing.JLabel();
bothRadioButton = new javax.swing.JRadioButton(); allRadioButton = new javax.swing.JRadioButton();
deleteSetButton = new javax.swing.JButton(); deleteSetButton = new javax.swing.JButton();
deleteRuleButton = new javax.swing.JButton(); deleteRuleButton = new javax.swing.JButton();
newSetButton = new javax.swing.JButton(); newSetButton = new javax.swing.JButton();
@ -686,10 +690,10 @@ public final class FilesSetDefsPanel extends IngestModuleGlobalSettingsPanel imp
setsListLabel.setFont(setsListLabel.getFont().deriveFont(setsListLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11)); setsListLabel.setFont(setsListLabel.getFont().deriveFont(setsListLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
org.openide.awt.Mnemonics.setLocalizedText(setsListLabel, org.openide.util.NbBundle.getMessage(FilesSetDefsPanel.class, "FilesSetDefsPanel.interesting.setsListLabel.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(setsListLabel, org.openide.util.NbBundle.getMessage(FilesSetDefsPanel.class, "FilesSetDefsPanel.interesting.setsListLabel.text")); // NOI18N
typeButtonGroup.add(bothRadioButton); typeButtonGroup.add(allRadioButton);
bothRadioButton.setFont(bothRadioButton.getFont().deriveFont(bothRadioButton.getFont().getStyle() & ~java.awt.Font.BOLD, 11)); allRadioButton.setFont(allRadioButton.getFont().deriveFont(allRadioButton.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
org.openide.awt.Mnemonics.setLocalizedText(bothRadioButton, org.openide.util.NbBundle.getMessage(FilesSetDefsPanel.class, "FilesSetDefsPanel.bothRadioButton.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(allRadioButton, org.openide.util.NbBundle.getMessage(FilesSetDefsPanel.class, "FilesSetDefsPanel.allRadioButton.text")); // NOI18N
bothRadioButton.setEnabled(false); allRadioButton.setEnabled(false);
deleteSetButton.setFont(deleteSetButton.getFont().deriveFont(deleteSetButton.getFont().getStyle() & ~java.awt.Font.BOLD, 11)); deleteSetButton.setFont(deleteSetButton.getFont().deriveFont(deleteSetButton.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
deleteSetButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/delete16.png"))); // NOI18N deleteSetButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/delete16.png"))); // NOI18N
@ -802,7 +806,7 @@ public final class FilesSetDefsPanel extends IngestModuleGlobalSettingsPanel imp
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(dirsRadioButton) .addComponent(dirsRadioButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(bothRadioButton)) .addComponent(allRadioButton))
.addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createSequentialGroup()
.addGap(105, 105, 105) .addGap(105, 105, 105)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
@ -921,7 +925,7 @@ public final class FilesSetDefsPanel extends IngestModuleGlobalSettingsPanel imp
.addComponent(jLabel2) .addComponent(jLabel2)
.addComponent(filesRadioButton) .addComponent(filesRadioButton)
.addComponent(dirsRadioButton) .addComponent(dirsRadioButton)
.addComponent(bothRadioButton)) .addComponent(allRadioButton))
.addGap(16, 16, 16) .addGap(16, 16, 16)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel3) .addComponent(jLabel3)
@ -1023,7 +1027,7 @@ public final class FilesSetDefsPanel extends IngestModuleGlobalSettingsPanel imp
}//GEN-LAST:event_newRuleButtonActionPerformed }//GEN-LAST:event_newRuleButtonActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables // Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JRadioButton bothRadioButton; private javax.swing.JRadioButton allRadioButton;
private javax.swing.JButton deleteRuleButton; private javax.swing.JButton deleteRuleButton;
private javax.swing.JButton deleteSetButton; private javax.swing.JButton deleteSetButton;
private javax.swing.JRadioButton dirsRadioButton; private javax.swing.JRadioButton dirsRadioButton;

View File

@ -28,8 +28,9 @@ import org.sleuthkit.autopsy.modules.interestingitems.FilesSetDefsPanel.PANEL_TY
* definitions. * definitions.
*/ */
public class FilesSetPanel extends javax.swing.JPanel { public class FilesSetPanel extends javax.swing.JPanel {
@NbBundle.Messages({"FilesSetPanel.ingest.title=File Ingest Filter", "FilesSetPanel.ingest.createNewFilter=Create new file ingest filter..."})
@NbBundle.Messages({"FilesSetPanel.ingest.title=File Ingest Filter", "FilesSetPanel.ingest.createNewFilter=Create/edit file ingest filter(s)..."})
private static final String CREATE_NEW_FILE_INGEST_FILTER = Bundle.FilesSetPanel_ingest_createNewFilter(); private static final String CREATE_NEW_FILE_INGEST_FILTER = Bundle.FilesSetPanel_ingest_createNewFilter();
/** /**
@ -39,7 +40,6 @@ public class FilesSetPanel extends javax.swing.JPanel {
return CREATE_NEW_FILE_INGEST_FILTER; return CREATE_NEW_FILE_INGEST_FILTER;
} }
/** /**
* Construct a files set panel in create mode. * Construct a files set panel in create mode.
*/ */

View File

@ -39,8 +39,7 @@ import org.sleuthkit.autopsy.modules.filetypeid.FileTypeDetector;
import org.sleuthkit.autopsy.modules.interestingitems.FilesSetDefsPanel.PANEL_TYPE; import org.sleuthkit.autopsy.modules.interestingitems.FilesSetDefsPanel.PANEL_TYPE;
/** /**
* A panel that allows a user to create and edit files set * A panel that allows a user to create and edit files set membership rules.
* membership rules.
*/ */
final class FilesSetRulePanel extends javax.swing.JPanel { final class FilesSetRulePanel extends javax.swing.JPanel {
@ -75,6 +74,10 @@ final class FilesSetRulePanel extends javax.swing.JPanel {
fileSizeCheck.setVisible(false); fileSizeCheck.setVisible(false);
equalitySymbolComboBox.setVisible(false); equalitySymbolComboBox.setVisible(false);
fileSizeSpinner.setVisible(false); fileSizeSpinner.setVisible(false);
jLabel1.setVisible(false);
filesRadioButton.setVisible(false);
dirsRadioButton.setVisible(false);
allRadioButton.setVisible(false);
org.openide.awt.Mnemonics.setLocalizedText(jLabel5, org.openide.util.NbBundle.getMessage(FilesSetRulePanel.class, "FilesSetRulePanel.ingest.jLabel5.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(jLabel5, org.openide.util.NbBundle.getMessage(FilesSetRulePanel.class, "FilesSetRulePanel.ingest.jLabel5.text")); // NOI18N
} else { } else {
@ -98,6 +101,10 @@ final class FilesSetRulePanel extends javax.swing.JPanel {
fileSizeCheck.setVisible(false); fileSizeCheck.setVisible(false);
equalitySymbolComboBox.setVisible(false); equalitySymbolComboBox.setVisible(false);
fileSizeSpinner.setVisible(false); fileSizeSpinner.setVisible(false);
jLabel1.setVisible(false);
filesRadioButton.setVisible(false);
dirsRadioButton.setVisible(false);
allRadioButton.setVisible(false);
} else { } else {
populateMimeTypesComboBox(); populateMimeTypesComboBox();
populateMimeConditionComponents(rule); populateMimeConditionComponents(rule);
@ -295,8 +302,8 @@ final class FilesSetRulePanel extends javax.swing.JPanel {
/** /**
* Returns whether or not the data entered in the panel constitutes a valid * Returns whether or not the data entered in the panel constitutes a valid
* files set membership rule definition, displaying a dialog * files set membership rule definition, displaying a dialog explaining the
* explaining the deficiency if the definition is invalid. * deficiency if the definition is invalid.
* *
* @return True if the definition is valid, false otherwise. * @return True if the definition is valid, false otherwise.
*/ */
@ -559,7 +566,6 @@ final class FilesSetRulePanel extends javax.swing.JPanel {
this.fileSizeCheck.setSelected(false); this.fileSizeCheck.setSelected(false);
this.mimeCheck.setEnabled(false); this.mimeCheck.setEnabled(false);
this.mimeCheck.setSelected(false); this.mimeCheck.setSelected(false);
} else { } else {
if (this.nameCheck.isSelected()) { if (this.nameCheck.isSelected()) {
this.extensionRadioButton.setEnabled(true); this.extensionRadioButton.setEnabled(true);