Autopsy  4.17.0
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-2018 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;
31 
35 @ServiceProvider(service = org.sleuthkit.autopsy.ingest.IngestModuleFactory.class)
36 @NbBundle.Messages({"CentralRepoIngestModuleFactory.ingestmodule.name=Central Repository",
37  "CentralRepoIngestModuleFactory.ingestmodule.desc=Saves properties to the central repository for later correlation"})
39 
45  public static String getModuleName() {
46  return Bundle.CentralRepoIngestModuleFactory_ingestmodule_name();
47  }
48 
49  @Override
50  public String getModuleDisplayName() {
51  return getModuleName();
52  }
53 
54  @Override
55  public String getModuleDescription() {
56  return Bundle.CentralRepoIngestModuleFactory_ingestmodule_desc();
57  }
58 
59  @Override
60  public String getModuleVersionNumber() {
61  return Version.getVersion();
62  }
63 
64  @Override
65  public boolean isFileIngestModuleFactory() {
66  return true;
67  }
68 
69  @Override
71  if (settings instanceof IngestSettings) {
72  return new CentralRepoIngestModule((IngestSettings) settings);
73  }
74  /*
75  * Compatibility check for older versions.
76  */
77  if (settings instanceof NoIngestModuleIngestJobSettings) {
78  return new CentralRepoIngestModule(new IngestSettings());
79  }
80 
81  throw new IllegalArgumentException("Expected settings argument to be an instance of IngestSettings");
82  }
83 
84  @Override
85  public boolean hasGlobalSettingsPanel() {
86  return true;
87  }
88 
89  @Override
91  GlobalSettingsPanel globalOptionsPanel = new GlobalSettingsPanel();
92  globalOptionsPanel.load();
93  return globalOptionsPanel;
94  }
95 
96  @Override
98  return new IngestSettings();
99  }
100 
101  @Override
102  public boolean hasIngestJobSettingsPanel() {
103  return true;
104  }
105 
106  @Override
108  if (settings instanceof IngestSettings) {
109  return new IngestSettingsPanel((IngestSettings) settings);
110  }
111  /*
112  * Compatibility check for older versions.
113  */
114  if (settings instanceof NoIngestModuleIngestJobSettings) {
115  return new IngestSettingsPanel(new IngestSettings());
116  }
117 
118  throw new IllegalArgumentException("Expected settings argument to be an instance of IngestSettings");
119  }
120 
121 }
IngestModuleIngestJobSettingsPanel getIngestJobSettingsPanel(IngestModuleIngestJobSettings settings)

Copyright © 2012-2021 Basis Technology. Generated on: Tue Jan 19 2021
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.