Autopsy  4.19.3
Graphical digital forensics platform for The Sleuth Kit and other tools.
Classes | Static Public Member Functions | Static Public Attributes | Private Member Functions | Static Private Attributes | List of all members
org.sleuthkit.autopsy.casemodule.services.contentviewertags.ContentViewerTagManager Class Reference

Classes

class  ContentViewerTag
 
class  ResultWrapper
 
class  SerializationException
 

Static Public Member Functions

static< T > void deleteTag (ContentViewerTag< T > contentViewerTag) throws TskCoreException, NoCurrentCaseException
 
static< T > ContentViewerTag< T > getTag (ContentTag contentTag, Class< T > clazz) throws TskCoreException, NoCurrentCaseException
 
static< T > ContentViewerTag< T > saveTag (ContentTag contentTag, T tagDataBean) throws SerializationException, TskCoreException, NoCurrentCaseException
 
static< T > ContentViewerTag< T > updateTag (ContentViewerTag< T > oldTag, T tagDataBean) throws SerializationException, TskCoreException, NoCurrentCaseException
 

Static Public Attributes

static final String TABLE_NAME = "beta_tag_app_data"
 
static final String TABLE_SCHEMA_POSTGRESQL
 
static final String TABLE_SCHEMA_SQLITE
 

Private Member Functions

 ContentViewerTagManager ()
 

Static Private Attributes

static final String DELETE_TAG_DATA = "WHERE app_data_id = %d"
 
static final String INSERT_TAG_DATA = "(content_tag_id, app_data) VALUES (%d, '%s')"
 
static final String SELECT_TAG_DATA = "* FROM " + TABLE_NAME + " WHERE content_tag_id = %d"
 
static final ObjectMapper SERIALIZER = new ObjectMapper()
 
static final String UPDATE_TAG_DATA = "SET content_tag_id = %d, app_data = '%s' WHERE app_data_id = %d"
 

Detailed Description

A per case Autopsy service that manages the addition of content viewer tags to the case database. This manager is also responsible for serializing and deserializing instances of your tag data objects for persistence and retrieval.

Definition at line 37 of file ContentViewerTagManager.java.

Constructor & Destructor Documentation

org.sleuthkit.autopsy.casemodule.services.contentviewertags.ContentViewerTagManager.ContentViewerTagManager ( )
private

Definition at line 268 of file ContentViewerTagManager.java.

Member Function Documentation

static <T> void org.sleuthkit.autopsy.casemodule.services.contentviewertags.ContentViewerTagManager.deleteTag ( ContentViewerTag< T >  contentViewerTag) throws TskCoreException, NoCurrentCaseException
static

Deletes the content viewer tag with the specified id.

Parameters
contentViewerTagContentViewerTag to delete
Exceptions
TskCoreExceptionThrown if this operation did not successfully persist in the case database.
NoCurrentCaseExceptionThrown if invocation of this method occurs when no case is open.

Definition at line 215 of file ContentViewerTagManager.java.

References org.sleuthkit.autopsy.casemodule.Case.getCurrentCaseThrows(), and org.sleuthkit.autopsy.casemodule.Case.getSleuthkitCase().

Referenced by org.sleuthkit.autopsy.actions.DeleteContentTagAction.actionPerformed(), org.sleuthkit.autopsy.actions.DeleteFileContentTagAction.deleteTag(), and org.sleuthkit.autopsy.actions.ReplaceContentTagAction.replaceTag().

static <T> ContentViewerTag<T> org.sleuthkit.autopsy.casemodule.services.contentviewertags.ContentViewerTagManager.getTag ( ContentTag  contentTag,
Class< T >  clazz 
) throws TskCoreException, NoCurrentCaseException
static

Retrieves a ContentViewerTag instance that is associated with the specified ContentTag. The Java class T that represents the technical details of the tag should be passed so that automatic binding can take place.

Parameters
contentTagContentTag that this ContentViewerTag is associated with (1:1)
clazzGeneric class that will be instantiated and filled in with data.
Returns
ContentViewerTag with an instance of T as a member variable or null if the content tag does not have an associated ContentViewerTag of type T.
Exceptions
TskCoreExceptionThrown if this operation did not successfully persist in the case database.
NoCurrentCaseExceptionThrown if invocation of this method occurs when no case is open.

Definition at line 142 of file ContentViewerTagManager.java.

References org.sleuthkit.autopsy.casemodule.Case.getCurrentCaseThrows(), org.sleuthkit.autopsy.casemodule.services.contentviewertags.ContentViewerTagManager.ResultWrapper< T >.getException(), org.sleuthkit.autopsy.casemodule.services.contentviewertags.ContentViewerTagManager.ResultWrapper< T >.getResult(), org.sleuthkit.autopsy.casemodule.Case.getSleuthkitCase(), org.sleuthkit.autopsy.casemodule.services.contentviewertags.ContentViewerTagManager.ResultWrapper< T >.hasException(), org.sleuthkit.autopsy.casemodule.services.contentviewertags.ContentViewerTagManager.ResultWrapper< T >.setException(), and org.sleuthkit.autopsy.casemodule.services.contentviewertags.ContentViewerTagManager.ResultWrapper< T >.setResult().

