mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-17 18:17:43 +00:00
3201 merge changes from 3199 regarding refactor of addTagName method name
This commit is contained in:
parent
0b27196ad4
commit
8533ce98fb
@ -180,7 +180,7 @@ final class TagNameDefinition implements Comparable<TagNameDefinition> {
|
|||||||
private TagName saveToCase(SleuthkitCase caseDb) {
|
private TagName saveToCase(SleuthkitCase caseDb) {
|
||||||
TagName tagName = null;
|
TagName tagName = null;
|
||||||
try {
|
try {
|
||||||
tagName = caseDb.addTagName(displayName, description, color, knownStatus);
|
tagName = caseDb.addOrUpdateTagName(displayName, description, color, knownStatus);
|
||||||
} catch (TskCoreException ex) {
|
} catch (TskCoreException ex) {
|
||||||
Exceptions.printStackTrace(ex);
|
Exceptions.printStackTrace(ex);
|
||||||
}
|
}
|
||||||
|
@ -138,7 +138,6 @@ final class TagNameDialog extends javax.swing.JDialog {
|
|||||||
}
|
}
|
||||||
//if a tag name contains illegal characters and is not the name of one of the standard tags
|
//if a tag name contains illegal characters and is not the name of one of the standard tags
|
||||||
if (TagsManager.containsIllegalCharacters(newTagDisplayName) && !TagNameDefinition.getStandardTagNames().contains(newTagDisplayName)) {
|
if (TagsManager.containsIllegalCharacters(newTagDisplayName) && !TagNameDefinition.getStandardTagNames().contains(newTagDisplayName)) {
|
||||||
|
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(null,
|
||||||
NbBundle.getMessage(TagNameDialog.class, "TagNameDialog.JOptionPane.tagNameIllegalCharacters.message"),
|
NbBundle.getMessage(TagNameDialog.class, "TagNameDialog.JOptionPane.tagNameIllegalCharacters.message"),
|
||||||
NbBundle.getMessage(TagNameDialog.class, "TagNameDialog.JOptionPane.tagNameIllegalCharacters.title"),
|
NbBundle.getMessage(TagNameDialog.class, "TagNameDialog.JOptionPane.tagNameIllegalCharacters.title"),
|
||||||
|
@ -255,7 +255,7 @@ public class TagsManager implements Closeable {
|
|||||||
*/
|
*/
|
||||||
public synchronized TagName addTagName(String displayName, String description, TagName.HTML_COLOR color, TskData.FileKnown knownStatus) throws TagNameAlreadyExistsException, TskCoreException {
|
public synchronized TagName addTagName(String displayName, String description, TagName.HTML_COLOR color, TskData.FileKnown knownStatus) throws TagNameAlreadyExistsException, TskCoreException {
|
||||||
try {
|
try {
|
||||||
TagName tagName = caseDb.addTagName(displayName, description, color, knownStatus);
|
TagName tagName = caseDb.addOrUpdateTagName(displayName, description, color, knownStatus);
|
||||||
Set<TagNameDefinition> customTypes = TagNameDefinition.getTagNameDefinitions();
|
Set<TagNameDefinition> customTypes = TagNameDefinition.getTagNameDefinitions();
|
||||||
customTypes.add(new TagNameDefinition(displayName, description, color, knownStatus));
|
customTypes.add(new TagNameDefinition(displayName, description, color, knownStatus));
|
||||||
TagNameDefinition.setTagNameDefinitions(customTypes);
|
TagNameDefinition.setTagNameDefinitions(customTypes);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user