19 package org.sleuthkit.autopsy.modules.hashdatabase;
21 import java.util.ArrayList;
22 import java.util.Collection;
23 import java.util.List;
25 import javax.swing.JOptionPane;
26 import org.openide.nodes.AbstractNode;
27 import org.openide.nodes.Children;
28 import org.openide.nodes.Node;
29 import org.openide.util.NbBundle;
30 import org.openide.windows.TopComponent;
39 class HashDbSearchManager {
41 private Map<String, List<AbstractFile>> map;
42 private List<AbstractFile> kvContents;
44 public HashDbSearchManager(Map<String, List<AbstractFile>> map) {
56 kvContents =
new ArrayList<AbstractFile>();
58 for (String s : map.keySet()) {
59 for (AbstractFile file : map.get(s)) {
70 public void execute() {
72 Collection<AbstractFile> kvCollection = kvContents;
75 if (kvCollection.size() > 0) {
76 Children childKeyValueContentNodes
77 = Children.create(
new HashDbSearchResultFactory(kvCollection),
true);
79 rootNode =
new AbstractNode(childKeyValueContentNodes);
81 rootNode = Node.EMPTY;
84 final String pathText = NbBundle.getMessage(this.getClass(),
"HashDbSearchManager.MD5HashSearch");
85 TopComponent searchResultWin = DataResultTopComponent.createInstance(
86 NbBundle.getMessage(
this.getClass(),
"HashDbSearchManager.MD5HashSearch"),
91 searchResultWin.requestActive();
93 JOptionPane.showMessageDialog(null,
94 NbBundle.getMessage(
this.getClass(),
"HashDbSearchManager.noResultsFoundMsg"));