mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-17 18:17:43 +00:00
Cleanup
This commit is contained in:
parent
143e530c32
commit
61b7f89788
@ -34,7 +34,6 @@ import java.time.LocalDate;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import org.openide.util.NbBundle;
|
|
||||||
import org.openide.util.NbBundle.Messages;
|
import org.openide.util.NbBundle.Messages;
|
||||||
import org.sleuthkit.autopsy.casemodule.Case;
|
import org.sleuthkit.autopsy.casemodule.Case;
|
||||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||||
@ -1312,7 +1311,8 @@ public abstract class AbstractSqlEamDb implements EamDb {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check whether the given reference set exists in the central repository.
|
* Check whether a reference set with the given parameters exists in the central repository.
|
||||||
|
* Used to check whether reference sets saved in the settings are still present.
|
||||||
* @param referenceSetID
|
* @param referenceSetID
|
||||||
* @param setName
|
* @param setName
|
||||||
* @param version
|
* @param version
|
||||||
@ -1773,14 +1773,15 @@ public abstract class AbstractSqlEamDb implements EamDb {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check whether a reference set with the given name/version is in the central repo
|
* Check whether a reference set with the given name/version is in the central repo.
|
||||||
* @param hashSetName
|
* Used to check for name collisions when creating reference sets.
|
||||||
|
* @param referenceSetName
|
||||||
* @param version
|
* @param version
|
||||||
* @return true if a matching set is found
|
* @return true if a matching set is found
|
||||||
* @throws EamDbException
|
* @throws EamDbException
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean referenceSetExists(String hashSetName, String version) throws EamDbException{
|
public boolean referenceSetExists(String referenceSetName, String version) throws EamDbException{
|
||||||
Connection conn = connect();
|
Connection conn = connect();
|
||||||
|
|
||||||
PreparedStatement preparedStatement1 = null;
|
PreparedStatement preparedStatement1 = null;
|
||||||
@ -1789,7 +1790,7 @@ public abstract class AbstractSqlEamDb implements EamDb {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
preparedStatement1 = conn.prepareStatement(sql1);
|
preparedStatement1 = conn.prepareStatement(sql1);
|
||||||
preparedStatement1.setString(1, hashSetName);
|
preparedStatement1.setString(1, referenceSetName);
|
||||||
preparedStatement1.setString(2, version);
|
preparedStatement1.setString(2, version);
|
||||||
resultSet = preparedStatement1.executeQuery();
|
resultSet = preparedStatement1.executeQuery();
|
||||||
return (resultSet.next());
|
return (resultSet.next());
|
||||||
|
@ -361,23 +361,25 @@ public interface EamDb {
|
|||||||
public void deleteReferenceSet(int referenceSetID) throws EamDbException;
|
public void deleteReferenceSet(int referenceSetID) throws EamDbException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check whether the given reference set exists in the central repository.
|
* Check whether a reference set with the given parameters exists in the central repository.
|
||||||
|
* Used to check whether reference sets saved in the settings are still present.
|
||||||
* @param referenceSetID
|
* @param referenceSetID
|
||||||
* @param hashSetName
|
* @param referenceSetName
|
||||||
* @param version
|
* @param version
|
||||||
* @return true if a matching entry exists in the central repository
|
* @return true if a matching entry exists in the central repository
|
||||||
* @throws EamDbException
|
* @throws EamDbException
|
||||||
*/
|
*/
|
||||||
public boolean referenceSetIsValid(int referenceSetID, String hashSetName, String version) throws EamDbException;
|
public boolean referenceSetIsValid(int referenceSetID, String referenceSetName, String version) throws EamDbException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check whether a reference set with the given name/version is in the central repo
|
* Check whether a reference set with the given name/version is in the central repo.
|
||||||
* @param hashSetName
|
* Used to check for name collisions when creating reference sets.
|
||||||
|
* @param referenceSetName
|
||||||
* @param version
|
* @param version
|
||||||
* @return true if a matching set is found
|
* @return true if a matching set is found
|
||||||
* @throws EamDbException
|
* @throws EamDbException
|
||||||
*/
|
*/
|
||||||
public boolean referenceSetExists(String hashSetName, String version) throws EamDbException;
|
public boolean referenceSetExists(String referenceSetName, String version) throws EamDbException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if the given file hash is in this reference set.
|
* Check if the given file hash is in this reference set.
|
||||||
|
@ -667,17 +667,18 @@ public class SqliteEamDb extends AbstractSqlEamDb {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check whether a reference set with the given name/version is in the central repo
|
* Check whether a reference set with the given name/version is in the central repo.
|
||||||
* @param hashSetName
|
* Used to check for name collisions when creating reference sets.
|
||||||
|
* @param referenceSetName
|
||||||
* @param version
|
* @param version
|
||||||
* @return true if a matching set is found
|
* @return true if a matching set is found
|
||||||
* @throws EamDbException
|
* @throws EamDbException
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean referenceSetExists(String hashSetName, String version) throws EamDbException {
|
public boolean referenceSetExists(String referenceSetName, String version) throws EamDbException {
|
||||||
try{
|
try{
|
||||||
acquireSharedLock();
|
acquireSharedLock();
|
||||||
return super.referenceSetExists(hashSetName, version);
|
return super.referenceSetExists(referenceSetName, version);
|
||||||
} finally {
|
} finally {
|
||||||
releaseSharedLock();
|
releaseSharedLock();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user