From d57985ac8cd2497b0cce65832998f449586e4cc8 Mon Sep 17 00:00:00 2001 From: millmanorama Date: Mon, 12 Mar 2018 13:05:58 +0100 Subject: [PATCH 1/2] enable "View File in Directory" action for attachments --- .../autopsy/contentviewers/MessageContentViewer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/contentviewers/MessageContentViewer.java b/Core/src/org/sleuthkit/autopsy/contentviewers/MessageContentViewer.java index 228dc09c13..a5b86e9d6c 100644 --- a/Core/src/org/sleuthkit/autopsy/contentviewers/MessageContentViewer.java +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/MessageContentViewer.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2017 Basis Technology Corp. + * Copyright 2017-18 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -706,7 +706,7 @@ public class MessageContentViewer extends javax.swing.JPanel implements DataCont private static class AttachmentNode extends FileNode { AttachmentNode(AbstractFile file) { - super(file, true); + super(file, false); } @Override From 53c3718e039a54314c0469bcce5c0ae0b21b2dc3 Mon Sep 17 00:00:00 2001 From: millmanorama Date: Mon, 12 Mar 2018 13:08:24 +0100 Subject: [PATCH 2/2] add Tags property to RelationshipNodes and AttachementNodes, enabling highlighting. --- .../communications/RelationshipNode.java | 5 +++- .../datamodel/BlackboardArtifactNode.java | 26 ++++++++++++++++--- .../autopsy/datamodel/Bundle.properties | 2 -- 3 files changed, 26 insertions(+), 7 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/communications/RelationshipNode.java b/Core/src/org/sleuthkit/autopsy/communications/RelationshipNode.java index e952573f50..d83eaa4fa3 100644 --- a/Core/src/org/sleuthkit/autopsy/communications/RelationshipNode.java +++ b/Core/src/org/sleuthkit/autopsy/communications/RelationshipNode.java @@ -46,7 +46,7 @@ import org.sleuthkit.datamodel.TskCoreException; final class RelationshipNode extends BlackboardArtifactNode { private static final Logger logger = Logger.getLogger(RelationshipNode.class.getName()); - + RelationshipNode(BlackboardArtifact artifact) { super(artifact); final String stripEnd = StringUtils.stripEnd(artifact.getDisplayName(), "s"); @@ -113,6 +113,9 @@ final class RelationshipNode extends BlackboardArtifactNode { break; } } + + addTagProperty(ss); + return s; } diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java index 33dd6a2cc0..6309c23722 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java @@ -29,6 +29,7 @@ import java.util.EnumSet; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; +import java.util.MissingResourceException; import java.util.Set; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; @@ -78,8 +79,12 @@ public class BlackboardArtifactNode extends AbstractContentNode> customProperties; + private final static String NO_DESCR = NbBundle.getMessage(BlackboardArtifactNode.class, "BlackboardArtifactNode.noDesc.text"); + + /* * Artifact types which should have the full unique path of the associated * content as a property. @@ -310,7 +315,6 @@ public class BlackboardArtifactNode extends AbstractContentNode map = new LinkedHashMap<>(); fillPropertyMap(map, artifact); @@ -438,6 +442,22 @@ public class BlackboardArtifactNode extends AbstractContentNode tags = new ArrayList<>(); try { @@ -446,10 +466,8 @@ public class BlackboardArtifactNode extends AbstractContentNode("Tags", NbBundle.getMessage(AbstractAbstractFileNode.class, "BlackboardArtifactNode.createSheet.tags.displayName"), + ss.put(new NodeProperty<>("Tags", Bundle.BlackboardArtifactNode_createSheet_tags_displayName(), NO_DESCR, tags.stream().map(t -> t.getName().getDisplayName()).collect(Collectors.joining(", ")))); - - return s; } private void updateSheet() { diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/Bundle.properties b/Core/src/org/sleuthkit/autopsy/datamodel/Bundle.properties index 7063656562..733c49e8b7 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/datamodel/Bundle.properties @@ -207,8 +207,6 @@ DeleteReportAction.actionDisplayName.multipleReports=Delete Reports DeleteReportAction.actionPerformed.showConfirmDialog.title=Confirm Deletion DeleteReportAction.actionPerformed.showConfirmDialog.single.msg=Do you want to delete 1 report from the case? DeleteReportAction.actionPerformed.showConfirmDialog.multiple.msg=Do you want to delete {0} reports from the case? -BlackboardArtifactNode.createSheet.tags.name=Tags -BlackboardArtifactNode.createSheet.tags.displayName=Tags FileTypeExtensionFilters.tskImgFilter.text=Images FileTypeExtensionFilters.tskVideoFilter.text=Videos FileTypeExtensionFilters.tskAudioFilter.text=Audio