Autopsy  4.6.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDb Class Reference

Inherits org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.

Public Member Functions

void addArtifact (CorrelationAttribute eamArtifact) throws EamDbException
 
void addReferenceInstance (EamGlobalFileInstance eamGlobalFileInstance, CorrelationAttribute.Type correlationType) throws EamDbException
 
void bulkInsertArtifacts () throws EamDbException
 
void bulkInsertCases (List< CorrelationCase > cases) throws EamDbException
 
void bulkInsertReferenceTypeEntries (Set< EamGlobalFileInstance > globalInstances, CorrelationAttribute.Type contentType) throws EamDbException
 
void deleteOrganization (EamOrganization organizationToDelete) throws EamDbException
 
void deleteReferenceSet (int referenceSetID) throws EamDbException
 
List< EamGlobalSetgetAllReferenceSets (CorrelationAttribute.Type correlationType) throws EamDbException
 
List< CorrelationAttributeInstancegetArtifactInstancesByPath (CorrelationAttribute.Type aType, String filePath) throws EamDbException
 
List< CorrelationAttributeInstancegetArtifactInstancesByTypeValue (CorrelationAttribute.Type aType, String value) throws EamDbException
 
List< CorrelationAttributeInstancegetArtifactInstancesKnownBad (CorrelationAttribute.Type aType, String value) throws EamDbException
 
CorrelationCase getCase (Case autopsyCase) throws EamDbException
 
CorrelationCase getCaseByUUID (String caseUUID) throws EamDbException
 
List< CorrelationCasegetCases () throws EamDbException
 
CorrelationAttribute.Type getCorrelationTypeById (int typeId) throws EamDbException
 
Long getCountArtifactInstancesByCaseDataSource (String caseUUID, String dataSourceID) throws EamDbException
 
Long getCountArtifactInstancesByTypeValue (CorrelationAttribute.Type aType, String value) throws EamDbException
 
Long getCountArtifactInstancesKnownBad (CorrelationAttribute.Type aType, String value) throws EamDbException
 
Long getCountUniqueCaseDataSourceTuplesHavingTypeValue (CorrelationAttribute.Type aType, String value) throws EamDbException
 
Long getCountUniqueDataSources () throws EamDbException
 
CorrelationDataSource getDataSource (CorrelationCase correlationCase, String dataSourceDeviceId) throws EamDbException
 
List< CorrelationDataSourcegetDataSources () throws EamDbException
 
String getDbInfo (String name) throws EamDbException
 
List< CorrelationAttribute.Type > getDefinedCorrelationTypes () throws EamDbException
 
List< CorrelationAttribute.Type > getEnabledCorrelationTypes () throws EamDbException
 
CoordinationService.Lock getExclusiveMultiUserDbLock () throws EamDbException
 
int getFrequencyPercentage (CorrelationAttribute corAttr) throws EamDbException
 
List< String > getListCasesHavingArtifactInstancesKnownBad (CorrelationAttribute.Type aType, String value) throws EamDbException
 
EamOrganization getOrganizationByID (int orgID) throws EamDbException
 
List< EamOrganizationgetOrganizations () throws EamDbException
 
List< EamGlobalFileInstancegetReferenceInstancesByTypeValue (CorrelationAttribute.Type aType, String aValue) throws EamDbException
 
EamGlobalSet getReferenceSetByID (int referenceSetID) throws EamDbException
 
EamOrganization getReferenceSetOrganization (int referenceSetID) throws EamDbException
 
List< CorrelationAttribute.Type > getSupportedCorrelationTypes () throws EamDbException
 
boolean isArtifactKnownBadByReference (CorrelationAttribute.Type aType, String value) throws EamDbException
 
boolean isFileHashInReferenceSet (String hash, int referenceSetID) throws EamDbException
 
boolean isValueInReferenceSet (String value, int referenceSetID, int correlationTypeID) throws EamDbException
 
synchronized CorrelationCase newCase (CorrelationCase eamCase) throws EamDbException
 
CorrelationCase newCase (Case autopsyCase) throws EamDbException
 
int newCorrelationType (CorrelationAttribute.Type newType) throws EamDbException
 
