mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-17 10:17:41 +00:00
Merge remote-tracking branch 'upstream/develop' into 2953_hash_import_speed
Conflicts: Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ImportHashDatabaseDialog.java
This commit is contained in:
commit
bda2bb5331
@ -36,8 +36,11 @@ public interface EamDb {
|
||||
* @throws EamDbException
|
||||
*/
|
||||
static EamDb getInstance() throws EamDbException {
|
||||
EamDbPlatformEnum selectedPlatform = EamDbPlatformEnum.getSelectedPlatform();
|
||||
|
||||
EamDbPlatformEnum selectedPlatform = EamDbPlatformEnum.DISABLED;
|
||||
if (EamDbUtil.useCentralRepo()) {
|
||||
selectedPlatform = EamDbPlatformEnum.getSelectedPlatform();
|
||||
}
|
||||
switch (selectedPlatform) {
|
||||
case POSTGRESQL:
|
||||
return PostgresEamDb.getInstance();
|
||||
@ -86,7 +89,8 @@ public interface EamDb {
|
||||
* @return Is the database enabled
|
||||
*/
|
||||
static boolean isEnabled() {
|
||||
return EamDbPlatformEnum.getSelectedPlatform() != EamDbPlatformEnum.DISABLED;
|
||||
return EamDbUtil.useCentralRepo()
|
||||
&& EamDbPlatformEnum.getSelectedPlatform() != EamDbPlatformEnum.DISABLED;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3,7 +3,6 @@
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
|
||||
package org.sleuthkit.autopsy.centralrepository.datamodel;
|
||||
|
||||
import java.sql.Connection;
|
||||
@ -15,12 +14,16 @@ import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
import static org.sleuthkit.autopsy.centralrepository.datamodel.EamDb.SCHEMA_VERSION;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.coreutils.ModuleSettings;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public class EamDbUtil {
|
||||
|
||||
private final static Logger LOGGER = Logger.getLogger(EamDbUtil.class.getName());
|
||||
private static final String CENTRAL_REPO_NAME = "CentralRepository";
|
||||
private static final String CENTRAL_REPO_USE_KEY = "db.useCentralRepo";
|
||||
|
||||
/**
|
||||
* Close the prepared statement.
|
||||
@ -77,6 +80,7 @@ public class EamDbUtil {
|
||||
* Insert the default correlation types into the database.
|
||||
*
|
||||
* @param conn Open connection to use.
|
||||
*
|
||||
* @return true on success, else false
|
||||
*/
|
||||
public static boolean insertDefaultCorrelationTypes(Connection conn) {
|
||||
@ -112,6 +116,7 @@ public class EamDbUtil {
|
||||
* loaded.
|
||||
*
|
||||
* @param conn Open connection to use.
|
||||
*
|
||||
* @return true on success, else false
|
||||
*/
|
||||
public static boolean insertSchemaVersion(Connection conn) {
|
||||
@ -158,8 +163,29 @@ public class EamDbUtil {
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the current settings and the validation query
|
||||
* to test the connection to the database.
|
||||
* If the Central Repos use has been enabled.
|
||||
*
|
||||
* @return true if the Central Repo may be configured, false if it should
|
||||
* not be able to be
|
||||
*/
|
||||
public static boolean useCentralRepo() {
|
||||
return Boolean.parseBoolean(ModuleSettings.getConfigSetting(CENTRAL_REPO_NAME, CENTRAL_REPO_USE_KEY));
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves the setting for whether the Central Repo should be able to be
|
||||
* configured.
|
||||
*
|
||||
* @param centralRepoCheckBoxIsSelected - true if the central repo can be
|
||||
* used
|
||||
*/
|
||||
public static void setUseCentralRepo(boolean centralRepoCheckBoxIsSelected) {
|
||||
ModuleSettings.setConfigSetting(CENTRAL_REPO_NAME, CENTRAL_REPO_USE_KEY, Boolean.toString(centralRepoCheckBoxIsSelected));
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the current settings and the validation query to test the connection
|
||||
* to the database.
|
||||
*
|
||||
* @return true if successfull query execution, else false.
|
||||
*/
|
||||
@ -184,11 +210,11 @@ public class EamDbUtil {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Conver thte Type's DbTableName string to the *_instances table name.
|
||||
*
|
||||
* @param type Correlation Type
|
||||
*
|
||||
* @return Instance table name for this Type.
|
||||
*/
|
||||
public static String correlationTypeToInstanceTableName(EamArtifact.Type type) {
|
||||
@ -199,6 +225,7 @@ public class EamDbUtil {
|
||||
* Convert the Type's DbTableName string to the reference_* table name.
|
||||
*
|
||||
* @param type Correlation Type
|
||||
*
|
||||
* @return Reference table name for this Type.
|
||||
*/
|
||||
public static String correlationTypeToReferenceTableName(EamArtifact.Type type) {
|
||||
|
@ -23,12 +23,16 @@ import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||
import java.util.logging.Level;
|
||||
import org.apache.commons.dbcp2.BasicDataSource;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
|
||||
/**
|
||||
* Sqlite implementation of the Central Repository database
|
||||
* Sqlite implementation of the Central Repository database.
|
||||
* All methods in AbstractSqlEamDb that read or write to the database should
|
||||
* be overriden here and use appropriate locking.
|
||||
*/
|
||||
public class SqliteEamDb extends AbstractSqlEamDb {
|
||||
|
||||
@ -40,6 +44,10 @@ public class SqliteEamDb extends AbstractSqlEamDb {
|
||||
|
||||
private final SqliteEamDbSettings dbSettings;
|
||||
|
||||
// While the Sqlite database should only be used for single users, it is still
|
||||
// possible for multiple threads to attempt to write to the database simultaneously.
|
||||
private final ReentrantReadWriteLock rwLock = new ReentrantReadWriteLock(true);
|
||||
|
||||
/**
|
||||
* Get the singleton instance of SqliteEamDb
|
||||
*
|
||||
@ -96,9 +104,13 @@ public class SqliteEamDb extends AbstractSqlEamDb {
|
||||
|
||||
@Override
|
||||
public void reset() throws EamDbException {
|
||||
try{
|
||||
acquireExclusiveLock();
|
||||
|
||||
Connection conn = connect();
|
||||
|
||||
try {
|
||||
|
||||
Statement dropContent = conn.createStatement();
|
||||
dropContent.executeUpdate("DELETE FROM organizations");
|
||||
dropContent.executeUpdate("DELETE FROM cases");
|
||||
@ -125,6 +137,9 @@ public class SqliteEamDb extends AbstractSqlEamDb {
|
||||
}
|
||||
|
||||
dbSettings.insertDefaultDatabaseContent();
|
||||
} finally {
|
||||
releaseExclusiveLock();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -193,4 +208,751 @@ public class SqliteEamDb extends AbstractSqlEamDb {
|
||||
dbSettings.setBadTags(badTags);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new name/value pair in the db_info table.
|
||||
*
|
||||
* @param name Key to set
|
||||
* @param value Value to set
|
||||
*
|
||||
* @throws EamDbException
|
||||
*/
|
||||
@Override
|
||||
public void newDbInfo(String name, String value) throws EamDbException {
|
||||
try{
|
||||
acquireExclusiveLock();
|
||||
super.newDbInfo(name, value);
|
||||
} finally {
|
||||
releaseExclusiveLock();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the value for the given name from the name/value db_info table.
|
||||
*
|
||||
* @param name Name to search for
|
||||
*
|
||||
* @return value associated with name.
|
||||
*
|
||||
* @throws EamDbException
|
||||
*/
|
||||
@Override
|
||||
public String getDbInfo(String name) throws EamDbException {
|
||||
try{
|
||||
acquireSharedLock();
|
||||
return super.getDbInfo(name);
|
||||
} finally {
|
||||
releaseSharedLock();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the value for a name in the name/value db_info table.
|
||||
*
|
||||
* @param name Name to find
|
||||
* @param value Value to assign to name.
|
||||
*
|
||||
* @throws EamDbException
|
||||
*/
|
||||
@Override
|
||||
public void updateDbInfo(String name, String value) throws EamDbException {
|
||||
try{
|
||||
acquireExclusiveLock();
|
||||
super.updateDbInfo(name, value);
|
||||
} finally {
|
||||
releaseExclusiveLock();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates new Case in the database
|
||||
*
|
||||
* Expects the Organization for this case to already exist in the database.
|
||||
*
|
||||
* @param eamCase The case to add
|
||||
*/
|
||||
@Override
|
||||
public void newCase(EamCase eamCase) throws EamDbException {
|
||||
try{
|
||||
acquireExclusiveLock();
|
||||
super.newCase(eamCase);
|
||||
} finally {
|
||||
releaseExclusiveLock();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates an existing Case in the database
|
||||
*
|
||||
* @param eamCase The case to update
|
||||
*/
|
||||
@Override
|
||||
public void updateCase(EamCase eamCase) throws EamDbException {
|
||||
try{
|
||||
acquireExclusiveLock();
|
||||
super.updateCase(eamCase);
|
||||
} finally {
|
||||
releaseExclusiveLock();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves Case details based on Case UUID
|
||||
*
|
||||
* @param caseUUID unique identifier for a case
|
||||
*
|
||||
* @return The retrieved case
|
||||
*/
|
||||
@Override
|
||||
public EamCase getCaseDetails(String caseUUID) throws EamDbException {
|
||||
try{
|
||||
acquireSharedLock();
|
||||
return super.getCaseDetails(caseUUID);
|
||||
} finally {
|
||||
releaseSharedLock();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves cases that are in DB.
|
||||
*
|
||||
* @return List of cases
|
||||
*/
|
||||
@Override
|
||||
public List<EamCase> getCases() throws EamDbException {
|
||||
try{
|
||||
acquireSharedLock();
|
||||
return super.getCases();
|
||||
} finally {
|
||||
releaseSharedLock();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates new Data Source in the database
|
||||
*
|
||||
* @param eamDataSource the data source to add
|
||||
*/
|
||||
@Override
|
||||
public void newDataSource(EamDataSource eamDataSource) throws EamDbException {
|
||||
try{
|
||||
acquireExclusiveLock();
|
||||
super.newDataSource(eamDataSource);
|
||||
} finally {
|
||||
releaseExclusiveLock();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a Data Source in the database
|
||||
*
|
||||
* @param eamDataSource the data source to update
|
||||
*/
|
||||
@Override
|
||||
public void updateDataSource(EamDataSource eamDataSource) throws EamDbException {
|
||||
try{
|
||||
acquireExclusiveLock();
|
||||
super.updateDataSource(eamDataSource);
|
||||
} finally {
|
||||
releaseExclusiveLock();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves Data Source details based on data source device ID
|
||||
*
|
||||
* @param dataSourceDeviceId the data source device ID number
|
||||
*
|
||||
* @return The data source
|
||||
*/
|
||||
@Override
|
||||
public EamDataSource getDataSourceDetails(String dataSourceDeviceId) throws EamDbException {
|
||||
try{
|
||||
acquireSharedLock();
|
||||
return super.getDataSourceDetails(dataSourceDeviceId);
|
||||
} finally {
|
||||
releaseSharedLock();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a list of data sources in the DB
|
||||
*
|
||||
* @return list of data sources in the DB
|
||||
*/
|
||||
@Override
|
||||
public List<EamDataSource> getDataSources() throws EamDbException {
|
||||
try{
|
||||
acquireSharedLock();
|
||||
return super.getDataSources();
|
||||
} finally {
|
||||
releaseSharedLock();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Inserts new Artifact(s) into the database. Should add associated Case and
|
||||
* Data Source first.
|
||||
*
|
||||
* @param eamArtifact The artifact to add
|
||||
*/
|
||||
@Override
|
||||
public void addArtifact(EamArtifact eamArtifact) throws EamDbException {
|
||||
try{
|
||||
acquireExclusiveLock();
|
||||
super.addArtifact(eamArtifact);
|
||||
} finally {
|
||||
releaseExclusiveLock();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves eamArtifact instances from the database that are associated
|
||||
* with the eamArtifactType and eamArtifactValue of the given eamArtifact.
|
||||
*
|
||||
* @param eamArtifact The type/value to look up (artifact with 0 instances)
|
||||
*
|
||||
* @return List of artifact instances for a given type/value
|
||||
*/
|
||||
@Override
|
||||
public List<EamArtifactInstance> getArtifactInstancesByTypeValue(EamArtifact.Type aType, String value) throws EamDbException {
|
||||
try{
|
||||
acquireSharedLock();
|
||||
return super.getArtifactInstancesByTypeValue(aType, value);
|
||||
} finally {
|
||||
releaseSharedLock();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves eamArtifact instances from the database that are associated
|
||||
* with the aType and filePath
|
||||
*
|
||||
* @param aType EamArtifact.Type to search for
|
||||
* @param filePath File path to search for
|
||||
*
|
||||
* @return List of 0 or more EamArtifactInstances
|
||||
*
|
||||
* @throws EamDbException
|
||||
*/
|
||||
@Override
|
||||
public List<EamArtifactInstance> getArtifactInstancesByPath(EamArtifact.Type aType, String filePath) throws EamDbException {
|
||||
try{
|
||||
acquireSharedLock();
|
||||
return super.getArtifactInstancesByPath(aType, filePath);
|
||||
} finally {
|
||||
releaseSharedLock();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves number of artifact instances in the database that are
|
||||
* associated with the ArtifactType and artifactValue of the given artifact.
|
||||
*
|
||||
* @param eamArtifact Artifact with artifactType and artifactValue to search
|
||||
* for
|
||||
*
|
||||
* @return Number of artifact instances having ArtifactType and
|
||||
* ArtifactValue.
|
||||
*/
|
||||
@Override
|
||||
public Long getCountArtifactInstancesByTypeValue(EamArtifact.Type aType, String value) throws EamDbException {
|
||||
try{
|
||||
acquireSharedLock();
|
||||
return super.getCountArtifactInstancesByTypeValue(aType, value);
|
||||
} finally {
|
||||
releaseSharedLock();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Using the ArtifactType and ArtifactValue from the given eamArtfact,
|
||||
* compute the ratio of: (The number of unique case_id/datasource_id tuples
|
||||
* where Type/Value is found) divided by (The total number of unique
|
||||
* case_id/datasource_id tuples in the database) expressed as a percentage.
|
||||
*
|
||||
* @param eamArtifact Artifact with artifactType and artifactValue to search
|
||||
* for
|
||||
*
|
||||
* @return Int between 0 and 100
|
||||
*/
|
||||
@Override
|
||||
public int getCommonalityPercentageForTypeValue(EamArtifact.Type aType, String value) throws EamDbException {
|
||||
try{
|
||||
acquireSharedLock();
|
||||
return super.getCommonalityPercentageForTypeValue(aType, value);
|
||||
} finally {
|
||||
releaseSharedLock();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves number of unique caseDisplayName / dataSource tuples in the
|
||||
* database that are associated with the artifactType and artifactValue of
|
||||
* the given artifact.
|
||||
*
|
||||
* @param eamArtifact Artifact with artifactType and artifactValue to search
|
||||
* for
|
||||
*
|
||||
* @return Number of unique tuples
|
||||
*/
|
||||
@Override
|
||||
public Long getCountUniqueCaseDataSourceTuplesHavingTypeValue(EamArtifact.Type aType, String value) throws EamDbException {
|
||||
try{
|
||||
acquireSharedLock();
|
||||
return super.getCountUniqueCaseDataSourceTuplesHavingTypeValue(aType, value);
|
||||
} finally {
|
||||
releaseSharedLock();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves number of unique caseDisplayName/dataSource tuples in the
|
||||
* database.
|
||||
*
|
||||
* @return Number of unique tuples
|
||||
*/
|
||||
@Override
|
||||
public Long getCountUniqueCaseDataSourceTuples() throws EamDbException {
|
||||
try{
|
||||
acquireSharedLock();
|
||||
return super.getCountUniqueCaseDataSourceTuples();
|
||||
} finally {
|
||||
releaseSharedLock();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves number of eamArtifact instances in the database that are
|
||||
* associated with the caseDisplayName and dataSource of the given
|
||||
* eamArtifact instance.
|
||||
*
|
||||
* @param caseUUID Case ID to search for
|
||||
* @param dataSourceID Data source ID to search for
|
||||
*
|
||||
* @return Number of artifact instances having caseDisplayName and
|
||||
* dataSource
|
||||
*/
|
||||
@Override
|
||||
public Long getCountArtifactInstancesByCaseDataSource(String caseUUID, String dataSourceID) throws EamDbException {
|
||||
try{
|
||||
acquireSharedLock();
|
||||
return super.getCountArtifactInstancesByCaseDataSource(caseUUID, dataSourceID);
|
||||
} finally {
|
||||
releaseSharedLock();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes a bulk insert of the eamArtifacts added from the
|
||||
* prepareBulkArtifact() method
|
||||
*/
|
||||
@Override
|
||||
public void bulkInsertArtifacts() throws EamDbException {
|
||||
try{
|
||||
acquireExclusiveLock();
|
||||
super.bulkInsertArtifacts();
|
||||
} finally {
|
||||
releaseExclusiveLock();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes a bulk insert of the cases
|
||||
*/
|
||||
@Override
|
||||
public void bulkInsertCases(List<EamCase> cases) throws EamDbException {
|
||||
try{
|
||||
acquireExclusiveLock();
|
||||
super.bulkInsertCases(cases);
|
||||
} finally {
|
||||
releaseExclusiveLock();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets an eamArtifact instance as knownStatus = "Bad". If eamArtifact
|
||||
* exists, it is updated. If eamArtifact does not exist nothing happens
|
||||
*
|
||||
* @param eamArtifact Artifact containing exactly one (1) ArtifactInstance.
|
||||
*/
|
||||
@Override
|
||||
public void setArtifactInstanceKnownBad(EamArtifact eamArtifact) throws EamDbException {
|
||||
try{
|
||||
acquireExclusiveLock();
|
||||
super.setArtifactInstanceKnownBad(eamArtifact);
|
||||
} finally {
|
||||
releaseExclusiveLock();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets list of matching eamArtifact instances that have knownStatus =
|
||||
* "Bad".
|
||||
*
|
||||
* @param aType EamArtifact.Type to search for
|
||||
* @param value Value to search for
|
||||
*
|
||||
* @return List with 0 or more matching eamArtifact instances.
|
||||
*/
|
||||
@Override
|
||||
public List<EamArtifactInstance> getArtifactInstancesKnownBad(EamArtifact.Type aType, String value) throws EamDbException {
|
||||
try{
|
||||
acquireSharedLock();
|
||||
return super.getArtifactInstancesKnownBad(aType, value);
|
||||
} finally {
|
||||
releaseSharedLock();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Count matching eamArtifacts instances that have knownStatus = "Bad".
|
||||
*
|
||||
* @param aType EamArtifact.Type to search for
|
||||
* @param value Value to search for
|
||||
*
|
||||
* @return Number of matching eamArtifacts
|
||||
*/
|
||||
@Override
|
||||
public Long getCountArtifactInstancesKnownBad(EamArtifact.Type aType, String value) throws EamDbException {
|
||||
try{
|
||||
acquireSharedLock();
|
||||
return super.getCountArtifactInstancesKnownBad(aType, value);
|
||||
} finally {
|
||||
releaseSharedLock();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets list of distinct case display names, where each case has 1+ Artifact
|
||||
* Instance matching eamArtifact with knownStatus = "Bad".
|
||||
*
|
||||
* @param aType EamArtifact.Type to search for
|
||||
* @param value Value to search for
|
||||
*
|
||||
* @return List of cases containing this artifact with instances marked as
|
||||
* bad
|
||||
*
|
||||
* @throws EamDbException
|
||||
*/
|
||||
@Override
|
||||
public List<String> getListCasesHavingArtifactInstancesKnownBad(EamArtifact.Type aType, String value) throws EamDbException {
|
||||
try{
|
||||
acquireSharedLock();
|
||||
return super.getListCasesHavingArtifactInstancesKnownBad(aType, value);
|
||||
} finally {
|
||||
releaseSharedLock();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Is the artifact known as bad according to the reference entries?
|
||||
*
|
||||
* @param aType EamArtifact.Type to search for
|
||||
* @param value Value to search for
|
||||
*
|
||||
* @return Global known status of the artifact
|
||||
*/
|
||||
@Override
|
||||
public boolean isArtifactlKnownBadByReference(EamArtifact.Type aType, String value) throws EamDbException {
|
||||
try{
|
||||
acquireSharedLock();
|
||||
return super.isArtifactlKnownBadByReference(aType, value);
|
||||
} finally {
|
||||
releaseSharedLock();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new organization
|
||||
*
|
||||
* @param eamOrg The organization to add
|
||||
*
|
||||
* @throws EamDbException
|
||||
*/
|
||||
@Override
|
||||
public void newOrganization(EamOrganization eamOrg) throws EamDbException {
|
||||
try{
|
||||
acquireExclusiveLock();
|
||||
super.newOrganization(eamOrg);
|
||||
} finally {
|
||||
releaseExclusiveLock();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all organizations
|
||||
*
|
||||
* @return A list of all organizations
|
||||
*
|
||||
* @throws EamDbException
|
||||
*/
|
||||
@Override
|
||||
public List<EamOrganization> getOrganizations() throws EamDbException {
|
||||
try{
|
||||
acquireSharedLock();
|
||||
return super.getOrganizations();
|
||||
} finally {
|
||||
releaseSharedLock();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get an organization having the given ID
|
||||
*
|
||||
* @param orgID The id to look up
|
||||
*
|
||||
* @return The organization with the given ID
|
||||
*
|
||||
* @throws EamDbException
|
||||
*/
|
||||
@Override
|
||||
public EamOrganization getOrganizationByID(int orgID) throws EamDbException {
|
||||
try{
|
||||
acquireSharedLock();
|
||||
return super.getOrganizationByID(orgID);
|
||||
} finally {
|
||||
releaseSharedLock();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new Global Set
|
||||
*
|
||||
* @param eamGlobalSet The global set to add
|
||||
*
|
||||
* @return The ID of the new global set
|
||||
*
|
||||
* @throws EamDbException
|
||||
*/
|
||||
@Override
|
||||
public int newReferencelSet(EamGlobalSet eamGlobalSet) throws EamDbException {
|
||||
try{
|
||||
acquireExclusiveLock();
|
||||
return super.newReferencelSet(eamGlobalSet);
|
||||
} finally {
|
||||
releaseExclusiveLock();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a reference set by ID
|
||||
*
|
||||
* @param referenceSetID The ID to look up
|
||||
*
|
||||
* @return The global set associated with the ID
|
||||
*
|
||||
* @throws EamDbException
|
||||
*/
|
||||
@Override
|
||||
public EamGlobalSet getReferenceSetByID(int referenceSetID) throws EamDbException {
|
||||
try{
|
||||
acquireSharedLock();
|
||||
return super.getReferenceSetByID(referenceSetID);
|
||||
} finally {
|
||||
releaseSharedLock();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new reference instance
|
||||
*
|
||||
* @param eamGlobalFileInstance The reference instance to add
|
||||
* @param correlationType Correlation Type that this Reference
|
||||
* Instance is
|
||||
*
|
||||
* @throws EamDbException
|
||||
*/
|
||||
@Override
|
||||
public void addReferenceInstance(EamGlobalFileInstance eamGlobalFileInstance, EamArtifact.Type correlationType) throws EamDbException {
|
||||
try{
|
||||
acquireExclusiveLock();
|
||||
super.addReferenceInstance(eamGlobalFileInstance, correlationType);
|
||||
} finally {
|
||||
releaseExclusiveLock();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Insert the bulk collection of Reference Type Instances
|
||||
*
|
||||
* @throws EamDbException
|
||||
*/
|
||||
@Override
|
||||
public void bulkInsertReferenceTypeEntries(Set<EamGlobalFileInstance> globalInstances, EamArtifact.Type contentType) throws EamDbException {
|
||||
try{
|
||||
acquireExclusiveLock();
|
||||
super.bulkInsertReferenceTypeEntries(globalInstances, contentType);
|
||||
} finally {
|
||||
releaseExclusiveLock();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all reference entries having a given correlation type and value
|
||||
*
|
||||
* @param aType Type to use for matching
|
||||
* @param aValue Value to use for matching
|
||||
*
|
||||
* @return List of all global file instances with a type and value
|
||||
*
|
||||
* @throws EamDbException
|
||||
*/
|
||||
@Override
|
||||
public List<EamGlobalFileInstance> getReferenceInstancesByTypeValue(EamArtifact.Type aType, String aValue) throws EamDbException {
|
||||
try{
|
||||
acquireSharedLock();
|
||||
return super.getReferenceInstancesByTypeValue(aType, aValue);
|
||||
} finally {
|
||||
releaseSharedLock();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new EamArtifact.Type to the db.
|
||||
*
|
||||
* @param newType New type to add.
|
||||
*
|
||||
* @return ID of this new Correlation Type
|
||||
*
|
||||
* @throws EamDbException
|
||||
*/
|
||||
@Override
|
||||
public int newCorrelationType(EamArtifact.Type newType) throws EamDbException {
|
||||
try{
|
||||
acquireExclusiveLock();
|
||||
return super.newCorrelationType(newType);
|
||||
} finally {
|
||||
releaseExclusiveLock();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the list of EamArtifact.Type's that will be used to correlate
|
||||
* artifacts.
|
||||
*
|
||||
* @return List of EamArtifact.Type's. If none are defined in the database,
|
||||
* the default list will be returned.
|
||||
*
|
||||
* @throws EamDbException
|
||||
*/
|
||||
@Override
|
||||
public List<EamArtifact.Type> getCorrelationTypes() throws EamDbException {
|
||||
try{
|
||||
acquireSharedLock();
|
||||
return super.getCorrelationTypes();
|
||||
} finally {
|
||||
releaseSharedLock();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the list of enabled EamArtifact.Type's that will be used to correlate
|
||||
* artifacts.
|
||||
*
|
||||
* @return List of enabled EamArtifact.Type's. If none are defined in the
|
||||
* database, the default list will be returned.
|
||||
*
|
||||
* @throws EamDbException
|
||||
*/
|
||||
@Override
|
||||
public List<EamArtifact.Type> getEnabledCorrelationTypes() throws EamDbException {
|
||||
try{
|
||||
acquireSharedLock();
|
||||
return super.getEnabledCorrelationTypes();
|
||||
} finally {
|
||||
releaseSharedLock();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the list of supported EamArtifact.Type's that can be used to
|
||||
* correlate artifacts.
|
||||
*
|
||||
* @return List of supported EamArtifact.Type's. If none are defined in the
|
||||
* database, the default list will be returned.
|
||||
*
|
||||
* @throws EamDbException
|
||||
*/
|
||||
@Override
|
||||
public List<EamArtifact.Type> getSupportedCorrelationTypes() throws EamDbException {
|
||||
try{
|
||||
acquireSharedLock();
|
||||
return super.getSupportedCorrelationTypes();
|
||||
} finally {
|
||||
releaseSharedLock();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update a EamArtifact.Type.
|
||||
*
|
||||
* @param aType EamArtifact.Type to update.
|
||||
*
|
||||
* @throws EamDbException
|
||||
*/
|
||||
@Override
|
||||
public void updateCorrelationType(EamArtifact.Type aType) throws EamDbException {
|
||||
try{
|
||||
acquireExclusiveLock();
|
||||
super.updateCorrelationType(aType);
|
||||
} finally {
|
||||
releaseExclusiveLock();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the EamArtifact.Type that has the given Type.Id.
|
||||
*
|
||||
* @param typeId Type.Id of Correlation Type to get
|
||||
*
|
||||
* @return EamArtifact.Type or null if it doesn't exist.
|
||||
*
|
||||
* @throws EamDbException
|
||||
*/
|
||||
@Override
|
||||
public EamArtifact.Type getCorrelationTypeById(int typeId) throws EamDbException {
|
||||
try{
|
||||
acquireSharedLock();
|
||||
return super.getCorrelationTypeById(typeId);
|
||||
} finally {
|
||||
releaseSharedLock();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Acquire the lock that provides exclusive access to the case database.
|
||||
* Call this method in a try block with a call to
|
||||
* the lock release method in an associated finally block.
|
||||
*/
|
||||
private void acquireExclusiveLock() {
|
||||
rwLock.writeLock().lock();
|
||||
}
|
||||
|
||||
/**
|
||||
* Release the lock that provides exclusive access to the database.
|
||||
* This method should always be called in the finally
|
||||
* block of a try block in which the lock was acquired.
|
||||
*/
|
||||
private void releaseExclusiveLock() {
|
||||
rwLock.writeLock().unlock();
|
||||
}
|
||||
|
||||
/**
|
||||
* Acquire the lock that provides shared access to the case database.
|
||||
* Call this method in a try block with a call to the
|
||||
* lock release method in an associated finally block.
|
||||
*/
|
||||
private void acquireSharedLock() {
|
||||
rwLock.readLock().lock();
|
||||
}
|
||||
|
||||
/**
|
||||
* Release the lock that provides shared access to the database.
|
||||
* This method should always be called in the finally block
|
||||
* of a try block in which the lock was acquired.
|
||||
*/
|
||||
private void releaseSharedLock() {
|
||||
rwLock.readLock().unlock();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -21,6 +21,7 @@ package org.sleuthkit.autopsy.centralrepository.datamodel;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.InvalidPathException;
|
||||
import java.sql.Connection;
|
||||
import java.sql.DriverManager;
|
||||
import java.sql.SQLException;
|
||||
@ -139,7 +140,7 @@ public final class SqliteEamDbSettings {
|
||||
File dbDir = new File(getDbDirectory());
|
||||
Files.createDirectories(dbDir.toPath());
|
||||
LOGGER.log(Level.INFO, "sqlite directory did not exist, created it at {0}.", getDbDirectory()); // NON-NLS
|
||||
} catch (IOException ex) {
|
||||
} catch (IOException | InvalidPathException | SecurityException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Failed to create sqlite database directory.", ex); // NON-NLS
|
||||
return false;
|
||||
}
|
||||
@ -162,7 +163,8 @@ public final class SqliteEamDbSettings {
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the current settings to get an ephemeral client connection for testing.
|
||||
* Use the current settings to get an ephemeral client connection for
|
||||
* testing.
|
||||
*
|
||||
* If the directory path does not exist, it will return null.
|
||||
*
|
||||
@ -186,8 +188,8 @@ public final class SqliteEamDbSettings {
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the current settings and the validation query
|
||||
* to test the connection to the database.
|
||||
* Use the current settings and the validation query to test the connection
|
||||
* to the database.
|
||||
*
|
||||
* @return true if successfull connection, else false.
|
||||
*/
|
||||
@ -203,8 +205,8 @@ public final class SqliteEamDbSettings {
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the current settings and the schema version query
|
||||
* to test the database schema.
|
||||
* Use the current settings and the schema version query to test the
|
||||
* database schema.
|
||||
*
|
||||
* @return true if successfull connection, else false.
|
||||
*/
|
||||
@ -247,7 +249,6 @@ public final class SqliteEamDbSettings {
|
||||
|
||||
// NOTE: The organizations will only have a small number of rows, so
|
||||
// an index is probably not worthwhile.
|
||||
|
||||
StringBuilder createCasesTable = new StringBuilder();
|
||||
createCasesTable.append("CREATE TABLE IF NOT EXISTS cases (");
|
||||
createCasesTable.append("id integer primary key autoincrement NOT NULL,");
|
||||
@ -346,7 +347,6 @@ public final class SqliteEamDbSettings {
|
||||
|
||||
// NOTE: the db_info table currenly only has 1 row, so having an index
|
||||
// provides no benefit.
|
||||
|
||||
Connection conn = null;
|
||||
try {
|
||||
conn = getEphemeralConnection();
|
||||
|
@ -13,7 +13,7 @@ EamSqliteSettingsDialog.bnCancel.text=Cancel
|
||||
EamSqliteSettingsDialog.lbTestDatabase.text=
|
||||
EamSqliteSettingsDialog.bnTestDatabase.text=Test Connection
|
||||
EamSqliteSettingsDialog.lbTestDatabaseWarning.text=
|
||||
EamSqliteSettingsDialog.bnDatabasePathFileOpen.text=Open...
|
||||
EamSqliteSettingsDialog.bnDatabasePathFileOpen.text=Browse...
|
||||
EamSqliteSettingsDialog.tfDatabasePath.toolTipText=Filename and path to store SQLite db file
|
||||
EamSqliteSettingsDialog.tfDatabasePath.text=
|
||||
EamSqliteSettingsDialog.lbDatabasePath.text=Database Path :
|
||||
@ -52,24 +52,16 @@ ManageTagsDialog.cancelButton.text=Cancel
|
||||
ManageArtifactTypesDialog.taInstructionsMsg.text=Enable one or more correlation properties to use for correlation during ingest. Note, these properties are global and impact all users of the central repository.
|
||||
EamSqliteSettingsDialog.bnOk.text=OK
|
||||
EamPostgresSettingsDialog.bnSave.text=Save
|
||||
EamDbSettingsDialog.pnDatabaseConnectionSettings.border.title=Database Settings
|
||||
EamDbSettingsDialog.rdioBnPostgreSQL.text=PostgreSQL
|
||||
EamDbSettingsDialog.rdioBnSQLite.text=SQLite
|
||||
EamDbSettingsDialog.bnDatabasePathFileOpen.text=Open...
|
||||
EamDbSettingsDialog.bnDatabasePathFileOpen.text=Browse...
|
||||
EamDbSettingsDialog.tfDatabasePath.toolTipText=Filename and path to store SQLite db file
|
||||
EamDbSettingsDialog.tfDatabasePath.text=
|
||||
EamDbSettingsDialog.lbDatabasePath.text=Database Path :
|
||||
EamDbSettingsDialog.rdioBnDisabled.text=Disabled
|
||||
EamDbSettingsDialog.bnCancel.text=Cancel
|
||||
EamDbSettingsDialog.bnOk.text=OK
|
||||
EamDbSettingsDialog.bnTest.text=Test
|
||||
EamDbSettingsDialog.lbHostName.text=Host Name / IP :
|
||||
EamDbSettingsDialog.lbDatabaseName.text=Database name :
|
||||
EamDbSettingsDialog.lbUserPassword.text=User Password :
|
||||
EamDbSettingsDialog.lbUserName.text=User Name :
|
||||
EamDbSettingsDialog.lbPort.text=Port :
|
||||
EamDbSettingsDialog.bnCreateDb.text=Create
|
||||
EamDbSettingsDialog.pnSetupGuidance.border.title=Setup Guidance
|
||||
GlobalSettingsPanel.pnDatabaseConfiguration.title=Database Configuration
|
||||
GlobalSettingsPanel.lbDbPlatformTypeLabel.text=Type:
|
||||
GlobalSettingsPanel.lbDbNameLabel.text=Name:
|
||||
|
@ -29,317 +29,35 @@
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="1" attributes="0">
|
||||
<Component id="pnSetupGuidance" max="32767" attributes="0"/>
|
||||
<Component id="pnDatabaseConnectionSettings" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="pnButtons" alignment="1" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="pnSetupGuidance" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="pnDatabaseConnectionSettings" min="-2" pref="348" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="pnButtons" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="pnDatabaseConnectionSettings">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
|
||||
<TitledBorder title="Database Settings">
|
||||
<ResourceString PropertyName="titleX" bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.pnDatabaseConnectionSettings.border.title" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<Font PropertyName="font" name="Tahoma" size="12" style="0"/>
|
||||
</TitledBorder>
|
||||
</Border>
|
||||
</Property>
|
||||
<Property name="name" type="java.lang.String" value="" noResource="true"/>
|
||||
</Properties>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="rdioBnPostgreSQL" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="rdioBnSQLite" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="rdioBnDisabled" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="pnButtons" max="32767" attributes="0"/>
|
||||
<Component id="pnSQLiteSettings" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="pnPostgreSQLSettings" alignment="1" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="rdioBnDisabled" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="13" max="-2" attributes="0"/>
|
||||
<Component id="rdioBnSQLite" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="10" max="-2" attributes="0"/>
|
||||
<Component id="pnSQLiteSettings" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="12" max="-2" attributes="0"/>
|
||||
<Component id="rdioBnPostgreSQL" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="pnPostgreSQLSettings" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="329" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="pnButtons" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="10" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="pnSQLiteSettings">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo">
|
||||
<EtchetBorder/>
|
||||
</Border>
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="lbDatabasePath" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="tfDatabasePath" min="-2" pref="343" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="bnDatabasePathFileOpen" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="lbDatabasePath" alignment="3" min="-2" pref="23" max="-2" attributes="0"/>
|
||||
<Component id="tfDatabasePath" alignment="3" min="-2" pref="23" max="-2" attributes="0"/>
|
||||
<Component id="bnDatabasePathFileOpen" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JLabel" name="lbDatabasePath">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.lbDatabasePath.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="tfDatabasePath">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.tfDatabasePath.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.tfDatabasePath.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="focusLost" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="tfDatabasePathFocusLost"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="bnDatabasePathFileOpen">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.bnDatabasePathFileOpen.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="bnDatabasePathFileOpenActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="pnPostgreSQLSettings">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo">
|
||||
<EtchetBorder/>
|
||||
</Border>
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="lbHostName" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbPort" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbDatabaseName" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbUserName" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbUserPassword" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="tbDbUsername" alignment="0" pref="439" max="32767" attributes="0"/>
|
||||
<Component id="tbDbName" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="tbDbPort" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="tbDbHostname" max="32767" attributes="0"/>
|
||||
<Component id="jpDbPassword" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="1" attributes="0">
|
||||
<Component id="tbDbHostname" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbHostName" alignment="1" min="-2" pref="22" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="tbDbPort" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="lbPort" alignment="0" min="-2" pref="20" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="tbDbName" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="lbDatabaseName" alignment="0" min="-2" pref="20" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="tbDbUsername" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="lbUserName" alignment="0" min="-2" pref="20" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="lbUserPassword" alignment="3" min="-2" pref="20" max="-2" attributes="0"/>
|
||||
<Component id="jpDbPassword" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace pref="19" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JLabel" name="lbHostName">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.lbHostName.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lbPort">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.lbPort.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lbUserName">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.lbUserName.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lbUserPassword">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.lbUserPassword.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lbDatabaseName">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.lbDatabaseName.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="tbDbHostname">
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="tbDbPort">
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="tbDbName">
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="tbDbUsername">
|
||||
</Component>
|
||||
<Component class="javax.swing.JPasswordField" name="jpDbPassword">
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Component class="javax.swing.JRadioButton" name="rdioBnSQLite">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.rdioBnSQLite.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="rdioBnSQLiteActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JRadioButton" name="rdioBnPostgreSQL">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.rdioBnPostgreSQL.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="rdioBnPostgreSQLActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JRadioButton" name="rdioBnDisabled">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.rdioBnDisabled.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="rdioBnDisabledActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="pnButtons">
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="bnTest" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="lbTestIcon" min="-2" pref="20" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="bnCreateDb" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="lbCreateIcon" min="-2" pref="21" max="-2" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="bnOk" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="11" max="-2" attributes="0"/>
|
||||
@ -352,20 +70,11 @@
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="lbCreateIcon" max="32767" attributes="0"/>
|
||||
<Component id="lbTestIcon" alignment="1" max="32767" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="bnOk" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="bnCancel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="bnTest" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="bnCreateDb" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
@ -391,40 +100,13 @@
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="bnOkActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="bnTest">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.bnTest.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="bnTestActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="bnCreateDb">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.bnCreateDb.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="bnCreateDbActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lbTestIcon">
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lbCreateIcon">
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="pnSetupGuidance">
|
||||
<Container class="javax.swing.JPanel" name="pnSQLiteSettings">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
|
||||
<TitledBorder title="Setup Guidance">
|
||||
<ResourceString PropertyName="titleX" bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.pnSetupGuidance.border.title" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<Font PropertyName="font" name="Tahoma" size="12" style="0"/>
|
||||
</TitledBorder>
|
||||
<Border info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo">
|
||||
<EtchetBorder/>
|
||||
</Border>
|
||||
</Property>
|
||||
</Properties>
|
||||
@ -434,56 +116,177 @@
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jScrollPane1" max="32767" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="lbHostName" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbPort" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbUserName" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbDatabaseType" alignment="0" min="-2" pref="82" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="lbDatabasePath" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbUserPassword" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="10" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="cbDatabaseType" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="lbSingleUserSqLite" pref="467" max="32767" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="9" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="tfDatabasePath" max="32767" attributes="0"/>
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Component id="bnDatabasePathFileOpen" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="11" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="tbDbHostname" max="32767" attributes="0"/>
|
||||
<Component id="jpDbPassword" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="tbDbUsername" alignment="1" max="32767" attributes="0"/>
|
||||
<Component id="tbDbPort" alignment="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="10" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="6" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="cbDatabaseType" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbSingleUserSqLite" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="lbDatabaseType" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jScrollPane1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="lbDatabasePath" alignment="3" min="-2" pref="23" max="-2" attributes="0"/>
|
||||
<Component id="tfDatabasePath" alignment="3" min="-2" pref="23" max="-2" attributes="0"/>
|
||||
<Component id="bnDatabasePathFileOpen" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="tbDbHostname" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbHostName" alignment="3" min="-2" pref="22" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="tbDbPort" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbPort" alignment="3" min="-2" pref="20" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="tbDbUsername" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbUserName" alignment="3" min="-2" pref="20" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="lbUserPassword" alignment="3" min="-2" pref="20" max="-2" attributes="0"/>
|
||||
<Component id="jpDbPassword" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="10" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JScrollPane" name="jScrollPane1">
|
||||
<Component class="javax.swing.JLabel" name="lbDatabasePath">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="null"/>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.lbDatabasePath.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JTextArea" name="taSetupGuidance">
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="tfDatabasePath">
|
||||
<Properties>
|
||||
<Property name="editable" type="boolean" value="false"/>
|
||||
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||
<Color blue="f0" green="f0" red="f0" type="rgb"/>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.tfDatabasePath.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="columns" type="int" value="20"/>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Monospaced" size="12" style="0"/>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.tfDatabasePath.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="lineWrap" type="boolean" value="true"/>
|
||||
<Property name="rows" type="int" value="3"/>
|
||||
<Property name="tabSize" type="int" value="4"/>
|
||||
<Property name="wrapStyleWord" type="boolean" value="true"/>
|
||||
<Property name="autoscrolls" type="boolean" value="false"/>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="null"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="bnDatabasePathFileOpen">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.bnDatabasePathFileOpen.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="bnDatabasePathFileOpenActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lbHostName">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.lbHostName.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="tbDbHostname">
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lbPort">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.lbPort.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="tbDbPort">
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lbUserName">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.lbUserName.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="tbDbUsername">
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lbUserPassword">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.lbUserPassword.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JPasswordField" name="jpDbPassword">
|
||||
</Component>
|
||||
<Component class="javax.swing.JComboBox" name="cbDatabaseType">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
|
||||
<Connection code="new javax.swing.DefaultComboBoxModel<>(new EamDbPlatformEnum[]{EamDbPlatformEnum.POSTGRESQL, EamDbPlatformEnum.SQLITE})" type="code"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="cbDatabaseTypeActionPerformed"/>
|
||||
</Events>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<EamDbPlatformEnum>"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lbSingleUserSqLite">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.lbSingleUserSqLite.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lbDatabaseType">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.lbDatabaseType.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
<Property name="verifyInputWhenFocusTarget" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -25,6 +25,10 @@
|
||||
<Component id="pnDatabaseContentButtons" max="32767" attributes="0"/>
|
||||
<Component id="tbOops" alignment="1" max="32767" attributes="0"/>
|
||||
<Component id="pnDatabaseConfiguration" max="32767" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="cbUseCentralRepo" min="-2" pref="186" max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
@ -33,13 +37,14 @@
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="cbUseCentralRepo" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="pnDatabaseConfiguration" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="tbOops" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="pnDatabaseContentButtons" min="-2" pref="50" max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="18" max="32767" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
@ -240,5 +245,15 @@
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="cbUseCentralRepo">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="GlobalSettingsPanel.cbUseCentralRepo.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="cbUseCentralRepoActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
|
@ -29,6 +29,8 @@ import org.sleuthkit.autopsy.events.AutopsyEvent;
|
||||
import org.sleuthkit.autopsy.ingest.IngestManager;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleGlobalSettingsPanel;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.EamDbPlatformEnum;
|
||||
import static org.sleuthkit.autopsy.centralrepository.datamodel.EamDbPlatformEnum.DISABLED;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings;
|
||||
|
||||
@ -53,7 +55,8 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i
|
||||
addIngestJobEventsListener();
|
||||
}
|
||||
|
||||
@Messages({"GlobalSettingsPanel.title=Central Repository Settings"})
|
||||
@Messages({"GlobalSettingsPanel.title=Central Repository Settings",
|
||||
"GlobalSettingsPanel.cbUseCentralRepo.text=Use a Central Repository"})
|
||||
private void customizeComponents() {
|
||||
setName(Bundle.GlobalSettingsPanel_title());
|
||||
}
|
||||
@ -85,6 +88,7 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i
|
||||
bnManageTags = new javax.swing.JButton();
|
||||
bnManageTypes = new javax.swing.JButton();
|
||||
tbOops = new javax.swing.JTextField();
|
||||
cbUseCentralRepo = new javax.swing.JCheckBox();
|
||||
|
||||
setName(""); // NOI18N
|
||||
|
||||
@ -198,6 +202,13 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i
|
||||
tbOops.setText(org.openide.util.NbBundle.getMessage(GlobalSettingsPanel.class, "GlobalSettingsPanel.tbOops.text")); // NOI18N
|
||||
tbOops.setBorder(null);
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(cbUseCentralRepo, org.openide.util.NbBundle.getMessage(GlobalSettingsPanel.class, "GlobalSettingsPanel.cbUseCentralRepo.text")); // NOI18N
|
||||
cbUseCentralRepo.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
cbUseCentralRepoActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
@ -207,50 +218,65 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(pnDatabaseContentButtons, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(tbOops, javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(pnDatabaseConfiguration, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addComponent(pnDatabaseConfiguration, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(cbUseCentralRepo, javax.swing.GroupLayout.PREFERRED_SIZE, 186, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(0, 0, Short.MAX_VALUE)))
|
||||
.addContainerGap())
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(cbUseCentralRepo)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(pnDatabaseConfiguration, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(tbOops, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(pnDatabaseContentButtons, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(0, 18, Short.MAX_VALUE))
|
||||
.addContainerGap())
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void bnImportDatabaseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bnImportDatabaseActionPerformed
|
||||
store();
|
||||
ImportHashDatabaseDialog dialog = new ImportHashDatabaseDialog();
|
||||
firePropertyChange(OptionsPanelController.PROP_VALID, null, null);
|
||||
}//GEN-LAST:event_bnImportDatabaseActionPerformed
|
||||
|
||||
private void bnManageTagsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bnManageTagsActionPerformed
|
||||
store();
|
||||
ManageTagsDialog dialog = new ManageTagsDialog();
|
||||
firePropertyChange(OptionsPanelController.PROP_VALID, null, null);
|
||||
}//GEN-LAST:event_bnManageTagsActionPerformed
|
||||
|
||||
private void bnManageTypesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bnManageTypesActionPerformed
|
||||
store();
|
||||
ManageCorrelationPropertiesDialog dialog = new ManageCorrelationPropertiesDialog();
|
||||
firePropertyChange(OptionsPanelController.PROP_VALID, null, null);
|
||||
}//GEN-LAST:event_bnManageTypesActionPerformed
|
||||
|
||||
private void bnDbConfigureActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bnDbConfigureActionPerformed
|
||||
store();
|
||||
EamDbSettingsDialog dialog = new EamDbSettingsDialog();
|
||||
load(); // reload db settings content and update buttons
|
||||
}//GEN-LAST:event_bnDbConfigureActionPerformed
|
||||
|
||||
private void cbUseCentralRepoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbUseCentralRepoActionPerformed
|
||||
//if saved setting is disabled checkbox should be disabled already
|
||||
enableDatabaseConfigureButton(cbUseCentralRepo.isSelected());
|
||||
enableButtonSubComponents(cbUseCentralRepo.isSelected() && !EamDbPlatformEnum.getSelectedPlatform().equals(DISABLED));
|
||||
this.ingestStateUpdated();
|
||||
firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
|
||||
}//GEN-LAST:event_cbUseCentralRepoActionPerformed
|
||||
|
||||
@Override
|
||||
@Messages({"GlobalSettingsPanel.validationerrMsg.mustConfigure=Configure the database to enable this module."})
|
||||
public void load() {
|
||||
tbOops.setText("");
|
||||
|
||||
enableAllSubComponents(false);
|
||||
EamDbPlatformEnum selectedPlatform = EamDbPlatformEnum.getSelectedPlatform();
|
||||
|
||||
cbUseCentralRepo.setSelected(EamDbUtil.useCentralRepo()); // NON-NLS
|
||||
switch (selectedPlatform) {
|
||||
case POSTGRESQL:
|
||||
PostgresEamDbSettings dbSettingsPg = new PostgresEamDbSettings();
|
||||
@ -270,16 +296,16 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i
|
||||
lbDbPlatformValue.setText(EamDbPlatformEnum.DISABLED.toString());
|
||||
lbDbNameValue.setText("");
|
||||
lbDbLocationValue.setText("");
|
||||
enableDatabaseConfigureButton(true);
|
||||
enableDatabaseConfigureButton(cbUseCentralRepo.isSelected());
|
||||
tbOops.setText(Bundle.GlobalSettingsPanel_validationerrMsg_mustConfigure());
|
||||
break;
|
||||
}
|
||||
|
||||
this.ingestStateUpdated();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void store() { // Click OK or Apply on Options Panel
|
||||
EamDbUtil.setUseCentralRepo(cbUseCentralRepo.isSelected());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -293,6 +319,7 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i
|
||||
|
||||
@Override
|
||||
public void saveSettings() { // Click OK on Global Settings Panel
|
||||
store();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -334,7 +361,10 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i
|
||||
|
||||
if (IngestManager.getInstance().isIngestRunning()) {
|
||||
tbOops.setText(Bundle.GlobalSettingsPanel_validationErrMsg_ingestRunning());
|
||||
enableAllSubComponents(false);
|
||||
cbUseCentralRepo.setEnabled(false);
|
||||
} else if (!cbUseCentralRepo.isEnabled()) {
|
||||
cbUseCentralRepo.setEnabled(true);
|
||||
load();
|
||||
}
|
||||
}
|
||||
|
||||
@ -347,8 +377,8 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i
|
||||
* @return True
|
||||
*/
|
||||
private boolean enableAllSubComponents(Boolean enable) {
|
||||
enableDatabaseConfigureButton(enable);
|
||||
enableButtonSubComponents(enable);
|
||||
enableDatabaseConfigureButton(cbUseCentralRepo.isSelected() && enable);
|
||||
enableButtonSubComponents(cbUseCentralRepo.isSelected() && enable);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -359,9 +389,18 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i
|
||||
*
|
||||
* @return True
|
||||
*/
|
||||
private boolean enableDatabaseConfigureButton(Boolean enable) {
|
||||
bnDbConfigure.setEnabled(enable);
|
||||
return true;
|
||||
private void enableDatabaseConfigureButton(Boolean enable) {
|
||||
boolean ingestRunning = IngestManager.getInstance().isIngestRunning();
|
||||
pnDatabaseConfiguration.setEnabled(enable && !ingestRunning);
|
||||
pnDatabaseContentButtons.setEnabled(enable && !ingestRunning);
|
||||
bnDbConfigure.setEnabled(enable && !ingestRunning);
|
||||
lbDbLocationLabel.setEnabled(enable && !ingestRunning);
|
||||
lbDbLocationValue.setEnabled(enable && !ingestRunning);
|
||||
lbDbNameLabel.setEnabled(enable && !ingestRunning);
|
||||
lbDbNameValue.setEnabled(enable && !ingestRunning);
|
||||
lbDbPlatformTypeLabel.setEnabled(enable && !ingestRunning);
|
||||
lbDbPlatformValue.setEnabled(enable && !ingestRunning);
|
||||
tbOops.setEnabled(enable && !ingestRunning);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -373,9 +412,10 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i
|
||||
* @return True
|
||||
*/
|
||||
private boolean enableButtonSubComponents(Boolean enable) {
|
||||
bnManageTypes.setEnabled(enable);
|
||||
bnImportDatabase.setEnabled(enable);
|
||||
bnManageTags.setEnabled(enable);
|
||||
boolean ingestRunning = IngestManager.getInstance().isIngestRunning();
|
||||
bnManageTypes.setEnabled(enable && !ingestRunning);
|
||||
bnImportDatabase.setEnabled(enable && !ingestRunning);
|
||||
bnManageTags.setEnabled(enable && !ingestRunning);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -384,6 +424,7 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i
|
||||
private javax.swing.JButton bnImportDatabase;
|
||||
private javax.swing.JButton bnManageTags;
|
||||
private javax.swing.JButton bnManageTypes;
|
||||
private javax.swing.JCheckBox cbUseCentralRepo;
|
||||
private javax.swing.JLabel lbDbLocationLabel;
|
||||
private javax.swing.JLabel lbDbLocationValue;
|
||||
private javax.swing.JLabel lbDbNameLabel;
|
||||
|
@ -72,6 +72,7 @@ final class ImportHashDatabaseDialog extends javax.swing.JDialog {
|
||||
|
||||
private final JFileChooser fileChooser = new JFileChooser();
|
||||
private final static String LAST_FILE_PATH_KEY = "CentralRepositoryImport_Path"; // NON-NLS
|
||||
private final int HASH_IMPORT_THRESHOLD = 10000;
|
||||
private EamOrganization selectedOrg = null;
|
||||
private List<EamOrganization> orgs = null;
|
||||
private final Collection<JTextField> textBoxes;
|
||||
@ -533,7 +534,8 @@ final class ImportHashDatabaseDialog extends javax.swing.JDialog {
|
||||
String errorMessage = Bundle.ImportHashDatabaseDialog_errorMessage_failedToOpenHashDbMsg(selectedFilePath);
|
||||
// Future, make UI handle more than the "FILES" type.
|
||||
try {
|
||||
EamArtifact.Type contentType = EamArtifact.getDefaultCorrelationTypes().get(0); // get "FILES" type
|
||||
EamDb dbManager = EamDb.getInstance();
|
||||
EamArtifact.Type contentType = dbManager.getCorrelationTypeById(EamArtifact.FILES_TYPE_ID); // get "FILES" type
|
||||
// run in the background and close dialog
|
||||
SwingUtilities.invokeLater(new ImportHashDatabaseWorker(selectedFilePath, knownStatus, globalSetID, contentType)::execute);
|
||||
dispose();
|
||||
@ -648,7 +650,7 @@ final class ImportHashDatabaseDialog extends javax.swing.JDialog {
|
||||
|
||||
globalInstances.add(eamGlobalFileInstance);
|
||||
|
||||
if(numLines % 10000 == 0){
|
||||
if(numLines % HASH_IMPORT_THRESHOLD == 0){
|
||||
dbManager.bulkInsertReferenceTypeEntries(globalInstances, contentType);
|
||||
globalInstances.clear();
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
#Updated by build script
|
||||
#Thu, 22 Jun 2017 08:50:21 -0400
|
||||
#Tue, 29 Aug 2017 09:47:52 -0400
|
||||
LBL_splash_window_title=Starting Autopsy
|
||||
SPLASH_HEIGHT=314
|
||||
SPLASH_WIDTH=538
|
||||
|
@ -1,4 +1,4 @@
|
||||
#Updated by build script
|
||||
#Thu, 22 Jun 2017 08:50:21 -0400
|
||||
#Tue, 29 Aug 2017 09:47:52 -0400
|
||||
CTL_MainWindow_Title=Autopsy 4.4.1
|
||||
CTL_MainWindow_Title_No_Project=Autopsy 4.4.1
|
||||
|
Loading…
x
Reference in New Issue
Block a user