Merge pull request #3279 from APriestman/3299_knownStatus

Clarify the use of the known_status field
This commit is contained in:
Richard Cordovano 2017-12-08 13:38:32 -05:00 committed by GitHub
commit b08216a460
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 7 deletions

View File

@ -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 * exists, it is updated. If eamArtifact does not exist it is added with the
* given status. * given status.
* *
* @param eamArtifact Artifact containing exactly one (1) ArtifactInstance. * @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 @Override
public void setArtifactInstanceKnownStatus(CorrelationAttribute eamArtifact, TskData.FileKnown knownStatus) throws EamDbException { public void setArtifactInstanceKnownStatus(CorrelationAttribute eamArtifact, TskData.FileKnown knownStatus) throws EamDbException {

View File

@ -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() { public TskData.FileKnown getKnownStatus() {
return knownStatus; 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) { public void setKnownStatus(TskData.FileKnown knownStatus) {
this.knownStatus = knownStatus; this.knownStatus = knownStatus;

View File

@ -550,11 +550,14 @@ public class SqliteEamDb extends AbstractSqlEamDb {
} }
/** /**
* Sets an eamArtifact instance as the given knownStatus. If eamArtifact * Sets an eamArtifact instance to the given knownStatus.
* exists, it is updated. If eamArtifact does not exist nothing happens * 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 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 @Override
public void setArtifactInstanceKnownStatus(CorrelationAttribute eamArtifact, TskData.FileKnown knownStatus) throws EamDbException { public void setArtifactInstanceKnownStatus(CorrelationAttribute eamArtifact, TskData.FileKnown knownStatus) throws EamDbException {