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;
38 class HashDbSearchManager {
39 private Map<String, List<AbstractFile>> map;
40 private List<AbstractFile> kvContents;
42 public HashDbSearchManager(Map<String, List<AbstractFile>> map) {
54 kvContents =
new ArrayList<AbstractFile>();
56 for(String s : map.keySet()) {
57 for(AbstractFile file : map.get(s)) {
68 public void execute() {
70 Collection<AbstractFile> kvCollection = kvContents;
73 if (kvCollection.size() > 0) {
74 Children childKeyValueContentNodes =
75 Children.create(
new HashDbSearchResultFactory(kvCollection),
true);
77 rootNode =
new AbstractNode(childKeyValueContentNodes);
79 rootNode = Node.EMPTY;
82 final String pathText = NbBundle.getMessage(this.getClass(),
"HashDbSearchManager.MD5HashSearch");
83 TopComponent searchResultWin = DataResultTopComponent.createInstance(
84 NbBundle.getMessage(
this.getClass(),
"HashDbSearchManager.MD5HashSearch"),
89 searchResultWin.requestActive();
91 JOptionPane.showMessageDialog(null,
92 NbBundle.getMessage(
this.getClass(),
"HashDbSearchManager.noResultsFoundMsg"));