Autopsy  4.19.3
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  */
19 package org.sleuthkit.autopsy.datamodel;
20 
21 import java.util.ArrayList;
22 import java.util.Arrays;
23 import java.util.Collections;
24 import java.util.List;
25 import javax.swing.Action;
26 import org.openide.util.NbBundle;
35 import org.sleuthkit.datamodel.Content;
36 import org.sleuthkit.datamodel.SpecialDirectory;
37 
41 public 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<>();
59  actions.add(new NewWindowViewAction(
60  Bundle.SpecialDirectoryNode_getActions_viewInNewWin_text(), this));
61  actions.add(null); // creates a menu separator
62  actions.add(ExtractAction.getInstance());
63  actions.add(ExportCSVAction.getInstance());
64  actions.add(null); // creates a menu separator
65  actions.add(new FileSearchTreeAction(Bundle.ImageNode_getActions_openFileSearchByAttr_text(), content.getId()));
66  if (content.isDataSource()) {
67  actions.add(new ViewSummaryInformationAction(content.getId()));
68  actions.add(new RunIngestModulesAction(Collections.<Content>singletonList(content)));
69  actions.add(new DeleteDataSourceAction(content.getId()));
70  } else {
71  actions.add(new RunIngestModulesAction(content));
72  }
73  actions.addAll(ContextMenuExtensionPoint.getActions());
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-2022 Basis Technology. Generated on: Tue Jun 27 2023
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.