Updated format in TagNameDefinition

This commit is contained in:
Kelly Kelly 2020-04-21 17:13:35 -04:00
parent 8409bee5b0
commit 98151b1de8

View File

@ -227,13 +227,13 @@ final class TagNameDefinition implements Comparable<TagNameDefinition> {
* Gets tag name definitions from the tag settings file as well as the * Gets tag name definitions from the tag settings file as well as the
* default tag name definitions. * default tag name definitions.
* *
* The currently custom tags properties are stored in one string property value * The currently custom tags properties are stored in one string property
* separated by ;. The properties of an individual tag are comma separated * value separated by ;. The properties of an individual tag are comma
* in the format of: * separated in the format of:
* tag_name,tag_description,tag_color,known_status * tag_name,tag_description,tag_color,known_status
* *
* In prior versions of autopsy the known_status was stored in the central repository, * In prior versions of autopsy the known_status was stored in the central
* therefore the properties file only had three values. * repository, therefore the properties file only had three values.
* *
* @return A set of tag name definition objects. * @return A set of tag name definition objects.
*/ */
@ -253,7 +253,7 @@ final class TagNameDefinition implements Comparable<TagNameDefinition> {
// Get the known status from the Central Repository // Get the known status from the Central Repository
String crTagKnownProp = ModuleSettings.getConfigSetting("CentralRepository", "db.badTags"); // NON-NLS String crTagKnownProp = ModuleSettings.getConfigSetting("CentralRepository", "db.badTags"); // NON-NLS
List<String> knownTagNameList = new ArrayList<>(); List<String> knownTagNameList = new ArrayList<>();
if(crTagKnownProp != null && !crTagKnownProp.isEmpty()) { if (crTagKnownProp != null && !crTagKnownProp.isEmpty()) {
knownTagNameList.addAll(Arrays.asList(crTagKnownProp.split(","))); knownTagNameList.addAll(Arrays.asList(crTagKnownProp.split(",")));
} }
@ -264,8 +264,8 @@ final class TagNameDefinition implements Comparable<TagNameDefinition> {
// Remove the standard and project vic tags. // Remove the standard and project vic tags.
List<String> standardTagNames = getStandardTagNames(); List<String> standardTagNames = getStandardTagNames();
for(TagNameDefinition def: tagDefinitions) { for (TagNameDefinition def : tagDefinitions) {
if(!standardTagNames.contains(def.getDisplayName())) { if (!standardTagNames.contains(def.getDisplayName())) {
tagNames.add(def); tagNames.add(def);
} }
} }
@ -274,8 +274,8 @@ final class TagNameDefinition implements Comparable<TagNameDefinition> {
} }
/** /**
* Returns a list of TagNameDefinitons created by merging the tag data * Returns a list of TagNameDefinitons created by merging the tag data from
* from the properties file and the known status information from the central * the properties file and the known status information from the central
* repository. * repository.
* *
* @param tagProperties List of description strings. * @param tagProperties List of description strings.
@ -292,7 +292,7 @@ final class TagNameDefinition implements Comparable<TagNameDefinition> {
String tagName = attributes[0]; String tagName = attributes[0];
TskData.FileKnown knownStatus = TskData.FileKnown.UNKNOWN; TskData.FileKnown knownStatus = TskData.FileKnown.UNKNOWN;
if(centralRepoNotableTags.contains(tagName)) { if (centralRepoNotableTags.contains(tagName)) {
knownStatus = TskData.FileKnown.BAD; knownStatus = TskData.FileKnown.BAD;
} }