Autopsy
4.17.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
|
Public Member Functions | |
RdbmsCentralRepoFactory (CentralRepoPlatforms selectedPlatform, SqliteCentralRepoSettings repoSettings) throws CentralRepoException | |
RdbmsCentralRepoFactory (CentralRepoPlatforms selectedPlatform, PostgresCentralRepoSettings repoSettings) throws CentralRepoException | |
boolean | initializeDatabaseSchema () |
boolean | insertDefaultDatabaseContent () |
Private Member Functions | |
Connection | getEphemeralConnection () |
Private Attributes | |
final PostgresCentralRepoSettings | postgresCentralRepoSettings |
final CentralRepoPlatforms | selectedPlatform |
final SqliteCentralRepoSettings | sqliteCentralRepoSettings |
Static Private Attributes | |
static final Logger | LOGGER = Logger.getLogger(RdbmsCentralRepoFactory.class.getName()) |
static final String | PRAGMA_ENCODING_UTF8 = "PRAGMA encoding = 'UTF-8'" |
static final String | PRAGMA_FOREIGN_KEYS_ON = "PRAGMA foreign_keys = ON" |
static final String | PRAGMA_JOURNAL_WAL = "PRAGMA journal_mode = WAL" |
static final String | PRAGMA_PAGE_SIZE_4096 = "PRAGMA page_size = 4096" |
static final String | PRAGMA_READ_UNCOMMITTED_TRUE = "PRAGMA read_uncommitted = True" |
static final String | PRAGMA_SYNC_OFF = "PRAGMA synchronous = OFF" |
Creates the CR schema and populates it with initial data.
Definition at line 38 of file RdbmsCentralRepoFactory.java.
org.sleuthkit.autopsy.centralrepository.datamodel.RdbmsCentralRepoFactory.RdbmsCentralRepoFactory | ( | CentralRepoPlatforms | selectedPlatform, |
SqliteCentralRepoSettings | repoSettings | ||
) | throws CentralRepoException |
Definition at line 58 of file RdbmsCentralRepoFactory.java.
References org.sleuthkit.autopsy.centralrepository.datamodel.RdbmsCentralRepoFactory.selectedPlatform.
org.sleuthkit.autopsy.centralrepository.datamodel.RdbmsCentralRepoFactory.RdbmsCentralRepoFactory | ( | CentralRepoPlatforms | selectedPlatform, |
PostgresCentralRepoSettings | repoSettings | ||
) | throws CentralRepoException |
Definition at line 65 of file RdbmsCentralRepoFactory.java.
References org.sleuthkit.autopsy.centralrepository.datamodel.RdbmsCentralRepoFactory.selectedPlatform.
|
staticprivate |
Definition at line 281 of file RdbmsCentralRepoFactory.java.
Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.RdbmsCentralRepoFactory.initializeDatabaseSchema().
|
staticprivate |
Definition at line 277 of file RdbmsCentralRepoFactory.java.
Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.RdbmsCentralRepoFactory.initializeDatabaseSchema().
|
staticprivate |
Returns Create Table SQL for Cases table.
selectedPlatform | CR database platform. |
Definition at line 259 of file RdbmsCentralRepoFactory.java.
References org.sleuthkit.autopsy.centralrepository.datamodel.RdbmsCentralRepoFactory.getNumericPrimaryKeyClause(), and org.sleuthkit.autopsy.centralrepository.datamodel.RdbmsCentralRepoFactory.getOnConflictIgnoreClause().
Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.RdbmsCentralRepoFactory.initializeDatabaseSchema().
|
staticprivate |
Returns the SQL statement to create correlation_types table.
selectedPlatform | CR database platform. |
Definition at line 354 of file RdbmsCentralRepoFactory.java.
References org.sleuthkit.autopsy.centralrepository.datamodel.RdbmsCentralRepoFactory.getNumericPrimaryKeyClause().
Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.RdbmsCentralRepoFactory.initializeDatabaseSchema().
|
staticprivate |
|
staticprivate |
Returns Create Table SQL for Organizations table.
selectedPlatform | CR database platform. |
Definition at line 235 of file RdbmsCentralRepoFactory.java.
References org.sleuthkit.autopsy.centralrepository.datamodel.RdbmsCentralRepoFactory.getNumericPrimaryKeyClause().
Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.RdbmsCentralRepoFactory.initializeDatabaseSchema().
|
staticprivate |
|
private |
Returns an ephemeral connection to the CR database.
Definition at line 593 of file RdbmsCentralRepoFactory.java.
Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.RdbmsCentralRepoFactory.initializeDatabaseSchema(), and org.sleuthkit.autopsy.centralrepository.datamodel.RdbmsCentralRepoFactory.insertDefaultDatabaseContent().
|
staticprivate |
Builds SQL clause for a numeric primary key. Produces correct SQL based on the selected CR platform/RDMBS.
pkName | name of primary key. |
selectedPlatform | The selected platform. |
Definition at line 532 of file RdbmsCentralRepoFactory.java.
Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.RdbmsCentralRepoFactory.getCreateCasesTableStatement(), org.sleuthkit.autopsy.centralrepository.datamodel.RdbmsCentralRepoFactory.getCreateCorrelationTypesTableStatement(), org.sleuthkit.autopsy.centralrepository.datamodel.RdbmsCentralRepoFactory.getCreateDbInfoTableStatement(), org.sleuthkit.autopsy.centralrepository.datamodel.RdbmsCentralRepoFactory.getCreateOrganizationsTableStatement(), org.sleuthkit.autopsy.centralrepository.datamodel.RdbmsCentralRepoFactory.getCreateReferenceSetsTableStatement(), and org.sleuthkit.autopsy.centralrepository.datamodel.RdbmsCentralRepoFactory.getReferenceTypesTableTemplate().
|
staticprivate |
Definition at line 578 of file RdbmsCentralRepoFactory.java.
|
staticprivate |
Returns ON CONFLICT IGNORE clause for the specified database platform.
Definition at line 550 of file RdbmsCentralRepoFactory.java.
Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.RdbmsCentralRepoFactory.getCreateCasesTableStatement(), and org.sleuthkit.autopsy.centralrepository.datamodel.RdbmsCentralRepoFactory.getReferenceTypesTableTemplate().
|
staticprivate |
Definition at line 306 of file RdbmsCentralRepoFactory.java.
Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.RdbmsCentralRepoFactory.initializeDatabaseSchema().
|
staticprivate |
Returns the template string to create reference_TYPE tables.
selectedPlatform | CR database platform. |
Definition at line 317 of file RdbmsCentralRepoFactory.java.
References org.sleuthkit.autopsy.centralrepository.datamodel.RdbmsCentralRepoFactory.getNumericPrimaryKeyClause(), and org.sleuthkit.autopsy.centralrepository.datamodel.RdbmsCentralRepoFactory.getOnConflictIgnoreClause().
Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.RdbmsCentralRepoFactory.initializeDatabaseSchema().
|
staticprivate |
Returns SQL string template to create a value index on ReferenceType table.
Definition at line 335 of file RdbmsCentralRepoFactory.java.
Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.RdbmsCentralRepoFactory.initializeDatabaseSchema().
|
staticprivate |
Returns SQL string template to create a value/known_status index on ReferenceType table.
Definition at line 343 of file RdbmsCentralRepoFactory.java.
Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.RdbmsCentralRepoFactory.initializeDatabaseSchema().
boolean org.sleuthkit.autopsy.centralrepository.datamodel.RdbmsCentralRepoFactory.initializeDatabaseSchema | ( | ) |
Initialize the database schema.
Requires valid connectionPool.
This method is called from within connect(), so we cannot call connect() to get a connection. This method is called after setupConnectionPool(), so it is safe to assume that a valid connectionPool exists. The implementation of connect() is synchronized, so we can safely use the connectionPool object directly.
Definition at line 83 of file RdbmsCentralRepoFactory.java.
References org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbUtil.correlationTypeToInstanceTableName(), org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbUtil.correlationTypeToReferenceTableName(), org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttributeInstance.FILES_TYPE_ID, org.sleuthkit.autopsy.centralrepository.datamodel.RdbmsCentralRepoFactory.getCasesCaseUidIndexStatement(), org.sleuthkit.autopsy.centralrepository.datamodel.RdbmsCentralRepoFactory.getCasesOrgIdIndexStatement(), org.sleuthkit.autopsy.centralrepository.datamodel.RdbmsCentralRepoFactory.getCreateCasesTableStatement(), org.sleuthkit.autopsy.centralrepository.datamodel.RdbmsCentralRepoFactory.getCreateCorrelationTypesTableStatement(), org.sleuthkit.autopsy.centralrepository.datamodel.RdbmsCentralRepoFactory.getCreateDbInfoTableStatement(), org.sleuthkit.autopsy.centralrepository.datamodel.RdbmsCentralRepoFactory.getCreateOrganizationsTableStatement(), org.sleuthkit.autopsy.centralrepository.datamodel.RdbmsCentralRepoFactory.getCreateReferenceSetsTableStatement(), org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttributeInstance.getDefaultCorrelationTypes(), org.sleuthkit.autopsy.centralrepository.datamodel.RdbmsCentralRepoFactory.getEphemeralConnection(), org.sleuthkit.autopsy.centralrepository.datamodel.RdbmsCentralRepoFactory.getReferenceSetsOrgIdIndexTemplate(), org.sleuthkit.autopsy.centralrepository.datamodel.RdbmsCentralRepoFactory.getReferenceTypesTableTemplate(), org.sleuthkit.autopsy.centralrepository.datamodel.RdbmsCentralRepoFactory.getReferenceTypeValueIndexTemplate(), org.sleuthkit.autopsy.centralrepository.datamodel.RdbmsCentralRepoFactory.getReferenceTypeValueKnownstatusIndexTemplate(), and org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoPlatforms.SQLITE.
Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbManager.createDb().
boolean org.sleuthkit.autopsy.centralrepository.datamodel.RdbmsCentralRepoFactory.insertDefaultDatabaseContent | ( | ) |
Inserts default data in CR database.
Definition at line 193 of file RdbmsCentralRepoFactory.java.
References org.sleuthkit.autopsy.centralrepository.datamodel.RdbmsCentralRepoFactory.getEphemeralConnection(), and org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbUtil.insertDefaultCorrelationTypes().
Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbManager.createDb().
|
staticprivate |
Definition at line 40 of file RdbmsCentralRepoFactory.java.
|
private |
Definition at line 45 of file RdbmsCentralRepoFactory.java.
|
staticprivate |
Definition at line 52 of file RdbmsCentralRepoFactory.java.
|
staticprivate |
Definition at line 54 of file RdbmsCentralRepoFactory.java.
|
staticprivate |
Definition at line 50 of file RdbmsCentralRepoFactory.java.
|
staticprivate |
Definition at line 53 of file RdbmsCentralRepoFactory.java.
|
staticprivate |
Definition at line 51 of file RdbmsCentralRepoFactory.java.
|
staticprivate |
Definition at line 49 of file RdbmsCentralRepoFactory.java.
|
private |
Definition at line 43 of file RdbmsCentralRepoFactory.java.
Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.RdbmsCentralRepoFactory.RdbmsCentralRepoFactory().
|
private |
Definition at line 44 of file RdbmsCentralRepoFactory.java.
Copyright © 2012-2021 Basis Technology. Generated on: Tue Jan 19 2021
This work is licensed under a
Creative Commons Attribution-Share Alike 3.0 United States License.