Skip to content
Snippets Groups Projects
Unverified Commit 8825f86c authored by eugene7646's avatar eugene7646 Committed by GitHub
Browse files

Merge pull request #2662 from kellykelly3/8243-account-artifacts-to-reports

8243 Allow reports newDataArtifact to include tsk_account
parents cf857795 cee95d49
No related branches found
No related tags found
No related merge requests found
...@@ -286,7 +286,8 @@ public AnalysisResultAdded newAnalysisResult(BlackboardArtifact.Type artifactTyp ...@@ -286,7 +286,8 @@ public AnalysisResultAdded newAnalysisResult(BlackboardArtifact.Type artifactTyp
@Override @Override
public DataArtifact newDataArtifact(BlackboardArtifact.Type artifactType, Collection<BlackboardAttribute> attributesList, Long osAccountId) throws TskCoreException { public DataArtifact newDataArtifact(BlackboardArtifact.Type artifactType, Collection<BlackboardAttribute> attributesList, Long osAccountId) throws TskCoreException {
if (artifactType.getTypeID() != BlackboardArtifact.ARTIFACT_TYPE.TSK_KEYWORD_HIT.getTypeID()) { if (artifactType.getTypeID() != BlackboardArtifact.ARTIFACT_TYPE.TSK_KEYWORD_HIT.getTypeID() &&
artifactType.getTypeID() != BlackboardArtifact.ARTIFACT_TYPE.TSK_ACCOUNT.getTypeID()) {
throw new TskCoreException("Reports can only have keyword hit artifacts."); throw new TskCoreException("Reports can only have keyword hit artifacts.");
} }
...@@ -296,10 +297,10 @@ public DataArtifact newDataArtifact(BlackboardArtifact.Type artifactType, Collec ...@@ -296,10 +297,10 @@ public DataArtifact newDataArtifact(BlackboardArtifact.Type artifactType, Collec
@Override @Override
public DataArtifact newDataArtifact(BlackboardArtifact.Type artifactType, Collection<BlackboardAttribute> attributesList, Long osAccountId, long dataSourceId) throws TskCoreException { public DataArtifact newDataArtifact(BlackboardArtifact.Type artifactType, Collection<BlackboardAttribute> attributesList, Long osAccountId, long dataSourceId) throws TskCoreException {
if (artifactType.getTypeID() != BlackboardArtifact.ARTIFACT_TYPE.TSK_KEYWORD_HIT.getTypeID()) { if (artifactType.getTypeID() != BlackboardArtifact.ARTIFACT_TYPE.TSK_KEYWORD_HIT.getTypeID() &&
artifactType.getTypeID() != BlackboardArtifact.ARTIFACT_TYPE.TSK_ACCOUNT.getTypeID()) {
throw new TskCoreException("Reports can only have keyword hit artifacts."); throw new TskCoreException("Reports can only have keyword hit artifacts.");
} }
return db.getBlackboard().newDataArtifact(artifactType, objectId, dataSourceId, attributesList, osAccountId); return db.getBlackboard().newDataArtifact(artifactType, objectId, dataSourceId, attributesList, osAccountId);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment