Autopsy  4.7.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings Class Reference

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())
 

Detailed Description

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.

Constructor & Destructor Documentation

org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.PostgresEamDbSettings ( )

Member Function Documentation

boolean org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.createDatabase ( )
boolean org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.deleteDatabase ( )
String org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.getDbName ( )
Connection org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.getEphemeralConnection ( boolean  usePostgresDb)
private
String org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.getHost ( )
String org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.getPassword ( )
int org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.getPort ( )
String org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.getUserName ( )
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 ( )
void org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.loadSettings ( )
void org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.saveSettings ( )
void org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.setBulkThreshold ( int  bulkThreshold) throws EamDbException
Parameters
bulkThresholdthe 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
void org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.setHost ( String  host) throws EamDbException
void org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.setPassword ( String  password) throws EamDbException
void org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.setPort ( int  port) throws EamDbException
void org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.setUserName ( String  userName) throws EamDbException
boolean org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.verifyConnection ( )
boolean org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.verifyDatabaseExists ( )
boolean org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.verifyDatabaseSchema ( )

Member Data Documentation

int org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.bulkThreshold
private
final String org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.DB_NAMES_REGEX = "[a-z][a-z0-9_]*"
private

Definition at line 52 of file PostgresEamDbSettings.java.

final String org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.DB_USER_NAMES_REGEX = "[a-zA-Z]\\w*"
private

Definition at line 53 of file PostgresEamDbSettings.java.

String org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.dbName
private

Definition at line 56 of file PostgresEamDbSettings.java.

final String org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.DEFAULT_DBNAME = "central_repository"
private
final String org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.DEFAULT_HOST = ""
private
final String org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.DEFAULT_PASSWORD = ""
private
final int org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.DEFAULT_PORT = 5432
private
final String org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.DEFAULT_USERNAME = ""
private
String org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.host
private
final String org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.JDBC_BASE_URI = "jdbc:postgresql://"
private

Definition at line 50 of file PostgresEamDbSettings.java.

final String org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.JDBC_DRIVER = "org.postgresql.Driver"
private

Definition at line 51 of file PostgresEamDbSettings.java.

final Logger org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.LOGGER = Logger.getLogger(PostgresEamDbSettings.class.getName())
staticprivate

Definition at line 43 of file PostgresEamDbSettings.java.

String org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.password
private
int org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.port
private
String org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.userName
private
final String org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.VALIDATION_QUERY = "SELECT version()"
private

Definition at line 49 of file PostgresEamDbSettings.java.


The documentation for this class was generated from the following file:

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.