From 70330c908033ba301565985e437cb257dee1c941 Mon Sep 17 00:00:00 2001 From: Ann Priestman Date: Fri, 8 Dec 2017 09:34:41 -0500 Subject: [PATCH] Clarify the use of the known_status field --- .../centralrepository/datamodel/AbstractSqlEamDb.java | 6 ++++-- .../datamodel/CorrelationAttributeInstance.java | 10 ++++++++-- .../centralrepository/datamodel/SqliteEamDb.java | 9 ++++++--- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/AbstractSqlEamDb.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/AbstractSqlEamDb.java index 8eda401abe..1dc372f81a 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/AbstractSqlEamDb.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/AbstractSqlEamDb.java @@ -1001,12 +1001,14 @@ public abstract class AbstractSqlEamDb implements EamDb { } /** - * Sets an eamArtifact instance to the given knownStatus. If eamArtifact + * Sets an eamArtifact instance to the given knownStatus. + * knownStatus should be BAD if the file has been tagged with a notable tag and + * UNKNOWN otherwise. If eamArtifact * exists, it is updated. If eamArtifact does not exist it is added with the * given status. * * @param eamArtifact Artifact containing exactly one (1) ArtifactInstance. - * @param knownStatus The status to change the artifact to + * @param knownStatus The status to change the artifact to. Should never be KNOWN */ @Override public void setArtifactInstanceKnownStatus(CorrelationAttribute eamArtifact, TskData.FileKnown knownStatus) throws EamDbException { diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeInstance.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeInstance.java index 7db48d28db..196d5ab388 100755 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeInstance.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeInstance.java @@ -179,14 +179,20 @@ public class CorrelationAttributeInstance implements Serializable { } /** - * @return the knownStatus + * Get this knownStatus. This only indicates whether an item has been + * tagged as notable and should never return KNOWN. + * + * @return BAD if the item has been tagged as notable, UNKNOWN otherwise */ public TskData.FileKnown getKnownStatus() { return knownStatus; } /** - * @param knownStatus the knownStatus to set + * Set the knownStatus. This only indicates whether an item has been + * tagged as notable and should never be set to KNOWN. + * + * @param knownStatus Should be BAD if the item is tagged as notable, UNKNOWN otherwise */ public void setKnownStatus(TskData.FileKnown knownStatus) { this.knownStatus = knownStatus; diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/SqliteEamDb.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/SqliteEamDb.java index 55e60dd380..0ed78b3631 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/SqliteEamDb.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/SqliteEamDb.java @@ -550,11 +550,14 @@ public class SqliteEamDb extends AbstractSqlEamDb { } /** - * Sets an eamArtifact instance as the given knownStatus. If eamArtifact - * exists, it is updated. If eamArtifact does not exist nothing happens + * Sets an eamArtifact instance to the given knownStatus. + * knownStatus should be BAD if the file has been tagged with a notable tag and + * UNKNOWN otherwise. If eamArtifact + * exists, it is updated. If eamArtifact does not exist it is added with the + * given status. * * @param eamArtifact Artifact containing exactly one (1) ArtifactInstance. - * @param knownStatus The known status of the artifact + * @param knownStatus The status to change the artifact to. Should never be KNOWN */ @Override public void setArtifactInstanceKnownStatus(CorrelationAttribute eamArtifact, TskData.FileKnown knownStatus) throws EamDbException {