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

Classes

class  CommentExistsCallback
 

Static Public Member Functions

static boolean allowUseOfCentralRepository ()
 
static void closeConnection (Connection conn)
 
static void closePreparedStatement (PreparedStatement preparedStatement)
 
static void closeResultSet (ResultSet resultSet)
 
static void closeStatement (Statement statement)
 
static boolean commentExistsOnAttributes (List< CorrelationAttributeInstance > attributes) throws CentralRepoException
 
static String correlationTypeToInstanceTableName (CorrelationAttributeInstance.Type type)
 
static String correlationTypeToReferenceTableName (CorrelationAttributeInstance.Type type)
 
static boolean executeValidationQuery (Connection conn, String validationQuery)
 
static String getDefaultOrgName ()
 
static void insertCorrelationType (Connection conn, CorrelationAttributeInstance.Type correlationType) throws SQLException
 
static boolean insertDefaultCorrelationTypes (Connection conn)
 
static boolean isDefaultOrg (CentralRepoOrganization org)
 
static boolean schemaVersionIsSet (Connection conn)
 
static void setUseCentralRepo (boolean centralRepoCheckBoxIsSelected)
 

Static Private Member Functions

static void closePersonasTopComponent ()
 

Static Private Attributes

static final String CENTRAL_REPO_NAME = CentralRepoSettings.getInstance().getModuleSettingsKey()
 
static final String CENTRAL_REPO_USE_KEY = "db.useCentralRepo"
 
static final String DEFAULT_ORG_NAME = "Not Specified"
 
static final Logger LOGGER = Logger.getLogger(CentralRepoDbUtil.class.getName())
 

Detailed Description

Definition at line 40 of file CentralRepoDbUtil.java.

Member Function Documentation

static boolean org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbUtil.allowUseOfCentralRepository ( )
static

If the option to use a central repository has been selected, does not indicate the central repository is configured for use simply that the checkbox allowing configuration is checked on the options panel.

Returns
true if the Central Repo may be configured, false if it should not be able to be

Definition at line 252 of file CentralRepoDbUtil.java.

References org.sleuthkit.autopsy.coreutils.ModuleSettings.getConfigSetting().

Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepository.getInstance(), org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepository.isEnabled(), org.sleuthkit.autopsy.centralrepository.optionspanel.GlobalSettingsPanel.load(), org.sleuthkit.autopsy.centralrepository.optionspanel.GlobalSettingsPanel.onMultiUserChange(), and org.sleuthkit.autopsy.centralrepository.optionspanel.GlobalSettingsPanel.testCurrentConfiguration().

static void org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbUtil.closeConnection ( Connection  conn)
static
static void org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbUtil.closePersonasTopComponent ( )
staticprivate

Closes Personas top component if it exists.

Definition at line 273 of file CentralRepoDbUtil.java.

Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbUtil.setUseCentralRepo().

static void org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbUtil.closePreparedStatement ( PreparedStatement  preparedStatement)
static

Close the prepared statement.

Parameters
preparedStatementThe prepared statement to be closed.
Deprecated:
Use closeStatement() instead.
Exceptions
CentralRepoException

Definition at line 341 of file CentralRepoDbUtil.java.

References org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbUtil.closeStatement().

Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbUtil.insertDefaultCorrelationTypes().

static void org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbUtil.closeResultSet ( ResultSet  resultSet)
static
static void org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbUtil.closeStatement ( Statement  statement)
static
static boolean org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbUtil.commentExistsOnAttributes ( List< CorrelationAttributeInstance attributes) throws CentralRepoException
static

Check if any of the specified attribute values in the CR have a non-empty and non-null comment.

Parameters
attributesThe list of attributes which should have their type value matches checked for the presence of a comment.
Returns
True if any of the type value matches in the CR have a comment in their respective comment column. False if there are no comments or if the CR is disabled.
Exceptions
CentralRepoExceptionThrown when there is an issue either getting the CentralRepository instance or executing a query.

Definition at line 373 of file CentralRepoDbUtil.java.

References org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbUtil.correlationTypeToInstanceTableName(), org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepository.executeQuery(), org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepository.getInstance(), and org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepository.isEnabled().

Referenced by org.sleuthkit.autopsy.datamodel.AbstractAbstractFileNode< SpecialDirectory >.getCommentProperty(), org.sleuthkit.autopsy.datamodel.OsAccounts.OsAccountNode.getCommentProperty(), and org.sleuthkit.autopsy.datamodel.BlackboardArtifactNode.getCommentProperty().

static String org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbUtil.correlationTypeToInstanceTableName ( CorrelationAttributeInstance.Type  type)
static
static String org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbUtil.correlationTypeToReferenceTableName ( CorrelationAttributeInstance.Type  type)
static

Convert the Type's DbTableName string to the reference_* table name.

Parameters
typeCorrelation Type
Returns
Reference table name for this Type.

Definition at line 327 of file CentralRepoDbUtil.java.

Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.RdbmsCentralRepoFactory.initializeDatabaseSchema().

static boolean org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbUtil.executeValidationQuery ( Connection  conn,
String  validationQuery 
)
static

Use the current settings and the validation query to test the connection to the database.

Returns
true if successfull query execution, else false.

Definition at line 288 of file CentralRepoDbUtil.java.

References org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbUtil.closeResultSet().

Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.PostgresCentralRepoSettings.verifyConnection(), and org.sleuthkit.autopsy.centralrepository.datamodel.SqliteCentralRepoSettings.verifyConnection().

static String org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbUtil.getDefaultOrgName ( )
static

Get the default organization name

Returns
the default org name

Definition at line 198 of file CentralRepoDbUtil.java.

References org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbUtil.DEFAULT_ORG_NAME.

static void org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbUtil.insertCorrelationType ( Connection  conn,
CorrelationAttributeInstance.Type  correlationType 
) throws SQLException
static

Inserts the specified correlation type into the database.

Parameters
connOpen connection to use.
correlationTypeNew correlation type to add.

Definition at line 138 of file CentralRepoDbUtil.java.

Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbUpgrader15To16.upgradeSchema(), and org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbUpgrader13To14.upgradeSchema().

static boolean org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbUtil.insertDefaultCorrelationTypes ( Connection  conn)
static
static boolean org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbUtil.isDefaultOrg ( CentralRepoOrganization  org)
static

Check whether the given org is the default organization.

Parameters
org
Returns
true if it is the default org, false otherwise

Definition at line 209 of file CentralRepoDbUtil.java.

References org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoOrganization.getName().

Referenced by org.sleuthkit.autopsy.centralrepository.optionspanel.ManageOrganizationsDialog.setButtonsEnabled().

static boolean org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbUtil.schemaVersionIsSet ( Connection  conn)
static
static void org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbUtil.setUseCentralRepo ( boolean  centralRepoCheckBoxIsSelected)
static

Member Data Documentation

final String org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbUtil.CENTRAL_REPO_NAME = CentralRepoSettings.getInstance().getModuleSettingsKey()
staticprivate

Definition at line 43 of file CentralRepoDbUtil.java.

final String org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbUtil.CENTRAL_REPO_USE_KEY = "db.useCentralRepo"
staticprivate

Definition at line 44 of file CentralRepoDbUtil.java.

final String org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbUtil.DEFAULT_ORG_NAME = "Not Specified"
staticprivate
final Logger org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbUtil.LOGGER = Logger.getLogger(CentralRepoDbUtil.class.getName())
staticprivate

Definition at line 42 of file CentralRepoDbUtil.java.


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

Copyright © 2012-2022 Basis Technology. Generated on: Tue Jun 27 2023
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.