19 package org.sleuthkit.autopsy.directorytree;
21 import java.util.ArrayList;
22 import java.util.Collection;
23 import java.util.Collections;
24 import java.util.HashSet;
25 import java.util.List;
26 import javax.swing.AbstractAction;
27 import javax.swing.Action;
28 import org.openide.util.NbBundle;
29 import org.openide.util.Utilities;
50 List<Action> actions =
new ArrayList<>();
52 actions.addAll(c.accept(instance));
71 public List<? extends Action>
visit(
final Image img) {
72 List<Action> lst =
new ArrayList<>();
73 lst.add(
new ExtractUnallocAction(
74 NbBundle.getMessage(
this.getClass(),
"ExplorerNodeActionVisitor.action.extUnallocToSingleFiles"), img));
79 public List<? extends Action>
visit(
final FileSystem fs) {
80 return new ArrayList<>();
84 public List<? extends Action>
visit(
final Volume vol) {
85 List<AbstractAction> lst =
new ArrayList<>();
86 lst.add(
new ExtractUnallocAction(
87 NbBundle.getMessage(
this.getClass(),
"ExplorerNodeActionVisitor.action.extUnallocToSingleFile"), vol));
93 public List<? extends Action>
visit(
final Directory d) {
94 List<Action> actionsList =
new ArrayList<>();
97 final Collection<AbstractFile> selectedFilesList =
98 new HashSet<>(Utilities.actionsGlobalContext().lookupAll(AbstractFile.class));
99 if(selectedFilesList.size() == 1) {
108 public List<? extends Action>
visit(
final VirtualDirectory d) {
109 List<Action> actionsList =
new ArrayList<>();
110 if (!d.isDataSource()) {
113 final Collection<AbstractFile> selectedFilesList =
114 new HashSet<>(Utilities.actionsGlobalContext().lookupAll(AbstractFile.class));
115 if(selectedFilesList.size() == 1) {
126 public List<? extends Action>
visit(
final LocalDirectory d) {
127 List<Action> actionsList =
new ArrayList<>();
128 if (!d.isDataSource()) {
131 final Collection<AbstractFile> selectedFilesList =
132 new HashSet<>(Utilities.actionsGlobalContext().lookupAll(AbstractFile.class));
133 if(selectedFilesList.size() == 1) {
144 public List<? extends Action>
visit(
final DerivedFile d) {
145 List<Action> actionsList =
new ArrayList<>();
150 final Collection<AbstractFile> selectedFilesList =
151 new HashSet<>(Utilities.actionsGlobalContext().lookupAll(AbstractFile.class));
152 if(selectedFilesList.size() == 1) {
161 public List<? extends Action>
visit(
final LocalFile d) {
162 List<Action> actionsList =
new ArrayList<>();
167 final Collection<AbstractFile> selectedFilesList =
168 new HashSet<>(Utilities.actionsGlobalContext().lookupAll(AbstractFile.class));
169 if(selectedFilesList.size() == 1) {
179 List<Action> actionsList =
new ArrayList<>();
184 final Collection<AbstractFile> selectedFilesList =
185 new HashSet<>(Utilities.actionsGlobalContext().lookupAll(AbstractFile.class));
186 if(selectedFilesList.size() == 1) {
196 return Collections.<Action>emptyList();
List<?extends Action > visit(final LocalFile d)
List<?extends Action > visit(final FileSystem fs)
List<?extends Action > visit(final Volume vol)
List<?extends Action > visit(final VirtualDirectory d)
List<?extends Action > visit(final Directory d)
static List< Action > getActions(Content c)
static synchronized ExportCSVAction getInstance()
static synchronized DeleteFileContentTagAction getInstance()
static final ExplorerNodeActionVisitor instance
List<?extends Action > visit(final DerivedFile d)
List<?extends Action > visit(final org.sleuthkit.datamodel.File d)
List<?extends Action > visit(final LocalDirectory d)
List<?extends Action > visit(final Image img)
static synchronized AddContentTagAction getInstance()
List<?extends Action > defaultVisit(Content di)