From e6fad48c0af7c9144ac09dd13a83eff02b09280a Mon Sep 17 00:00:00 2001 From: Richard Cordovano Date: Fri, 27 May 2016 15:19:39 -0400 Subject: [PATCH] Make Blackboard use SleuthkitCase field --- .../autopsy/casemodule/services/Blackboard.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/services/Blackboard.java b/Core/src/org/sleuthkit/autopsy/casemodule/services/Blackboard.java index e101114584..70b10b0f0e 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/services/Blackboard.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/services/Blackboard.java @@ -56,7 +56,7 @@ public final class Blackboard implements Closeable { * * @throws BlackboardException If there is a problem indexing the artifact. */ - public void indexArtifact(BlackboardArtifact artifact) throws BlackboardException { + public synchronized void indexArtifact(BlackboardArtifact artifact) throws BlackboardException { if (null == caseDb) { throw new BlackboardException("Blackboard has been closed"); } @@ -83,15 +83,15 @@ public final class Blackboard implements Closeable { * @throws BlackboardBlackboardException If there is a problem getting or * adding the artifact type. */ - public BlackboardArtifact.Type getOrAddArtifactType(String typeName, String displayName) throws BlackboardException { + public synchronized BlackboardArtifact.Type getOrAddArtifactType(String typeName, String displayName) throws BlackboardException { if (null == caseDb) { throw new BlackboardException("Blackboard has been closed"); } try { - return Case.getCurrentCase().getSleuthkitCase().addBlackboardArtifactType(typeName, displayName); + return caseDb.addBlackboardArtifactType(typeName, displayName); } catch (TskDataException typeExistsEx) { try { - return Case.getCurrentCase().getSleuthkitCase().getArtifactType(typeName); + return caseDb.getArtifactType(typeName); } catch (TskCoreException ex) { throw new BlackboardException("Failed to get or add artifact type", ex); } @@ -113,15 +113,15 @@ public final class Blackboard implements Closeable { * @throws BlackboardBlackboardException If there is a problem getting or * adding the attribute type. */ - public BlackboardAttribute.Type getOrAddAttributeType(String typeName, BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE valueType, String displayName) throws BlackboardException { + public synchronized BlackboardAttribute.Type getOrAddAttributeType(String typeName, BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE valueType, String displayName) throws BlackboardException { if (null == caseDb) { throw new BlackboardException("Blackboard has been closed"); } try { - return Case.getCurrentCase().getSleuthkitCase().addArtifactAttributeType(typeName, valueType, displayName); + return caseDb.addArtifactAttributeType(typeName, valueType, displayName); } catch (TskDataException typeExistsEx) { try { - return Case.getCurrentCase().getSleuthkitCase().getAttributeType(typeName); + return caseDb.getAttributeType(typeName); } catch (TskCoreException ex) { throw new BlackboardException("Failed to get or add attribute type", ex); }