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

Classes

class  CaseNodeDataException
 
enum  DeletedFlags
 

Public Member Functions

Date getCreateDate ()
 
Path getDirectory ()
 
String getDisplayName ()
 
boolean getErrorsOccurred ()
 
Date getLastAccessDate ()
 
String getName ()
 
boolean isDeletedFlagSet (DeletedFlags flag)
 
void setDeletedFlag (DeletedFlags flag)
 
void setDisplayName (String displayName)
 
void setErrorsOccurred (boolean errorsOccurred)
 
void setLastAccessDate (Date lastAccessDate)
 

Static Public Member Functions

static CaseNodeData createCaseNodeData (final CaseMetadata metadata) throws CaseNodeDataException, InterruptedException
 
static CaseNodeData readCaseNodeData (String nodePath) throws CaseNodeDataException, InterruptedException
 
static void writeCaseNodeData (CaseNodeData nodeData) throws CaseNodeDataException, InterruptedException
 

Private Member Functions

 CaseNodeData (CaseMetadata metadata) throws ParseException
 
 CaseNodeData (byte[] nodeData) throws IOException
 
int getVersion ()
 
void setMinorVersion (int minorVersion)
 
byte[] toArray () throws IOException
 

Static Private Member Functions

static CaseMetadata getCaseMetadata (String nodePath) throws CaseNodeDataException, CaseMetadataException
 
static CaseNodeData upgradeCaseNodeData (String nodePath, CaseNodeData oldNodeData) throws CaseNodeDataException, CaseMetadataException, ParseException, IOException, CoordinationServiceException, InterruptedException
 

Private Attributes

Date createDate
 
short deletedItemFlags
 
Path directory
 
String displayName
 
boolean errorsOccurred
 
Date lastAccessDate
 
int minorVersion
 
String name
 
int version
 

Static Private Attributes

static final Logger logger = Logger.getLogger(CaseNodeData.class.getName())
 
static final int MAJOR_VERSION = 2
 
static final int MINOR_VERSION = 0
 

Detailed Description

Case data stored in a case directory coordination service node.

Definition at line 41 of file CaseNodeData.java.

Constructor & Destructor Documentation

org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.CaseNodeData ( CaseMetadata  metadata) throws ParseException
private

Uses case metadata to construct the case data to store in a case directory coordination service node.

Parameters
metadataThe case meta data.
Exceptions
ParseExceptionIf there is an error parsing dates from string representations of dates in the meta data.

Definition at line 247 of file CaseNodeData.java.

References org.sleuthkit.autopsy.casemodule.CaseMetadata.getDateFormat(), org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.MAJOR_VERSION, and org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.MINOR_VERSION.

Referenced by org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.createCaseNodeData(), org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.readCaseNodeData(), and org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.upgradeCaseNodeData().

org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.CaseNodeData ( byte[]  nodeData) throws IOException
private

Uses the raw bytes from a case directory coordination service node to construct a case node data object.

Parameters
nodeDataThe raw bytes received from the coordination service.
Exceptions
IOExceptionIf there is an error reading the node data.

Definition at line 267 of file CaseNodeData.java.

Member Function Documentation

static CaseNodeData org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.createCaseNodeData ( final CaseMetadata  metadata) throws CaseNodeDataException, InterruptedException
static

Creates case node data from the metadata for a case and writes it to the appropriate case directory coordination service node, which must already exist.

Parameters
metadataThe case metadata.
Returns
The case node data that was written to the coordination service node.
Exceptions
CaseNodeDataExceptionIf there is an error creating or writing the case node data.
InterruptedExceptionIf the current thread is interrupted while waiting for the coordination service.

Definition at line 84 of file CaseNodeData.java.

References org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.CaseNodeData(), org.sleuthkit.autopsy.coordinationservice.CoordinationService.CategoryNode.CASES, org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.getDirectory(), org.sleuthkit.autopsy.coordinationservice.CoordinationService.getInstance(), org.sleuthkit.autopsy.coordinationservice.CoordinationService.setNodeData(), and org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.toArray().

Referenced by org.sleuthkit.autopsy.casemodule.Case.createCaseNodeData(), and org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.readCaseNodeData().

static CaseMetadata org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.getCaseMetadata ( String  nodePath) throws CaseNodeDataException, CaseMetadataException
staticprivate

Gets the metadata for a case.

Parameters
nodePathThe case directory coordination service node path for the case.
Returns
The case metadata.
Exceptions
CaseNodeDataExceptionIf the case metadata file or the case directory does not exist.
CaseMetadataExceptionIf the case metadata cannot be read.

Definition at line 225 of file CaseNodeData.java.

References org.sleuthkit.autopsy.casemodule.CaseMetadata.getCaseMetadataFilePath().

Referenced by org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.readCaseNodeData(), and org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.upgradeCaseNodeData().

Date org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.getCreateDate ( )

Gets the date the case was created.

Returns
The create date.

Definition at line 345 of file CaseNodeData.java.

Path org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.getDirectory ( )
String org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.getDisplayName ( )
boolean org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.getErrorsOccurred ( )

Gets whether or not any errors occurred during the processing of any auto ingest job for the case.

Returns
True or false.

Definition at line 317 of file CaseNodeData.java.

References org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.errorsOccurred.

Date org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.getLastAccessDate ( )

Gets the date the case was last accessed.

Returns
The last access date.

Definition at line 354 of file CaseNodeData.java.

String org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.getName ( )
int org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.getVersion ( )
private

Gets the version number of this node data.

Returns
The version number.

Definition at line 298 of file CaseNodeData.java.

References org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.version.

Referenced by org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.readCaseNodeData().

