19 package org.sleuthkit.autopsy.contentviewers.analysisresults;
21 import java.awt.Component;
22 import java.util.logging.Level;
23 import java.util.logging.Logger;
24 import javax.swing.SwingWorker;
25 import org.openide.nodes.Node;
26 import org.openide.util.NbBundle;
27 import org.openide.util.lookup.ServiceProvider;
41 @ServiceProvider(service = DataContentViewer.class, position = 7)
46 private static final int PREFERRED_VALUE = 3;
51 private SwingWorker<?, ?> worker = null;
56 "AnalysisResultsContentViewer_title=Analysis Results"
60 return Bundle.AnalysisResultsContentViewer_title();
64 "AnalysisResultsContentViewer_tooltip=Viewer for Analysis Results related to the selected node."
68 return Bundle.AnalysisResultsContentViewer_tooltip();
88 "AnalysisResultsContentViewer_setNode_loadingMessage=Loading...",
89 "AnalysisResultsContentViewer_setNode_errorMessage=There was an error loading results.",})
90 public synchronized void setNode(Node node) {
106 panel.showMessage(Bundle.AnalysisResultsContentViewer_setNode_loadingMessage());
111 (selectedNode) -> viewModel.getAnalysisResults(selectedNode),
112 (nodeAnalysisResults) -> {
115 panel.displayResults(nodeAnalysisResults.getData());
118 panel.showMessage(Bundle.AnalysisResultsContentViewer_setNode_errorMessage());
134 for (Content content : node.getLookup().lookupAll(Content.class)) {
135 if (content instanceof AnalysisResult) {
139 if (content == null || content instanceof BlackboardArtifact) {
148 logger.log(Level.SEVERE,
"Unable to get analysis results for file with obj id " + content.getId(), ex);
157 return PREFERRED_VALUE;
int isPreferred(Node node)
boolean isSupported(Node node)
synchronized void setNode(Node node)
DataContentViewer createInstance()
SleuthkitCase getSleuthkitCase()
static Case getCurrentCaseThrows()