add getXXXTagByTagId methods to TagsManager

This commit is contained in:
jmillman 2015-06-29 17:39:04 -04:00
parent d1219f78de
commit 28c8440343

View File

@ -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.
*