19 package org.sleuthkit.autopsy.test;
21 import java.util.logging.Level;
22 import org.openide.util.NbBundle;
36 "CustomArtifactsCreatorFileIngestModule.exceptionMessage.errorCreatingCustomType=Error creating custom artifact type."
38 final class CustomArtifactsCreatorFileIngestModule extends FileIngestModuleAdapter {
40 private static final Logger logger = Logger.getLogger(CustomArtifactsCreatorFileIngestModule.class.getName());
53 public void startUp(IngestJobContext context)
throws IngestModuleException {
55 CustomArtifactType.addToCaseDatabase();
56 }
catch (Blackboard.BlackboardException | NoCurrentCaseException ex) {
57 throw new IngestModuleException(Bundle.CustomArtifactsCreatorFileIngestModule_exceptionMessage_errorCreatingCustomType(), ex);
70 public ProcessResult process(AbstractFile file) {
71 if (file.isDir() || file.isVirtual()) {
72 return ProcessResult.OK;
75 CustomArtifactType.createInstance(file);
76 }
catch (TskCoreException ex) {
77 logger.log(Level.SEVERE, String.format(
"Failed to process file (obj_id = %d)", file.getId()), ex);
78 return ProcessResult.ERROR;
80 return ProcessResult.OK;