mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-16 17:57:43 +00:00
Remove/change some public methods.
This commit is contained in:
parent
a46d369f7e
commit
2bb24e3d4d
@ -150,11 +150,11 @@ public class EamGlobalSet {
|
||||
* Return the FileKnown status as a KnownFilesType
|
||||
* @return KNOWN or KNOWN_BAD
|
||||
*/
|
||||
public HashDbManager.HashDatabase.KnownFilesType getKnownStatus(){
|
||||
public HashDbManager.HashDb.KnownFilesType getKnownStatus(){
|
||||
if(fileKnownStatus.equals(TskData.FileKnown.BAD)){
|
||||
return HashDbManager.HashDatabase.KnownFilesType.KNOWN_BAD;
|
||||
return HashDbManager.HashDb.KnownFilesType.KNOWN_BAD;
|
||||
}
|
||||
return HashDbManager.HashDatabase.KnownFilesType.KNOWN;
|
||||
return HashDbManager.HashDb.KnownFilesType.KNOWN;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -692,11 +692,6 @@ public class HashDbManager implements PropertyChangeListener {
|
||||
INDEXING_DONE
|
||||
}
|
||||
|
||||
enum DatabaseType{
|
||||
FILE,
|
||||
CENTRAL_REPOSITORY
|
||||
};
|
||||
|
||||
public String getHashSetName();
|
||||
|
||||
public String getDisplayName();
|
||||
@ -709,11 +704,11 @@ public class HashDbManager implements PropertyChangeListener {
|
||||
|
||||
public boolean getDefaultSearchDuringIngest();
|
||||
|
||||
void setSearchDuringIngest(boolean useForIngest);
|
||||
public void setSearchDuringIngest(boolean useForIngest);
|
||||
|
||||
public boolean getSendIngestMessages();
|
||||
|
||||
void setSendIngestMessages(boolean showInboxMessages);
|
||||
public void setSendIngestMessages(boolean showInboxMessages);
|
||||
|
||||
/**
|
||||
* Indicates whether the hash database accepts updates.
|
||||
@ -750,8 +745,6 @@ public class HashDbManager implements PropertyChangeListener {
|
||||
*/
|
||||
public boolean isValid() throws TskCoreException;
|
||||
|
||||
public int getHandle();
|
||||
|
||||
public String getIndexPath() throws TskCoreException;
|
||||
|
||||
public boolean hasIndexOnly() throws TskCoreException;
|
||||
@ -762,14 +755,11 @@ public class HashDbManager implements PropertyChangeListener {
|
||||
|
||||
public void removePropertyChangeListener(PropertyChangeListener pcl);
|
||||
|
||||
void close() throws TskCoreException;
|
||||
public void close() throws TskCoreException;
|
||||
|
||||
@Override
|
||||
public String toString();
|
||||
|
||||
DatabaseType getDatabaseType();
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -817,8 +807,7 @@ public class HashDbManager implements PropertyChangeListener {
|
||||
propertyChangeSupport.removePropertyChangeListener(pcl);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getHandle(){
|
||||
int getHandle(){
|
||||
return handle;
|
||||
}
|
||||
|
||||
@ -840,12 +829,8 @@ public class HashDbManager implements PropertyChangeListener {
|
||||
public void setIndexing(boolean indexing){
|
||||
this.indexing = indexing;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DatabaseType getDatabaseType(){
|
||||
return DatabaseType.FILE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getIndexPath() throws TskCoreException {
|
||||
return SleuthkitJNI.getHashDatabaseIndexPath(handle);
|
||||
}
|
||||
@ -996,7 +981,7 @@ public class HashDbManager implements PropertyChangeListener {
|
||||
return hasIndex();
|
||||
}
|
||||
|
||||
public boolean hasIndex() throws TskCoreException {
|
||||
boolean hasIndex() throws TskCoreException {
|
||||
return SleuthkitJNI.hashDatabaseHasLookupIndex(handle);
|
||||
}
|
||||
|
||||
@ -1005,11 +990,11 @@ public class HashDbManager implements PropertyChangeListener {
|
||||
return SleuthkitJNI.hashDatabaseIsIndexOnly(handle);
|
||||
}
|
||||
|
||||
public boolean canBeReIndexed() throws TskCoreException {
|
||||
boolean canBeReIndexed() throws TskCoreException {
|
||||
return SleuthkitJNI.hashDatabaseCanBeReindexed(handle);
|
||||
}
|
||||
|
||||
public boolean isIndexing() {
|
||||
boolean isIndexing() {
|
||||
return indexing;
|
||||
}
|
||||
|
||||
@ -1117,11 +1102,6 @@ public class HashDbManager implements PropertyChangeListener {
|
||||
propertyChangeSupport.removePropertyChangeListener(pcl);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getHandle(){
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasIndexOnly() throws TskCoreException{
|
||||
return true;
|
||||
@ -1137,15 +1117,15 @@ public class HashDbManager implements PropertyChangeListener {
|
||||
return getHashSetName() + " " + getVersion();
|
||||
}
|
||||
|
||||
public String getVersion(){
|
||||
String getVersion(){
|
||||
return version;
|
||||
}
|
||||
|
||||
public String getOrgName(){
|
||||
String getOrgName(){
|
||||
return orgName;
|
||||
}
|
||||
|
||||
public int getReferenceSetID(){
|
||||
int getReferenceSetID(){
|
||||
return referenceSetID;
|
||||
}
|
||||
|
||||
@ -1153,11 +1133,6 @@ public class HashDbManager implements PropertyChangeListener {
|
||||
public String getDatabasePath() throws TskCoreException {
|
||||
return "";
|
||||
}
|
||||
|
||||
@Override
|
||||
public DatabaseType getDatabaseType(){
|
||||
return DatabaseType.CENTRAL_REPOSITORY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getIndexPath() throws TskCoreException {
|
||||
@ -1311,7 +1286,6 @@ public class HashDbManager implements PropertyChangeListener {
|
||||
* Returns whether this database can be enabled.
|
||||
*
|
||||
* @return true if is valid, false otherwise
|
||||
* @throws TskCoreException
|
||||
*/
|
||||
@Override
|
||||
public boolean isValid() {
|
||||
|
@ -36,8 +36,8 @@ import org.sleuthkit.autopsy.core.RuntimeProperties;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.coreutils.PlatformUtil;
|
||||
import org.sleuthkit.autopsy.coreutils.XMLUtil;
|
||||
import org.sleuthkit.autopsy.modules.hashdatabase.HashDbManager.HashDb.DatabaseType;
|
||||
import org.sleuthkit.autopsy.modules.hashdatabase.HashDbManager.CentralRepoHashDb;
|
||||
import org.sleuthkit.autopsy.modules.hashdatabase.HashDbManager.HashDatabase;
|
||||
import org.sleuthkit.datamodel.TskCoreException;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Element;
|
||||
@ -297,6 +297,11 @@ final class HashLookupSettings implements Serializable {
|
||||
*/
|
||||
static final class HashDbInfo implements Serializable {
|
||||
|
||||
enum DatabaseType{
|
||||
FILE,
|
||||
CENTRAL_REPOSITORY
|
||||
};
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private final String hashSetName;
|
||||
private final HashDbManager.HashDatabase.KnownFilesType knownFilesType;
|
||||
@ -466,7 +471,8 @@ final class HashLookupSettings implements Serializable {
|
||||
return false;
|
||||
}
|
||||
|
||||
if( ! this.dbType.equals(hashDb.getDatabaseType())){
|
||||
if((this.dbType == DatabaseType.CENTRAL_REPOSITORY) && (! (hashDb instanceof CentralRepoHashDb))
|
||||
|| (this.dbType == DatabaseType.FILE) && (! (hashDb instanceof HashDatabase))){
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -474,19 +480,15 @@ final class HashLookupSettings implements Serializable {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(this.dbType.equals(DatabaseType.FILE)){
|
||||
// FILE types will always have unique names, so no more testing required
|
||||
return true;
|
||||
}
|
||||
|
||||
// Central repo tests
|
||||
CentralRepoHashDb crDb = (CentralRepoHashDb) hashDb;
|
||||
if(this.referenceSetID != crDb.getReferenceSetID()){
|
||||
return false;
|
||||
}
|
||||
|
||||
if(! version.equals(crDb.getVersion())){
|
||||
return false;
|
||||
if(hashDb instanceof CentralRepoHashDb){
|
||||
CentralRepoHashDb crDb = (CentralRepoHashDb) hashDb;
|
||||
if(this.referenceSetID != crDb.getReferenceSetID()){
|
||||
return false;
|
||||
}
|
||||
|
||||
if(! version.equals(crDb.getVersion())){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user