From 55bb01f3580cf5a4f30d69fb9ead46b532189d00 Mon Sep 17 00:00:00 2001 From: apriestman <apriestman@basistech.com> Date: Tue, 19 May 2020 14:41:46 -0400 Subject: [PATCH] Adding AddDataSourceCallbacks.java and AddDataSourceCallbackException.java --- .../AddDataSourceCallbackException.java | 52 +++++++++++++++++++ .../datamodel/AddDataSourceCallbacks.java | 32 ++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 bindings/java/src/org/sleuthkit/datamodel/AddDataSourceCallbackException.java create mode 100644 bindings/java/src/org/sleuthkit/datamodel/AddDataSourceCallbacks.java diff --git a/bindings/java/src/org/sleuthkit/datamodel/AddDataSourceCallbackException.java b/bindings/java/src/org/sleuthkit/datamodel/AddDataSourceCallbackException.java new file mode 100644 index 000000000..3fa666641 --- /dev/null +++ b/bindings/java/src/org/sleuthkit/datamodel/AddDataSourceCallbackException.java @@ -0,0 +1,52 @@ +/* + * SleuthKit Java Bindings + * + * Copyright 2020 Basis Technology Corp. + * Contact: carrier <at> sleuthkit <dot> 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.datamodel; + +/** + * + */ +public class AddDataSourceCallbackException extends TskException { + private static final long serialVersionUID = 123049876L; + + /** + * Default constructor when error message is not available + */ + public AddDataSourceCallbackException() { + super("No error message available."); + } + + /** + * Create exception containing the error message + * + * @param msg the message + */ + public AddDataSourceCallbackException(String msg) { + super(msg); + } + + /** + * Create exception containing the error message and cause exception + * + * @param msg the message + * @param ex cause exception + */ + public AddDataSourceCallbackException(String msg, Exception ex) { + super(msg, ex); + } +} diff --git a/bindings/java/src/org/sleuthkit/datamodel/AddDataSourceCallbacks.java b/bindings/java/src/org/sleuthkit/datamodel/AddDataSourceCallbacks.java new file mode 100644 index 000000000..cac2fc843 --- /dev/null +++ b/bindings/java/src/org/sleuthkit/datamodel/AddDataSourceCallbacks.java @@ -0,0 +1,32 @@ +/* + * SleuthKit Java Bindings + * + * Copyright 2020 Basis Technology Corp. + * Contact: carrier <at> sleuthkit <dot> 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.datamodel; + +import java.util.List; + +/** + * + */ +public interface AddDataSourceCallbacks { + void onDataSourceAdded(long dataSourceObjectId) throws AddDataSourceCallbackException; + + void onFilesAdded(List<Long> fileObjectIds) throws AddDataSourceCallbackException; + + void onCompleted() throws AddDataSourceCallbackException; +} -- GitLab