Autopsy 4.22.1
Graphical digital forensics platform for The Sleuth Kit and other tools.
CentralRepository.java
Go to the documentation of this file.
1/*
2 * Central Repository
3 *
4 * Copyright 2015-2021 Basis Technology Corp.
5 * Contact: carrier <at> sleuthkit <dot> org
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 */
19package org.sleuthkit.autopsy.centralrepository.datamodel;
20
21import java.sql.SQLException;
22import java.util.Collection;
23import java.util.List;
24import java.util.Optional;
25import java.util.Set;
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;
32
36public interface CentralRepository {
37
46
50 }
51 switch (selectedPlatform) {
52 case POSTGRESQL:
53 return PostgresCentralRepo.getInstance();
54
55 case SQLITE:
56 return SqliteCentralRepo.getInstance();
57 default:
58 return null;
59 }
60 }
61
73
83
88
93
103
112 void newDbInfo(String name, String value) throws CentralRepoException;
113
122 void addDataSourceObjectId(int rowId, long dataSourceObjectId) throws CentralRepoException;
123
133 String getDbInfo(String name) throws CentralRepoException;
134
143 void updateDbInfo(String name, String value) throws CentralRepoException;
144
153
160
167
180
191
200
209
215 List<CorrelationCase> getCases() throws CentralRepoException;
216
226
233
240
248
258 CorrelationDataSource getDataSource(CorrelationCase correlationCase, Long caseDbDataSourceId) throws CentralRepoException;
259
270
277
286 void updateDataSourceName(CorrelationDataSource eamDataSource, String newName) throws CentralRepoException;
287
295
311
332
351
363
372
384
400
407
418
427
433
438
449
468 CorrelationDataSource correlationDataSource, String value, String filePath) throws CentralRepoException, CorrelationAttributeNormalizationException;
469
486
494 void setAttributeInstanceKnownStatus(CorrelationAttributeInstance eamArtifact, TskData.FileKnown knownStatus) throws CentralRepoException;
495
505
519
533
541 void deleteReferenceSet(int referenceSetID) throws CentralRepoException;
542
556 boolean referenceSetIsValid(int referenceSetID, String referenceSetName, String version) throws CentralRepoException;
557
570 boolean referenceSetExists(String referenceSetName, String version) throws CentralRepoException;
571
584
598 HashHitInfo lookupHash(String hash, int referenceSetID) throws CentralRepoException, CorrelationAttributeNormalizationException;
599
609 boolean isValueInReferenceSet(String value, int referenceSetID, int correlationTypeID) throws CentralRepoException, CorrelationAttributeNormalizationException;
610
620
631
640
651
662
672
681
692
703
714
725
736
748
759
770
781
792
801
812
819
832
842
852 void processInstanceTableWhere(CorrelationAttributeInstance.Type type, String whereClause, InstanceTableCallback instanceTableCallback) throws CentralRepoException;
853
862 void processSelectClause(String selectClause, InstanceTableCallback instanceTableCallback) throws CentralRepoException;
863
873 void executeCommand(String sql, List<Object> params) throws CentralRepoException;
874
885 void executeQuery(String sql, List<Object> params, CentralRepositoryDbQueryCallback queryCallback) throws CentralRepoException;
886
896 Optional<CentralRepoAccountType> getAccountTypeByName(String accountTypeName) throws CentralRepoException;
897
906
920 CentralRepoAccount getOrCreateAccount(CentralRepoAccount.CentralRepoAccountType crAccountType, String accountUniqueID) throws InvalidAccountIDException, CentralRepoException;
921
935 CentralRepoAccount getAccount(CentralRepoAccount.CentralRepoAccountType crAccountType, String accountUniqueID) throws InvalidAccountIDException, CentralRepoException;
936
937}
boolean isArtifactKnownBadByReference(CorrelationAttributeInstance.Type aType, String value)
Long getCountCasesWithOtherInstances(CorrelationAttributeInstance instance)
List< CorrelationAttributeInstance > getArtifactInstancesByTypeValues(CorrelationAttributeInstance.Type aType, List< String > values)
void addAttributeInstanceBulk(CorrelationAttributeInstance eamArtifact)
void processInstanceTable(CorrelationAttributeInstance.Type type, InstanceTableCallback instanceTableCallback)
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)
boolean referenceSetIsValid(int referenceSetID, String referenceSetName, String version)
Optional< CentralRepoAccountType > getAccountTypeByName(String accountTypeName)
void setAttributeInstanceKnownStatus(CorrelationAttributeInstance eamArtifact, TskData.FileKnown knownStatus)
List< CorrelationAttributeInstance.Type > getEnabledCorrelationTypes()
CorrelationDataSource getDataSource(CorrelationCase correlationCase, Long caseDbDataSourceId)
void processSelectClause(String selectClause, InstanceTableCallback instanceTableCallback)
void deleteOrganization(CentralRepoOrganization organizationToDelete)
Long getCountUniqueCaseDataSourceTuplesHavingTypeValue(CorrelationAttributeInstance.Type aType, String value)
boolean isValueInReferenceSet(String value, int referenceSetID, int correlationTypeID)
List< CentralRepoFileSet > getAllReferenceSets(CorrelationAttributeInstance.Type correlationType)
int newCorrelationType(CorrelationAttributeInstance.Type newType)
CentralRepoOrganization getReferenceSetOrganization(int referenceSetID)
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)
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)
CentralRepoAccount getOrCreateAccount(CentralRepoAccount.CentralRepoAccountType crAccountType, String accountUniqueID)
List< CorrelationAttributeInstance.Type > getDefinedCorrelationTypes()
void executeQuery(String sql, List< Object > params, CentralRepositoryDbQueryCallback queryCallback)
Long getCountArtifactInstancesByTypeValue(CorrelationAttributeInstance.Type aType, String value)
Long getCountArtifactInstancesKnownBad(CorrelationAttributeInstance.Type aType, String value)
CentralRepoOrganization newOrganization(CentralRepoOrganization eamOrg)
List< String > getListCasesHavingArtifactInstances(CorrelationAttributeInstance.Type aType, String value)
void updateDataSourceName(CorrelationDataSource eamDataSource, String newName)
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)

Copyright © 2012-2024 Sleuth Kit Labs. Generated on:
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.