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

Inherits JDialog.

Classes

class  DbChoiceRenderer
 
class  TextBoxChangedListener
 

Public Member Functions

 EamDbSettingsDialog ()
 
 EamDbSettingsDialog (CentralRepoDbChoice initialMenuItem)
 
boolean wasConfigurationChanged ()
 

Static Public Member Functions

static boolean promptCreateDatabase (CentralRepoDbManager manager, EamDbSettingsDialog dialog)
 
static boolean testStatusAndCreate (Component parent, CentralRepoDbManager manager)
 

Private Member Functions

void bnCancelActionPerformed (java.awt.event.ActionEvent evt)
 
void bnDatabasePathFileOpenActionPerformed (java.awt.event.ActionEvent evt)
 
void bnOkActionPerformed (java.awt.event.ActionEvent evt)
 
void cbDatabaseTypeActionPerformed (java.awt.event.ActionEvent evt)
 
void changeDbSelection (CentralRepoDbChoice selectedItem)
 
boolean checkFields ()
 
void customizeComponents ()
 
boolean databaseFieldsArePopulated ()
 
boolean databaseSettingsAreValid ()
 
void display ()
 
void displayDatabaseSettings (CentralRepoDbChoice choice)
 
boolean enableOkButton (boolean isValidInput)
 
void initComponents ()
 
boolean isDbChoiceSelectable (CentralRepoDbChoice item)
 
void setTextBoxListeners ()
 
void setTextPrompts ()
 
void setupDbChoice (CentralRepoDbChoice initialMenuItem)
 
void updateFullDbPath ()
 
void updatePostgresFields (boolean enabled)
 
void updateSqliteFields (boolean enabled)
 
boolean valid ()
 

Static Private Member Functions

static void addDocumentListeners (Collection< JTextField > textFields, TextBoxChangedListener listener)
 
static void closePersonasTopComponent ()
 
static void configureTextPrompts (Collection< TextPrompt > textPrompts)
 
static void onPromptStatusError (CentralRepoDbManager manager1)
 
static boolean promptTestStatusWarnings (CentralRepoDbManager manager, EamDbSettingsDialog dialog)
 
static boolean testStatusAndCreate (Component parent, CentralRepoDbManager manager, EamDbSettingsDialog dialog)
 

Private Attributes

javax.swing.JButton bnCancel
 
javax.swing.JButton bnDatabasePathFileOpen
 
javax.swing.JButton bnOk
 
javax.swing.JComboBox< org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbChoicecbDatabaseType
 
javax.swing.JScrollPane dataBaseFileScrollPane
 
javax.swing.JTextArea dataBaseFileTextArea
 
final DbChoiceRenderer DB_CHOICE_RENDERER = new DbChoiceRenderer()
 
javax.swing.JFileChooser fcDatabasePath
 
javax.swing.Box.Filler filler1
 
javax.swing.JPasswordField jpDbPassword
 
javax.swing.JLabel lbDatabaseDesc
 
javax.swing.JLabel lbDatabasePath
 
javax.swing.JLabel lbDatabaseType
 
javax.swing.JLabel lbHostName
 
javax.swing.JLabel lbPort
 
javax.swing.JLabel lbSingleUserSqLite
 
javax.swing.JLabel lbUserName
 
javax.swing.JLabel lbUserPassword
 
final CentralRepoDbManager manager = new CentralRepoDbManager()
 
javax.swing.JPanel pathPanel
 
javax.swing.JPanel pnButtons
 
javax.swing.JPanel pnSQLiteSettings
 
javax.swing.JTextField tbDbHostname
 
javax.swing.JTextField tbDbPort
 
javax.swing.JTextField tbDbUsername
 
final TextBoxChangedListener textBoxChangedListener
 
final Collection< JTextField > textBoxes
 
javax.swing.JTextField tfDatabasePath
 
javax.swing.JPanel typePanel
 

Static Private Attributes

static final Logger logger = Logger.getLogger(EamDbSettingsDialog.class.getName())
 
