Autopsy  4.5.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
RunIngestAction.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2011-2017 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.ingest;
20 
21 import java.awt.event.ActionEvent;
22 import java.awt.event.ActionListener;
23 import javax.swing.JMenuItem;
24 import org.openide.awt.ActionID;
25 import org.openide.awt.ActionRegistration;
26 import org.openide.util.HelpCtx;
27 import org.openide.util.NbBundle;
28 import org.openide.util.NbBundle.Messages;
29 import org.openide.util.actions.CallableSystemAction;
30 import org.openide.util.actions.Presenter;
32 
38 @ActionID(category = "Tools", id = "org.sleuthkit.autopsy.ingest.RunIngestAction")
39 @ActionRegistration(displayName = "#CTL_RunIngestAction", lazy = false)
40 @Messages("CTL_RunIngestAction=Run Ingest")
41 public final class RunIngestAction extends CallableSystemAction implements Presenter.Menu, ActionListener {
42 
43  private static final long serialVersionUID = 1L;
44  private static RunIngestAction action;
45 
46  static public RunIngestAction getInstance() {
47  if (action == null) {
48  action = new RunIngestAction();
49  }
50  return action;
51  }
52 
53  private RunIngestAction() {
54  }
55 
56  @Override
57  public void performAction() {
58  getMenuPresenter();
59  }
60 
61  @Override
62  public String getName() {
63  return NbBundle.getMessage(RunIngestAction.class, "RunIngestModulesMenu.getName.text");
64  }
65 
66  @Override
67  public HelpCtx getHelpCtx() {
68  return HelpCtx.DEFAULT_HELP;
69  }
70 
71  @Override
72  public JMenuItem getMenuPresenter() {
73  JMenuItem sublist = new RunIngestSubMenu();
74  sublist.setVisible(true);
75  return sublist;
76  }
77 
78  @Override
79  public void actionPerformed(ActionEvent e) {
80  performAction();
81  }
82 
83  @Override
84  public boolean isEnabled() {
85  return Case.isCaseOpen() && Case.getCurrentCase().hasData();
86  }
87 }

Copyright © 2012-2016 Basis Technology. Generated on: Tue Feb 20 2018
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.