Go to the documentation of this file.
19package org.sleuthkit.autopsy.test;
21import java.util.logging.Level;
22import org.apache.commons.codec.DecoderException;
23import org.openide.util.NbBundle;
24import org.sleuthkit.autopsy.coreutils.Logger;
25import org.sleuthkit.autopsy.ingest.FileIngestModuleAdapter;
26import org.sleuthkit.autopsy.ingest.IngestJobContext;
27import org.sleuthkit.datamodel.Blackboard;
28import org.sleuthkit.datamodel.AbstractFile;
29import org.sleuthkit.datamodel.TskCoreException;
36 "CustomArtifactsCreatorFileIngestModule.exceptionMessage.errorCreatingCustomType=Error creating custom artifact type."
40 private static final Logger logger =
Logger.
getLogger(CustomArtifactsCreatorFileIngestModule.class.getName());
55 this.context = context;
57 CustomArtifactType.addToCaseDatabase();
58 }
catch (Blackboard.BlackboardException ex) {
59 throw new IngestModuleException(Bundle.CustomArtifactsCreatorFileIngestModule_exceptionMessage_errorCreatingCustomType(), ex);
72 public ProcessResult process(AbstractFile file) {
73 if (file.isDir() || file.isVirtual()) {
74 return ProcessResult.OK;
77 CustomArtifactType.createAndPostInstance(file, context.getJobId());
78 }
catch (TskCoreException | Blackboard.BlackboardException | DecoderException ex) {
79 logger.log(Level.SEVERE, String.format(
"Failed to process file (obj_id = %d)", file.getId()), ex);
80 return ProcessResult.ERROR;
82 return ProcessResult.OK;
synchronized static Logger getLogger(String name)
Copyright © 2012-2024 Sleuth Kit Labs. Generated on:
This work is licensed under a
Creative Commons Attribution-Share Alike 3.0 United States License.