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;
55 this.setDisplayName(af.getName());
59 this.setIconBaseWithExtension(
"org/sleuthkit/autopsy/images/Folder-icon.png");
61 this.setIconBaseWithExtension(
FileNode.getIconForFileType(af));
68 List<Action> actionsList =
new ArrayList<>();
69 actionsList.addAll(Arrays.asList(super.getActions(
true)));
71 actionsList.add(
new ViewContextAction(NbBundle.getMessage(
this.getClass(),
"LocalFileNode.viewFileInDir.text"), this.content));
72 actionsList.add(null);
74 NbBundle.getMessage(
this.getClass(),
"LocalFileNode.getActions.viewInNewWin.text"),
this));
75 final Collection<AbstractFile> selectedFilesList
76 =
new HashSet<>(Utilities.actionsGlobalContext().lookupAll(AbstractFile.class));
77 if (selectedFilesList.size() == 1) {
79 NbBundle.getMessage(
this.getClass(),
"LocalFileNode.getActions.openInExtViewer.text"),
this));
83 actionsList.add(null);
87 actionsList.add(null);
90 if (selectedFilesList.size() == 1) {
97 if (this.content.getArtifacts(BlackboardArtifact.ARTIFACT_TYPE.TSK_ENCRYPTION_DETECTED).size() > 0) {
100 }
catch (TskCoreException ex) {
101 logger.log(Level.WARNING,
"Unable to add unzip with password action to context menus", ex);
104 return actionsList.toArray(
new Action[actionsList.size()]);
108 public <T> T accept(ContentNodeVisitor<T> visitor) {
109 return visitor.visit(
this);
113 public <T> T accept(DisplayableItemNodeVisitor<T> visitor) {
114 return visitor.visit(
this);
127 return getClass().getName();
static List< String > getArchiveExtensions()
LocalFileNode(AbstractFile af)
Action[] getActions(boolean context)
static synchronized ExportCSVAction getInstance()
static synchronized DeleteFileContentTagAction getInstance()
static final Logger logger
static synchronized ExternalViewerShortcutAction getInstance()
synchronized static Logger getLogger(String name)
static synchronized AddContentTagAction getInstance()