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 java.util.logging.Level;
27 import javax.swing.AbstractAction;
28 import javax.swing.Action;
29 import org.openide.util.NbBundle;
30 import org.openide.util.Utilities;
53 List<Action> actions =
new ArrayList<>();
55 actions.addAll(c.accept(instance));
74 public List<? extends Action>
visit(
final Image img) {
75 List<Action> lst =
new ArrayList<>();
78 lst.add(
new ExtractUnallocAction(
79 NbBundle.getMessage(
this.getClass(),
"ExplorerNodeActionVisitor.action.extUnallocToSingleFiles"), img));
87 public List<? extends Action>
visit(
final FileSystem fs) {
88 return new ArrayList<>();
92 public List<? extends Action>
visit(
final Volume vol) {
93 List<AbstractAction> lst =
new ArrayList<>();
94 lst.add(
new ExtractUnallocAction(
95 NbBundle.getMessage(
this.getClass(),
"ExplorerNodeActionVisitor.action.extUnallocToSingleFile"), vol));
101 public List<? extends Action>
visit(
final Directory d) {
102 List<Action> actionsList =
new ArrayList<>();
105 final Collection<AbstractFile> selectedFilesList =
106 new HashSet<>(Utilities.actionsGlobalContext().lookupAll(AbstractFile.class));
107 if(selectedFilesList.size() == 1) {
116 public List<? extends Action>
visit(
final VirtualDirectory d) {
117 List<Action> actionsList =
new ArrayList<>();
118 if (!d.isDataSource()) {
121 final Collection<AbstractFile> selectedFilesList =
122 new HashSet<>(Utilities.actionsGlobalContext().lookupAll(AbstractFile.class));
123 if(selectedFilesList.size() == 1) {
134 public List<? extends Action>
visit(
final LocalDirectory d) {
135 List<Action> actionsList =
new ArrayList<>();
136 if (!d.isDataSource()) {
139 final Collection<AbstractFile> selectedFilesList =
140 new HashSet<>(Utilities.actionsGlobalContext().lookupAll(AbstractFile.class));
141 if(selectedFilesList.size() == 1) {
152 public List<? extends Action>
visit(
final DerivedFile d) {
153 List<Action> actionsList =
new ArrayList<>();
158 final Collection<AbstractFile> selectedFilesList =
159 new HashSet<>(Utilities.actionsGlobalContext().lookupAll(AbstractFile.class));
160 if(selectedFilesList.size() == 1) {
169 public List<? extends Action>
visit(
final LocalFile d) {
170 List<Action> actionsList =
new ArrayList<>();
175 final Collection<AbstractFile> selectedFilesList =
176 new HashSet<>(Utilities.actionsGlobalContext().lookupAll(AbstractFile.class));
177 if(selectedFilesList.size() == 1) {
187 List<Action> actionsList =
new ArrayList<>();
192 final Collection<AbstractFile> selectedFilesList =
193 new HashSet<>(Utilities.actionsGlobalContext().lookupAll(AbstractFile.class));
194 if(selectedFilesList.size() == 1) {
204 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 ExplorerNodeActionVisitor instance
static synchronized ExportCSVAction getInstance()
static synchronized DeleteFileContentTagAction getInstance()
List<?extends Action > visit(final DerivedFile d)
List<?extends Action > visit(final org.sleuthkit.datamodel.File d)
List<?extends Action > visit(final LocalDirectory d)
synchronized static Logger getLogger(String name)
List<?extends Action > visit(final Image img)
static synchronized AddContentTagAction getInstance()
List<?extends Action > defaultVisit(Content di)