mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-13 00:16:16 +00:00
remove dead code
This commit is contained in:
parent
584490d0c7
commit
e3aa664520
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2013-15 Basis Technology Corp.
|
* Copyright 2013-16 Basis Technology Corp.
|
||||||
* Contact: carrier <at> sleuthkit <dot> org
|
* Contact: carrier <at> sleuthkit <dot> org
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2013-15 Basis Technology Corp.
|
* Copyright 2013-16 Basis Technology Corp.
|
||||||
* Contact: carrier <at> sleuthkit <dot> org
|
* Contact: carrier <at> sleuthkit <dot> org
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -1029,65 +1029,12 @@ public final class DrawableDB {
|
|||||||
return files;
|
return files;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<DrawableFile<?>> getFilesInGroup(GroupKey<?> key) throws TskCoreException {
|
|
||||||
List<DrawableFile<?>> files = new ArrayList<>();
|
|
||||||
dbReadLock();
|
|
||||||
try {
|
|
||||||
PreparedStatement statement = null;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* I hate this! not flexible/generic/maintainable we could have the
|
|
||||||
* DrawableAttribute provide/create/configure the correct statement
|
|
||||||
* but they shouldn't be coupled like that -jm
|
|
||||||
*/
|
|
||||||
switch (key.getAttribute().attrName) {
|
|
||||||
case MIME_TYPE:
|
|
||||||
return getFilesWithMimeType((String) key.getValue());
|
|
||||||
case CATEGORY:
|
|
||||||
return getFilesWithCategory((Category) key.getValue());
|
|
||||||
default:
|
|
||||||
statement = getGroupStatment(key.getAttribute());
|
|
||||||
}
|
|
||||||
|
|
||||||
statement.setObject(1, key.getValue());
|
|
||||||
|
|
||||||
try (ResultSet valsResults = statement.executeQuery()) {
|
|
||||||
while (valsResults.next()) {
|
|
||||||
files.add(getFileFromID(valsResults.getLong(OBJ_ID), valsResults.getBoolean(ANALYZED)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (SQLException ex) {
|
|
||||||
LOGGER.log(Level.WARNING, "failed to get file for group:" + key.getAttribute() + " == " + key.getValue(), ex);
|
|
||||||
} finally {
|
|
||||||
dbReadUnlock();
|
|
||||||
}
|
|
||||||
|
|
||||||
return files;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void closeStatements() throws SQLException {
|
private void closeStatements() throws SQLException {
|
||||||
for (PreparedStatement pStmt : preparedStatements) {
|
for (PreparedStatement pStmt : preparedStatements) {
|
||||||
pStmt.close();
|
pStmt.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<DrawableFile<?>> getFilesWithCategory(Category cat) throws TskCoreException, IllegalArgumentException {
|
|
||||||
try {
|
|
||||||
List<DrawableFile<?>> files = new ArrayList<>();
|
|
||||||
List<ContentTag> contentTags = controller.getTagsManager().getContentTagsByTagName(controller.getTagsManager().getTagName(cat));
|
|
||||||
for (ContentTag ct : contentTags) {
|
|
||||||
if (ct.getContent() instanceof AbstractFile) {
|
|
||||||
files.add(DrawableFile.create((AbstractFile) ct.getContent(), isFileAnalyzed(ct.getContent().getId()),
|
|
||||||
isVideoFile((AbstractFile) ct.getContent())));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return files;
|
|
||||||
} catch (TskCoreException ex) {
|
|
||||||
LOGGER.log(Level.WARNING, "TSK error getting files in Category:" + cat.getDisplayName(), ex);
|
|
||||||
throw ex;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private PreparedStatement getGroupStatment(DrawableAttribute<?> groupBy) {
|
private PreparedStatement getGroupStatment(DrawableAttribute<?> groupBy) {
|
||||||
return groupStatementMap.get(groupBy);
|
return groupStatementMap.get(groupBy);
|
||||||
|
|
||||||
@ -1145,10 +1092,6 @@ public final class DrawableDB {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<DrawableFile<?>> getFilesWithMimeType(String string) {
|
|
||||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
|
||||||
}
|
|
||||||
|
|
||||||
public class MultipleTransactionException extends IllegalStateException {
|
public class MultipleTransactionException extends IllegalStateException {
|
||||||
|
|
||||||
private static final String CANNOT_HAVE_MORE_THAN_ONE_OPEN_TRANSACTIO = "cannot have more than one open transaction";
|
private static final String CANNOT_HAVE_MORE_THAN_ONE_OPEN_TRANSACTIO = "cannot have more than one open transaction";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user