Skip to content
Snippets Groups Projects
Commit 82010cc2 authored by Kelly Kelly's avatar Kelly Kelly
Browse files

Added new functions to support Summary Panel in communications window.

parent 83edeb53
No related tags found
No related merge requests found
......@@ -85,6 +85,18 @@ public void addAttributes(Collection<BlackboardAttribute> bbatrs) throws TskCore
public Account getAccount() throws TskCoreException {
return this.account;
}
/**
* Gets the source content (data source or file within a
* data source) of the underlying Account artifact for this instance.
*
* @return The source content.
*
* @throws TskCoreException
*/
public Content getFile() throws TskCoreException {
return artifact.getSleuthkitCase().getContentById(artifact.getObjectID());
}
/**
* Get the object ID of the artifact this account file instance maps to.
......
......@@ -1193,6 +1193,34 @@ public List<Content> getRelationshipSources(AccountDeviceInstance account1, Acco
db.releaseSingleUserCaseReadLock();
}
}
/**
* Get a list AccountFileInstance for the given accounts.
*
* @param account List of accounts
*
* @return A lit of AccountFileInstances for the given accounts or null if
* none are found.
*
* @throws org.sleuthkit.datamodel.TskCoreException
*/
public List<AccountFileInstance> getAccountFileInstances(Account account) throws TskCoreException {
List<AccountFileInstance> accountFileInstanceList = new ArrayList<>();
List<BlackboardArtifact> artifactList = getSleuthkitCase().getBlackboardArtifacts(BlackboardArtifact.ARTIFACT_TYPE.TSK_ACCOUNT, BlackboardAttribute.ATTRIBUTE_TYPE.TSK_ID, account.getTypeSpecificID());
if(artifactList != null && !artifactList.isEmpty()) {
for(BlackboardArtifact artifact : artifactList) {
accountFileInstanceList.add(new AccountFileInstance(artifact, account));
}
}
if(!accountFileInstanceList.isEmpty()) {
return accountFileInstanceList;
} else {
return null;
}
}
/**
* Get account_type_id for the given account type.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment