Autopsy  4.10.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
Public Member Functions | Private Attributes | Static Private Attributes | List of all members
org.sleuthkit.autopsy.casemodule.events.DataSourceNameChangedEvent Class Reference

Inherits org.sleuthkit.autopsy.events.AutopsyEvent, and Serializable.

Public Member Functions

 DataSourceNameChangedEvent (Content dataSource, String newName)
 
Content getDataSource ()
 
Object getNewValue ()
 
Object getSource ()
 
SourceType getSourceType ()
 

Private Attributes

transient Content dataSource
 
final String newName
 

Static Private Attributes

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

Detailed Description

Definition at line 33 of file DataSourceNameChangedEvent.java.

Constructor & Destructor Documentation

org.sleuthkit.autopsy.casemodule.events.DataSourceNameChangedEvent.DataSourceNameChangedEvent ( Content  dataSource,
String  newName 
)

Constructs an event published when a data source is added to a case.

Parameters
dataSourceThe data source that was added.
newNameThe new name of the data source

Putting the object id of the data source into newValue to allow for lazy loading of the Content object. This bypasses the issues related to the serialization and de-serialization of Content objects when the event is published over a network.

Definition at line 46 of file DataSourceNameChangedEvent.java.

References org.sleuthkit.autopsy.casemodule.Case.Events.DATA_SOURCE_NAME_CHANGED, org.sleuthkit.autopsy.casemodule.events.DataSourceNameChangedEvent.dataSource, and org.sleuthkit.autopsy.casemodule.events.DataSourceNameChangedEvent.newName.

Member Function Documentation

Content org.sleuthkit.autopsy.casemodule.events.DataSourceNameChangedEvent.getDataSource ( )

Gets the data source that was added.

Returns
The data source.

The dataSource field is set in the constructor, but it is transient so it will become null when the event is serialized for publication over a network. Doing a lazy load of the Content object bypasses the issues related to the serialization and de-serialization of Content objects and may also save database round trips from other nodes since subscribers to this event are often not interested in the event data.

Definition at line 73 of file DataSourceNameChangedEvent.java.

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

Referenced by org.sleuthkit.autopsy.centralrepository.eventlisteners.CaseEventListener.DataSourceNameChangedTask.run().

Object org.sleuthkit.autopsy.casemodule.events.DataSourceNameChangedEvent.getNewValue ( )

Gets the new name for the data source

Returns
The new name for the data source

Definition at line 64 of file DataSourceNameChangedEvent.java.

References org.sleuthkit.autopsy.casemodule.events.DataSourceNameChangedEvent.newName.

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

Gets the source type (local or remote) as a string. This is for clients that do not have access to the AutopsyEvent type, and is necessary because the events package is not currently a public package within the Autopsy-Core NetBeans Module (NBM).

Returns
A string, either "LOCAL" or "REMOTE", as an Object.

Definition at line 82 of file AutopsyEvent.java.

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

Gets the source type (local or remote).

Returns
SourceType The source type of the event, local or remote.

Definition at line 69 of file AutopsyEvent.java.

References org.sleuthkit.autopsy.events.AutopsyEvent.sourceType.

Member Data Documentation

transient Content org.sleuthkit.autopsy.casemodule.events.DataSourceNameChangedEvent.dataSource
private
final Logger org.sleuthkit.autopsy.casemodule.events.DataSourceNameChangedEvent.logger = Logger.getLogger(DataSourceAddedEvent.class.getName())
staticprivate

Definition at line 36 of file DataSourceNameChangedEvent.java.

final String org.sleuthkit.autopsy.casemodule.events.DataSourceNameChangedEvent.newName
private
final long org.sleuthkit.autopsy.casemodule.events.DataSourceNameChangedEvent.serialVersionUID = 1L
staticprivate

Definition at line 35 of file DataSourceNameChangedEvent.java.


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

Copyright © 2012-2018 Basis Technology. Generated on: Fri Mar 22 2019
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.