void newDataSource (CorrelationDataSource eamDataSource) throws EamDbException
 
void newDbInfo (String name, String value) throws EamDbException
 
long newOrganization (EamOrganization eamOrg) throws EamDbException
 
int newReferenceSet (EamGlobalSet eamGlobalSet) throws EamDbException
 
void prepareBulkArtifact (CorrelationAttribute eamArtifact) throws EamDbException
 
boolean referenceSetExists (String referenceSetName, String version) throws EamDbException
 
boolean referenceSetIsValid (int referenceSetID, String setName, String version) throws EamDbException
 
void reset () throws EamDbException
 
void saveSettings ()
 
void setArtifactInstanceKnownStatus (CorrelationAttribute eamArtifact, TskData.FileKnown knownStatus) throws EamDbException
 
void shutdownConnections () throws EamDbException
 
void updateCase (CorrelationCase eamCase) throws EamDbException
 
void updateCorrelationType (CorrelationAttribute.Type aType) throws EamDbException
 
void updateDbInfo (String name, String value) throws EamDbException
 
void updateOrganization (EamOrganization updatedOrganization) throws EamDbException
 
void updateSettings ()
 
void upgradeSchema () throws EamDbException, SQLException
 

Static Public Member Functions

static synchronized PostgresEamDb getInstance () throws EamDbException
 
static boolean isEnabled ()
 

Static Public Attributes

static final CaseDbSchemaVersionNumber CURRENT_DB_SCHEMA_VERSION = new CaseDbSchemaVersionNumber(1, 1)
 
static final int SCHEMA_VERSION = 1
 

Protected Member Functions

Connection connect () throws EamDbException
 
String getConflictClause ()
 

Protected Attributes

int bulkArtifactsThreshold
 
final List< CorrelationAttribute.Type > DEFAULT_CORRELATION_TYPES
 

Private Member Functions

 PostgresEamDb () throws EamDbException
 
void setupConnectionPool () throws EamDbException
 

Private Attributes

BasicDataSource connectionPool = null
 
final PostgresEamDbSettings dbSettings
 

Static Private Attributes

static final String CONFLICT_CLAUSE = "ON CONFLICT DO NOTHING"
 
static final int CONN_POOL_SIZE = 10
 
static PostgresEamDb instance
 
static final Logger LOGGER = Logger.getLogger(PostgresEamDb.class.getName())
 

Detailed Description

Central Repository database implementation using Postgres as a backend

Definition at line 37 of file PostgresEamDb.java.

Constructor & Destructor Documentation

org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDb.PostgresEamDb ( ) throws EamDbException
private

Member Function Documentation

void org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.addArtifact ( CorrelationAttribute  eamArtifact) throws EamDbException
inherited
void org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.addReferenceInstance ( EamGlobalFileInstance  eamGlobalFileInstance,
CorrelationAttribute.Type  correlationType 
) throws EamDbException
inherited
void org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.bulkInsertArtifacts ( ) throws EamDbException
inherited
void org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.bulkInsertCases ( List< CorrelationCase cases) throws EamDbException
inherited
void org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.bulkInsertReferenceTypeEntries ( Set< EamGlobalFileInstance globalInstances,
CorrelationAttribute.Type  contentType 
) throws EamDbException
inherited
Connection org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDb.connect ( ) throws EamDbException
protected

Lazily setup Singleton connection on first request.

Returns
A connection from the connection pool.
Exceptions
EamDbException

Definition at line 171 of file PostgresEamDb.java.

References org.sleuthkit.autopsy.centralrepository.datamodel.EamDb.isEnabled(), and org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDb.setupConnectionPool().

Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDb.reset().

void org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.deleteOrganization ( EamOrganization  organizationToDelete) throws EamDbException
inherited
void org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.deleteReferenceSet ( int  referenceSetID) throws EamDbException
inherited
List<EamGlobalSet> org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.getAllReferenceSets ( CorrelationAttribute.Type  correlationType) throws EamDbException
inherited
List<CorrelationAttributeInstance> org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.getArtifactInstancesByPath ( CorrelationAttribute.Type  aType,
String  filePath 
) throws EamDbException
inherited
List<CorrelationAttributeInstance> org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.getArtifactInstancesByTypeValue ( CorrelationAttribute.Type  aType,
String  value 
) throws EamDbException
inherited
List<CorrelationAttributeInstance> org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.getArtifactInstancesKnownBad ( CorrelationAttribute.Type  aType,
String  value 
) throws EamDbException
inherited
CorrelationCase org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.getCase ( Case  autopsyCase) throws EamDbException
inherited

