mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-17 02:07:42 +00:00
Merge pull request #2219 from BasisOlivers/add-run-ingest-module-action
Made run ingest modules dialog accessible via directory listing.
This commit is contained in:
commit
f3af9a22f1
@ -147,7 +147,6 @@ HashsetHits.createSheet.name.name=Name
|
|||||||
HashsetHits.createSheet.name.displayName=Name
|
HashsetHits.createSheet.name.displayName=Name
|
||||||
HashsetHits.createSheet.name.desc=no description
|
HashsetHits.createSheet.name.desc=no description
|
||||||
ImageNode.getActions.viewInNewWin.text=View in New Window
|
ImageNode.getActions.viewInNewWin.text=View in New Window
|
||||||
ImageNode.getActions.openFileSearchByAttr.text=Open File Search by Attributes
|
|
||||||
ImageNode.createSheet.name.name=Name
|
ImageNode.createSheet.name.name=Name
|
||||||
ImageNode.createSheet.name.displayName=Name
|
ImageNode.createSheet.name.displayName=Name
|
||||||
ImageNode.createSheet.name.desc=no description
|
ImageNode.createSheet.name.desc=no description
|
||||||
|
@ -18,11 +18,14 @@
|
|||||||
*/
|
*/
|
||||||
package org.sleuthkit.autopsy.datamodel;
|
package org.sleuthkit.autopsy.datamodel;
|
||||||
|
|
||||||
|
import java.awt.event.ActionEvent;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
import javax.swing.AbstractAction;
|
||||||
import javax.swing.Action;
|
import javax.swing.Action;
|
||||||
import org.openide.nodes.Sheet;
|
import org.openide.nodes.Sheet;
|
||||||
import org.openide.util.NbBundle;
|
import org.openide.util.NbBundle;
|
||||||
@ -32,6 +35,8 @@ import org.sleuthkit.autopsy.coreutils.Logger;
|
|||||||
import org.sleuthkit.autopsy.directorytree.ExplorerNodeActionVisitor;
|
import org.sleuthkit.autopsy.directorytree.ExplorerNodeActionVisitor;
|
||||||
import org.sleuthkit.autopsy.directorytree.FileSearchAction;
|
import org.sleuthkit.autopsy.directorytree.FileSearchAction;
|
||||||
import org.sleuthkit.autopsy.directorytree.NewWindowViewAction;
|
import org.sleuthkit.autopsy.directorytree.NewWindowViewAction;
|
||||||
|
import org.sleuthkit.autopsy.ingest.RunIngestModulesDialog;
|
||||||
|
import org.sleuthkit.datamodel.Content;
|
||||||
import org.sleuthkit.datamodel.Image;
|
import org.sleuthkit.datamodel.Image;
|
||||||
import org.sleuthkit.datamodel.SleuthkitCase.CaseDbQuery;
|
import org.sleuthkit.datamodel.SleuthkitCase.CaseDbQuery;
|
||||||
import org.sleuthkit.datamodel.TskCoreException;
|
import org.sleuthkit.datamodel.TskCoreException;
|
||||||
@ -76,15 +81,25 @@ public class ImageNode extends AbstractContentNode<Image> {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@Messages({"ImageNode.action.runIngestMods.text=Run Ingest Modules",
|
||||||
|
"ImageNode.getActions.openFileSearchByAttr.text=Open File Search by Attributes",})
|
||||||
public Action[] getActions(boolean context) {
|
public Action[] getActions(boolean context) {
|
||||||
|
|
||||||
List<Action> actionsList = new ArrayList<Action>();
|
List<Action> actionsList = new ArrayList<Action>();
|
||||||
|
actionsList.addAll(ExplorerNodeActionVisitor.getActions(content));
|
||||||
|
actionsList.add(new FileSearchAction(
|
||||||
|
Bundle.ImageNode_getActions_openFileSearchByAttr_text()));
|
||||||
|
actionsList.add(new AbstractAction(
|
||||||
|
Bundle.ImageNode_action_runIngestMods_text()) {
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
final RunIngestModulesDialog ingestDialog = new RunIngestModulesDialog(Collections.<Content>singletonList(content));
|
||||||
|
ingestDialog.display();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
actionsList.add(new NewWindowViewAction(
|
actionsList.add(new NewWindowViewAction(
|
||||||
NbBundle.getMessage(this.getClass(), "ImageNode.getActions.viewInNewWin.text"), this));
|
NbBundle.getMessage(this.getClass(), "ImageNode.getActions.viewInNewWin.text"), this));
|
||||||
actionsList.add(new FileSearchAction(
|
|
||||||
NbBundle.getMessage(this.getClass(), "ImageNode.getActions.openFileSearchByAttr.text")));
|
|
||||||
actionsList.addAll(ExplorerNodeActionVisitor.getActions(content));
|
|
||||||
|
|
||||||
return actionsList.toArray(new Action[0]);
|
return actionsList.toArray(new Action[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,13 +18,16 @@
|
|||||||
*/
|
*/
|
||||||
package org.sleuthkit.autopsy.datamodel;
|
package org.sleuthkit.autopsy.datamodel;
|
||||||
|
|
||||||
|
import java.awt.event.ActionEvent;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
import javax.swing.AbstractAction;
|
||||||
import javax.swing.Action;
|
import javax.swing.Action;
|
||||||
import org.openide.nodes.Sheet;
|
import org.openide.nodes.Sheet;
|
||||||
import org.openide.util.NbBundle;
|
import org.openide.util.NbBundle;
|
||||||
@ -33,7 +36,10 @@ import org.sleuthkit.autopsy.casemodule.Case;
|
|||||||
import org.sleuthkit.autopsy.coreutils.ContextMenuExtensionPoint;
|
import org.sleuthkit.autopsy.coreutils.ContextMenuExtensionPoint;
|
||||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||||
import org.sleuthkit.autopsy.directorytree.ExtractAction;
|
import org.sleuthkit.autopsy.directorytree.ExtractAction;
|
||||||
|
import org.sleuthkit.autopsy.directorytree.FileSearchAction;
|
||||||
import org.sleuthkit.autopsy.directorytree.NewWindowViewAction;
|
import org.sleuthkit.autopsy.directorytree.NewWindowViewAction;
|
||||||
|
import org.sleuthkit.autopsy.ingest.RunIngestModulesDialog;
|
||||||
|
import org.sleuthkit.datamodel.Content;
|
||||||
import org.sleuthkit.datamodel.SleuthkitCase;
|
import org.sleuthkit.datamodel.SleuthkitCase;
|
||||||
import org.sleuthkit.datamodel.TskCoreException;
|
import org.sleuthkit.datamodel.TskCoreException;
|
||||||
import org.sleuthkit.datamodel.TskData;
|
import org.sleuthkit.datamodel.TskData;
|
||||||
@ -80,13 +86,25 @@ public class VirtualDirectoryNode extends AbstractAbstractFileNode<VirtualDirect
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@NbBundle.Messages({"VirtualDirectoryNode.action.runIngestMods.text=Run Ingest Modules"})
|
||||||
public Action[] getActions(boolean popup) {
|
public Action[] getActions(boolean popup) {
|
||||||
List<Action> actions = new ArrayList<>();
|
List<Action> actions = new ArrayList<>();
|
||||||
|
|
||||||
actions.add(new NewWindowViewAction(
|
actions.add(new NewWindowViewAction(
|
||||||
NbBundle.getMessage(this.getClass(), "VirtualDirectoryNode.getActions.viewInNewWin.text"), this));
|
NbBundle.getMessage(this.getClass(), "VirtualDirectoryNode.getActions.viewInNewWin.text"), this));
|
||||||
actions.add(null); // creates a menu separator
|
actions.add(null); // creates a menu separator
|
||||||
actions.add(ExtractAction.getInstance());
|
actions.add(ExtractAction.getInstance());
|
||||||
actions.add(null); // creates a menu separator
|
actions.add(null); // creates a menu separator
|
||||||
|
actions.add(new FileSearchAction(
|
||||||
|
Bundle.ImageNode_getActions_openFileSearchByAttr_text()));
|
||||||
|
actions.add(new AbstractAction(
|
||||||
|
Bundle.VirtualDirectoryNode_action_runIngestMods_text()) {
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
final RunIngestModulesDialog ingestDialog = new RunIngestModulesDialog(Collections.<Content>singletonList(content));
|
||||||
|
ingestDialog.display();
|
||||||
|
}
|
||||||
|
});
|
||||||
actions.addAll(ContextMenuExtensionPoint.getActions());
|
actions.addAll(ContextMenuExtensionPoint.getActions());
|
||||||
return actions.toArray(new Action[0]);
|
return actions.toArray(new Action[0]);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user