Autopsy  4.19.3
Graphical digital forensics platform for The Sleuth Kit and other tools.
CentralRepoIngestModuleFactory.java
Go to the documentation of this file.
1 /*
2  * Central Repository
3  *
4  * Copyright 2015-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.centralrepository.ingestmodule;
20 
21 import org.openide.util.NbBundle;
22 import org.openide.util.lookup.ServiceProvider;
32 
36 @ServiceProvider(service = org.sleuthkit.autopsy.ingest.IngestModuleFactory.class)
37 @NbBundle.Messages({
38  "CentralRepoIngestModuleFactory.ingestmodule.name=Central Repository",
39  "CentralRepoIngestModuleFactory.ingestmodule.desc=Saves properties to the central repository for later correlation"
40 })
42 
48  public static String getModuleName() {
49  return Bundle.CentralRepoIngestModuleFactory_ingestmodule_name();
50  }
51 
52  @Override
53  public String getModuleDisplayName() {
54  return getModuleName();
55  }
56 
57  @Override
58  public String getModuleDescription() {
59  return Bundle.CentralRepoIngestModuleFactory_ingestmodule_desc();
60  }
61 
62  @Override
63  public String getModuleVersionNumber() {
64  return Version.getVersion();
65  }
66 
67  @Override
68  public boolean isFileIngestModuleFactory() {
69  return true;
70  }
71 
72  @Override
74  if (settings instanceof IngestSettings) {
75  return new CentralRepoIngestModule((IngestSettings) settings);
76  }
77  /*
78  * Earlier versions of the modules had no ingest job settings. Create a
79  * module with the default settings.
80  */
81  if (settings instanceof NoIngestModuleIngestJobSettings) {
82  return new CentralRepoIngestModule((IngestSettings) getDefaultIngestJobSettings());
83  }
84  throw new IllegalArgumentException("Expected settings argument to be an instance of IngestSettings");
85  }
86 
87  @Override
88  public boolean hasGlobalSettingsPanel() {
89  return true;
90  }
91 
92  @Override
94  GlobalSettingsPanel globalOptionsPanel = new GlobalSettingsPanel();
95  globalOptionsPanel.load();
96  return globalOptionsPanel;
97  }
98 
99  @Override
101  return new IngestSettings();
102  }
103 
104  @Override
105  public boolean hasIngestJobSettingsPanel() {
106  return true;
107  }
108 
109  @Override
111  if (settings instanceof IngestSettings) {
112  return new IngestSettingsPanel((IngestSettings) settings);
113  }
114  /*
115  * Earlier versions of the modules had no ingest job settings. Create a
116  * panel with the default settings.
117  */
118  if (settings instanceof NoIngestModuleIngestJobSettings) {
119  return new IngestSettingsPanel((IngestSettings) getDefaultIngestJobSettings());
120  }
121  throw new IllegalArgumentException("Expected settings argument to be an instance of IngestSettings");
122  }
123 
124  @Override
126  return true;
127  }
128 
129  @Override
131  return new CentralRepoDataArtifactIngestModule((IngestSettings) settings);
132  }
133 
134 }
DataArtifactIngestModule createDataArtifactIngestModule(IngestModuleIngestJobSettings settings)
IngestModuleIngestJobSettingsPanel getIngestJobSettingsPanel(IngestModuleIngestJobSettings settings)

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.