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.addAll(Arrays.asList(super.getActions(
true)));
108 actionsList.add(
new ViewContextAction(Bundle.LayoutFileNode_getActions_viewFileInDir_text(),
this));
109 actionsList.add(null);
112 NbBundle.getMessage(
this.getClass(),
"LayoutFileNode.getActions.viewInNewWin.text"),
this));
113 final Collection<AbstractFile> selectedFilesList
114 =
new HashSet<>(Utilities.actionsGlobalContext().lookupAll(AbstractFile.class));
115 if (selectedFilesList.size() == 1) {
117 NbBundle.getMessage(
this.getClass(),
"LayoutFileNode.getActions.openInExtViewer.text"),
this));
122 actionsList.add(null);
125 actionsList.add(null);
128 if (selectedFilesList.size() == 1) {
135 if (this.content.getArtifacts(BlackboardArtifact.ARTIFACT_TYPE.TSK_ENCRYPTION_DETECTED).size() > 0) {
138 }
catch (TskCoreException ex) {
139 logger.log(Level.WARNING,
"Unable to add unzip with password action to context menus", ex);
142 return actionsList.toArray(
new Action[actionsList.size()]);
147 return getClass().getName();
static List< String > getArchiveExtensions()
LayoutFileNode(LayoutFile lf)
static synchronized ExportCSVAction getInstance()
T visit(DataSourcesNode in)
static synchronized DeleteFileContentTagAction getInstance()
static String nameForLayoutFile(LayoutFile lf)
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()