static final long serialVersionUID = 1L
 

Detailed Description

Configuration dialog for Central Repository database settings.

Definition at line 61 of file EamDbSettingsDialog.java.

Constructor & Destructor Documentation

org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.EamDbSettingsDialog ( )

Definition at line 93 of file EamDbSettingsDialog.java.

org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.EamDbSettingsDialog ( CentralRepoDbChoice  initialMenuItem)

Member Function Documentation

static void org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.addDocumentListeners ( Collection< JTextField >  textFields,
TextBoxChangedListener  listener 
)
staticprivate

Adds a change listener to a collection of text fields.

Parameters
textFieldsThe text fields.
listenerThe change listener.

Definition at line 842 of file EamDbSettingsDialog.java.

void org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.bnCancelActionPerformed ( java.awt.event.ActionEvent  evt)
private

Definition at line 723 of file EamDbSettingsDialog.java.

void org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.bnDatabasePathFileOpenActionPerformed ( java.awt.event.ActionEvent  evt)
private
void org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.bnOkActionPerformed ( java.awt.event.ActionEvent  evt)
private

Definition at line 629 of file EamDbSettingsDialog.java.

void org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.cbDatabaseTypeActionPerformed ( java.awt.event.ActionEvent  evt)
private

Definition at line 728 of file EamDbSettingsDialog.java.

void org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.changeDbSelection ( CentralRepoDbChoice  selectedItem)
private
boolean org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.checkFields ( )
private

Tests whether or not all of the settings components are populated.

Returns
True or false.

Definition at line 875 of file EamDbSettingsDialog.java.

static void org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.closePersonasTopComponent ( )
staticprivate

Closes Personas top component if it exists.

Definition at line 702 of file EamDbSettingsDialog.java.

static void org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.configureTextPrompts ( Collection< TextPrompt textPrompts)
staticprivate

Sets the foreground color and transparency of a collection of text prompts.

Parameters
textPromptsThe text prompts to configure.

Definition at line 828 of file EamDbSettingsDialog.java.

void org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.customizeComponents ( )
private
boolean org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.databaseFieldsArePopulated ( )
private
boolean org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.databaseSettingsAreValid ( )
private

Tests whether or not the database settings are valid.

Returns
True or false.

Definition at line 911 of file EamDbSettingsDialog.java.

References org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbManager.testDatabaseSettingsAreValid().

void org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.display ( )
private

Definition at line 603 of file EamDbSettingsDialog.java.

void org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.displayDatabaseSettings ( CentralRepoDbChoice  choice)
private
boolean org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.enableOkButton ( boolean  isValidInput)
private

Enable the "OK" button if the db test passed. Disabled defaults to db test passed.

Returns
true

Definition at line 896 of file EamDbSettingsDialog.java.

void org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.initComponents ( )
private

This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.

Definition at line 255 of file EamDbSettingsDialog.java.

References org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbChoice.DB_CHOICES.

boolean org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.isDbChoiceSelectable ( CentralRepoDbChoice  item)
private
static void org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.onPromptStatusError ( CentralRepoDbManager  manager1)
staticprivate
static boolean org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.promptCreateDatabase ( CentralRepoDbManager  manager,
EamDbSettingsDialog  dialog 
)
static

This method prompts the user whether or not they would like to create a database in the instance that it doesn't exist.

Parameters
managerThe manager to use when setting up the database.
dialogIf non-null value, validates settings and updates 'okay' button enabled state.
Returns
Whether or not the ultimate status after prompts is okay.

Definition at line 201 of file EamDbSettingsDialog.java.

References org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbManager.createDb(), org.sleuthkit.autopsy.centralrepository.datamodel.DatabaseTestResult.TESTED_OK, org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbManager.testStatus(), and org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.valid().

Referenced by org.sleuthkit.autopsy.centralrepository.optionspanel.GlobalSettingsPanel.testCurrentConfiguration().