Referenced by org.sleuthkit.autopsy.actions.DeleteContentTagAction.actionPerformed(), org.sleuthkit.autopsy.actions.DeleteFileContentTagAction.deleteTag(), org.sleuthkit.autopsy.report.modules.html.HTMLReport.getTaggedRegions(), and org.sleuthkit.autopsy.actions.ReplaceContentTagAction.replaceTag().

static <T> ContentViewerTag<T> org.sleuthkit.autopsy.casemodule.services.contentviewertags.ContentViewerTagManager.saveTag ( ContentTag  contentTag,
tagDataBean 
) throws SerializationException, TskCoreException, NoCurrentCaseException
static

Creates and saves a new ContentViewerTag in the case database. The generic tag data instance T will be automatically serialized into a storable format.

Parameters
contentTagContentTag that this ContentViewerTag is associated with (1:1).
tagDataBeanData instance that contains the tag information to be persisted.
Returns
An instance of a ContentViewerTag of type T, which contains all the stored information.
Exceptions
SerializationExceptionThrown if the tag data instance T could not be serialized into a storable format.
TskCoreExceptionThrown if this operation did not successfully persist in the case database.
NoCurrentCaseExceptionThrown if invocation of this method occurs when no case is open.

Definition at line 75 of file ContentViewerTagManager.java.

References org.sleuthkit.autopsy.casemodule.Case.getCurrentCaseThrows(), and org.sleuthkit.autopsy.casemodule.Case.getSleuthkitCase().

Referenced by org.sleuthkit.autopsy.actions.ReplaceContentTagAction.replaceTag().

static <T> ContentViewerTag<T> org.sleuthkit.autopsy.casemodule.services.contentviewertags.ContentViewerTagManager.updateTag ( ContentViewerTag< T >  oldTag,
tagDataBean 
) throws SerializationException, TskCoreException, NoCurrentCaseException
static

Updates the ContentViewerTag instance with the new tag data T and persists the changes to the case database.

Parameters
oldTagContentViewerTag instance to be updated
tagDataBeanData instance that contains the updated information to be persisted.
Exceptions
SerializationExceptionThrown if the tag data instance T could not be serialized into a storable format.
TskCoreExceptionThrown if this operation did not successfully persist in the case database.
NoCurrentCaseExceptionThrown if invocation of this method occurs when no case is open.

Definition at line 107 of file ContentViewerTagManager.java.

References org.sleuthkit.autopsy.casemodule.Case.getCurrentCaseThrows(), and org.sleuthkit.autopsy.casemodule.Case.getSleuthkitCase().

Member Data Documentation

final String org.sleuthkit.autopsy.casemodule.services.contentviewertags.ContentViewerTagManager.DELETE_TAG_DATA = "WHERE app_data_id = %d"
staticprivate

Definition at line 54 of file ContentViewerTagManager.java.

final String org.sleuthkit.autopsy.casemodule.services.contentviewertags.ContentViewerTagManager.INSERT_TAG_DATA = "(content_tag_id, app_data) VALUES (%d, '%s')"
staticprivate

Definition at line 51 of file ContentViewerTagManager.java.

final String org.sleuthkit.autopsy.casemodule.services.contentviewertags.ContentViewerTagManager.SELECT_TAG_DATA = "* FROM " + TABLE_NAME + " WHERE content_tag_id = %d"
staticprivate

Definition at line 53 of file ContentViewerTagManager.java.

final ObjectMapper org.sleuthkit.autopsy.casemodule.services.contentviewertags.ContentViewerTagManager.SERIALIZER = new ObjectMapper()
staticprivate

Definition at line 41 of file ContentViewerTagManager.java.

final String org.sleuthkit.autopsy.casemodule.services.contentviewertags.ContentViewerTagManager.TABLE_NAME = "beta_tag_app_data"
static
final String org.sleuthkit.autopsy.casemodule.services.contentviewertags.ContentViewerTagManager.TABLE_SCHEMA_POSTGRESQL
static
Initial value:
= "(app_data_id BIGSERIAL PRIMARY KEY, "
+ "content_tag_id INTEGER NOT NULL, app_data TEXT NOT NULL, "
+ "FOREIGN KEY(content_tag_id) REFERENCES content_tags(tag_id))"

Definition at line 47 of file ContentViewerTagManager.java.

final String org.sleuthkit.autopsy.casemodule.services.contentviewertags.ContentViewerTagManager.TABLE_SCHEMA_SQLITE
static
Initial value:
= "(app_data_id INTEGER PRIMARY KEY, "
+ "content_tag_id INTEGER NOT NULL, app_data TEXT NOT NULL, "
+ "FOREIGN KEY(content_tag_id) REFERENCES content_tags(tag_id))"

Definition at line 44 of file ContentViewerTagManager.java.

Referenced by org.sleuthkit.autopsy.report.modules.portablecase.PortableCaseReportModule.initializeImageTags().

final String org.sleuthkit.autopsy.casemodule.services.contentviewertags.ContentViewerTagManager.UPDATE_TAG_DATA = "SET content_tag_id = %d, app_data = '%s' WHERE app_data_id = %d"
staticprivate

Definition at line 52 of file ContentViewerTagManager.java.


The documentation for this class was generated from the following file:

Copyright © 2012-2022 Basis Technology. Generated on: Sat Sep 24 2022
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.