boolean org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.isDeletedFlagSet ( DeletedFlags  flag)
static CaseNodeData org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.readCaseNodeData ( String  nodePath) throws CaseNodeDataException, InterruptedException
static

Reads case data from a case directory coordination service node. If the data is missing, corrupted, or from an older version of the software, an attempt is made to remedy the situation using the case metadata.

Parameters
nodePathThe case directory coordination service node path.
Returns
The case node data.
Exceptions
CaseNodeDataExceptionIf there is an error reading or writing the case node data.
InterruptedExceptionIf the current thread is interrupted while waiting for the coordination service.

Definition at line 109 of file CaseNodeData.java.

References org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.CaseNodeData(), org.sleuthkit.autopsy.coordinationservice.CoordinationService.CategoryNode.CASES, org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.createCaseNodeData(), org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.getCaseMetadata(), org.sleuthkit.autopsy.coordinationservice.CoordinationService.getInstance(), org.sleuthkit.autopsy.coordinationservice.CoordinationService.getNodeData(), org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.getVersion(), org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.MAJOR_VERSION, and org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.upgradeCaseNodeData().

Referenced by org.sleuthkit.autopsy.casemodule.Case.deleteMultiUserCase(), org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeDataCollector.getNodeData(), and org.sleuthkit.autopsy.casemodule.Case.updateCaseNodeData().

void org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.setDeletedFlag ( DeletedFlags  flag)

Sets a given deleted item flag.

Parameters
flagThe flag to set.

Definition at line 410 of file CaseNodeData.java.

References org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.DeletedFlags.getValue().

Referenced by org.sleuthkit.autopsy.casemodule.Case.setDeletedItemFlag().

void org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.setDisplayName ( String  displayName)

Sets the display name of the case.

Parameters
displayNameThe case display name.

Definition at line 390 of file CaseNodeData.java.

References org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.displayName.

void org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.setErrorsOccurred ( boolean  errorsOccurred)

Sets whether or not any errors occurred during the processing of any auto ingest job for the case.

Parameters
errorsOccurredTrue or false.

Definition at line 327 of file CaseNodeData.java.

References org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.errorsOccurred.

Referenced by org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.upgradeCaseNodeData().

void org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.setLastAccessDate ( Date  lastAccessDate)

Sets the date the case was last accessed.

Parameters
lastAccessDateThe last access date.

Definition at line 363 of file CaseNodeData.java.

Referenced by org.sleuthkit.autopsy.casemodule.Case.updateCaseNodeData().

void org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.setMinorVersion ( int  minorVersion)
private

Sets the minor version number of this node data.

Parameters
minorVersionThe version number.

Definition at line 307 of file CaseNodeData.java.

References org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.minorVersion.

byte [] org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.toArray ( ) throws IOException
private

Gets the node data as a byte array that can be sent to the coordination service.

Returns
The node data as a byte array.
Exceptions
IOExceptionIf there is an error writing the node data to the array.

Definition at line 423 of file CaseNodeData.java.

Referenced by org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.createCaseNodeData().

static CaseNodeData org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.upgradeCaseNodeData ( String  nodePath,
CaseNodeData  oldNodeData 
) throws CaseNodeDataException, CaseMetadataException, ParseException, IOException, CoordinationServiceException, InterruptedException
staticprivate

Upgrades older versions of node data to the current version and writes the data back to the case directory coordination service node.

Parameters
nodePathThe case directory coordination service node path.
oldNodeDataThe outdated node data.
Returns
The updated node data.
Exceptions
CaseNodeDataExceptionIf the case meta data file or case directory do not exist.
CaseMetadataExceptionIf the case metadata cannot be read.

Definition at line 180 of file CaseNodeData.java.

References org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.CaseNodeData(), org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.getCaseMetadata(), org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.setErrorsOccurred(), and org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.writeCaseNodeData().

Referenced by org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.readCaseNodeData().

static void org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.writeCaseNodeData ( CaseNodeData  nodeData) throws CaseNodeDataException, InterruptedException
static

Writes case data to a case directory coordination service node. Obtain the case data to be updated and written by calling createCaseNodeData() or readCaseNodeData().

Parameters
nodeDataThe case node data.
Exceptions
CaseNodeDataExceptionIf there is an error writing the case node data.
InterruptedExceptionIf the current thread is interrupted while waiting for the coordination service.

Definition at line 158 of file CaseNodeData.java.

References org.sleuthkit.autopsy.coordinationservice.CoordinationService.CategoryNode.CASES, org.sleuthkit.autopsy.coordinationservice.CoordinationService.getInstance(), and org.sleuthkit.autopsy.coordinationservice.CoordinationService.setNodeData().

Referenced by org.sleuthkit.autopsy.casemodule.Case.setDeletedItemFlag(), org.sleuthkit.autopsy.casemodule.Case.updateCaseNodeData(), and org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.upgradeCaseNodeData().

Member Data Documentation

Date org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.createDate
private

Definition at line 58 of file CaseNodeData.java.

short org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.deletedItemFlags
private

Definition at line 62 of file CaseNodeData.java.

Path org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.directory
private
String org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.displayName
private
boolean org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.errorsOccurred
private
Date org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.lastAccessDate
private

Definition at line 59 of file CaseNodeData.java.

final Logger org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.logger = Logger.getLogger(CaseNodeData.class.getName())
staticprivate

Definition at line 45 of file CaseNodeData.java.

final int org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.MAJOR_VERSION = 2
staticprivate
final int org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.MINOR_VERSION = 0
staticprivate
int org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.minorVersion
private
String org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.name
private
int org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.version
private

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

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