Autopsy
4.7.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 |
final String | DB_NAMES_REGEX = "[a-z][a-z0-9_]*(\\.db)?" |
String | dbDirectory |
String | dbName |
final String | DEFAULT_DBDIRECTORY = PlatformUtil.getUserDirectory() + File.separator + "central_repository" |
final String | DEFAULT_DBNAME = "central_repository.db" |
final String | JDBC_BASE_URI = "jdbc:sqlite:" |
final String | JDBC_DRIVER = "org.sqlite.JDBC" |
final String | VALIDATION_QUERY = "SELECT count(*) from sqlite_master" |
Static Private Attributes | |
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" |
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 41 of file SqliteEamDbSettings.java.
org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.SqliteEamDbSettings | ( | ) |
Definition at line 61 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 137 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 118 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 104 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 156 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 498 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 456 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 182 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 522 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 244 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.CorrelationAttribute.FILES_TYPE_ID, org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttribute.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 430 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 65 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 91 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 509 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 465 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 205 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 222 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 59 of file SqliteEamDbSettings.java.
|
private |
Definition at line 56 of file SqliteEamDbSettings.java.
|
private |
Definition at line 58 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 57 of file SqliteEamDbSettings.java.
Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.getDbName(), and org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.setDbName().
|
private |
Definition at line 45 of file SqliteEamDbSettings.java.
Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.loadSettings().
|
private |
Definition at line 44 of file SqliteEamDbSettings.java.
Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.loadSettings().
|
private |
Definition at line 47 of file SqliteEamDbSettings.java.
|
private |
Definition at line 46 of file SqliteEamDbSettings.java.
|
staticprivate |
Definition at line 43 of file SqliteEamDbSettings.java.
|
staticprivate |
Definition at line 53 of file SqliteEamDbSettings.java.
|
staticprivate |
Definition at line 55 of file SqliteEamDbSettings.java.
|
staticprivate |
Definition at line 51 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 50 of file SqliteEamDbSettings.java.
|
staticprivate |
Definition at line 49 of file SqliteEamDbSettings.java.
|
private |
Definition at line 48 of file SqliteEamDbSettings.java.
Copyright © 2012-2016 Basis Technology. Generated on: Mon Jun 18 2018
This work is licensed under a
Creative Commons Attribution-Share Alike 3.0 United States License.