Retrieves Central Repo case based on an Autopsy Case

Parameters
autopsyCaseAutopsy case to find corresponding CR case for
Returns
CR Case
Exceptions
EamDbException

Implements org.sleuthkit.autopsy.centralrepository.datamodel.EamDb.

Definition at line 271 of file AbstractSqlEamDb.java.

References org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.getCaseByUUID().

CorrelationCase org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.getCaseByUUID ( String  caseUUID) throws EamDbException
inherited
List<CorrelationCase> org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.getCases ( ) throws EamDbException
inherited
String org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDb.getConflictClause ( )
protected
CorrelationAttribute.Type org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.getCorrelationTypeById ( int  typeId) throws EamDbException
inherited
Long org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.getCountArtifactInstancesByCaseDataSource ( String  caseUUID,
String  dataSourceID 
) throws EamDbException
inherited
Long org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.getCountArtifactInstancesByTypeValue ( CorrelationAttribute.Type  aType,
String  value 
) throws EamDbException
inherited

Retrieves number of artifact instances in the database that are associated with the ArtifactType and artifactValue of the given artifact.

Parameters
aTypeThe type of the artifact
valueThe correlation value
Returns
Number of artifact instances having ArtifactType and ArtifactValue.

Implements org.sleuthkit.autopsy.centralrepository.datamodel.EamDb.

Definition at line 719 of file AbstractSqlEamDb.java.

References org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil.closeConnection(), org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil.closePreparedStatement(), org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil.closeResultSet(), org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.connect(), and org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil.correlationTypeToInstanceTableName().

Long org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.getCountArtifactInstancesKnownBad ( CorrelationAttribute.Type  aType,
String  value 
) throws EamDbException
inherited
Long org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.getCountUniqueCaseDataSourceTuplesHavingTypeValue ( CorrelationAttribute.Type  aType,
String  value 
) throws EamDbException
inherited
Long org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.getCountUniqueDataSources ( ) throws EamDbException
inherited
CorrelationDataSource org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.getDataSource ( CorrelationCase  correlationCase,
String  dataSourceDeviceId 
) throws EamDbException
inherited
List<CorrelationDataSource> org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.getDataSources ( ) throws EamDbException
inherited
String org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.getDbInfo ( String  name) throws EamDbException
inherited
List<CorrelationAttribute.Type> org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.getDefinedCorrelationTypes ( ) throws EamDbException
inherited
List<CorrelationAttribute.Type> org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.getEnabledCorrelationTypes ( ) throws EamDbException
inherited
CoordinationService.Lock org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDb.getExclusiveMultiUserDbLock ( ) throws EamDbException

Gets an exclusive lock (if applicable). Will return the lock if successful, null if unsuccessful because locking isn't supported, and throw an exception if we should have been able to get the lock but failed (meaning the database is in use).

Returns
the lock, or null if locking is not supported
Exceptions
EamDbExceptionif the coordination service is running but we fail to get the lock

Implements org.sleuthkit.autopsy.centralrepository.datamodel.EamDb.

Definition at line 203 of file PostgresEamDb.java.

References org.sleuthkit.autopsy.coordinationservice.CoordinationService.CategoryNode.CENTRAL_REPO, org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.getDbName(), org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.getHost(), org.sleuthkit.autopsy.coordinationservice.CoordinationService.getInstance(), org.sleuthkit.autopsy.core.UserPreferences.getIsMultiUserModeEnabled(), and org.sleuthkit.autopsy.coordinationservice.CoordinationService.tryGetExclusiveLock().

int org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.getFrequencyPercentage ( CorrelationAttribute  corAttr) throws EamDbException
inherited

Calculate the percentage of data sources that have this attribute value.

Parameters
corAttrAttribute type and value to get data about
Returns
Int between 0 and 100

