Autopsy
4.7.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 |
final String | DB_NAMES_REGEX = "[a-z][a-z0-9_]*" |
final String | DB_USER_NAMES_REGEX = "[a-zA-Z]\\w*" |
String | dbName |
final String | DEFAULT_DBNAME = "central_repository" |
final String | DEFAULT_HOST = "" |
final String | DEFAULT_PASSWORD = "" |
final int | DEFAULT_PORT = 5432 |
final String | DEFAULT_USERNAME = "" |
String | host |
final String | JDBC_BASE_URI = "jdbc:postgresql://" |
final String | JDBC_DRIVER = "org.postgresql.Driver" |
String | password |
int | port |
String | userName |
final String | VALIDATION_QUERY = "SELECT version()" |
Static Private Attributes | |
static final Logger | LOGGER = Logger.getLogger(PostgresEamDbSettings.class.getName()) |
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 41 of file PostgresEamDbSettings.java.
org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.PostgresEamDbSettings | ( | ) |
Definition at line 61 of file PostgresEamDbSettings.java.
References org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.loadSettings().
boolean org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.createDatabase | ( | ) |
Definition at line 249 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 270 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 552 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 163 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 513 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 609 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 531 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 590 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 302 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.CorrelationAttribute.FILES_TYPE_ID, org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttribute.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 483 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 65 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 122 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 579 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 559 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 520 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 616 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 538 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 597 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 188 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 204 of file PostgresEamDbSettings.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.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 237 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 57 of file PostgresEamDbSettings.java.
Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.setBulkThreshold().
|
private |
Definition at line 52 of file PostgresEamDbSettings.java.
|
private |
Definition at line 53 of file PostgresEamDbSettings.java.
|
private |
Definition at line 56 of file PostgresEamDbSettings.java.
|
private |
Definition at line 46 of file PostgresEamDbSettings.java.
Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.loadSettings().
|
private |
Definition at line 44 of file PostgresEamDbSettings.java.
Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.loadSettings().
|
private |
Definition at line 48 of file PostgresEamDbSettings.java.
Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.loadSettings().
|
private |
Definition at line 45 of file PostgresEamDbSettings.java.
Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.loadSettings().
|
private |
Definition at line 47 of file PostgresEamDbSettings.java.
Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.loadSettings().
|
private |
Definition at line 54 of file PostgresEamDbSettings.java.
Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.getHost(), and org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.setHost().
|
private |
Definition at line 50 of file PostgresEamDbSettings.java.
|
private |
Definition at line 51 of file PostgresEamDbSettings.java.
|
staticprivate |
Definition at line 43 of file PostgresEamDbSettings.java.
|
private |
Definition at line 59 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 55 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 58 of file PostgresEamDbSettings.java.
Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.getUserName(), and org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.setUserName().
|
private |
Definition at line 49 of file PostgresEamDbSettings.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.