19 package org.sleuthkit.autopsy.report.modules.datasourcesummaryexport;
21 import java.util.Arrays;
22 import java.util.Collections;
23 import java.util.List;
24 import org.apache.commons.lang3.tuple.Pair;
25 import org.openide.util.NbBundle.Messages;
38 "ExportPastCases_caseColumn_title=Case",
39 "ExportPastCases_countColumn_title=Count",
40 "ExportPastCases_notableFileTable_tabName=Cases with Common Notable Items at Time Of Ingest",
41 "ExportPastCases_sameIdsTable_tabName=Past Cases with the Same Devices",})
42 class ExportPastCases {
44 private final PastCasesSummary pastSummary;
47 private static final ColumnModel<Pair<String, Long>, DefaultCellModel<?>> CASE_COL =
new ColumnModel<>(
48 Bundle.ExportPastCases_caseColumn_title(),
49 (pair) ->
new DefaultCellModel<>(pair.getKey()),
54 private static final ColumnModel<Pair<String, Long>, DefaultCellModel<?>> COUNT_COL =
new ColumnModel<>(
55 Bundle.ExportPastCases_countColumn_title(),
56 (pair) ->
new DefaultCellModel<>(pair.getValue()),
61 private static List<ColumnModel<Pair<String, Long>, DefaultCellModel<?>>> DEFAULT_TEMPLATE
62 = Arrays.asList(CASE_COL, COUNT_COL);
65 pastSummary =
new PastCasesSummary();
68 List<ExcelExport.ExcelSheetExport> getExports(DataSource dataSource) {
69 DataFetcher<DataSource, PastCasesResult> pastCasesFetcher = (ds) -> pastSummary.getPastCasesData(ds);
70 PastCasesResult result = getFetchResult(pastCasesFetcher,
"Past cases sheets", dataSource);
72 return Collections.emptyList();
76 getTableExport(DEFAULT_TEMPLATE, Bundle.ExportPastCases_notableFileTable_tabName(), result.getTaggedNotable()),
77 getTableExport(DEFAULT_TEMPLATE, Bundle.ExportPastCases_sameIdsTable_tabName(), result.getSameIdsResults())