Implements org.sleuthkit.autopsy.centralrepository.datamodel.EamDb.

Definition at line 757 of file AbstractSqlEamDb.java.

References org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.getCountUniqueCaseDataSourceTuplesHavingTypeValue(), and org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.getCountUniqueDataSources().

static synchronized PostgresEamDb org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDb.getInstance ( ) throws EamDbException
static

Get the singleton instance of PostgresEamDb

Returns
the singleton instance of PostgresEamDb
Exceptions
EamDbExceptionif one or more default correlation type(s) have an invalid db table name.

Implements org.sleuthkit.autopsy.centralrepository.datamodel.EamDb.

Definition at line 57 of file PostgresEamDb.java.

References org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDb.instance, and org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDb.PostgresEamDb().

Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.EamDb.getInstance().

List<String> org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.getListCasesHavingArtifactInstancesKnownBad ( CorrelationAttribute.Type  aType,
String  value 
) throws EamDbException
inherited

Gets list of distinct case display names, where each case has 1+ Artifact Instance matching eamArtifact with knownStatus = "Bad".

Parameters
aTypeEamArtifact.Type to search for
valueValue to search for
Returns
List of cases containing this artifact with instances marked as bad
Exceptions
EamDbException

Implements org.sleuthkit.autopsy.centralrepository.datamodel.EamDb.

Definition at line 1300 of file AbstractSqlEamDb.java.

References org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil.closeConnection(), org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil.closePreparedStatement(), org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil.closeResultSet(), org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.connect(), and org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil.correlationTypeToInstanceTableName().

EamOrganization org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.getOrganizationByID ( int  orgID) throws EamDbException
inherited
List<EamOrganization> org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.getOrganizations ( ) throws EamDbException
inherited
List<EamGlobalFileInstance> org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.getReferenceInstancesByTypeValue ( CorrelationAttribute.Type  aType,
String  aValue 
) throws EamDbException
inherited
EamGlobalSet org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.getReferenceSetByID ( int  referenceSetID) throws EamDbException
inherited
EamOrganization org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.getReferenceSetOrganization ( int  referenceSetID) throws EamDbException
inherited
List<CorrelationAttribute.Type> org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.getSupportedCorrelationTypes ( ) throws EamDbException
inherited
boolean org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.isArtifactKnownBadByReference ( CorrelationAttribute.Type  aType,
String  value 
) throws EamDbException
inherited
static boolean org.sleuthkit.autopsy.centralrepository.datamodel.EamDb.isEnabled ( )
staticinherited

Is the database enabled?

Returns
Is the database enabled

Definition at line 98 of file EamDb.java.

References org.sleuthkit.autopsy.centralrepository.datamodel.EamDbPlatformEnum.DISABLED, org.sleuthkit.autopsy.centralrepository.datamodel.EamDbPlatformEnum.getSelectedPlatform(), and org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil.useCentralRepo().

Referenced by org.sleuthkit.autopsy.modules.hashdatabase.HashLookupSettingsPanel.cancel(), org.sleuthkit.autopsy.modules.hashdatabase.HashDbManager.configureSettings(), org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDb.connect(), org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDb.connect(), org.sleuthkit.autopsy.modules.hashdatabase.HashDbManager.getCentralRepoHashSetsFromDatabase(), org.sleuthkit.autopsy.centralrepository.contentviewer.DataContentViewerOtherCases.isSupported(), org.sleuthkit.autopsy.centralrepository.eventlisteners.NewArtifactsRunner.run(), org.sleuthkit.autopsy.centralrepository.eventlisteners.CaseEventListener.ContentTagTask.run(), org.sleuthkit.autopsy.centralrepository.eventlisteners.CaseEventListener.BlackboardTagTask.run(), org.sleuthkit.autopsy.centralrepository.eventlisteners.IngestEventsListener.DataAddedTask.run(), org.sleuthkit.autopsy.centralrepository.eventlisteners.CaseEventListener.TagDefinitionChangeTask.run(), org.sleuthkit.autopsy.centralrepository.eventlisteners.CaseEventListener.DataSourceAddedTask.run(), org.sleuthkit.autopsy.centralrepository.eventlisteners.CaseEventListener.CurrentCaseTask.run(), org.sleuthkit.autopsy.centralrepository.contentviewer.DataContentViewerOtherCases.setNode(), org.sleuthkit.autopsy.modules.hashdatabase.HashDbManager.updateHashSetsFromCentralRepository(), and org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil.upgradeDatabase().

