19package org.sleuthkit.autopsy.centralrepository.datamodel;
21import java.sql.SQLException;
22import java.util.Collection;
24import java.util.Optional;
26import org.sleuthkit.datamodel.TskData;
27import org.sleuthkit.autopsy.casemodule.Case;
28import org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoAccount.CentralRepoAccountType;
29import org.sleuthkit.autopsy.coordinationservice.CoordinationService;
30import org.sleuthkit.datamodel.HashHitInfo;
31import org.sleuthkit.datamodel.InvalidAccountIDException;
51 switch (selectedPlatform) {
53 return PostgresCentralRepo.getInstance();
56 return SqliteCentralRepo.getInstance();
static CentralRepoDbChoice getSavedDbChoice()
static boolean allowUseOfCentralRepository()
CentralRepoPlatforms getDbPlatform()
boolean isArtifactKnownBadByReference(CorrelationAttributeInstance.Type aType, String value)
Long getCountCasesWithOtherInstances(CorrelationAttributeInstance instance)
List< CorrelationAttributeInstance > getArtifactInstancesByTypeValues(CorrelationAttributeInstance.Type aType, List< String > values)
static CentralRepository getInstance()
void addAttributeInstanceBulk(CorrelationAttributeInstance eamArtifact)
CorrelationCase getCaseByUUID(String caseUUID)
void processInstanceTable(CorrelationAttributeInstance.Type type, InstanceTableCallback instanceTableCallback)
void commitAttributeInstancesBulk()
List< CentralRepoFileInstance > getReferenceInstancesByTypeValue(CorrelationAttributeInstance.Type aType, String aValue)
CentralRepoExaminer getOrInsertExaminer(String examinerLoginName)
CorrelationAttributeInstance.Type getCorrelationTypeById(int typeId)
void updateDataSourceMd5Hash(CorrelationDataSource eamDataSource)
List< CorrelationAttributeInstance > getArtifactInstancesByTypeValue(CorrelationAttributeInstance.Type type, String value)
CorrelationDataSource getDataSourceById(CorrelationCase correlationCase, int dataSourceId)
void updateDataSourceSha256Hash(CorrelationDataSource eamDataSource)
void updateOrganization(CentralRepoOrganization updatedOrganization)
boolean referenceSetExists(String referenceSetName, String version)
void updateCorrelationType(CorrelationAttributeInstance.Type aType)
List< CorrelationCase > getCases()
Long getCountUniqueDataSources()
boolean referenceSetIsValid(int referenceSetID, String referenceSetName, String version)
Optional< CentralRepoAccountType > getAccountTypeByName(String accountTypeName)
void setAttributeInstanceKnownStatus(CorrelationAttributeInstance eamArtifact, TskData.FileKnown knownStatus)
void bulkInsertCases(List< CorrelationCase > cases)
List< CorrelationAttributeInstance.Type > getEnabledCorrelationTypes()
CorrelationDataSource getDataSource(CorrelationCase correlationCase, Long caseDbDataSourceId)
CorrelationCase getCase(Case autopsyCase)
void processSelectClause(String selectClause, InstanceTableCallback instanceTableCallback)
void executeCommand(String sql, List< Object > params)
Collection< CentralRepoAccountType > getAllAccountTypes()
void deleteOrganization(CentralRepoOrganization organizationToDelete)
Long getCountUniqueCaseDataSourceTuplesHavingTypeValue(CorrelationAttributeInstance.Type aType, String value)
List< CentralRepoOrganization > getOrganizations()
int newReferenceSet(CentralRepoFileSet eamGlobalSet)
CentralRepoOrganization getOrganizationByID(int orgID)
void shutdownConnections()
boolean isValueInReferenceSet(String value, int referenceSetID, int correlationTypeID)
List< CentralRepoFileSet > getAllReferenceSets(CorrelationAttributeInstance.Type correlationType)
CorrelationCase getCaseById(int caseId)
int newCorrelationType(CorrelationAttributeInstance.Type newType)
CentralRepoOrganization getReferenceSetOrganization(int referenceSetID)
String getDbInfo(String name)
void bulkInsertReferenceTypeEntries(Set< CentralRepoFileInstance > globalInstances, CorrelationAttributeInstance.Type contentType)
boolean isFileHashInReferenceSet(String hash, int referenceSetID)
void addArtifactInstance(CorrelationAttributeInstance eamArtifact)
void updateAttributeInstanceComment(CorrelationAttributeInstance eamArtifact)
HashHitInfo lookupHash(String hash, int referenceSetID)
void addReferenceInstance(CentralRepoFileInstance eamGlobalFileInstance, CorrelationAttributeInstance.Type correlationType)
List< String > getListCasesHavingArtifactInstancesKnownBad(CorrelationAttributeInstance.Type aType, String value)
CentralRepoFileSet getReferenceSetByID(int globalSetID)
void updateDataSourceSha1Hash(CorrelationDataSource eamDataSource)
List< CorrelationAttributeInstance.Type > getSupportedCorrelationTypes()
CentralRepoAccount getAccount(CentralRepoAccount.CentralRepoAccountType crAccountType, String accountUniqueID)
void processInstanceTableWhere(CorrelationAttributeInstance.Type type, String whereClause, InstanceTableCallback instanceTableCallback)
void addDataSourceObjectId(int rowId, long dataSourceObjectId)
List< CorrelationAttributeInstance > getArtifactInstancesByTypeValuesAndCases(CorrelationAttributeInstance.Type aType, List< String > values, List< Integer > caseIds)
CorrelationCase newCase(CorrelationCase eamCase)
CentralRepoAccount getOrCreateAccount(CentralRepoAccount.CentralRepoAccountType crAccountType, String accountUniqueID)
List< CorrelationDataSource > getDataSources()
List< CorrelationAttributeInstance.Type > getDefinedCorrelationTypes()
void executeQuery(String sql, List< Object > params, CentralRepositoryDbQueryCallback queryCallback)
Long getCountArtifactInstancesByTypeValue(CorrelationAttributeInstance.Type aType, String value)
CoordinationService.Lock getExclusiveMultiUserDbLock()
CorrelationCase newCase(Case autopsyCase)
void deleteReferenceSet(int referenceSetID)
Long getCountArtifactInstancesKnownBad(CorrelationAttributeInstance.Type aType, String value)
void newDbInfo(String name, String value)
CentralRepoOrganization newOrganization(CentralRepoOrganization eamOrg)
static boolean isEnabled()
List< String > getListCasesHavingArtifactInstances(CorrelationAttributeInstance.Type aType, String value)
void updateDataSourceName(CorrelationDataSource eamDataSource, String newName)
void updateDbInfo(String name, String value)
void updateCase(CorrelationCase eamCase)
Long getCountArtifactInstancesByCaseDataSource(CorrelationDataSource correlationDataSource)
CorrelationAttributeInstance getCorrelationAttributeInstance(CorrelationAttributeInstance.Type type, CorrelationCase correlationCase, CorrelationDataSource correlationDataSource, String value, String filePath)
CorrelationDataSource newDataSource(CorrelationDataSource eamDataSource)
int getFrequencyPercentage(CorrelationAttributeInstance corAttr)