Autopsy  4.19.3
Graphical digital forensics platform for The Sleuth Kit and other tools.
Public Member Functions | Protected Member Functions | Private Attributes | Static Private Attributes | List of all members
org.sleuthkit.autopsy.casemodule.events.TskDataModelChangedEvent< T, U > Class Template Referenceabstract

Inherits org.sleuthkit.autopsy.events.AutopsyEvent.

Public Member Functions

List< U > getNewValue ()
 
List< T > getOldValue ()
 
Object getSource ()
 
SourceType getSourceType ()
 

Protected Member Functions

 TskDataModelChangedEvent (String eventName, List< T > oldValueObjects, Function< T, Long > oldValueGetIdMethod, List< U > newValueObjects, Function< U, Long > newValueGetIdMethod)
 
List< U > getNewValueObjects (SleuthkitCase caseDb, List< Long > ids) throws TskCoreException
 
List< T > getOldValueObjects (SleuthkitCase caseDb, List< Long > ids) throws TskCoreException
 

Private Attributes

final boolean hasNewValue
 
final boolean hasOldValue
 
final List< Long > newValueIds
 
transient List< U > newValueObjects
 
final List< Long > oldValueIds
 
transient List< T > oldValueObjects
 

Static Private Attributes

static final Logger logger = Logger.getLogger(TskDataModelChangedEvent.class.getName())
 
static final long serialVersionUID = 1L
 

Detailed Description

An abstract base class for application events published when one or more Sleuth Kit Data Model objects for a case change in some way.

This class extends AutopsyEvent. The AutopsyEvent class extends PropertyChangeEvent to integrate with legacy use of JavaBeans PropertyChangeEvents and PropertyChangeListeners as an application event publisher-subcriber mechanism. Subclasses need to decide what constitutes "old" and "new" objects for them and are encouraged to provide getters for these values that do not require clients to cast the return values.

The AutopsyEvent class implements Serializable to allow local event instances to be published to other Autopsy nodes over a network in serialized form. TSK Data Model objects are generally not serializable because they encapsulate a reference to a SleuthkitCase object that represents the case database and which has local JDBC Connection objects. For this reason, this class supports serialization of the unique numeric IDs (TSK object IDs, case database row IDs, etc.) of the subject TSK Data Model objects and the "reconstruction" of those objects on other Autopsy nodes by querying the case database by unique ID.

Parameters
<T>The Sleuth Kit Data Model object type of the "old" data model objects.
<U>The Sleuth Kit Data Model object type of the "new" data model objects.

Definition at line 60 of file TskDataModelChangedEvent.java.

Constructor & Destructor Documentation

org.sleuthkit.autopsy.casemodule.events.TskDataModelChangedEvent< T, U >.TskDataModelChangedEvent ( String  eventName,
List< T >  oldValueObjects,
Function< T, Long >  oldValueGetIdMethod,
List< U >  newValueObjects,
Function< U, Long >  newValueGetIdMethod 
)
protected

Constructs the base class part for application events published when one or more Sleuth Kit Data Model objects for a case change in some way.

Parameters
eventNameThe event name.
oldValueObjectsA list of he Data Model objects that have been designated as the "old" objects in the event. May be null.
oldValueGetIdMethodA method that can be applied to the "old" data model objects to get their unique numeric IDs (TSK object IDs, case database row IDs, etc.). May be null if there are no "old" objects.
newValueObjectsA list of he Data Model objects that have been designated as the "new" objects in the event. May be null.
newValueGetIdMethodA method that can be applied to the "new" data model objects to get their unique numeric IDs (TSK object IDs, case database row IDs, etc.). May be null if there are no "new" objects.

Definition at line 91 of file TskDataModelChangedEvent.java.

Member Function Documentation

Gets a list of the Data Model objects that have been designated as the "new" objects in the event.

Returns
The list of the "new" data model objects. May be empty.

Definition at line 149 of file TskDataModelChangedEvent.java.

List<U> org.sleuthkit.autopsy.casemodule.events.TskDataModelChangedEvent< T, U >.getNewValueObjects ( SleuthkitCase  caseDb,
List< Long >  ids 
) throws TskCoreException
protected

