19 package org.sleuthkit.autopsy.datamodel;
21 import java.util.ArrayList;
22 import java.util.List;
23 import javax.swing.Action;
25 import org.openide.util.NbBundle;
65 public static List<Action>
getActions(File file,
boolean isArtifactSource) {
66 List<Action> actions =
new ArrayList<>();
67 actions.add(
new ViewContextAction((isArtifactSource ? VIEW_SOURCE_FILE_IN_DIR : VIEW_FILE_IN_DIR), file));
77 if (isArtifactSource) {
84 public static List<Action>
getActions(LayoutFile file,
boolean isArtifactSource) {
85 List<Action> actions =
new ArrayList<>();
86 actions.add(
new ViewContextAction((isArtifactSource ? VIEW_SOURCE_FILE_IN_DIR : VIEW_FILE_IN_DIR), file));
95 if (isArtifactSource) {
102 public static List<Action>
getActions(Directory directory,
boolean isArtifactSource) {
103 List<Action> actions =
new ArrayList<>();
104 actions.add(
new ViewContextAction((isArtifactSource ? VIEW_SOURCE_FILE_IN_DIR : VIEW_FILE_IN_DIR), directory));
113 if (isArtifactSource) {
120 public static List<Action>
getActions(VirtualDirectory directory,
boolean isArtifactSource) {
121 List<Action> actions =
new ArrayList<>();
122 actions.add(
new ViewContextAction((isArtifactSource ? VIEW_SOURCE_FILE_IN_DIR : VIEW_FILE_IN_DIR), directory));
131 if (isArtifactSource) {
138 public static List<Action>
getActions(LocalFile file,
boolean isArtifactSource) {
139 List<Action> actions =
new ArrayList<>();
140 actions.add(
new ViewContextAction((isArtifactSource ? VIEW_SOURCE_FILE_IN_DIR : VIEW_FILE_IN_DIR), file));
149 if (isArtifactSource) {
156 public static List<Action>
getActions(DerivedFile file,
boolean isArtifactSource) {
157 List<Action> actions =
new ArrayList<>();
158 actions.add(
new ViewContextAction((isArtifactSource ? VIEW_SOURCE_FILE_IN_DIR : VIEW_FILE_IN_DIR), file));
167 if (isArtifactSource) {
174 public static List<Action>
getActions(Content content,
boolean isArtifactSource) {
175 if (content instanceof File) {
176 return getActions((File) content, isArtifactSource);
177 }
else if (content instanceof LayoutFile) {
178 return getActions((LayoutFile) content, isArtifactSource);
179 }
else if (content instanceof Directory) {
180 return getActions((Directory) content, isArtifactSource);
181 }
else if (content instanceof VirtualDirectory) {
182 return getActions((VirtualDirectory) content, isArtifactSource);
183 }
else if (content instanceof LocalFile) {
184 return getActions((LocalFile) content, isArtifactSource);
185 }
else if (content instanceof DerivedFile) {
186 return getActions((DerivedFile) content, isArtifactSource);
188 return new ArrayList<>();
static final String OPEN_IN_EXTERNAL_VIEWER
static List< Action > getActions(LayoutFile file, boolean isArtifactSource)
static final String VIEW_FILE_IN_DIR
static List< Action > getActions(File file, boolean isArtifactSource)
static synchronized AddBlackboardArtifactTagAction getInstance()
static List< Action > getActions(Content content, boolean isArtifactSource)
static final String VIEW_IN_NEW_WINDOW
static List< Action > getActions(LocalFile file, boolean isArtifactSource)
static final String VIEW_SOURCE_FILE_IN_DIR
static final String SEARCH_FOR_FILES_SAME_MD5
static List< Action > getActions(DerivedFile file, boolean isArtifactSource)
static List< Action > getActions(Directory directory, boolean isArtifactSource)
static synchronized AddContentTagAction getInstance()
static List< Action > getActions(VirtualDirectory directory, boolean isArtifactSource)