Autopsy
4.12.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
|
Public Member Functions | |
PostgresEamDbSettings () | |
boolean | createDatabase () |
boolean | deleteDatabase () |
String | getDbName () |
String | getHost () |
String | getPassword () |
int | getPort () |
String | getUserName () |
boolean | initializeDatabaseSchema () |
boolean | insertDefaultDatabaseContent () |
void | loadSettings () |
void | saveSettings () |
void | setBulkThreshold (int bulkThreshold) throws EamDbException |
void | setDbName (String dbName) throws EamDbException |
void | setHost (String host) throws EamDbException |
void | setPassword (String password) throws EamDbException |
void | setPort (int port) throws EamDbException |
void | setUserName (String userName) throws EamDbException |
boolean | verifyConnection () |
boolean | verifyDatabaseExists () |
boolean | verifyDatabaseSchema () |
Private Member Functions | |
Connection | getEphemeralConnection (boolean usePostgresDb) |
Private Attributes | |
int | bulkThreshold |
String | dbName |
String | host |
String | password |
int | port |
String | userName |
Static Private Attributes | |
static final String | DB_NAMES_REGEX = "[a-z][a-z0-9_]*" |
static final String | DB_USER_NAMES_REGEX = "[a-zA-Z]\\w*" |
static final String | DEFAULT_DBNAME = "central_repository" |
static final String | DEFAULT_HOST = "" |
static final String | DEFAULT_PASSWORD = "" |
static final int | DEFAULT_PORT = 5432 |
static final String | DEFAULT_USERNAME = "" |
static final String | JDBC_BASE_URI = "jdbc:postgresql://" |
static final String | JDBC_DRIVER = "org.postgresql.Driver" |
static final Logger | LOGGER = Logger.getLogger(PostgresEamDbSettings.class.getName()) |
static final String | VALIDATION_QUERY = "SELECT version()" |
Settings for the Postgres 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 PostgresEamDbSettings.java.
org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.PostgresEamDbSettings | ( | ) |
Definition at line 63 of file PostgresEamDbSettings.java.
References org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.loadSettings().
boolean org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.createDatabase | ( | ) |
Definition at line 251 of file PostgresEamDbSettings.java.
References org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil.closeConnection(), org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.getDbName(), org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.getEphemeralConnection(), and org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.getUserName().
Referenced by org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.createDb().
boolean org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.deleteDatabase | ( | ) |
Definition at line 272 of file PostgresEamDbSettings.java.
References org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil.closeConnection(), org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.getDbName(), and org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.getEphemeralConnection().
Referenced by org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.createDb().
String org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.getDbName | ( | ) |
To prevent issues where one command can honor case and another cannot, we will force the dbname to lower case.
Definition at line 651 of file PostgresEamDbSettings.java.
Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.createDatabase(), org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.deleteDatabase(), org.sleuthkit.autopsy.centralrepository.optionspanel.GlobalSettingsPanel.load(), org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.saveSettings(), and org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.verifyDatabaseExists().
|
private |
Use the current settings to get an ephemeral client connection for testing.
Definition at line 165 of file PostgresEamDbSettings.java.
References org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.getPassword(), and org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.getUserName().
Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.createDatabase(), org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.deleteDatabase(), org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.initializeDatabaseSchema(), org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.insertDefaultDatabaseContent(), org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.verifyConnection(), org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.verifyDatabaseExists(), and org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.verifyDatabaseSchema().
String org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.getHost | ( | ) |
Definition at line 612 of file PostgresEamDbSettings.java.
References org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.host.
Referenced by org.sleuthkit.autopsy.centralrepository.optionspanel.GlobalSettingsPanel.load(), org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.saveSettings(), and org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.updatePostgresFields().
String org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.getPassword | ( | ) |
Definition at line 708 of file PostgresEamDbSettings.java.
References org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.password.
Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.getEphemeralConnection(), org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.saveSettings(), and org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.updatePostgresFields().
int org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.getPort | ( | ) |
Definition at line 630 of file PostgresEamDbSettings.java.
References org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.port.
Referenced by org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.updatePostgresFields().
String org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.getUserName | ( | ) |
Definition at line 689 of file PostgresEamDbSettings.java.
References org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.userName.
Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.createDatabase(), org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.getEphemeralConnection(), org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.saveSettings(), and org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.updatePostgresFields().
boolean org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.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 304 of file PostgresEamDbSettings.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.PostgresEamDbSettings.getEphemeralConnection().
Referenced by org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.createDb().
boolean org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.insertDefaultDatabaseContent | ( | ) |
Definition at line 584 of file PostgresEamDbSettings.java.
References org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil.closeConnection(), org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.getEphemeralConnection(), and org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil.insertDefaultCorrelationTypes().
Referenced by org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.createDb().
void org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.loadSettings | ( | ) |
Definition at line 67 of file PostgresEamDbSettings.java.
References org.sleuthkit.autopsy.coreutils.TextConverter.convertHexTextToText(), org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.DEFAULT_DBNAME, org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.DEFAULT_HOST, org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.DEFAULT_PASSWORD, org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.DEFAULT_PORT, org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.DEFAULT_USERNAME, and org.sleuthkit.autopsy.coreutils.ModuleSettings.getConfigSetting().
Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.PostgresEamDbSettings().
void org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.saveSettings | ( | ) |
Definition at line 124 of file PostgresEamDbSettings.java.
References org.sleuthkit.autopsy.coreutils.TextConverter.convertTextToHexText(), org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.getDbName(), org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.getHost(), org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.getPassword(), org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.getUserName(), and org.sleuthkit.autopsy.coreutils.ModuleSettings.setConfigSetting().
Referenced by org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.bnOkActionPerformed().
void org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.setBulkThreshold | ( | int | bulkThreshold | ) | throws EamDbException |
bulkThreshold | the bulkThreshold to set |
Definition at line 678 of file PostgresEamDbSettings.java.
References org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.bulkThreshold.
void org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.setDbName | ( | String | dbName | ) | throws EamDbException |
dbName | the dbName to set |
Definition at line 658 of file PostgresEamDbSettings.java.
Referenced by org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.databaseSettingsAreValid().
void org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.setHost | ( | String | host | ) | throws EamDbException |
host | the host to set |
Definition at line 619 of file PostgresEamDbSettings.java.
References org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.host.
Referenced by org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.databaseSettingsAreValid().
void org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.setPassword | ( | String | password | ) | throws EamDbException |
password | the password to set |
Definition at line 715 of file PostgresEamDbSettings.java.
References org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.password.
Referenced by org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.databaseSettingsAreValid().
void org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.setPort | ( | int | port | ) | throws EamDbException |
port | the port to set |
Definition at line 637 of file PostgresEamDbSettings.java.
References org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.port.
Referenced by org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.databaseSettingsAreValid().
void org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.setUserName | ( | String | userName | ) | throws EamDbException |
userName | the userName to set |
Definition at line 696 of file PostgresEamDbSettings.java.
References org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.userName.
Referenced by org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.databaseSettingsAreValid().
boolean org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.verifyConnection | ( | ) |
Use the current settings and the validation query to test the connection to the database.
Definition at line 190 of file PostgresEamDbSettings.java.
References org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil.closeConnection(), org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil.executeValidationQuery(), and org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.getEphemeralConnection().
Referenced by org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.testDbSettings().
boolean org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.verifyDatabaseExists | ( | ) |
Check to see if the database exists.
Definition at line 206 of file PostgresEamDbSettings.java.
References org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil.closeConnection(), org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil.closeResultSet(), org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil.closeStatement(), org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.getDbName(), and org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.getEphemeralConnection().
Referenced by org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.createDb(), and org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.testDbSettings().
boolean org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.verifyDatabaseSchema | ( | ) |
Use the current settings and the schema version query to test the database schema.
Definition at line 239 of file PostgresEamDbSettings.java.
References org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil.closeConnection(), org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.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 PostgresEamDbSettings.java.
Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.setBulkThreshold().
|
staticprivate |
Definition at line 54 of file PostgresEamDbSettings.java.
|
staticprivate |
Definition at line 55 of file PostgresEamDbSettings.java.
|
private |
Definition at line 58 of file PostgresEamDbSettings.java.
|
staticprivate |
Definition at line 48 of file PostgresEamDbSettings.java.
Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.loadSettings().
|
staticprivate |
Definition at line 46 of file PostgresEamDbSettings.java.
Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.loadSettings().
|
staticprivate |
Definition at line 50 of file PostgresEamDbSettings.java.
Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.loadSettings().
|
staticprivate |
Definition at line 47 of file PostgresEamDbSettings.java.
Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.loadSettings().
|
staticprivate |
Definition at line 49 of file PostgresEamDbSettings.java.
Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.loadSettings().
|
private |
Definition at line 56 of file PostgresEamDbSettings.java.
Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.getHost(), and org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.setHost().
|
staticprivate |
Definition at line 52 of file PostgresEamDbSettings.java.
|
staticprivate |
Definition at line 53 of file PostgresEamDbSettings.java.
|
staticprivate |
Definition at line 45 of file PostgresEamDbSettings.java.
|
private |
Definition at line 61 of file PostgresEamDbSettings.java.
Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.getPassword(), and org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.setPassword().
|
private |
Definition at line 57 of file PostgresEamDbSettings.java.
Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.getPort(), and org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.setPort().
|
private |
Definition at line 60 of file PostgresEamDbSettings.java.
Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.getUserName(), and org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.setUserName().
|
staticprivate |
Definition at line 51 of file PostgresEamDbSettings.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.