Reconstructs the "new" Sleuth Kit Data Model objects associated with this application event, if any, using the given unique numeric IDs (TSK object IDs, case database row IDs, etc.) to query the given case database.

Parameters
caseDbThe case database.
idsThe unique, numeric IDs (TSK object IDs, case database row IDs, etc.) of the Sleuth Kit Data Model objects.
Returns
The objects.
Exceptions
org.sleuthkit.datamodel.TskCoreExceptionIf there is an error getting the Sleuth Kit Data Model objects.

Definition at line 201 of file TskDataModelChangedEvent.java.

Referenced by org.sleuthkit.autopsy.casemodule.events.TskDataModelChangedEvent< TagSet, TagSet >.getNewValue().

Gets a list of the Data Model objects that have been designated as the "old" objects in the event.

Returns
The list of the "old" data model objects. May be empty.

Definition at line 124 of file TskDataModelChangedEvent.java.

List<T> org.sleuthkit.autopsy.casemodule.events.TskDataModelChangedEvent< T, U >.getOldValueObjects ( SleuthkitCase  caseDb,
List< Long >  ids 
) throws TskCoreException
protected

Reconstructs the "old" Sleuth Kit Data Model objects associated with this application event, if any, using the given unique numeric IDs (TSK object IDs, case database row IDs, etc.) to query the given case database.

Parameters
caseDbThe case database.
idsThe unique, numeric IDs (TSK object IDs, case database row IDs, etc.) of the Sleuth Kit Data Model objects.
Returns
The objects.
Exceptions
org.sleuthkit.datamodel.TskCoreExceptionIf there is an error getting the Sleuth Kit Data Model objects.

Definition at line 182 of file TskDataModelChangedEvent.java.

Referenced by org.sleuthkit.autopsy.casemodule.events.TskDataModelChangedEvent< TagSet, TagSet >.getOldValue().

Object org.sleuthkit.autopsy.events.AutopsyEvent.getSource ( )
inherited

Gets the event source type (local or remote) as a string.

Returns
A string, either "LOCAL" or "REMOTE."

Definition at line 88 of file AutopsyEvent.java.

SourceType org.sleuthkit.autopsy.events.AutopsyEvent.getSourceType ( )
inherited

Member Data Documentation

final boolean org.sleuthkit.autopsy.casemodule.events.TskDataModelChangedEvent< T, U >.hasNewValue
private

Definition at line 67 of file TskDataModelChangedEvent.java.

final boolean org.sleuthkit.autopsy.casemodule.events.TskDataModelChangedEvent< T, U >.hasOldValue
private

Definition at line 64 of file TskDataModelChangedEvent.java.

final Logger org.sleuthkit.autopsy.casemodule.events.TskDataModelChangedEvent< T, U >.logger = Logger.getLogger(TskDataModelChangedEvent.class.getName())
staticprivate

Definition at line 63 of file TskDataModelChangedEvent.java.

final List<Long> org.sleuthkit.autopsy.casemodule.events.TskDataModelChangedEvent< T, U >.newValueIds
private

Definition at line 68 of file TskDataModelChangedEvent.java.

transient List<U> org.sleuthkit.autopsy.casemodule.events.TskDataModelChangedEvent< T, U >.newValueObjects
private

Definition at line 69 of file TskDataModelChangedEvent.java.

final List<Long> org.sleuthkit.autopsy.casemodule.events.TskDataModelChangedEvent< T, U >.oldValueIds
private

Definition at line 65 of file TskDataModelChangedEvent.java.

transient List<T> org.sleuthkit.autopsy.casemodule.events.TskDataModelChangedEvent< T, U >.oldValueObjects
private

Definition at line 66 of file TskDataModelChangedEvent.java.

final long org.sleuthkit.autopsy.casemodule.events.TskDataModelChangedEvent< T, U >.serialVersionUID = 1L
staticprivate

Definition at line 62 of file TskDataModelChangedEvent.java.


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

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