Autopsy  4.12.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
InterestingItemsIngestModuleFactory.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2014 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.modules.interestingitems;
20 
21 import java.util.ArrayList;
22 import java.util.List;
23 import org.openide.util.NbBundle;
24 import org.openide.util.NbBundle.Messages;
25 import org.openide.util.lookup.ServiceProvider;
34 
39 @ServiceProvider(service = IngestModuleFactory.class)
41 
42  @Messages({
43  "InterestingItemsIngestModuleFactory.defaultSettingsError=Error getting default interesting files settings from file."
44  })
45 
46  @Override
47  public String getModuleDisplayName() {
48  return getModuleName();
49  }
50 
51  static String getModuleName() {
52  return NbBundle.getMessage(InterestingItemsIngestModuleFactory.class, "InterestingItemsIdentifierIngestModule.moduleName");
53  }
54 
55  @Override
56  public String getModuleDescription() {
57  return NbBundle.getMessage(InterestingItemsIngestModuleFactory.class, "InterestingItemsIdentifierIngestModule.moduleDescription");
58  }
59 
60  @Override
61  public String getModuleVersionNumber() {
62  return Version.getVersion();
63  }
64 
65  @Override
66  public boolean hasGlobalSettingsPanel() {
67  return true;
68  }
69 
70  @Override
73  panel.load();
74  return panel;
75  }
76 
77  @Override
79  // All interesting files set definitions are enabled by default. The
80  // names of the set definitions are stored instead of the set
81  // definitions to make per ingest job enabling and disabling of the
82  // definitions independent of the rules that make up the defintions.
83  // Doing so also keeps the serialization simple.
84  List<String> enabledFilesSetNames = new ArrayList<>();
85  try {
86  for (String name : FilesSetsManager.getInstance().getInterestingFilesSets().keySet()) {
87  enabledFilesSetNames.add(name);
88  }
90  MessageNotifyUtil.Message.error(Bundle.InterestingItemsIngestModuleFactory_defaultSettingsError());
91  }
92  return new FilesIdentifierIngestJobSettings(enabledFilesSetNames);
93  }
94 
95  @Override
96  public boolean hasIngestJobSettingsPanel() {
97  return true;
98  }
99 
100  @Override
102  if (!(settings instanceof FilesIdentifierIngestJobSettings)) {
103  throw new IllegalArgumentException("Settings not instanceof org.sleuthkit.autopsy.modules.interestingitems.InterestingItemsIngestJobSettings");
104  }
105  return FilesIdentifierIngestJobSettingsPanel.makePanel((FilesIdentifierIngestJobSettings) settings);
106  }
107 
108  @Override
109  public boolean isFileIngestModuleFactory() {
110  return true;
111  }
112 
113  @Override
115  if (!(settings instanceof FilesIdentifierIngestJobSettings)) {
116  throw new IllegalArgumentException("Settings not instanceof org.sleuthkit.autopsy.modules.interestingitems.InterestingItemsIngestJobSettings");
117  }
118  return new FilesIdentifierIngestModule((FilesIdentifierIngestJobSettings) settings);
119  }
120 }
IngestModuleIngestJobSettingsPanel getIngestJobSettingsPanel(IngestModuleIngestJobSettings settings)

Copyright © 2012-2018 Basis Technology. Generated on: Wed Sep 18 2019
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.