mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-15 01:07:42 +00:00
code cleanup
This commit is contained in:
parent
7128093e3e
commit
7f718148e3
@ -26,13 +26,13 @@ import java.util.stream.Stream;
|
|||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.commons.lang3.tuple.Pair;
|
import org.apache.commons.lang3.tuple.Pair;
|
||||||
import org.sleuthkit.autopsy.centralrepository.ingestmodule.CentralRepoIngestModuleFactory;
|
import org.sleuthkit.autopsy.centralrepository.ingestmodule.CentralRepoIngestModuleFactory;
|
||||||
|
import org.sleuthkit.autopsy.datasourcesummary.datamodel.SleuthkitCaseProvider.SleuthkitCaseProviderException;
|
||||||
import org.sleuthkit.datamodel.BlackboardArtifact;
|
import org.sleuthkit.datamodel.BlackboardArtifact;
|
||||||
import org.sleuthkit.datamodel.BlackboardArtifact.ARTIFACT_TYPE;
|
import org.sleuthkit.datamodel.BlackboardArtifact.ARTIFACT_TYPE;
|
||||||
import org.sleuthkit.datamodel.BlackboardAttribute;
|
import org.sleuthkit.datamodel.BlackboardAttribute;
|
||||||
import org.sleuthkit.datamodel.BlackboardAttribute.ATTRIBUTE_TYPE;
|
import org.sleuthkit.datamodel.BlackboardAttribute.ATTRIBUTE_TYPE;
|
||||||
import org.sleuthkit.datamodel.DataSource;
|
import org.sleuthkit.datamodel.DataSource;
|
||||||
import org.sleuthkit.datamodel.IngestJobInfo;
|
import org.sleuthkit.datamodel.IngestJobInfo;
|
||||||
import org.sleuthkit.datamodel.IngestModuleInfo;
|
|
||||||
import org.sleuthkit.datamodel.TskCoreException;
|
import org.sleuthkit.datamodel.TskCoreException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -160,8 +160,7 @@ public class DataSourcePastCasesSummary {
|
|||||||
* instances that case appeared for the given artifact type. The
|
* instances that case appeared for the given artifact type. The
|
||||||
* case is sorted from max to min descending.
|
* case is sorted from max to min descending.
|
||||||
*
|
*
|
||||||
* @throws
|
* @throws SleuthkitCaseProviderException
|
||||||
* org.sleuthkit.autopsy.datasourcesummary.datamodel.SleuthkitCaseProvider.SleuthkitCaseProviderException
|
|
||||||
* @throws TskCoreException
|
* @throws TskCoreException
|
||||||
*/
|
*/
|
||||||
private List<Pair<String, Long>> getPastCases(DataSource dataSource, ARTIFACT_TYPE artifactType)
|
private List<Pair<String, Long>> getPastCases(DataSource dataSource, ARTIFACT_TYPE artifactType)
|
||||||
@ -215,8 +214,7 @@ public class DataSourcePastCasesSummary {
|
|||||||
* where an ingest module matches the central repo ingest module
|
* where an ingest module matches the central repo ingest module
|
||||||
* display name.
|
* display name.
|
||||||
*
|
*
|
||||||
* @throws
|
* @throws SleuthkitCaseProviderException
|
||||||
* org.sleuthkit.autopsy.datasourcesummary.datamodel.SleuthkitCaseProvider.SleuthkitCaseProviderException
|
|
||||||
* @throws TskCoreException
|
* @throws TskCoreException
|
||||||
*/
|
*/
|
||||||
public boolean isCentralRepoIngested(DataSource dataSource)
|
public boolean isCentralRepoIngested(DataSource dataSource)
|
||||||
@ -245,8 +243,7 @@ public class DataSourcePastCasesSummary {
|
|||||||
* instances that case appeared. The case is sorted from max to min
|
* instances that case appeared. The case is sorted from max to min
|
||||||
* descending.
|
* descending.
|
||||||
*
|
*
|
||||||
* @throws
|
* @throws SleuthkitCaseProviderException
|
||||||
* org.sleuthkit.autopsy.datasourcesummary.datamodel.SleuthkitCaseProvider.SleuthkitCaseProviderException
|
|
||||||
* @throws TskCoreException
|
* @throws TskCoreException
|
||||||
*/
|
*/
|
||||||
public List<Pair<String, Long>> getPastCasesWithNotableFile(DataSource dataSource)
|
public List<Pair<String, Long>> getPastCasesWithNotableFile(DataSource dataSource)
|
||||||
@ -264,8 +261,7 @@ public class DataSourcePastCasesSummary {
|
|||||||
* instances that case appeared. The case is sorted from max to min
|
* instances that case appeared. The case is sorted from max to min
|
||||||
* descending.
|
* descending.
|
||||||
*
|
*
|
||||||
* @throws
|
* @throws SleuthkitCaseProviderException
|
||||||
* org.sleuthkit.autopsy.datasourcesummary.datamodel.SleuthkitCaseProvider.SleuthkitCaseProviderException
|
|
||||||
* @throws TskCoreException
|
* @throws TskCoreException
|
||||||
*/
|
*/
|
||||||
public List<Pair<String, Long>> getPastCasesWithSameId(DataSource dataSource)
|
public List<Pair<String, Long>> getPastCasesWithSameId(DataSource dataSource)
|
||||||
|
@ -45,7 +45,7 @@ import org.sleuthkit.datamodel.TskCoreException;
|
|||||||
"PastCasesPanel_caseColumn_title=Case",
|
"PastCasesPanel_caseColumn_title=Case",
|
||||||
"PastCasesPanel_countColumn_title=Count",
|
"PastCasesPanel_countColumn_title=Count",
|
||||||
"PastCasesPanel_onNoCrIngest_message=No results will be shown because the Central Repository module was not run."
|
"PastCasesPanel_onNoCrIngest_message=No results will be shown because the Central Repository module was not run."
|
||||||
|
|
||||||
})
|
})
|
||||||
public class PastCasesPanel extends BaseDataSourceSummaryPanel {
|
public class PastCasesPanel extends BaseDataSourceSummaryPanel {
|
||||||
|
|
||||||
@ -80,7 +80,7 @@ public class PastCasesPanel extends BaseDataSourceSummaryPanel {
|
|||||||
public PastCasesPanel() {
|
public PastCasesPanel() {
|
||||||
this(new DataSourcePastCasesSummary());
|
this(new DataSourcePastCasesSummary());
|
||||||
}
|
}
|
||||||
|
|
||||||
private final DataSourcePastCasesSummary pastCaseData;
|
private final DataSourcePastCasesSummary pastCaseData;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -88,7 +88,7 @@ public class PastCasesPanel extends BaseDataSourceSummaryPanel {
|
|||||||
*/
|
*/
|
||||||
public PastCasesPanel(DataSourcePastCasesSummary pastCaseData) {
|
public PastCasesPanel(DataSourcePastCasesSummary pastCaseData) {
|
||||||
this.pastCaseData = pastCaseData;
|
this.pastCaseData = pastCaseData;
|
||||||
|
|
||||||
// set up data acquisition methods
|
// set up data acquisition methods
|
||||||
dataFetchComponents = Arrays.asList(
|
dataFetchComponents = Arrays.asList(
|
||||||
// hashset hits loading components
|
// hashset hits loading components
|
||||||
@ -103,7 +103,7 @@ public class PastCasesPanel extends BaseDataSourceSummaryPanel {
|
|||||||
|
|
||||||
initComponents();
|
initComponents();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onNewDataSource(DataSource dataSource) {
|
protected void onNewDataSource(DataSource dataSource) {
|
||||||
// if no data source is present or the case is not open,
|
// if no data source is present or the case is not open,
|
||||||
@ -120,13 +120,13 @@ public class PastCasesPanel extends BaseDataSourceSummaryPanel {
|
|||||||
} catch (SleuthkitCaseProvider.SleuthkitCaseProviderException | TskCoreException ex) {
|
} catch (SleuthkitCaseProvider.SleuthkitCaseProviderException | TskCoreException ex) {
|
||||||
logger.log(Level.WARNING, "There was an error while determining if dataSource has been central repo ingested.", ex);
|
logger.log(Level.WARNING, "There was an error while determining if dataSource has been central repo ingested.", ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!centralRepoIngested) {
|
if (!centralRepoIngested) {
|
||||||
// set tables to display loading screen
|
// set tables to display loading screen
|
||||||
this.tables.forEach((table) -> table.showMessage(Bundle.PastCasesPanel_onNoCrIngest_message()));
|
this.tables.forEach((table) -> table.showMessage(Bundle.PastCasesPanel_onNoCrIngest_message()));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// set tables to display loading screen
|
// set tables to display loading screen
|
||||||
this.tables.forEach((table) -> table.showDefaultLoadingMessage());
|
this.tables.forEach((table) -> table.showDefaultLoadingMessage());
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user