Autopsy
4.12.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
|
Public Member Functions | |
SqliteEamDbSettings () | |
boolean | createDbDirectory () |
boolean | dbDirectoryExists () |
boolean | dbFileExists () |
boolean | deleteDatabase () |
String | getDbDirectory () |
String | getDbName () |
String | getFileNameWithPath () |
boolean | initializeDatabaseSchema () |
boolean | insertDefaultDatabaseContent () |
void | loadSettings () |
void | saveSettings () |
void | setDbDirectory (String dbDirectory) throws EamDbException |
void | setDbName (String dbName) throws EamDbException |
boolean | verifyConnection () |
boolean | verifyDatabaseSchema () |
Private Member Functions | |
Connection | getEphemeralConnection () |
Private Attributes | |
int | bulkThreshold |
String | dbDirectory |
String | dbName |
Static Private Attributes | |
static final String | DB_NAMES_REGEX = "[a-z][a-z0-9_]*(\\.db)?" |
static final String | DEFAULT_DBDIRECTORY = PlatformUtil.getUserDirectory() + File.separator + "central_repository" |
static final String | DEFAULT_DBNAME = "central_repository.db" |
static final String | JDBC_BASE_URI = "jdbc:sqlite:" |
static final String | JDBC_DRIVER = "org.sqlite.JDBC" |
static final Logger | LOGGER = Logger.getLogger(SqliteEamDbSettings.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_NORMAL = "PRAGMA synchronous = NORMAL" |
static final String | PRAGMA_SYNC_OFF = "PRAGMA synchronous = OFF" |
static final String | VALIDATION_QUERY = "SELECT count(*) from sqlite_master" |
Settings for the sqlite implementation of the Central Repository database
NOTE: This is public scope because the options panel calls it directly to set/get
Definition at line 43 of file SqliteEamDbSettings.java.
org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.SqliteEamDbSettings | ( | ) |
Definition at line 63 of file SqliteEamDbSettings.java.
References org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.loadSettings().
boolean org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.createDbDirectory | ( | ) |
Create the db directory if it does not exist.
Definition at line 139 of file SqliteEamDbSettings.java.
References org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.dbDirectoryExists(), and org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.getDbDirectory().
Referenced by org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.createDb(), and org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.saveSettings().
boolean org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.dbDirectoryExists | ( | ) |
Verify that the db directory path exists.
Definition at line 120 of file SqliteEamDbSettings.java.
References org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.getDbDirectory().
Referenced by org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.createDb(), org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.createDbDirectory(), and org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.getEphemeralConnection().
boolean org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.dbFileExists | ( | ) |
Verify that the db file exists.
Definition at line 106 of file SqliteEamDbSettings.java.
References org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.getFileNameWithPath().
Referenced by org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.testDbSettings().
boolean org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.deleteDatabase | ( | ) |
Delete the database
Definition at line 159 of file SqliteEamDbSettings.java.
References org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.getFileNameWithPath().
Referenced by org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.createDb().
String org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.getDbDirectory | ( | ) |
Definition at line 595 of file SqliteEamDbSettings.java.
References org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.dbDirectory.
Referenced by org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.bnDatabasePathFileOpenActionPerformed(), org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.createDbDirectory(), org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.dbDirectoryExists(), org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.getFileNameWithPath(), org.sleuthkit.autopsy.centralrepository.optionspanel.GlobalSettingsPanel.load(), org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.saveSettings(), and org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.updateSqliteFields().
String org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.getDbName | ( | ) |
Definition at line 555 of file SqliteEamDbSettings.java.
References org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.dbName.
Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.getFileNameWithPath(), org.sleuthkit.autopsy.centralrepository.optionspanel.GlobalSettingsPanel.load(), and org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.saveSettings().
|
private |
Use the current settings to get an ephemeral client connection for testing.
If the directory path does not exist, it will return null.
Definition at line 185 of file SqliteEamDbSettings.java.
References org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.dbDirectoryExists().
Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.initializeDatabaseSchema(), org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.insertDefaultDatabaseContent(), org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.verifyConnection(), and org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.verifyDatabaseSchema().
String org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.getFileNameWithPath | ( | ) |
Join the DbDirectory and the DbName into a full path.
Definition at line 619 of file SqliteEamDbSettings.java.
References org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.getDbDirectory(), and org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.getDbName().
Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.dbFileExists(), and org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.deleteDatabase().
boolean org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.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 247 of file SqliteEamDbSettings.java.
References org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil.closeConnection(), org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil.correlationTypeToInstanceTableName(), org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil.correlationTypeToReferenceTableName(), org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttributeInstance.FILES_TYPE_ID, org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttributeInstance.getDefaultCorrelationTypes(), and org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.getEphemeralConnection().
Referenced by org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.createDb().
boolean org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.insertDefaultDatabaseContent | ( | ) |
Definition at line 531 of file SqliteEamDbSettings.java.
References org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil.closeConnection(), org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.getEphemeralConnection(), and org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil.insertDefaultCorrelationTypes().
Referenced by org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.createDb().
void org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.loadSettings | ( | ) |
Definition at line 67 of file SqliteEamDbSettings.java.
References org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.DEFAULT_DBDIRECTORY, org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.DEFAULT_DBNAME, and org.sleuthkit.autopsy.coreutils.ModuleSettings.getConfigSetting().
Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.SqliteEamDbSettings().
void org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.saveSettings | ( | ) |
Definition at line 93 of file SqliteEamDbSettings.java.
References org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.createDbDirectory(), org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.getDbDirectory(), org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.getDbName(), and org.sleuthkit.autopsy.coreutils.ModuleSettings.setConfigSetting().
Referenced by org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.bnOkActionPerformed().
void org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.setDbDirectory | ( | String | dbDirectory | ) | throws EamDbException |
Path for directory to hold the sqlite database.
User must have WRITE permission to this directory.
dbDirectory | the dbDirectory to set |
Definition at line 606 of file SqliteEamDbSettings.java.
References org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.dbDirectory.
Referenced by org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.databaseSettingsAreValid().
void org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.setDbName | ( | String | dbName | ) | throws EamDbException |
Name of the sqlite db file.
dbName | the dbName to set |
Definition at line 564 of file SqliteEamDbSettings.java.
References org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.dbName.
Referenced by org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.databaseSettingsAreValid().
boolean org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.verifyConnection | ( | ) |
Use the current settings and the validation query to test the connection to the database.
Definition at line 208 of file SqliteEamDbSettings.java.
References org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil.closeConnection(), org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil.executeValidationQuery(), and org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.getEphemeralConnection().
Referenced by org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.testDbSettings().
boolean org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.verifyDatabaseSchema | ( | ) |
Use the current settings and the schema version query to test the database schema.
Definition at line 225 of file SqliteEamDbSettings.java.
References org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil.closeConnection(), org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.getEphemeralConnection(), and org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil.schemaVersionIsSet().
Referenced by org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.testDbSettings().
|
private |
Definition at line 61 of file SqliteEamDbSettings.java.
|
staticprivate |
Definition at line 58 of file SqliteEamDbSettings.java.
|
private |
Definition at line 60 of file SqliteEamDbSettings.java.
Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.getDbDirectory(), and org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.setDbDirectory().
|
private |
Definition at line 59 of file SqliteEamDbSettings.java.
Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.getDbName(), and org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.setDbName().
|
staticprivate |
Definition at line 47 of file SqliteEamDbSettings.java.
Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.loadSettings().
|
staticprivate |
Definition at line 46 of file SqliteEamDbSettings.java.
Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.loadSettings().
|
staticprivate |
Definition at line 49 of file SqliteEamDbSettings.java.
|
staticprivate |
Definition at line 48 of file SqliteEamDbSettings.java.
|
staticprivate |
Definition at line 45 of file SqliteEamDbSettings.java.
|
staticprivate |
Definition at line 55 of file SqliteEamDbSettings.java.
|
staticprivate |
Definition at line 57 of file SqliteEamDbSettings.java.
|
staticprivate |
Definition at line 53 of file SqliteEamDbSettings.java.
|
staticprivate |
Definition at line 56 of file SqliteEamDbSettings.java.
|
staticprivate |
Definition at line 54 of file SqliteEamDbSettings.java.
|
staticprivate |
Definition at line 52 of file SqliteEamDbSettings.java.
|
staticprivate |
Definition at line 51 of file SqliteEamDbSettings.java.
|
staticprivate |
Definition at line 50 of file SqliteEamDbSettings.java.
Copyright © 2012-2018 Basis Technology. Generated on: Wed Sep 18 2019
This work is licensed under a
Creative Commons Attribution-Share Alike 3.0 United States License.