mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
Switch to Blackboard methods
This commit is contained in:
parent
685c7a3768
commit
2de422a1a6
@ -1120,7 +1120,7 @@ public final class LeappFileProcessor {
|
||||
|
||||
BlackboardArtifact.Type foundArtifactType = null;
|
||||
try {
|
||||
foundArtifactType = Case.getCurrentCase().getSleuthkitCase().getArtifactType(artifactName);
|
||||
foundArtifactType = Case.getCurrentCase().getSleuthkitCase().getBlackboard().getArtifactType(artifactName);
|
||||
} catch (TskCoreException ex) {
|
||||
logger.log(Level.SEVERE, String.format("There was an issue that arose while trying to fetch artifact type for %s.", artifactName), ex);
|
||||
}
|
||||
@ -1165,7 +1165,7 @@ public final class LeappFileProcessor {
|
||||
|
||||
BlackboardAttribute.Type foundAttrType = null;
|
||||
try {
|
||||
foundAttrType = Case.getCurrentCase().getSleuthkitCase().getAttributeType(attributeName.toUpperCase());
|
||||
foundAttrType = Case.getCurrentCase().getSleuthkitCase().getBlackboard().getAttributeType(attributeName.toUpperCase());
|
||||
} catch (TskCoreException ex) {
|
||||
logger.log(Level.SEVERE, String.format("There was an issue that arose while trying to fetch attribute type for %s.", attributeName), ex);
|
||||
}
|
||||
|
@ -1232,7 +1232,7 @@ class TableReportGenerator {
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
artifacts.add(new ArtifactData(artifact, Case.getCurrentCaseThrows().getSleuthkitCase().getBlackboardAttributes(artifact), uniqueTagNames));
|
||||
artifacts.add(new ArtifactData(artifact, Case.getCurrentCaseThrows().getSleuthkitCase().getBlackboard().getBlackboardAttributes(artifact), uniqueTagNames));
|
||||
} catch (TskCoreException ex) {
|
||||
errorList.add(NbBundle.getMessage(this.getClass(), "ReportGenerator.errList.failedGetBBAttribs"));
|
||||
logger.log(Level.SEVERE, "Failed to get Blackboard Attributes when generating report.", ex); //NON-NLS
|
||||
|
@ -354,7 +354,7 @@ public class PortableCaseReportModule implements ReportModule {
|
||||
}
|
||||
for (BlackboardAttribute.ATTRIBUTE_TYPE type : BlackboardAttribute.ATTRIBUTE_TYPE.values()) {
|
||||
try {
|
||||
oldAttrTypeIdToNewAttrType.put(type.getTypeID(), portableSkCase.getAttributeType(type.getLabel()));
|
||||
oldAttrTypeIdToNewAttrType.put(type.getTypeID(), portableSkCase.getBlackboard().getAttributeType(type.getLabel()));
|
||||
} catch (TskCoreException ex) {
|
||||
handleError("Error looking up attribute name " + type.getLabel(),
|
||||
Bundle.PortableCaseReportModule_generateReport_errorLookingUpAttrType(type.getLabel()),
|
||||
@ -1084,7 +1084,7 @@ public class PortableCaseReportModule implements ReportModule {
|
||||
return oldArtTypeIdToNewArtTypeId.get(oldArtifact.getArtifactTypeID());
|
||||
}
|
||||
|
||||
BlackboardArtifact.Type oldCustomType = currentCase.getSleuthkitCase().getArtifactType(oldArtifact.getArtifactTypeName());
|
||||
BlackboardArtifact.Type oldCustomType = currentCase.getSleuthkitCase().getBlackboard().getArtifactType(oldArtifact.getArtifactTypeName());
|
||||
try {
|
||||
BlackboardArtifact.Type newCustomType = portableSkCase.getBlackboard().getOrAddArtifactType(oldCustomType.getTypeName(), oldCustomType.getDisplayName());
|
||||
oldArtTypeIdToNewArtTypeId.put(oldArtifact.getArtifactTypeID(), newCustomType.getTypeID());
|
||||
|
@ -1084,13 +1084,13 @@ final class FileExportRuleSet implements Serializable, Comparable<FileExportRule
|
||||
SleuthkitCase caseDb = currentCase.getSleuthkitCase();
|
||||
BlackboardArtifact.Type artifactType;
|
||||
try {
|
||||
artifactType = caseDb.getArtifactType(artifactTypeName);
|
||||
artifactType = caseDb.getBlackboard().getArtifactType(artifactTypeName);
|
||||
} catch (TskCoreException ex) {
|
||||
throw new ExportRulesException(String.format("The specified %s artifact type does not exist in case database for %s", artifactTypeName, currentCase.getCaseDirectory()), ex);
|
||||
}
|
||||
BlackboardAttribute.Type attributeType;
|
||||
try {
|
||||
attributeType = caseDb.getAttributeType(attributeTypeName);
|
||||
attributeType = caseDb.getBlackboard().getAttributeType(attributeTypeName);
|
||||
} catch (TskCoreException ex) {
|
||||
throw new ExportRulesException(String.format("The specified %s attribute type does not exist in case database for %s", attributeTypeName, currentCase.getCaseDirectory()), ex);
|
||||
}
|
||||
|
@ -98,7 +98,7 @@ final class ExtractRecycleBin extends Extract {
|
||||
BlackboardArtifact.Type recycleBinArtifactType;
|
||||
|
||||
try {
|
||||
recycleBinArtifactType = tskCase.getArtifactType(RECYCLE_BIN_ARTIFACT_NAME);
|
||||
recycleBinArtifactType = tskCase.getBlackboard().getArtifactType(RECYCLE_BIN_ARTIFACT_NAME);
|
||||
} catch (TskCoreException ex) {
|
||||
logger.log(Level.WARNING, String.format("Unable to retrive custom artifact type %s", RECYCLE_BIN_ARTIFACT_NAME), ex); // NON-NLS
|
||||
// If this doesn't work bail.
|
||||
|
@ -423,7 +423,7 @@ final class VcardParser {
|
||||
}
|
||||
|
||||
try {
|
||||
BlackboardAttribute.Type attributeType = tskCase.getAttributeType(attributeTypeName);
|
||||
BlackboardAttribute.Type attributeType = tskCase.getBlackboard().getAttributeType(attributeTypeName);
|
||||
if (attributeType == null) {
|
||||
try{
|
||||
// Add this attribute type to the case database.
|
||||
@ -479,7 +479,7 @@ final class VcardParser {
|
||||
attributeTypeName = "TSK_EMAIL";
|
||||
}
|
||||
try {
|
||||
BlackboardAttribute.Type attributeType = tskCase.getAttributeType(attributeTypeName);
|
||||
BlackboardAttribute.Type attributeType = tskCase.getBlackboard().getAttributeType(attributeTypeName);
|
||||
if (attributeType == null) {
|
||||
// Add this attribute type to the case database.
|
||||
attributeType = tskCase.getBlackboard().getOrAddAttributeType(attributeTypeName,
|
||||
|
Loading…
x
Reference in New Issue
Block a user