static boolean org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.promptTestStatusWarnings ( CentralRepoDbManager  manager,
EamDbSettingsDialog  dialog 
)
staticprivate

This method prompts user based on testing status (i.e. failure to connect, invalid schema, db does not exist, etc.).

Parameters
managerThe manager to use when setting up the database.
dialogIf non-null value, validates settings and updates 'okay' button enabled state.
Returns
Whether or not the ultimate status after prompts is okay to continue.

Definition at line 172 of file EamDbSettingsDialog.java.

References org.sleuthkit.autopsy.centralrepository.datamodel.DatabaseTestResult.CONNECTION_FAILED, org.sleuthkit.autopsy.centralrepository.datamodel.DatabaseTestResult.DB_DOES_NOT_EXIST, org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbManager.getStatus(), org.sleuthkit.autopsy.centralrepository.datamodel.DatabaseTestResult.SCHEMA_INVALID, and org.sleuthkit.autopsy.centralrepository.datamodel.DatabaseTestResult.TESTED_OK.

void org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.setTextBoxListeners ( )
private

Register for notifications when the text boxes get updated.

Definition at line 812 of file EamDbSettingsDialog.java.

void org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.setTextPrompts ( )
private

Add text prompts to all of the text fields.

Definition at line 778 of file EamDbSettingsDialog.java.

void org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.setupDbChoice ( CentralRepoDbChoice  initialMenuItem)
private
static boolean org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.testStatusAndCreate ( Component  parent,
CentralRepoDbManager  manager 
)
static

This method tests status for central repo db / creation and prompts user accordingly.

Parameters
parentThe parent component (the anchor for displaying dialogs).
managerThe central repo db manager with settings to be tested and saved.
Returns
Whether or not central repo db was successfully be created or found.

Definition at line 646 of file EamDbSettingsDialog.java.

Referenced by org.sleuthkit.autopsy.centralrepository.optionspanel.GlobalSettingsPanel.checkStatusAndCreateDb().

static boolean org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.testStatusAndCreate ( Component  parent,
CentralRepoDbManager  manager,
EamDbSettingsDialog  dialog 
)
staticprivate

This method tests status for central repo db / creation and prompts user accordingly.

Parameters
parentThe parent component (the anchor for displaying dialogs).
managerThe central repo db manager with settings to be tested and saved.
dialogThe db settings dialog; if non-null, will validate okay button state.
Returns
Whether or not central repo db was successfully be created or found.

Definition at line 663 of file EamDbSettingsDialog.java.

References org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbManager.saveNewCentralRepo(), org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbManager.testStatus(), and org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.valid().

void org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.updateFullDbPath ( )
private
void org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.updatePostgresFields ( boolean  enabled)
private
void org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.updateSqliteFields ( boolean  enabled)
private

Update the fields for the SQLite platform depending on whether the SQLite radioButton is enabled.

Parameters
enabled

Definition at line 803 of file EamDbSettingsDialog.java.

References org.sleuthkit.autopsy.centralrepository.datamodel.SqliteCentralRepoSettings.getDbDirectory(), and org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbManager.getDbSettingsSqlite().

boolean org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.valid ( )
private

Validates that the form is filled out correctly for our usage.

Returns
true if it's okay, false otherwise.

Definition at line 885 of file EamDbSettingsDialog.java.

Referenced by org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.promptCreateDatabase(), and org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.testStatusAndCreate().

boolean org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.wasConfigurationChanged ( )

This method returns if changes to the central repository configuration were successfully applied.

Returns
True if the database configuration was successfully changed; false if it was not.

Definition at line 719 of file EamDbSettingsDialog.java.

References org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbManager.wasConfigurationChanged().

Referenced by org.sleuthkit.autopsy.centralrepository.optionspanel.GlobalSettingsPanel.invokeCrChoice().

Member Data Documentation

javax.swing.JButton org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.bnCancel
private

Definition at line 957 of file EamDbSettingsDialog.java.

javax.swing.JButton org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.bnDatabasePathFileOpen
private