boolean org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.isFileHashInReferenceSet ( String  hash,
int  referenceSetID 
) throws EamDbException
inherited

Check if the given file hash is in this reference set. Only searches the reference_files table.

Parameters
hash
referenceSetID
Returns
true if the hash is found in the reference set
Exceptions
EamDbException

Implements org.sleuthkit.autopsy.centralrepository.datamodel.EamDb.

Definition at line 1438 of file AbstractSqlEamDb.java.

References org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttribute.FILES_TYPE_ID, and org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.isValueInReferenceSet().

boolean org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.isValueInReferenceSet ( String  value,
int  referenceSetID,
int  correlationTypeID 
) throws EamDbException
inherited
synchronized CorrelationCase org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.newCase ( CorrelationCase  eamCase) throws EamDbException
inherited
CorrelationCase org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.newCase ( Case  autopsyCase) throws EamDbException
inherited
int org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.newCorrelationType ( CorrelationAttribute.Type  newType) throws EamDbException
inherited
void org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.newDataSource ( CorrelationDataSource  eamDataSource) throws EamDbException
inherited
void org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.newDbInfo ( String  name,
String  value 
) throws EamDbException
inherited
long org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.newOrganization ( EamOrganization  eamOrg) throws EamDbException
inherited
int org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.newReferenceSet ( EamGlobalSet  eamGlobalSet) throws EamDbException
inherited
void org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.prepareBulkArtifact ( CorrelationAttribute  eamArtifact) throws EamDbException
inherited

Adds an eamArtifact to an internal list to be later added to DB. Artifact can have 1 or more Artifact Instances. Insert will be triggered by a threshold or a call to bulkInsertArtifacts().

Parameters
eamArtifactThe artifact to add

Implements org.sleuthkit.autopsy.centralrepository.datamodel.EamDb.

Definition at line 902 of file AbstractSqlEamDb.java.

References org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.bulkArtifacts, and org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.bulkInsertArtifacts().

boolean org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.referenceSetExists ( String  referenceSetName,
String  version 
) throws EamDbException
inherited

Check whether a reference set with the given name/version is in the central repo. Used to check for name collisions when creating reference sets.

Parameters
referenceSetName
version
Returns
true if a matching set is found
Exceptions
EamDbException

Implements org.sleuthkit.autopsy.centralrepository.datamodel.EamDb.

Definition at line 1911 of file AbstractSqlEamDb.java.

References org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil.closeConnection(), org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil.closePreparedStatement(), org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil.closeResultSet(), and org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.connect().

boolean org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.referenceSetIsValid ( int  referenceSetID,
String  setName,
String  version 
) throws EamDbException
inherited

Check whether a reference set with the given parameters exists in the central repository. Used to check whether reference sets saved in the settings are still present.

Parameters
referenceSetID
setName
version
Returns
true if a matching entry exists in the central repository
Exceptions
EamDbException

Implements org.sleuthkit.autopsy.centralrepository.datamodel.EamDb.

Definition at line 1419 of file AbstractSqlEamDb.java.

References org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.getReferenceSetByID(), org.sleuthkit.autopsy.centralrepository.datamodel.EamGlobalSet.getSetName(), and org.sleuthkit.autopsy.centralrepository.datamodel.EamGlobalSet.getVersion().

void org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDb.reset ( ) throws EamDbException
void org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDb.saveSettings ( )
void org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.setArtifactInstanceKnownStatus ( CorrelationAttribute  eamArtifact,
TskData.FileKnown  knownStatus 
) throws EamDbException
inherited

Sets an eamArtifact instance to the given knownStatus. knownStatus should be BAD if the file has been tagged with a notable tag and UNKNOWN otherwise. If eamArtifact exists, it is updated. If eamArtifact does not exist it is added with the given status.

