mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-16 17:57:43 +00:00
add getXXXTagByTagId methods to TagsManager
This commit is contained in:
parent
d1219f78de
commit
28c8440343
@ -311,6 +311,24 @@ public class TagsManager implements Closeable {
|
||||
return tskCase.getContentTagsCountByTagName(tagName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a content tag by tag id.
|
||||
*
|
||||
* @param tagID The tag id of interest.
|
||||
*
|
||||
* @return the content tag with the specified tag id.
|
||||
*
|
||||
* @throws TskCoreException
|
||||
*/
|
||||
public synchronized ContentTag getContentTagByTagID(long tagID) throws TskCoreException {
|
||||
// @@@ This is a work around to be removed when database access on the EDT is correctly synchronized.
|
||||
if (!tagNamesInitialized) {
|
||||
getExistingTagNames();
|
||||
}
|
||||
|
||||
return tskCase.getContentTagByID(tagID);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets content tags by tag name.
|
||||
*
|
||||
@ -447,6 +465,24 @@ public class TagsManager implements Closeable {
|
||||
return tskCase.getBlackboardArtifactTagsCountByTagName(tagName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a blackboard artifact tag by tag id.
|
||||
*
|
||||
* @param tagID The tag id of interest.
|
||||
*
|
||||
* @return the blackboard artifact tag with the specified tag id.
|
||||
*
|
||||
* @throws TskCoreException
|
||||
*/
|
||||
public synchronized BlackboardArtifactTag getBlackboardArtifactTagByTagID(long tagID) throws TskCoreException {
|
||||
// @@@ This is a work around to be removed when database access on the EDT is correctly synchronized.
|
||||
if (!tagNamesInitialized) {
|
||||
getExistingTagNames();
|
||||
}
|
||||
|
||||
return tskCase.getBlackboardArtifactTagByID(tagID);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets blackboard artifact tags by tag name.
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user