Autopsy  4.14.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
DroneIngestModule.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2020 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.drones;
20 
21 import java.util.ArrayList;
22 import java.util.List;
23 import java.util.logging.Level;
24 import java.util.logging.Logger;
25 import org.openide.util.NbBundle.Messages;
31 import org.sleuthkit.datamodel.Content;
32 
37 public final class DroneIngestModule implements DataSourceIngestModule {
38 
39  private static final Logger logger = Logger.getLogger(DroneIngestModule.class.getName());
40  final private List<DroneExtractor> extractors;
41 
43 
48  extractors = new ArrayList<>();
49  }
50 
51  @Override
52  public void startUp(IngestJobContext context) throws IngestModuleException {
53  this.context = context;
54 
55  extractors.add(new DATExtractor());
56  }
57 
58  @Messages({
59  "# {0} - AbstractFileName",
60  "DroneIngestModule_process_start=Started {0}"
61  })
62  @Override
63  public ProcessResult process(Content dataSource, DataSourceIngestModuleProgress progressBar) {
64  ProcessResult processResult = ProcessResult.OK;
65 
67 
70  DroneIngestModuleFactory.getModuleName(),
71  Bundle.DroneIngestModule_process_start(dataSource.getName())));
72 
73  progressBar.switchToIndeterminate();
74 
75  for (DroneExtractor extractor : extractors) {
76 
77  if (context.dataSourceIngestIsCancelled()) {
78  logger.log(Level.INFO, "Drone ingest has been canceled, quitting before {0}", extractor.getName()); //NON-NLS
79  break;
80  }
81 
82  progressBar.progress(extractor.getName());
83 
84  try {
85  extractor.process(dataSource, context, progressBar);
86  } catch (DroneIngestException ex) {
87  logger.log(Level.SEVERE, String.format("Exception thrown from drone extractor %s", extractor.getName()), ex);
88  }
89  }
90 
91  return processResult;
92  }
93 
94 }
static IngestMessage createMessage(MessageType messageType, String source, String subject, String detailsHtml)
void postMessage(final IngestMessage message)
ProcessResult process(Content dataSource, DataSourceIngestModuleProgress progressBar)
static synchronized IngestServices getInstance()

Copyright © 2012-2020 Basis Technology. Generated on: Wed Apr 8 2020
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.