Autopsy  4.4.1
Graphical digital forensics platform for The Sleuth Kit and other tools.
EamDb.java
Go to the documentation of this file.
1 /*
2  * Central Repository
3  *
4  * Copyright 2015-2017 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  */
19 package org.sleuthkit.autopsy.centralrepository.datamodel;
20 
21 import java.util.List;
22 import java.util.Set;
23 import org.sleuthkit.datamodel.TskData;
25 
29 public interface EamDb {
30 
31  public static final int SCHEMA_VERSION = 1;
32 
40  static EamDb getInstance() throws EamDbException {
41 
42  EamDbPlatformEnum selectedPlatform = EamDbPlatformEnum.DISABLED;
43  if (EamDbUtil.useCentralRepo()) {
44  selectedPlatform = EamDbPlatformEnum.getSelectedPlatform();
45  }
46  switch (selectedPlatform) {
47  case POSTGRESQL:
48  return PostgresEamDb.getInstance();
49 
50  case SQLITE:
51  return SqliteEamDb.getInstance();
52  default:
53  return null;
54  }
55  }
56 
66  void shutdownConnections() throws EamDbException;
67 
76  void updateSettings();
77 
81  void saveSettings();
82 
86  void reset() throws EamDbException;
87 
93  static boolean isEnabled() {
94  return EamDbUtil.useCentralRepo()
96  }
97 
103  List<String> getBadTags();
104 
110  void setBadTags(List<String> tags);
111 
120  public void newDbInfo(String name, String value) throws EamDbException;
121 
131  public String getDbInfo(String name) throws EamDbException;
132 
141  public void updateDbInfo(String name, String value) throws EamDbException;
142 
150  void newCase(CorrelationCase eamCase) throws EamDbException;
151 
157  CorrelationCase newCase(Case autopsyCase) throws EamDbException;
158 
164  void updateCase(CorrelationCase eamCase) throws EamDbException;
165 
173  CorrelationCase getCaseByUUID(String caseUUID) throws EamDbException;
174 
180  List<CorrelationCase> getCases() throws EamDbException;
181 
187  void newDataSource(CorrelationDataSource eamDataSource) throws EamDbException;
188 
194  //void updateDataSource(CorrelationDataSource eamDataSource) throws EamDbException;
195 
203  CorrelationDataSource getDataSourceDetails(String dataSourceDeviceId) throws EamDbException;
204 
210  List<CorrelationDataSource> getDataSources() throws EamDbException;
211 
218  void addArtifact(CorrelationAttribute eamArtifact) throws EamDbException;
219 
229  List<CorrelationAttributeInstance> getArtifactInstancesByTypeValue(CorrelationAttribute.Type aType, String value) throws EamDbException;
230 
242  List<CorrelationAttributeInstance> getArtifactInstancesByPath(CorrelationAttribute.Type aType, String filePath) throws EamDbException;
243 
254  Long getCountArtifactInstancesByTypeValue(CorrelationAttribute.Type aType, String value) throws EamDbException;
255 
263  int getFrequencyPercentage(CorrelationAttribute corAttr) throws EamDbException;
264 
275  Long getCountUniqueCaseDataSourceTuplesHavingTypeValue(CorrelationAttribute.Type aType, String value) throws EamDbException;
276 
282  Long getCountUniqueDataSources() throws EamDbException;
283 
295  Long getCountArtifactInstancesByCaseDataSource(String caseUUID, String dataSourceID) throws EamDbException;
296 
304  void prepareBulkArtifact(CorrelationAttribute eamArtifact) throws EamDbException;
305 
310  void bulkInsertArtifacts() throws EamDbException;
311 
315  void bulkInsertCases(List<CorrelationCase> cases) throws EamDbException;
316 
324  void setArtifactInstanceKnownStatus(CorrelationAttribute eamArtifact, TskData.FileKnown knownStatus) throws EamDbException;
325 
335  List<CorrelationAttributeInstance> getArtifactInstancesKnownBad(CorrelationAttribute.Type aType, String value) throws EamDbException;
336 
345  Long getCountArtifactInstancesKnownBad(CorrelationAttribute.Type aType, String value) throws EamDbException;
346 
359  List<String> getListCasesHavingArtifactInstancesKnownBad(CorrelationAttribute.Type aType, String value) throws EamDbException;
360 
369  boolean isArtifactlKnownBadByReference(CorrelationAttribute.Type aType, String value) throws EamDbException;
370 
378  void newOrganization(EamOrganization eamOrg) throws EamDbException;
379 
387  List<EamOrganization> getOrganizations() throws EamDbException;
388 
398  EamOrganization getOrganizationByID(int orgID) throws EamDbException;
399 
409  int newReferencelSet(EamGlobalSet eamGlobalSet) throws EamDbException;
410 
420  EamGlobalSet getReferenceSetByID(int globalSetID) throws EamDbException;
421 
431  void addReferenceInstance(EamGlobalFileInstance eamGlobalFileInstance, CorrelationAttribute.Type correlationType) throws EamDbException;
432 
440 // void prepareGlobalFileInstance(EamGlobalFileInstance eamGlobalFileInstance) throws EamDbException;
450  void bulkInsertReferenceTypeEntries(Set<EamGlobalFileInstance> globalInstances, CorrelationAttribute.Type contentType) throws EamDbException;
451 
462  List<EamGlobalFileInstance> getReferenceInstancesByTypeValue(CorrelationAttribute.Type aType, String aValue) throws EamDbException;
463 
473  public int newCorrelationType(CorrelationAttribute.Type newType) throws EamDbException;
474 
484  public List<CorrelationAttribute.Type> getDefinedCorrelationTypes() throws EamDbException;
485 
495  public List<CorrelationAttribute.Type> getEnabledCorrelationTypes() throws EamDbException;
496 
506  public List<CorrelationAttribute.Type> getSupportedCorrelationTypes() throws EamDbException;
507 
515  public void updateCorrelationType(CorrelationAttribute.Type aType) throws EamDbException;
516 
526  public CorrelationAttribute.Type getCorrelationTypeById(int typeId) throws EamDbException;
527 }
int getFrequencyPercentage(CorrelationAttribute corAttr)
CorrelationAttribute.Type getCorrelationTypeById(int typeId)
CorrelationCase getCaseByUUID(String caseUUID)
List< CorrelationAttributeInstance > getArtifactInstancesKnownBad(CorrelationAttribute.Type aType, String value)
List< CorrelationAttribute.Type > getSupportedCorrelationTypes()
void addReferenceInstance(EamGlobalFileInstance eamGlobalFileInstance, CorrelationAttribute.Type correlationType)
void prepareBulkArtifact(CorrelationAttribute eamArtifact)
List< CorrelationAttribute.Type > getEnabledCorrelationTypes()
List< String > getListCasesHavingArtifactInstancesKnownBad(CorrelationAttribute.Type aType, String value)
void addArtifact(CorrelationAttribute eamArtifact)
List< CorrelationAttributeInstance > getArtifactInstancesByTypeValue(CorrelationAttribute.Type aType, String value)
Long getCountArtifactInstancesKnownBad(CorrelationAttribute.Type aType, String value)
void setArtifactInstanceKnownStatus(CorrelationAttribute eamArtifact, TskData.FileKnown knownStatus)
CorrelationDataSource getDataSourceDetails(String dataSourceDeviceId)
int newCorrelationType(CorrelationAttribute.Type newType)
Long getCountArtifactInstancesByCaseDataSource(String caseUUID, String dataSourceID)
List< EamGlobalFileInstance > getReferenceInstancesByTypeValue(CorrelationAttribute.Type aType, String aValue)
boolean isArtifactlKnownBadByReference(CorrelationAttribute.Type aType, String value)
void updateCorrelationType(CorrelationAttribute.Type aType)
Long getCountUniqueCaseDataSourceTuplesHavingTypeValue(CorrelationAttribute.Type aType, String value)
void bulkInsertCases(List< CorrelationCase > cases)
List< CorrelationAttributeInstance > getArtifactInstancesByPath(CorrelationAttribute.Type aType, String filePath)
void bulkInsertReferenceTypeEntries(Set< EamGlobalFileInstance > globalInstances, CorrelationAttribute.Type contentType)
List< CorrelationAttribute.Type > getDefinedCorrelationTypes()
void newDataSource(CorrelationDataSource eamDataSource)
Long getCountArtifactInstancesByTypeValue(CorrelationAttribute.Type aType, String value)

Copyright © 2012-2016 Basis Technology. Generated on: Fri Sep 29 2017
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.