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;
60 public String toString() {
61 return NbBundle.getMessage(this.getClass(),
"LayoutFileNode.propertyType.parts");
75 if (lf.getType().equals(TskData.TSK_DB_FILES_TYPE_ENUM.CARVED)) {
76 this.setIconBaseWithExtension(
"org/sleuthkit/autopsy/images/carved-file-x-icon-16.png");
77 }
else if (lf.getType().equals(TskData.TSK_DB_FILES_TYPE_ENUM.LAYOUT_FILE)) {
78 if (lf.isDirNameFlagSet(TskData.TSK_FS_NAME_FLAG_ENUM.UNALLOC)) {
79 this.setIconBaseWithExtension(
"org/sleuthkit/autopsy/images/file-icon-deleted.png");
81 this.setIconBaseWithExtension(
FileNode.getIconForFileType(lf));
84 this.setIconBaseWithExtension(
"org/sleuthkit/autopsy/images/file-icon-deleted.png");
88 public <T> T accept(ContentNodeVisitor<T> visitor) {
89 return visitor.visit(
this);
99 return visitor.
visit(
this);
104 "LayoutFileNode.getActions.viewFileInDir.text=View File in Directory"})
106 List<Action> actionsList =
new ArrayList<>();
107 actionsList.add(
new ViewContextAction(Bundle.LayoutFileNode_getActions_viewFileInDir_text(),
this));
108 actionsList.add(null);
111 NbBundle.getMessage(
this.getClass(),
"LayoutFileNode.getActions.viewInNewWin.text"),
this));
112 final Collection<AbstractFile> selectedFilesList
113 =
new HashSet<>(Utilities.actionsGlobalContext().lookupAll(AbstractFile.class));
114 if (selectedFilesList.size() == 1) {
116 NbBundle.getMessage(
this.getClass(),
"LayoutFileNode.getActions.openInExtViewer.text"),
this));
121 actionsList.add(null);
124 actionsList.add(null);
127 if (selectedFilesList.size() == 1) {
134 if (this.content.getArtifacts(BlackboardArtifact.ARTIFACT_TYPE.TSK_ENCRYPTION_DETECTED).size() > 0) {
137 }
catch (TskCoreException ex) {
138 logger.log(Level.WARNING,
"Unable to add unzip with password action to context menus", ex);
141 actionsList.add(null);
142 actionsList.addAll(Arrays.asList(super.getActions(
true)));
143 return actionsList.toArray(
new Action[actionsList.size()]);
148 return getClass().getName();
static List< String > getArchiveExtensions()
LayoutFileNode(LayoutFile lf)
static synchronized ExportCSVAction getInstance()
static synchronized DeleteFileContentTagAction getInstance()
static String nameForLayoutFile(LayoutFile lf)
T visit(DataSourceFilesNode in)
Action[] getActions(boolean context)
static synchronized ExternalViewerShortcutAction getInstance()
synchronized static Logger getLogger(String name)
static final Logger logger
static ViewFileInTimelineAction createViewFileAction(AbstractFile file)
static synchronized AddContentTagAction getInstance()