From 4cc6decf369dd6720ab59bf4125d3444237bf0aa Mon Sep 17 00:00:00 2001 From: Richard Cordovano Date: Tue, 18 Feb 2014 08:41:29 -0500 Subject: [PATCH] Add first draft of new ingest module interfaces --- .../ingest/DataSourceIngestModule.java | 29 ++++++++++++ .../autopsy/ingest/FileIngestModule.java | 29 ++++++++++++ .../autopsy/ingest/IngestModule.java | 46 +++++++++++++++++++ 3 files changed, 104 insertions(+) create mode 100755 Core/src/org/sleuthkit/autopsy/ingest/DataSourceIngestModule.java create mode 100755 Core/src/org/sleuthkit/autopsy/ingest/FileIngestModule.java create mode 100755 Core/src/org/sleuthkit/autopsy/ingest/IngestModule.java diff --git a/Core/src/org/sleuthkit/autopsy/ingest/DataSourceIngestModule.java b/Core/src/org/sleuthkit/autopsy/ingest/DataSourceIngestModule.java new file mode 100755 index 0000000000..9eaec70738 --- /dev/null +++ b/Core/src/org/sleuthkit/autopsy/ingest/DataSourceIngestModule.java @@ -0,0 +1,29 @@ +/* + * Autopsy Forensic Browser + * + * Copyright 2014 Basis Technology Corp. + * Contact: carrier sleuthkit org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.sleuthkit.autopsy.ingest; + +import org.sleuthkit.datamodel.Content; + +/** + * Interface that must be implemented by all data source ingest modules. + */ +public interface DataSourceIngestModule extends IngestModule { + void process(Content dataSource); +} diff --git a/Core/src/org/sleuthkit/autopsy/ingest/FileIngestModule.java b/Core/src/org/sleuthkit/autopsy/ingest/FileIngestModule.java new file mode 100755 index 0000000000..b594284c06 --- /dev/null +++ b/Core/src/org/sleuthkit/autopsy/ingest/FileIngestModule.java @@ -0,0 +1,29 @@ +/* + * Autopsy Forensic Browser + * + * Copyright 2014 Basis Technology Corp. + * Contact: carrier sleuthkit org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.sleuthkit.autopsy.ingest; + +import org.sleuthkit.datamodel.AbstractFile; + +/** + * Interface that must be implemented by all data source ingest modules. + */ +public interface FileIngestModule { + void process(AbstractFile file); +} diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestModule.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestModule.java new file mode 100755 index 0000000000..baf9c3e478 --- /dev/null +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestModule.java @@ -0,0 +1,46 @@ +/* + * Autopsy Forensic Browser + * + * Copyright 2014 Basis Technology Corp. + * Contact: carrier sleuthkit org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.sleuthkit.autopsy.ingest; + +/** + * Interface that must be implemented by all ingest modules. + */ +public interface IngestModule { + /** + * Called to allow an ingest module to initialize itself before commencing + * processing. + * + * @param schedulingToken A module that uses the scheduling service to + * schedule additional processing needs to supply its scheduling token to + * the scheduler. For example, a module that extracts files from an archive + * may schedule ingest of those files using the module's scheduling token. + */ + void init(int schedulingToken); + + /** + * RJCTODO + */ + void complete(); + + /** + * RJCTODO + */ + void stop(); +}