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<>();
70 actionsList.add(
new ViewContextAction(NbBundle.getMessage(
this.getClass(),
"LocalFileNode.viewFileInDir.text"), this.content));
71 actionsList.add(null);
73 NbBundle.getMessage(
this.getClass(),
"LocalFileNode.getActions.viewInNewWin.text"),
this));
74 final Collection<AbstractFile> selectedFilesList
75 =
new HashSet<>(Utilities.actionsGlobalContext().lookupAll(AbstractFile.class));
76 if (selectedFilesList.size() == 1) {
78 NbBundle.getMessage(
this.getClass(),
"LocalFileNode.getActions.openInExtViewer.text"),
this));
82 actionsList.add(null);
86 actionsList.add(null);
89 if (selectedFilesList.size() == 1) {
96 if (this.content.getArtifacts(BlackboardArtifact.ARTIFACT_TYPE.TSK_ENCRYPTION_DETECTED).size() > 0) {
99 }
catch (TskCoreException ex) {
100 logger.log(Level.WARNING,
"Unable to add unzip with password action to context menus", ex);
104 actionsList.add(null);
105 actionsList.addAll(Arrays.asList(super.getActions(
true)));
107 return actionsList.toArray(
new Action[actionsList.size()]);
111 public <T> T accept(ContentNodeVisitor<T> visitor) {
112 return visitor.visit(
this);
116 public <T> T accept(DisplayableItemNodeVisitor<T> visitor) {
117 return visitor.visit(
this);
130 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()