Parameters
eamArtifactArtifact containing exactly one (1) ArtifactInstance.
knownStatusThe status to change the artifact to. Should never be KNOWN

Implements org.sleuthkit.autopsy.centralrepository.datamodel.EamDb.

Definition at line 1094 of file AbstractSqlEamDb.java.

References org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.addArtifact(), org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil.closeConnection(), org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil.closePreparedStatement(), org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil.closeResultSet(), org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.connect(), org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil.correlationTypeToInstanceTableName(), org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.getCaseByUUID(), org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationCase.getCaseUUID(), org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttributeInstance.getComment(), org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttributeInstance.getCorrelationCase(), org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttributeInstance.getCorrelationDataSource(), org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttribute.getCorrelationType(), org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttribute.getCorrelationValue(), org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.getDataSource(), org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationDataSource.getDeviceID(), org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttributeInstance.getFilePath(), org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttribute.getInstances(), org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.newCase(), and org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.newDataSource().

void org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDb.setupConnectionPool ( ) throws EamDbException
private
void org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDb.shutdownConnections ( ) throws EamDbException

Shutdown the connection pool.

This closes the connection pool including all idle database connections. It will not close active/in-use connections. Thus, it is vital that there are no in-use connections when you call this method.

Exceptions
EamDbExceptionif there is a problem closing the connection pool.

Implements org.sleuthkit.autopsy.centralrepository.datamodel.EamDb.

Definition at line 76 of file PostgresEamDb.java.

void org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.updateCase ( CorrelationCase  eamCase) throws EamDbException
inherited
void org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.updateCorrelationType ( CorrelationAttribute.Type  aType) throws EamDbException
inherited
void org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.updateDbInfo ( String  name,
String  value 
) throws EamDbException
inherited
void org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.updateOrganization ( EamOrganization  updatedOrganization) throws EamDbException
inherited

Update an existing organization.

Parameters
updatedOrganizationthe values the Organization with the same ID will be updated to in the database.
Exceptions
EamDbException

Implements org.sleuthkit.autopsy.centralrepository.datamodel.EamDb.

Definition at line 1660 of file AbstractSqlEamDb.java.

References org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil.closeConnection(), org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil.closePreparedStatement(), and org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.connect().

void org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDb.updateSettings ( )

Update settings

When using updateSettings, if any database settings have changed, you should call shutdownConnections() before using any API methods. That will ensure that any old connections are closed and all new connections will be made using the new settings.

Implements org.sleuthkit.autopsy.centralrepository.datamodel.EamDb.

Definition at line 90 of file PostgresEamDb.java.

References org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.bulkArtifactsThreshold, org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.getBulkThreshold(), and org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.loadSettings().

void org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.upgradeSchema ( ) throws EamDbException, SQLException
inherited

Member Data Documentation

int org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.bulkArtifactsThreshold
protectedinherited
final String org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDb.CONFLICT_CLAUSE = "ON CONFLICT DO NOTHING"
staticprivate
final int org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDb.CONN_POOL_SIZE = 10
staticprivate

Definition at line 45 of file PostgresEamDb.java.

BasicDataSource org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDb.connectionPool = null
private

Definition at line 46 of file PostgresEamDb.java.

final CaseDbSchemaVersionNumber org.sleuthkit.autopsy.centralrepository.datamodel.EamDb.CURRENT_DB_SCHEMA_VERSION = new CaseDbSchemaVersionNumber(1, 1)
staticinherited
final PostgresEamDbSettings org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDb.dbSettings
private

Definition at line 48 of file PostgresEamDb.java.

final List<CorrelationAttribute.Type> org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.DEFAULT_CORRELATION_TYPES
protectedinherited
PostgresEamDb org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDb.instance
staticprivate
final Logger org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDb.LOGGER = Logger.getLogger(PostgresEamDb.class.getName())
staticprivate

Definition at line 39 of file PostgresEamDb.java.

final int org.sleuthkit.autopsy.centralrepository.datamodel.EamDb.SCHEMA_VERSION = 1
staticinherited

Definition at line 34 of file EamDb.java.


The documentation for this class was generated from the following file:

Copyright © 2012-2016 Basis Technology. Generated on: Mon May 7 2018
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.