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 0000000000000000000000000000000000000000..3fa66664177850deea8ae7b258aa9531dfaaa3e5 --- /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 0000000000000000000000000000000000000000..cac2fc8435543679410a72ba88f40fa568dc4388 --- /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; +}