Autopsy  4.20.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
IngestModulesConfigWizardPanel.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.runIngestModuleWizard;
20 
21 import java.awt.Component;
22 import java.util.List;
23 import javax.swing.event.ChangeListener;
24 import org.openide.WizardDescriptor;
25 import org.openide.util.HelpCtx;
26 import org.openide.util.NbBundle;
29 import org.sleuthkit.datamodel.Content;
30 
34 class IngestModulesConfigWizardPanel extends ShortcutWizardDescriptorPanel {
35 
36  private final String executionContext;
37  private final IngestJobSettings.IngestType ingestType;
38  private IngestJobSettingsPanel ingestJobSettingsPanel;
39  private final List<Content> dataSources;
46  IngestModulesConfigWizardPanel(String executionContest, IngestJobSettings.IngestType ingestType, List<Content> dataSources) {
47  this.executionContext = executionContest;
48  this.ingestType = ingestType;
49  this.dataSources = dataSources;
50  }
51 
58  IngestJobSettings getIngestJobSettings() {
59  return ingestJobSettingsPanel.getSettings();
60  }
61 
62  @NbBundle.Messages("IngestModulesConfigWizardPanel.name.text=Configure Ingest Modules")
63  @Override
64  public Component getComponent() {
65  if (null == ingestJobSettingsPanel) {
66  /*
67  * Creating an ingest job settings object is expensive, so it is
68  * deferred until this panel is actually used in the wizard.
69  */
70  ingestJobSettingsPanel = new IngestJobSettingsPanel(new IngestJobSettings(executionContext, ingestType), dataSources);
71  }
72  ingestJobSettingsPanel.setName(Bundle.IngestModulesConfigWizardPanel_name_text());
73  return ingestJobSettingsPanel;
74  }
75 
76  @Override
77  public HelpCtx getHelp() {
78  return HelpCtx.DEFAULT_HELP;
79  }
80 
81  @Override
82  public boolean isValid() {
83  return true;
84  }
85 
86  @Override
87  public void addChangeListener(ChangeListener l) {
88  }
89 
90  @Override
91  public void removeChangeListener(ChangeListener l) {
92  }
93 
94  @Override
95  public void readSettings(WizardDescriptor wiz) {
96  }
97 
98  @Override
99  public void storeSettings(WizardDescriptor wiz) {
100  ingestJobSettingsPanel.getSettings().save();
101  }
102 
103 }

Copyright © 2012-2022 Basis Technology. Generated on: Tue Aug 1 2023
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.