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