mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-17 02:07:42 +00:00
4440 change case node icon, remove case count query and methods
This commit is contained in:
parent
4d6add63db
commit
e5b24b1651
@ -1119,49 +1119,6 @@ abstract class AbstractSqlEamDb implements EamDb {
|
||||
return instanceCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves number of unique cases in the
|
||||
* database that are associated with the artifactType and artifactValue of
|
||||
* the given artifact.
|
||||
*
|
||||
* @param aType The type of the artifact
|
||||
* @param value The correlation value
|
||||
*
|
||||
* @return Number of unique cases
|
||||
*/
|
||||
@Override
|
||||
public Long getCountOfCasesWithValue(CorrelationAttributeInstance.Type aType, String value) throws EamDbException, CorrelationAttributeNormalizationException {
|
||||
String normalizedValue = CorrelationAttributeNormalizer.normalize(aType, value);
|
||||
|
||||
Connection conn = connect();
|
||||
|
||||
Long instanceCount = 0L;
|
||||
PreparedStatement preparedStatement = null;
|
||||
ResultSet resultSet = null;
|
||||
|
||||
String tableName = EamDbUtil.correlationTypeToInstanceTableName(aType);
|
||||
String sql
|
||||
= "SELECT count(DISTINCT case_id) FROM "
|
||||
+ tableName
|
||||
+ " WHERE value=?";
|
||||
|
||||
try {
|
||||
preparedStatement = conn.prepareStatement(sql);
|
||||
preparedStatement.setString(1, normalizedValue);
|
||||
resultSet = preparedStatement.executeQuery();
|
||||
resultSet.next();
|
||||
instanceCount = resultSet.getLong(1);
|
||||
} catch (SQLException ex) {
|
||||
throw new EamDbException("Error counting unique caseDisplayName/dataSource tuples having artifactType and artifactValue.", ex); // NON-NLS
|
||||
} finally {
|
||||
EamDbUtil.closeStatement(preparedStatement);
|
||||
EamDbUtil.closeResultSet(resultSet);
|
||||
EamDbUtil.closeConnection(conn);
|
||||
}
|
||||
|
||||
return instanceCount;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long getCountUniqueDataSources() throws EamDbException {
|
||||
Connection conn = connect();
|
||||
|
@ -304,18 +304,6 @@ public interface EamDb {
|
||||
*/
|
||||
Long getCountUniqueCaseDataSourceTuplesHavingTypeValue(CorrelationAttributeInstance.Type aType, String value) throws EamDbException, CorrelationAttributeNormalizationException;
|
||||
|
||||
/**
|
||||
* Retrieves number of unique cases in the
|
||||
* database that are associated with the artifactType and artifactValue of
|
||||
* the given artifact.
|
||||
*
|
||||
* @param aType EamArtifact.Type to search for
|
||||
* @param value Value to search for
|
||||
*
|
||||
* @return Number of unique cases
|
||||
*/
|
||||
Long getCountOfCasesWithValue(CorrelationAttributeInstance.Type aType, String value) throws EamDbException, CorrelationAttributeNormalizationException;
|
||||
|
||||
/**
|
||||
* Retrieves number of data sources in the database.
|
||||
*
|
||||
|
@ -544,28 +544,6 @@ final class SqliteEamDb extends AbstractSqlEamDb {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves number of unique cases in the
|
||||
* database that are associated with the artifactType and artifactValue of
|
||||
* the given artifact.
|
||||
*
|
||||
* @param aType The correlation type
|
||||
* @param value The value to search for
|
||||
*
|
||||
* @return Number of unique cases
|
||||
*
|
||||
* @throws EamDbException
|
||||
*/
|
||||
@Override
|
||||
public Long getCountOfCasesWithValue(CorrelationAttributeInstance.Type aType, String value) throws EamDbException, CorrelationAttributeNormalizationException {
|
||||
try {
|
||||
acquireSharedLock();
|
||||
return super.getCountUniqueDataSources();
|
||||
} finally {
|
||||
releaseSharedLock();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long getCountUniqueDataSources() throws EamDbException {
|
||||
try {
|
||||
|
@ -58,7 +58,7 @@ public final class InstanceCaseNode extends DisplayableItemNode {
|
||||
this.dataSourceToValueList = attributeValues;
|
||||
|
||||
this.setDisplayName(this.caseName);
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/fileset-icon-16.png"); //NON-NLS
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/image.png"); //NON-NLS
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user