Definition at line 958 of file EamDbSettingsDialog.java.

javax.swing.JButton org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.bnOk
private

Definition at line 959 of file EamDbSettingsDialog.java.

javax.swing.JComboBox<org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbChoice> org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.cbDatabaseType
private

Definition at line 960 of file EamDbSettingsDialog.java.

javax.swing.JScrollPane org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.dataBaseFileScrollPane
private

Definition at line 961 of file EamDbSettingsDialog.java.

javax.swing.JTextArea org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.dataBaseFileTextArea
private

Definition at line 962 of file EamDbSettingsDialog.java.

final DbChoiceRenderer org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.DB_CHOICE_RENDERER = new DbChoiceRenderer()
private

Definition at line 91 of file EamDbSettingsDialog.java.

javax.swing.JFileChooser org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.fcDatabasePath
private

Definition at line 963 of file EamDbSettingsDialog.java.

javax.swing.Box.Filler org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.filler1
private

Definition at line 964 of file EamDbSettingsDialog.java.

javax.swing.JPasswordField org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.jpDbPassword
private

Definition at line 965 of file EamDbSettingsDialog.java.

javax.swing.JLabel org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.lbDatabaseDesc
private

Definition at line 966 of file EamDbSettingsDialog.java.

javax.swing.JLabel org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.lbDatabasePath
private

Definition at line 967 of file EamDbSettingsDialog.java.

javax.swing.JLabel org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.lbDatabaseType
private

Definition at line 968 of file EamDbSettingsDialog.java.

javax.swing.JLabel org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.lbHostName
private

Definition at line 969 of file EamDbSettingsDialog.java.

javax.swing.JLabel org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.lbPort
private

Definition at line 970 of file EamDbSettingsDialog.java.

javax.swing.JLabel org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.lbSingleUserSqLite
private

Definition at line 971 of file EamDbSettingsDialog.java.

javax.swing.JLabel org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.lbUserName
private

Definition at line 972 of file EamDbSettingsDialog.java.

javax.swing.JLabel org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.lbUserPassword
private

Definition at line 973 of file EamDbSettingsDialog.java.

final Logger org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.logger = Logger.getLogger(EamDbSettingsDialog.class.getName())
staticprivate

Definition at line 63 of file EamDbSettingsDialog.java.

final CentralRepoDbManager org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.manager = new CentralRepoDbManager()
private

Definition at line 90 of file EamDbSettingsDialog.java.

javax.swing.JPanel org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.pathPanel
private

Definition at line 974 of file EamDbSettingsDialog.java.

javax.swing.JPanel org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.pnButtons
private

Definition at line 975 of file EamDbSettingsDialog.java.

javax.swing.JPanel org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.pnSQLiteSettings
private

Definition at line 976 of file EamDbSettingsDialog.java.

final long org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.serialVersionUID = 1L
staticprivate

Definition at line 65 of file EamDbSettingsDialog.java.

javax.swing.JTextField org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.tbDbHostname
private

Definition at line 977 of file EamDbSettingsDialog.java.

javax.swing.JTextField org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.tbDbPort
private

Definition at line 978 of file EamDbSettingsDialog.java.

javax.swing.JTextField org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.tbDbUsername
private

Definition at line 979 of file EamDbSettingsDialog.java.

final TextBoxChangedListener org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.textBoxChangedListener
private

Definition at line 89 of file EamDbSettingsDialog.java.

final Collection<JTextField> org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.textBoxes
private

Definition at line 88 of file EamDbSettingsDialog.java.

javax.swing.JTextField org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.tfDatabasePath
private

Definition at line 980 of file EamDbSettingsDialog.java.

javax.swing.JPanel org.sleuthkit.autopsy.centralrepository.optionspanel.EamDbSettingsDialog.typePanel
private

Definition at line 981 of file EamDbSettingsDialog.java.


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

Copyright © 2012-2022 Basis Technology. Generated on: Sun Sep 25 2022
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.