diff --git a/Core/src/org/sleuthkit/autopsy/datasourcesummary/uiutils/DataFetchLoadableComponent.java b/Core/src/org/sleuthkit/autopsy/datasourcesummary/uiutils/DataFetchLoadableComponent.java new file mode 100644 index 0000000000..6bc8b778eb --- /dev/null +++ b/Core/src/org/sleuthkit/autopsy/datasourcesummary/uiutils/DataFetchLoadableComponent.java @@ -0,0 +1,43 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package org.sleuthkit.autopsy.datasourcesummary.uiutils; + +import java.util.List; + +/** + * + * @author gregd + */ +public interface DataFetchLoadableComponent { + void showMessage(String message); + void showDefaultLoadingMessage(); + void showResults(List data); + + + /** + * Shows the data in a DataFetchResult. If there was an error during the + * operation, the errorMessage will be displayed. If the operation completed + * successfully and no data is present, noResultsMessage will be shown. + * Otherwise, the data will be shown as rows in the table. + * + * @param result The DataFetchResult. + * @param errorMessage The error message to be shown in the event of an + * error. + * @param noResultsMessage The message to be shown if there are no results + * but the operation completed successfully. + */ + void showDataFetchResult(DataFetchResult> result, String errorMessage, String noResultsMessage); + + /** + * Shows the data in a DataFetchResult. If there was an error during the + * operation, the DEFAULT_ERROR_MESSAGE will be displayed. If the operation + * completed successfully and no data is present, DEFAULT_NO_RESULTS_MESSAGE + * will be shown. Otherwise, the data will be shown as rows in the table. + * + * @param result The DataFetchResult. + */ + public void showDataFetchResult(DataFetchResult> result); +}