From cf07e646e416c2778754a3d45f7f04392042a7d5 Mon Sep 17 00:00:00 2001 From: Richard Cordovano Date: Mon, 20 Nov 2017 17:37:03 -0500 Subject: [PATCH] Revert "Revert "Merge branch '3199-ConsolidateDefaultTags' of https://github.com/wschaeferB/autopsy into develop"" This reverts commit 55fe85935d6f84250e38598724f5c88d9126c3e3. --- Core/nbproject/project.xml | 1 + .../casemodule/services/NewTagNameDialog.java | 6 +- .../casemodule/services/TagNameDefiniton.java | 90 +++++++++++++++++-- .../casemodule/services/TagOptionsPanel.form | 2 +- .../casemodule/services/TagOptionsPanel.java | 3 +- .../casemodule/services/TagsManager.java | 58 ++++++++---- .../datamodel/AbstractSqlEamDb.java | 27 ------ .../centralrepository/datamodel/EamDb.java | 14 --- .../datamodel/PostgresEamDb.java | 11 --- .../datamodel/PostgresEamDbSettings.java | 30 ------- .../datamodel/SqliteEamDb.java | 11 +-- .../datamodel/SqliteEamDbSettings.java | 27 +----- .../eventlisteners/CaseEventListener.java | 55 +++++------- .../optionspanel/ManageTagsDialog.java | 12 +-- .../autopsy/datamodel/tags}/Category.java | 2 +- .../actions/CategorizeAction.java | 2 +- .../actions/CategorizeGroupAction.java | 2 +- .../CategorizeSelectedFilesAction.java | 2 +- .../datamodel/CategoryManager.java | 2 + .../datamodel/DrawableAttribute.java | 1 + .../imagegallery/datamodel/DrawableDB.java | 1 + .../imagegallery/datamodel/DrawableFile.java | 1 + .../datamodel/DrawableTagsManager.java | 16 +--- .../datamodel/grouping/GroupManager.java | 2 +- .../imagegallery/gui/SummaryTablePane.java | 2 +- .../autopsy/imagegallery/gui/Toolbar.java | 2 +- .../gui/drawableviews/DrawableView.java | 2 +- .../gui/drawableviews/GroupPane.java | 2 +- .../gui/drawableviews/MetaDataPane.java | 2 +- .../gui/drawableviews/SlideShowView.java | 2 +- 30 files changed, 178 insertions(+), 212 deletions(-) rename {ImageGallery/src/org/sleuthkit/autopsy/imagegallery/datamodel => Core/src/org/sleuthkit/autopsy/datamodel/tags}/Category.java (98%) mode change 100755 => 100644 diff --git a/Core/nbproject/project.xml b/Core/nbproject/project.xml index 987b2ffe78..394198f6c9 100755 --- a/Core/nbproject/project.xml +++ b/Core/nbproject/project.xml @@ -304,6 +304,7 @@ org.sleuthkit.autopsy.corecomponents org.sleuthkit.autopsy.coreutils org.sleuthkit.autopsy.datamodel + org.sleuthkit.autopsy.datamodel.tags org.sleuthkit.autopsy.datasourceprocessors org.sleuthkit.autopsy.directorytree org.sleuthkit.autopsy.events diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/services/NewTagNameDialog.java b/Core/src/org/sleuthkit/autopsy/casemodule/services/NewTagNameDialog.java index ff21ac283b..b7b2e66ebc 100755 --- a/Core/src/org/sleuthkit/autopsy/casemodule/services/NewTagNameDialog.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/services/NewTagNameDialog.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * -* Copyright 2011-2016 Basis Technology Corp. +* Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -117,7 +117,9 @@ final class NewTagNameDialog extends javax.swing.JDialog { JOptionPane.ERROR_MESSAGE); return; } - if (TagsManager.containsIllegalCharacters(newTagDisplayName)) { + + //if a tag name contains illegal characters and is not the name of one of the standard tags + if (TagsManager.containsIllegalCharacters(newTagDisplayName) && !TagNameDefiniton.getStandardTagNames().contains(newTagDisplayName)) { JOptionPane.showMessageDialog(null, NbBundle.getMessage(NewTagNameDialog.class, "NewTagNameDialog.JOptionPane.tagNameIllegalCharacters.message"), NbBundle.getMessage(NewTagNameDialog.class, "NewTagNameDialog.JOptionPane.tagNameIllegalCharacters.title"), diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/services/TagNameDefiniton.java b/Core/src/org/sleuthkit/autopsy/casemodule/services/TagNameDefiniton.java index 101d68fa4c..8c7d29baa3 100755 --- a/Core/src/org/sleuthkit/autopsy/casemodule/services/TagNameDefiniton.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/services/TagNameDefiniton.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2016 Basis Technology Corp. + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -18,14 +18,22 @@ */ package org.sleuthkit.autopsy.casemodule.services; +import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; import java.util.List; import java.util.Objects; import java.util.Set; import javax.annotation.concurrent.Immutable; +import org.openide.util.Exceptions; +import org.openide.util.NbBundle; +import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.coreutils.ModuleSettings; import org.sleuthkit.datamodel.TagName; +import org.sleuthkit.autopsy.datamodel.tags.Category; +import org.sleuthkit.datamodel.SleuthkitCase; +import org.sleuthkit.datamodel.TskCoreException; +import org.sleuthkit.datamodel.TskData; /** * A tag name definition consisting of a display name, description and color. @@ -33,24 +41,40 @@ import org.sleuthkit.datamodel.TagName; @Immutable final class TagNameDefiniton implements Comparable { + @NbBundle.Messages({"TagNameDefiniton.predefTagNames.bookmark.text=Bookmark", + "TagNameDefiniton.predefTagNames.followUp.text=Follow Up", + "TagNameDefiniton.predefTagNames.notableItem.text=Notable Item"}) private static final String TAGS_SETTINGS_NAME = "Tags"; //NON-NLS private static final String TAG_NAMES_SETTING_KEY = "TagNames"; //NON-NLS + + private static final List STANDARD_NOTABLE_TAG_DISPLAY_NAMES = Arrays.asList(Bundle.TagNameDefiniton_predefTagNames_notableItem_text(), Category.ONE.getDisplayName(), Category.TWO.getDisplayName(), Category.THREE.getDisplayName()); // NON-NLS + private static final List STANDARD_TAG_DISPLAY_NAMES = Arrays.asList(Bundle.TagNameDefiniton_predefTagNames_bookmark_text(), Bundle.TagNameDefiniton_predefTagNames_followUp_text(), + Bundle.TagNameDefiniton_predefTagNames_notableItem_text(), Category.ONE.getDisplayName(), + Category.TWO.getDisplayName(), Category.THREE.getDisplayName(), + Category.FOUR.getDisplayName(), Category.FIVE.getDisplayName()); private final String displayName; private final String description; private final TagName.HTML_COLOR color; + private final TskData.FileKnown knownStatusDenoted; /** * Constructs a tag name definition consisting of a display name, - * description and color. + * description, color and knownStatus. * * @param displayName The display name for the tag name. * @param description The description for the tag name. * @param color The color for the tag name. + * @param knownStatus The status denoted by the tag. */ - TagNameDefiniton(String displayName, String description, TagName.HTML_COLOR color) { + TagNameDefiniton(String displayName, String description, TagName.HTML_COLOR color, TskData.FileKnown status) { this.displayName = displayName; this.description = description; this.color = color; + this.knownStatusDenoted = status; + } + + static List getStandardTagNames() { + return STANDARD_TAG_DISPLAY_NAMES; } /** @@ -80,6 +104,16 @@ final class TagNameDefiniton implements Comparable { return color; } + /** + * Whether or not the status that this tag implies is the Notable status + * + * @return true if the Notable status is implied by this tag, false + * otherwise. + */ + boolean isNotable() { + return knownStatusDenoted == TskData.FileKnown.BAD; + } + /** * Compares this tag name definition with the specified tag name definition * for order. @@ -140,22 +174,58 @@ final class TagNameDefiniton implements Comparable { * that is used by the tags settings file. */ private String toSettingsFormat() { - return displayName + "," + description + "," + color.name(); + return displayName + "," + description + "," + color.name() + "," + knownStatusDenoted.toString(); + } + + private TagName saveToCase(SleuthkitCase caseDb) { + TagName tagName = null; + try { + tagName = caseDb.addOrUpdateTagName(displayName, description, color, knownStatusDenoted); + } catch (TskCoreException ex) { + Exceptions.printStackTrace(ex); + } + return tagName; } /** - * Gets tag name definitions from the tag settings file. + * Gets tag name definitions from the tag settings file as well as the + * default tag name definitions. * * @return A set of tag name definition objects. */ static synchronized Set getTagNameDefinitions() { Set tagNames = new HashSet<>(); + List standardTags = new ArrayList<>(STANDARD_TAG_DISPLAY_NAMES); //modifiable copy of default tags list for us to keep track of which ones already exist String setting = ModuleSettings.getConfigSetting(TAGS_SETTINGS_NAME, TAG_NAMES_SETTING_KEY); if (null != setting && !setting.isEmpty()) { List tagNameTuples = Arrays.asList(setting.split(";")); - for (String tagNameTuple : tagNameTuples) { - String[] tagNameAttributes = tagNameTuple.split(","); - tagNames.add(new TagNameDefiniton(tagNameAttributes[0], tagNameAttributes[1], TagName.HTML_COLOR.valueOf(tagNameAttributes[2]))); + List notableTags = new ArrayList<>(); + String badTagsStr = ModuleSettings.getConfigSetting("CentralRepository", "db.badTags"); // NON-NLS + if (badTagsStr == null || badTagsStr.isEmpty()) { //if there were no bad tags in the central repo properties file use the default list + notableTags.addAll(STANDARD_NOTABLE_TAG_DISPLAY_NAMES); + } else { //otherwise use the list that was in the central repository properties file + notableTags.addAll(Arrays.asList(badTagsStr.split(","))); + } + for (String tagNameTuple : tagNameTuples) { //for each tag listed in the tags properties file + String[] tagNameAttributes = tagNameTuple.split(","); //get the attributes + if (tagNameAttributes.length == 3) { //if there are only 3 attributes so Tags.properties does not contain any tag definitions with knownStatus + standardTags.remove(tagNameAttributes[0]); //remove tag from default tags we need to create still + if (notableTags.contains(tagNameAttributes[0])) { //if tag should be notable mark create it as such + tagNames.add(new TagNameDefiniton(tagNameAttributes[0], tagNameAttributes[1], TagName.HTML_COLOR.valueOf(tagNameAttributes[2]), TskData.FileKnown.BAD)); + } else { //otherwise create it as unknown + tagNames.add(new TagNameDefiniton(tagNameAttributes[0], tagNameAttributes[1], TagName.HTML_COLOR.valueOf(tagNameAttributes[2]), TskData.FileKnown.UNKNOWN)); //add the default value for that tag + } + } else if (tagNameAttributes.length == 4) { //if there are 4 attributes its a current list we can use the values present + standardTags.remove(tagNameAttributes[0]); //remove tag from default tags we need to create still + tagNames.add(new TagNameDefiniton(tagNameAttributes[0], tagNameAttributes[1], TagName.HTML_COLOR.valueOf(tagNameAttributes[2]), TskData.FileKnown.valueOf(tagNameAttributes[3]))); + } + } + } + for (String standardTagName : standardTags) { //create standard tags which should always exist which were not already created for whatever reason, such as upgrade + if (STANDARD_NOTABLE_TAG_DISPLAY_NAMES.contains(standardTagName)) { + tagNames.add(new TagNameDefiniton(standardTagName, "", TagName.HTML_COLOR.NONE, TskData.FileKnown.BAD)); + } else { + tagNames.add(new TagNameDefiniton(standardTagName, "", TagName.HTML_COLOR.NONE, TskData.FileKnown.UNKNOWN)); } } return tagNames; @@ -173,6 +243,10 @@ final class TagNameDefiniton implements Comparable { setting.append(";"); } setting.append(tagName.toSettingsFormat()); + if (Case.isCaseOpen()) { + SleuthkitCase caseDb = Case.getCurrentCase().getSleuthkitCase(); + tagName.saveToCase(caseDb); + } } ModuleSettings.setConfigSetting(TAGS_SETTINGS_NAME, TAG_NAMES_SETTING_KEY, setting.toString()); } diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/services/TagOptionsPanel.form b/Core/src/org/sleuthkit/autopsy/casemodule/services/TagOptionsPanel.form index 3f33f848c0..c58201621a 100755 --- a/Core/src/org/sleuthkit/autopsy/casemodule/services/TagOptionsPanel.form +++ b/Core/src/org/sleuthkit/autopsy/casemodule/services/TagOptionsPanel.form @@ -52,7 +52,7 @@ - + diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/services/TagOptionsPanel.java b/Core/src/org/sleuthkit/autopsy/casemodule/services/TagOptionsPanel.java index c1c9beb5b2..681cc95472 100755 --- a/Core/src/org/sleuthkit/autopsy/casemodule/services/TagOptionsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/services/TagOptionsPanel.java @@ -27,6 +27,7 @@ import org.netbeans.spi.options.OptionsPanelController; import org.openide.util.NbBundle; import org.sleuthkit.autopsy.corecomponents.OptionsPanel; import org.sleuthkit.datamodel.TagName; +import org.sleuthkit.datamodel.TskData; /** * A panel to allow the user to create and delete custom tag types. @@ -190,7 +191,7 @@ final class TagOptionsPanel extends javax.swing.JPanel implements OptionsPanel { NewTagNameDialog.BUTTON_PRESSED result = dialog.getResult(); if (result == NewTagNameDialog.BUTTON_PRESSED.OK) { String newTagDisplayName = dialog.getTagName(); - TagNameDefiniton newTagType = new TagNameDefiniton(newTagDisplayName, DEFAULT_DESCRIPTION, DEFAULT_COLOR); + TagNameDefiniton newTagType = new TagNameDefiniton(newTagDisplayName, DEFAULT_DESCRIPTION, DEFAULT_COLOR, TskData.FileKnown.UNKNOWN); /* * If tag name already exists, don't add the tag name. */ diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/services/TagsManager.java b/Core/src/org/sleuthkit/autopsy/casemodule/services/TagsManager.java index c592e463cb..adfcbf0029 100755 --- a/Core/src/org/sleuthkit/autopsy/casemodule/services/TagsManager.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/services/TagsManager.java @@ -20,14 +20,13 @@ package org.sleuthkit.autopsy.casemodule.services; import java.io.Closeable; import java.io.IOException; -import java.util.Arrays; +import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import java.util.logging.Level; -import org.openide.util.NbBundle; import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.datamodel.BlackboardArtifact; @@ -37,6 +36,7 @@ import org.sleuthkit.datamodel.ContentTag; import org.sleuthkit.datamodel.SleuthkitCase; import org.sleuthkit.datamodel.TagName; import org.sleuthkit.datamodel.TskCoreException; +import org.sleuthkit.datamodel.TskData; /** * A per case Autopsy service that manages the addition of content and artifact @@ -45,8 +45,7 @@ import org.sleuthkit.datamodel.TskCoreException; public class TagsManager implements Closeable { private static final Logger LOGGER = Logger.getLogger(TagsManager.class.getName()); - @NbBundle.Messages("TagsManager.predefTagNames.bookmark.text=Bookmark") - private static final Set STANDARD_TAG_DISPLAY_NAMES = new HashSet<>(Arrays.asList(Bundle.TagsManager_predefTagNames_bookmark_text())); + private final SleuthkitCase caseDb; /** @@ -83,11 +82,11 @@ public class TagsManager implements Closeable { * querying the case database for tag types. */ public static Set getTagDisplayNames() throws TskCoreException { - Set tagDisplayNames = new HashSet<>(STANDARD_TAG_DISPLAY_NAMES); + Set tagDisplayNames = new HashSet<>(); Set customNames = TagNameDefiniton.getTagNameDefinitions(); customNames.forEach((tagType) -> { tagDisplayNames.add(tagType.getDisplayName()); - }); + }); try { TagsManager tagsManager = Case.getCurrentCase().getServices().getTagsManager(); for (TagName tagName : tagsManager.getAllTagNames()) { @@ -97,7 +96,17 @@ public class TagsManager implements Closeable { /* * No current case, nothing more to add to the set. */ - } + } + return tagDisplayNames; + } + + public static List getNotableTagDisplayNames() { + List tagDisplayNames = new ArrayList<>(); + for (TagNameDefiniton tagDef : TagNameDefiniton.getTagNameDefinitions()) { + if (tagDef.isNotable()) { + tagDisplayNames.add(tagDef.getDisplayName()); + } + } return tagDisplayNames; } @@ -186,7 +195,7 @@ public class TagsManager implements Closeable { * name to the case database. */ public synchronized TagName addTagName(String displayName) throws TagNameAlreadyExistsException, TskCoreException { - return addTagName(displayName, "", TagName.HTML_COLOR.NONE); + return addTagName(displayName, "", TagName.HTML_COLOR.NONE, TskData.FileKnown.UNKNOWN); } /** @@ -205,7 +214,7 @@ public class TagsManager implements Closeable { * name to the case database. */ public synchronized TagName addTagName(String displayName, String description) throws TagNameAlreadyExistsException, TskCoreException { - return addTagName(displayName, description, TagName.HTML_COLOR.NONE); + return addTagName(displayName, description, TagName.HTML_COLOR.NONE, TskData.FileKnown.UNKNOWN); } /** @@ -224,13 +233,32 @@ public class TagsManager implements Closeable { * name to the case database. */ public synchronized TagName addTagName(String displayName, String description, TagName.HTML_COLOR color) throws TagNameAlreadyExistsException, TskCoreException { + return addTagName(displayName, description, color, TskData.FileKnown.UNKNOWN); + } + + /** + * Adds a tag name entry to the case database and adds a corresponding tag + * type to the current user's custom tag types. + * + * @param displayName The display name for the new tag type. + * @param description The description for the new tag type. + * @param color The color to associate with the new tag type. + * @param knownStatus The knownStatus to be used for the tag when + * correlating on the tagged item + * + * @return A TagName object that can be used to add instances of the tag + * type to the case database. + * + * @throws TagNameAlreadyExistsException If the tag name already exists. + * @throws TskCoreException If there is an error adding the tag + * name to the case database. + */ + public synchronized TagName addTagName(String displayName, String description, TagName.HTML_COLOR color, TskData.FileKnown knownStatus) throws TagNameAlreadyExistsException, TskCoreException { try { - TagName tagName = caseDb.addTagName(displayName, description, color); - if (!STANDARD_TAG_DISPLAY_NAMES.contains(displayName)) { - Set customTypes = TagNameDefiniton.getTagNameDefinitions(); - customTypes.add(new TagNameDefiniton(displayName, description, color)); - TagNameDefiniton.setTagNameDefinitions(customTypes); - } + TagName tagName = caseDb.addOrUpdateTagName(displayName, description, color, knownStatus); + Set customTypes = TagNameDefiniton.getTagNameDefinitions(); + customTypes.add(new TagNameDefiniton(displayName, description, color, knownStatus)); + TagNameDefiniton.setTagNameDefinitions(customTypes); return tagName; } catch (TskCoreException ex) { List existingTagNames = caseDb.getAllTagNames(); diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/AbstractSqlEamDb.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/AbstractSqlEamDb.java index 7c7d22066e..f9c2435472 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/AbstractSqlEamDb.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/AbstractSqlEamDb.java @@ -53,7 +53,6 @@ public abstract class AbstractSqlEamDb implements EamDb { private int bulkArtifactsCount; protected int bulkArtifactsThreshold; private final Map> bulkArtifacts; - private final List badTags; /** * Connect to the DB and initialize it. @@ -61,7 +60,6 @@ public abstract class AbstractSqlEamDb implements EamDb { * @throws UnknownHostException, EamDbException */ protected AbstractSqlEamDb() throws EamDbException { - badTags = new ArrayList<>(); bulkArtifactsCount = 0; bulkArtifacts = new HashMap<>(); @@ -76,31 +74,6 @@ public abstract class AbstractSqlEamDb implements EamDb { */ protected abstract Connection connect() throws EamDbException; - /** - * Get the list of tags recognized as "Bad" - * - * @return The list of bad tags - */ - @Override - public List getBadTags() { - synchronized (badTags) { - return new ArrayList<>(badTags); - } - } - - /** - * Set the tags recognized as "Bad" - * - * @param tags The tags to consider bad - */ - @Override - public void setBadTags(List tags) { - synchronized (badTags) { - badTags.clear(); - badTags.addAll(tags); - } - } - /** * Add a new name/value pair in the db_info table. * diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamDb.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamDb.java index 1011f837cc..5f2cdfa816 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamDb.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamDb.java @@ -103,20 +103,6 @@ public interface EamDb { return ""; } - /** - * Get the list of tags recognized as "Bad" - * - * @return The list of bad tags - */ - List getBadTags(); - - /** - * Set the tags recognized as "Bad" - * - * @param tags The tags to consider bad - */ - void setBadTags(List tags); - /** * Add a new name/value pair in the db_info table. * diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/PostgresEamDb.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/PostgresEamDb.java index cecba78f4e..c139554c9c 100755 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/PostgresEamDb.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/PostgresEamDb.java @@ -21,7 +21,6 @@ package org.sleuthkit.autopsy.centralrepository.datamodel; import java.sql.Connection; import java.sql.SQLException; import java.sql.Statement; -import java.util.List; import java.util.logging.Level; import org.apache.commons.dbcp2.BasicDataSource; import org.sleuthkit.autopsy.coreutils.Logger; @@ -187,14 +186,4 @@ public class PostgresEamDb extends AbstractSqlEamDb { return CONFLICT_CLAUSE; } - @Override - public List getBadTags() { - return dbSettings.getBadTags(); - } - - @Override - public void setBadTags(List badTags) { - dbSettings.setBadTags(badTags); - } - } diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/PostgresEamDbSettings.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/PostgresEamDbSettings.java index 6179a58342..bfb3f04b32 100755 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/PostgresEamDbSettings.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/PostgresEamDbSettings.java @@ -24,8 +24,6 @@ import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; -import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import java.util.Properties; import java.util.logging.Level; @@ -47,7 +45,6 @@ public final class PostgresEamDbSettings { private final int DEFAULT_BULK_THRESHHOLD = 1000; private final String DEFAULT_USERNAME = ""; private final String DEFAULT_PASSWORD = ""; - private final String DEFAULT_BAD_TAGS = "Evidence"; // NON-NLS private final String VALIDATION_QUERY = "SELECT version()"; // NON-NLS private final String JDBC_BASE_URI = "jdbc:postgresql://"; // NON-NLS private final String JDBC_DRIVER = "org.postgresql.Driver"; // NON-NLS @@ -59,7 +56,6 @@ public final class PostgresEamDbSettings { private int bulkThreshold; private String userName; private String password; - private List badTags; public PostgresEamDbSettings() { loadSettings(); @@ -120,16 +116,6 @@ public final class PostgresEamDbSettings { password = DEFAULT_PASSWORD; } } - - String badTagsStr = ModuleSettings.getConfigSetting("CentralRepository", "db.badTags"); // NON-NLS - if (badTagsStr == null) { - badTagsStr = DEFAULT_BAD_TAGS; - } - if(badTagsStr.isEmpty()){ - badTags = new ArrayList<>(); - } else { - badTags = new ArrayList<>(Arrays.asList(badTagsStr.split(","))); - } } public void saveSettings() { @@ -143,8 +129,6 @@ public final class PostgresEamDbSettings { } catch (TextConverterException ex) { LOGGER.log(Level.SEVERE, "Failed to convert password from text to hex text.", ex); } - - ModuleSettings.setConfigSetting("CentralRepository", "db.badTags", String.join(",", badTags)); // NON-NLS } /** @@ -633,20 +617,6 @@ public final class PostgresEamDbSettings { this.password = password; } - /** - * @return the badTags - */ - public List getBadTags() { - return badTags; - } - - /** - * @param badTags the badTags to set - */ - public void setBadTags(List badTags) { - this.badTags = badTags; - } - /** * @return the VALIDATION_QUERY */ diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/SqliteEamDb.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/SqliteEamDb.java index 719a58385b..3e79f5abca 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/SqliteEamDb.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/SqliteEamDb.java @@ -200,16 +200,7 @@ public class SqliteEamDb extends AbstractSqlEamDb { return ""; } - @Override - public List getBadTags() { - return dbSettings.getBadTags(); - } - - @Override - public void setBadTags(List badTags) { - dbSettings.setBadTags(badTags); - } - + /** * Add a new name/value pair in the db_info table. * diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/SqliteEamDbSettings.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/SqliteEamDbSettings.java index fa50118924..b4ea1aa8a2 100755 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/SqliteEamDbSettings.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/SqliteEamDbSettings.java @@ -26,8 +26,6 @@ import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; import java.sql.Statement; -import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import java.util.logging.Level; import java.util.regex.Pattern; @@ -44,7 +42,6 @@ public final class SqliteEamDbSettings { private final String DEFAULT_DBNAME = "central_repository.db"; // NON-NLS private final String DEFAULT_DBDIRECTORY = PlatformUtil.getUserDirectory() + File.separator + "central_repository"; // NON-NLS private final int DEFAULT_BULK_THRESHHOLD = 1000; - private final String DEFAULT_BAD_TAGS = "Evidence"; // NON-NLS private final String JDBC_DRIVER = "org.sqlite.JDBC"; // NON-NLS private final String JDBC_BASE_URI = "jdbc:sqlite:"; // NON-NLS private final String VALIDATION_QUERY = "SELECT count(*) from sqlite_master"; // NON-NLS @@ -59,7 +56,6 @@ public final class SqliteEamDbSettings { private String dbName; private String dbDirectory; private int bulkThreshold; - private List badTags; public SqliteEamDbSettings() { loadSettings(); @@ -90,15 +86,7 @@ public final class SqliteEamDbSettings { this.bulkThreshold = DEFAULT_BULK_THRESHHOLD; } - String badTagsStr = ModuleSettings.getConfigSetting("CentralRepository", "db.badTags"); // NON-NLS - if (badTagsStr == null) { - badTagsStr = DEFAULT_BAD_TAGS; - } - if (badTagsStr.isEmpty()) { - badTags = new ArrayList<>(); - } else { - badTags = new ArrayList<>(Arrays.asList(badTagsStr.split(","))); - } + } public void saveSettings() { @@ -107,7 +95,6 @@ public final class SqliteEamDbSettings { ModuleSettings.setConfigSetting("CentralRepository", "db.sqlite.dbName", getDbName()); // NON-NLS ModuleSettings.setConfigSetting("CentralRepository", "db.sqlite.dbDirectory", getDbDirectory()); // NON-NLS ModuleSettings.setConfigSetting("CentralRepository", "db.sqlite.bulkThreshold", Integer.toString(getBulkThreshold())); // NON-NLS - ModuleSettings.setConfigSetting("CentralRepository", "db.badTags", String.join(",", badTags)); // NON-NLS } /** @@ -502,19 +489,7 @@ public final class SqliteEamDbSettings { } } - /** - * @return the badTags - */ - public List getBadTags() { - return badTags; - } - /** - * @param badTags the badTags to set - */ - public void setBadTags(List badTags) { - this.badTags = badTags; - } /** * @return the dbDirectory diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/CaseEventListener.java b/Core/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/CaseEventListener.java index a68b0cba8d..dbe17d6e6d 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/CaseEventListener.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/CaseEventListener.java @@ -130,7 +130,7 @@ final class CaseEventListener implements PropertyChangeListener { final ContentTagAddedEvent tagAddedEvent = (ContentTagAddedEvent) event; final ContentTag tagAdded = tagAddedEvent.getAddedTag(); - if (dbManager.getBadTags().contains(tagAdded.getName().getDisplayName())) { + if (TagsManager.getNotableTagDisplayNames().contains(tagAdded.getName().getDisplayName())) { if (tagAdded.getContent() instanceof AbstractFile) { af = (AbstractFile) tagAdded.getContent(); knownStatus = TskData.FileKnown.BAD; @@ -151,7 +151,7 @@ final class CaseEventListener implements PropertyChangeListener { long contentID = tagDeletedEvent.getDeletedTagInfo().getContentID(); String tagName = tagDeletedEvent.getDeletedTagInfo().getName().getDisplayName(); - if (!dbManager.getBadTags().contains(tagName)) { + if (!TagsManager.getNotableTagDisplayNames().contains(tagName)) { // If the tag that got removed isn't on the list of central repo tags, do nothing return; } @@ -164,7 +164,7 @@ final class CaseEventListener implements PropertyChangeListener { if (tags.stream() .map(tag -> tag.getName().getDisplayName()) - .filter(dbManager.getBadTags()::contains) + .filter(TagsManager.getNotableTagDisplayNames()::contains) .collect(Collectors.toList()) .isEmpty()) { @@ -227,7 +227,7 @@ final class CaseEventListener implements PropertyChangeListener { final BlackBoardArtifactTagAddedEvent tagAddedEvent = (BlackBoardArtifactTagAddedEvent) event; final BlackboardArtifactTag tagAdded = tagAddedEvent.getAddedTag(); - if (dbManager.getBadTags().contains(tagAdded.getName().getDisplayName())) { + if (TagsManager.getNotableTagDisplayNames().contains(tagAdded.getName().getDisplayName())) { content = tagAdded.getContent(); bbArtifact = tagAdded.getArtifact(); knownStatus = TskData.FileKnown.BAD; @@ -245,7 +245,7 @@ final class CaseEventListener implements PropertyChangeListener { long artifactID = tagDeletedEvent.getDeletedTagInfo().getArtifactID(); String tagName = tagDeletedEvent.getDeletedTagInfo().getName().getDisplayName(); - if (!dbManager.getBadTags().contains(tagName)) { + if (!TagsManager.getNotableTagDisplayNames().contains(tagName)) { // If the tag that got removed isn't on the list of central repo tags, do nothing return; } @@ -259,7 +259,7 @@ final class CaseEventListener implements PropertyChangeListener { if (tags.stream() .map(tag -> tag.getName().getDisplayName()) - .filter(dbManager.getBadTags()::contains) + .filter(TagsManager.getNotableTagDisplayNames()::contains) .collect(Collectors.toList()) .isEmpty()) { @@ -350,37 +350,22 @@ final class CaseEventListener implements PropertyChangeListener { if ((null == event.getOldValue()) && (event.getNewValue() instanceof Case)) { Case curCase = (Case) event.getNewValue(); IngestEventsListener.resetCeModuleInstanceCount(); - try { - // only add default evidence tag if case is open and it doesn't already exist in the tags list. - if (Case.isCaseOpen() - && Case.getCurrentCase().getServices().getTagsManager().getAllTagNames().stream() - .map(tag -> tag.getDisplayName()) - .filter(tagName -> Bundle.caseeventlistener_evidencetag().equals(tagName)) - .collect(Collectors.toList()) - .isEmpty()) { - curCase.getServices().getTagsManager().addTagName(Bundle.caseeventlistener_evidencetag()); - } - } catch (TagsManager.TagNameAlreadyExistsException ex) { - LOGGER.info("Evidence tag already exists"); // NON-NLS - } catch (TskCoreException ex) { - LOGGER.log(Level.SEVERE, "Error adding tag.", ex); // NON-NLS - } - + CorrelationCase curCeCase = new CorrelationCase( - -1, - curCase.getName(), // unique case ID - EamOrganization.getDefault(), - curCase.getDisplayName(), - curCase.getCreatedDate(), - curCase.getNumber(), - curCase.getExaminer(), - curCase.getExaminerEmail(), - curCase.getExaminerPhone(), - curCase.getCaseNotes()); + -1, + curCase.getName(), // unique case ID + EamOrganization.getDefault(), + curCase.getDisplayName(), + curCase.getCreatedDate(), + curCase.getNumber(), + curCase.getExaminer(), + curCase.getExaminerEmail(), + curCase.getExaminerPhone(), + curCase.getCaseNotes()); - if (!EamDb.isEnabled()) { - return; - } + if (!EamDb.isEnabled()) { + return; + } try { // NOTE: Cannot determine if the opened case is a new case or a reopened case, diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.java index 1960ee3df4..ff179c3032 100755 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.java @@ -25,7 +25,6 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.logging.Level; -import java.util.stream.Collectors; import javax.swing.JFrame; import javax.swing.table.DefaultTableModel; import javax.swing.event.TableModelEvent; @@ -91,15 +90,11 @@ final class ManageTagsDialog extends javax.swing.JDialog { lbWarnings.setText(Bundle.ManageTagsDialog_init_failedConnection_msg()); return; } - List badTags = dbManager.getBadTags(); + List badTags = TagsManager.getNotableTagDisplayNames(); - List tagNames = new ArrayList<>(badTags); + List tagNames = new ArrayList<>(); try { - tagNames.addAll( - TagsManager.getTagDisplayNames() - .stream() - .filter(tagName -> !badTags.contains(tagName)) - .collect(Collectors.toList())); + tagNames.addAll(TagsManager.getTagDisplayNames()); } catch (TskCoreException ex) { LOGGER.log(Level.WARNING, "Could not get list of tags in case", ex); lbWarnings.setText(Bundle.ManageTagsDialog_init_failedGettingTags_msg()); @@ -262,7 +257,6 @@ final class ManageTagsDialog extends javax.swing.JDialog { } try { EamDb dbManager = EamDb.getInstance(); - dbManager.setBadTags(badTags); dbManager.saveSettings(); } catch (EamDbException ex) { LOGGER.log(Level.SEVERE, "Failed to connect to central repository database."); // NON-NLS diff --git a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/datamodel/Category.java b/Core/src/org/sleuthkit/autopsy/datamodel/tags/Category.java old mode 100755 new mode 100644 similarity index 98% rename from ImageGallery/src/org/sleuthkit/autopsy/imagegallery/datamodel/Category.java rename to Core/src/org/sleuthkit/autopsy/datamodel/tags/Category.java index 1b2bd604b0..39d624110f --- a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/datamodel/Category.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/tags/Category.java @@ -16,7 +16,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.sleuthkit.autopsy.imagegallery.datamodel; +package org.sleuthkit.autopsy.datamodel.tags; import com.google.common.collect.ImmutableList; import java.util.Map; diff --git a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/actions/CategorizeAction.java b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/actions/CategorizeAction.java index 0cbef7e5d1..e55078018e 100755 --- a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/actions/CategorizeAction.java +++ b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/actions/CategorizeAction.java @@ -40,7 +40,7 @@ import org.controlsfx.control.action.ActionUtils; import org.openide.util.NbBundle; import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.imagegallery.ImageGalleryController; -import org.sleuthkit.autopsy.imagegallery.datamodel.Category; +import org.sleuthkit.autopsy.datamodel.tags.Category; import org.sleuthkit.autopsy.imagegallery.datamodel.CategoryManager; import org.sleuthkit.autopsy.imagegallery.datamodel.DrawableAttribute; import org.sleuthkit.autopsy.imagegallery.datamodel.DrawableFile; diff --git a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/actions/CategorizeGroupAction.java b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/actions/CategorizeGroupAction.java index cc2ede2ce5..439bb59512 100755 --- a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/actions/CategorizeGroupAction.java +++ b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/actions/CategorizeGroupAction.java @@ -38,7 +38,7 @@ import org.openide.util.NbBundle; import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.imagegallery.ImageGalleryController; import org.sleuthkit.autopsy.imagegallery.ImageGalleryPreferences; -import org.sleuthkit.autopsy.imagegallery.datamodel.Category; +import org.sleuthkit.autopsy.datamodel.tags.Category; import org.sleuthkit.datamodel.TskCoreException; /** diff --git a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/actions/CategorizeSelectedFilesAction.java b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/actions/CategorizeSelectedFilesAction.java index ef70b0f1f6..be8c3644bb 100755 --- a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/actions/CategorizeSelectedFilesAction.java +++ b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/actions/CategorizeSelectedFilesAction.java @@ -19,7 +19,7 @@ package org.sleuthkit.autopsy.imagegallery.actions; import org.sleuthkit.autopsy.imagegallery.ImageGalleryController; -import org.sleuthkit.autopsy.imagegallery.datamodel.Category; +import org.sleuthkit.autopsy.datamodel.tags.Category; /** * diff --git a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/datamodel/CategoryManager.java b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/datamodel/CategoryManager.java index f18e96795b..33bc9a58d4 100755 --- a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/datamodel/CategoryManager.java +++ b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/datamodel/CategoryManager.java @@ -35,10 +35,12 @@ import org.sleuthkit.autopsy.casemodule.events.ContentTagAddedEvent; import org.sleuthkit.autopsy.casemodule.events.ContentTagDeletedEvent; import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.imagegallery.ImageGalleryController; +import org.sleuthkit.autopsy.datamodel.tags.Category; import org.sleuthkit.datamodel.ContentTag; import org.sleuthkit.datamodel.TagName; import org.sleuthkit.datamodel.TskCoreException; + /** * Provides a cached view of the number of files per category, and fires * {@link CategoryChangeEvent}s when files are categorized. diff --git a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/datamodel/DrawableAttribute.java b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/datamodel/DrawableAttribute.java index 96e37d0a83..0ac5142f3c 100755 --- a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/datamodel/DrawableAttribute.java +++ b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/datamodel/DrawableAttribute.java @@ -18,6 +18,7 @@ */ package org.sleuthkit.autopsy.imagegallery.datamodel; +import org.sleuthkit.autopsy.datamodel.tags.Category; import java.util.Arrays; import java.util.Collection; import java.util.Collections; diff --git a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/datamodel/DrawableDB.java b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/datamodel/DrawableDB.java index 9f8a6c924e..5426ac205a 100755 --- a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/datamodel/DrawableDB.java +++ b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/datamodel/DrawableDB.java @@ -18,6 +18,7 @@ */ package org.sleuthkit.autopsy.imagegallery.datamodel; +import org.sleuthkit.autopsy.datamodel.tags.Category; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; diff --git a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/datamodel/DrawableFile.java b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/datamodel/DrawableFile.java index 2f86c47ad6..5b40c9240c 100755 --- a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/datamodel/DrawableFile.java +++ b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/datamodel/DrawableFile.java @@ -18,6 +18,7 @@ */ package org.sleuthkit.autopsy.imagegallery.datamodel; +import org.sleuthkit.autopsy.datamodel.tags.Category; import java.lang.ref.SoftReference; import java.text.MessageFormat; import java.util.ArrayList; diff --git a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/datamodel/DrawableTagsManager.java b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/datamodel/DrawableTagsManager.java index 2172aacf51..0497068924 100755 --- a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/datamodel/DrawableTagsManager.java +++ b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/datamodel/DrawableTagsManager.java @@ -18,6 +18,7 @@ */ package org.sleuthkit.autopsy.imagegallery.datamodel; +import org.sleuthkit.autopsy.datamodel.tags.Category; import com.google.common.eventbus.AsyncEventBus; import com.google.common.eventbus.EventBus; import java.util.Collections; @@ -51,19 +52,9 @@ public class DrawableTagsManager { private static final Logger LOGGER = Logger.getLogger(DrawableTagsManager.class.getName()); - private static final String FOLLOW_UP = Bundle.DrawableTagsManager_followUp(); - private static final String BOOKMARK = Bundle.DrawableTagsManager_bookMark(); private static Image FOLLOW_UP_IMAGE; private static Image BOOKMARK_IMAGE; - public static String getFollowUpText() { - return FOLLOW_UP; - } - - public static String getBookmarkText() { - return BOOKMARK; - } - final private Object autopsyTagsManagerLock = new Object(); private TagsManager autopsyTagsManager; @@ -147,7 +138,7 @@ public class DrawableTagsManager { public TagName getFollowUpTagName() throws TskCoreException { synchronized (autopsyTagsManagerLock) { if (Objects.isNull(followUpTagName)) { - followUpTagName = getTagName(FOLLOW_UP); + followUpTagName = getTagName(NbBundle.getMessage(DrawableTagsManager.class, "DrawableTagsManager.followUp")); } return followUpTagName; } @@ -156,12 +147,13 @@ public class DrawableTagsManager { private Object getBookmarkTagName() throws TskCoreException { synchronized (autopsyTagsManagerLock) { if (Objects.isNull(bookmarkTagName)) { - bookmarkTagName = getTagName(BOOKMARK); + bookmarkTagName = getTagName(NbBundle.getMessage(DrawableTagsManager.class, "DrawableTagsManager.bookMark")); } return bookmarkTagName; } } + /** * get all the TagNames that are not categories * diff --git a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/datamodel/grouping/GroupManager.java b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/datamodel/grouping/GroupManager.java index 5c02f5abd1..e62c2b6541 100755 --- a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/datamodel/grouping/GroupManager.java +++ b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/datamodel/grouping/GroupManager.java @@ -71,7 +71,7 @@ import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.coreutils.ThreadConfined; import org.sleuthkit.autopsy.coreutils.ThreadConfined.ThreadType; import org.sleuthkit.autopsy.imagegallery.ImageGalleryController; -import org.sleuthkit.autopsy.imagegallery.datamodel.Category; +import org.sleuthkit.autopsy.datamodel.tags.Category; import org.sleuthkit.autopsy.imagegallery.datamodel.CategoryManager; import org.sleuthkit.autopsy.imagegallery.datamodel.DrawableAttribute; import org.sleuthkit.autopsy.imagegallery.datamodel.DrawableDB; diff --git a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/gui/SummaryTablePane.java b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/gui/SummaryTablePane.java index 708568fe41..2841eb5325 100755 --- a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/gui/SummaryTablePane.java +++ b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/gui/SummaryTablePane.java @@ -36,7 +36,7 @@ import org.openide.util.NbBundle; import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.imagegallery.FXMLConstructor; import org.sleuthkit.autopsy.imagegallery.ImageGalleryController; -import org.sleuthkit.autopsy.imagegallery.datamodel.Category; +import org.sleuthkit.autopsy.datamodel.tags.Category; /** * Displays summary statistics (counts) for each group diff --git a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/gui/Toolbar.java b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/gui/Toolbar.java index bdc43c1c06..6cb29d46d1 100755 --- a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/gui/Toolbar.java +++ b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/gui/Toolbar.java @@ -49,7 +49,7 @@ import org.sleuthkit.autopsy.imagegallery.FXMLConstructor; import org.sleuthkit.autopsy.imagegallery.ImageGalleryController; import org.sleuthkit.autopsy.imagegallery.actions.CategorizeGroupAction; import org.sleuthkit.autopsy.imagegallery.actions.TagGroupAction; -import org.sleuthkit.autopsy.imagegallery.datamodel.Category; +import org.sleuthkit.autopsy.datamodel.tags.Category; import org.sleuthkit.autopsy.imagegallery.datamodel.DrawableAttribute; import org.sleuthkit.autopsy.imagegallery.datamodel.grouping.DrawableGroup; import org.sleuthkit.autopsy.imagegallery.datamodel.grouping.GroupSortBy; diff --git a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/gui/drawableviews/DrawableView.java b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/gui/drawableviews/DrawableView.java index 6668657619..e6d7bf06f2 100755 --- a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/gui/drawableviews/DrawableView.java +++ b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/gui/drawableviews/DrawableView.java @@ -17,7 +17,7 @@ import org.sleuthkit.autopsy.casemodule.events.ContentTagDeletedEvent; import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.coreutils.ThreadConfined; import org.sleuthkit.autopsy.imagegallery.ImageGalleryController; -import org.sleuthkit.autopsy.imagegallery.datamodel.Category; +import org.sleuthkit.autopsy.datamodel.tags.Category; import org.sleuthkit.autopsy.imagegallery.datamodel.CategoryManager; import org.sleuthkit.autopsy.imagegallery.datamodel.DrawableFile; diff --git a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/gui/drawableviews/GroupPane.java b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/gui/drawableviews/GroupPane.java index 6fc8074248..bd84611b93 100755 --- a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/gui/drawableviews/GroupPane.java +++ b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/gui/drawableviews/GroupPane.java @@ -122,7 +122,7 @@ import org.sleuthkit.autopsy.imagegallery.actions.RedoAction; import org.sleuthkit.autopsy.imagegallery.actions.SwingMenuItemAdapter; import org.sleuthkit.autopsy.imagegallery.actions.TagSelectedFilesAction; import org.sleuthkit.autopsy.imagegallery.actions.UndoAction; -import org.sleuthkit.autopsy.imagegallery.datamodel.Category; +import org.sleuthkit.autopsy.datamodel.tags.Category; import org.sleuthkit.autopsy.imagegallery.datamodel.DrawableFile; import org.sleuthkit.autopsy.imagegallery.datamodel.grouping.DrawableGroup; import org.sleuthkit.autopsy.imagegallery.datamodel.grouping.GroupViewMode; diff --git a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/gui/drawableviews/MetaDataPane.java b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/gui/drawableviews/MetaDataPane.java index bf6597ecb5..881925a098 100755 --- a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/gui/drawableviews/MetaDataPane.java +++ b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/gui/drawableviews/MetaDataPane.java @@ -57,7 +57,7 @@ import org.sleuthkit.autopsy.casemodule.events.ContentTagDeletedEvent; import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.imagegallery.FXMLConstructor; import org.sleuthkit.autopsy.imagegallery.ImageGalleryController; -import org.sleuthkit.autopsy.imagegallery.datamodel.Category; +import org.sleuthkit.autopsy.datamodel.tags.Category; import org.sleuthkit.autopsy.imagegallery.datamodel.CategoryManager; import org.sleuthkit.autopsy.imagegallery.datamodel.DrawableAttribute; import org.sleuthkit.autopsy.imagegallery.datamodel.DrawableFile; diff --git a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/gui/drawableviews/SlideShowView.java b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/gui/drawableviews/SlideShowView.java index 94e56cf93c..b40e121102 100755 --- a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/gui/drawableviews/SlideShowView.java +++ b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/gui/drawableviews/SlideShowView.java @@ -50,7 +50,7 @@ import org.sleuthkit.autopsy.coreutils.ThreadConfined; import org.sleuthkit.autopsy.coreutils.ThreadConfined.ThreadType; import org.sleuthkit.autopsy.imagegallery.FXMLConstructor; import org.sleuthkit.autopsy.imagegallery.ImageGalleryController; -import org.sleuthkit.autopsy.imagegallery.datamodel.Category; +import org.sleuthkit.autopsy.datamodel.tags.Category; import org.sleuthkit.autopsy.imagegallery.datamodel.DrawableFile; import org.sleuthkit.autopsy.imagegallery.datamodel.VideoFile; import org.sleuthkit.autopsy.imagegallery.gui.VideoPlayer;