Autopsy 4.22.1
Graphical digital forensics platform for The Sleuth Kit and other tools.
SpecialDirectoryNode.java
Go to the documentation of this file.
1/*
2 * Autopsy Forensic Browser
3 *
4 * Copyright 2017-2021 Basis Technology Corp.
5 * Contact: carrier <at> sleuthkit <dot> org
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 */
19package org.sleuthkit.autopsy.datamodel;
20
21import java.util.ArrayList;
22import java.util.Arrays;
23import java.util.Collections;
24import java.util.List;
25import javax.swing.Action;
26import org.openide.util.NbBundle;
27import org.sleuthkit.autopsy.casemodule.DeleteDataSourceAction;
28import org.sleuthkit.autopsy.datasourcesummary.ui.ViewSummaryInformationAction;
29import org.sleuthkit.autopsy.coreutils.ContextMenuExtensionPoint;
30import org.sleuthkit.autopsy.directorytree.ExportCSVAction;
31import org.sleuthkit.autopsy.directorytree.ExtractAction;
32import org.sleuthkit.autopsy.directorytree.FileSearchTreeAction;
33import org.sleuthkit.autopsy.directorytree.NewWindowViewAction;
34import org.sleuthkit.autopsy.ingest.runIngestModuleWizard.RunIngestModulesAction;
35import org.sleuthkit.datamodel.Content;
36import org.sleuthkit.datamodel.SpecialDirectory;
37
41public abstract class SpecialDirectoryNode extends AbstractAbstractFileNode<SpecialDirectory> {
42
43 public SpecialDirectoryNode(SpecialDirectory sd) {
44 super(sd);
45 }
46
54 @Override
55 @NbBundle.Messages({"SpecialDirectoryNode.getActions.viewInNewWin.text=View in New Window"
56 })
57 public Action[] getActions(boolean popup) {
58 List<Action> actions = new ArrayList<>();
60 Bundle.SpecialDirectoryNode_getActions_viewInNewWin_text(), this));
61 actions.add(null); // creates a menu separator
64 actions.add(null); // creates a menu separator
65 actions.add(new FileSearchTreeAction(Bundle.ImageNode_getActions_openFileSearchByAttr_text(), content.getId()));
66 if (content.isDataSource()) {
68 actions.add(new RunIngestModulesAction(Collections.<Content>singletonList(content)));
69 actions.add(new DeleteDataSourceAction(content.getId()));
70 } else {
72 }
74 actions.add(null);
75 actions.addAll(Arrays.asList(super.getActions(true)));
76 return actions.toArray(new Action[0]);
77 }
78
79 @Override
80 public boolean isLeafTypeNode() {
81 return false;
82 }
83
84 @Override
85 public String getItemType() {
86 // use content.isDataSource if different column settings are desired
87 return DisplayableItemNode.FILE_PARENT_NODE_KEY;
88 }
89}
static synchronized ExportCSVAction getInstance()
static synchronized ExtractAction getInstance()

Copyright © 2012-2024 Sleuth Kit Labs. Generated on:
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.