19 package org.sleuthkit.autopsy.datamodel;
21 import java.util.ArrayList;
22 import java.util.Arrays;
23 import java.util.Collection;
24 import java.util.HashSet;
25 import java.util.List;
26 import java.util.logging.Level;
27 import javax.swing.Action;
28 import org.openide.util.NbBundle;
29 import org.openide.util.Utilities;
53 this.setDisplayName(af.getName());
57 this.setIconBaseWithExtension(
"org/sleuthkit/autopsy/images/Folder-icon.png");
59 this.setIconBaseWithExtension(
FileNode.getIconForFileType(af));
65 List<Action> actionsList =
new ArrayList<>();
66 actionsList.addAll(Arrays.asList(super.getActions(
true)));
68 actionsList.add(
new ViewContextAction(NbBundle.getMessage(
this.getClass(),
"LocalFileNode.viewFileInDir.text"), this.content));
69 actionsList.add(null);
71 NbBundle.getMessage(
this.getClass(),
"LocalFileNode.getActions.viewInNewWin.text"),
this));
73 NbBundle.getMessage(
this.getClass(),
"LocalFileNode.getActions.openInExtViewer.text"),
this));
74 actionsList.add(null);
77 actionsList.add(null);
80 final Collection<AbstractFile> selectedFilesList
81 =
new HashSet<>(Utilities.actionsGlobalContext().lookupAll(AbstractFile.class));
82 if (selectedFilesList.size() == 1) {
89 if (this.content.getArtifacts(BlackboardArtifact.ARTIFACT_TYPE.TSK_ENCRYPTION_DETECTED).size() > 0) {
92 }
catch (TskCoreException ex) {
93 logger.log(Level.WARNING,
"Unable to add unzip with password action to context menus", ex);
96 return actionsList.toArray(
new Action[actionsList.size()]);
100 public <T> T accept(ContentNodeVisitor<T> visitor) {
101 return visitor.visit(
this);
105 public <T> T accept(DisplayableItemNodeVisitor<T> visitor) {
106 return visitor.visit(
this);
119 return getClass().getName();
static List< String > getArchiveExtensions()
LocalFileNode(AbstractFile af)
Action[] getActions(boolean context)
static synchronized DeleteFileContentTagAction getInstance()
static final Logger logger
synchronized static Logger getLogger(String name)
static synchronized AddContentTagAction getInstance()