Autopsy  4.11.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
org.sleuthkit.autopsy.report.uisnapshot.UiSnapShotReportWriter Class Referenceabstract

Inherited by org.sleuthkit.autopsy.communications.snapshot.CommSnapShotReportWriter, and org.sleuthkit.autopsy.timeline.snapshot.SnapShotReportWriter.

Public Member Functions

Path writeReport () throws IOException
 

Protected Member Functions

 UiSnapShotReportWriter (Case currentCase, Path reportFolderPath, String reportName, Date generationDate)
 
void fillTemplateAndWrite (final String templateLocation, final String templateName, Object context, final Path outPutFile) throws IOException
 
Case getCurrentCase ()
 
Path getReportFolderPath ()
 
String getReportName ()
 
abstract void writeSnapShotHTMLFile () throws IOException
 

Private Member Functions

void copyInternalResource (String internalPath, String fileName) throws IOException
 
void copyResources () throws IOException
 
Path writeIndexHTML () throws IOException
 
void writeSummaryHTML () throws IOException
 

Private Attributes

final Case currentCase
 
Date generationDate
 
final ReportBranding reportBranding
 
final Path reportFolderPath
 
final String reportName
 

Static Private Attributes

static final MustacheFactory mf = new DefaultMustacheFactory()
 

Detailed Description

Generate and write the snapshot report to disk.

Definition at line 43 of file UiSnapShotReportWriter.java.

Constructor & Destructor Documentation

org.sleuthkit.autopsy.report.uisnapshot.UiSnapShotReportWriter.UiSnapShotReportWriter ( Case  currentCase,
Path  reportFolderPath,
String  reportName,
Date  generationDate 
)
protected

Constructor

Parameters
currentCaseThe Case to write a report for.
reportFolderPathThe Path to the folder that will contain the report.
reportNameThe name of the report.
generationDateThe generation Date of the report.

Definition at line 66 of file UiSnapShotReportWriter.java.

References org.sleuthkit.autopsy.report.uisnapshot.UiSnapShotReportWriter.currentCase, org.sleuthkit.autopsy.report.uisnapshot.UiSnapShotReportWriter.generationDate, org.sleuthkit.autopsy.report.uisnapshot.UiSnapShotReportWriter.reportFolderPath, and org.sleuthkit.autopsy.report.uisnapshot.UiSnapShotReportWriter.reportName.

Member Function Documentation

void org.sleuthkit.autopsy.report.uisnapshot.UiSnapShotReportWriter.copyInternalResource ( String  internalPath,
String  fileName 
) throws IOException
private

Copies internal resource to the report folder.

Parameters
internalPathLocation in jar of the image
fileNameName to give resource in new location
Exceptions
IOException

Definition at line 234 of file UiSnapShotReportWriter.java.

Referenced by org.sleuthkit.autopsy.report.uisnapshot.UiSnapShotReportWriter.copyResources().

void org.sleuthkit.autopsy.report.uisnapshot.UiSnapShotReportWriter.copyResources ( ) throws IOException
private
void org.sleuthkit.autopsy.report.uisnapshot.UiSnapShotReportWriter.fillTemplateAndWrite ( final String  templateLocation,
final String  templateName,
Object  context,
final Path  outPutFile 
) throws IOException
protected

Fill in the mustache template at the given location using the values from the given context object and save it to the given outPutFile.

Parameters
templateLocationThe location of the template. suitible for use with Class.getResourceAsStream
templateNameThe name of the tempalte. (Used by mustache to cache templates?)
contextThe contect to use to fill in the template values.
outPutFileThe filled in tempalte will be saced at this Path.
Exceptions
IOExceptionIf there is a problem saving the filled in template to disk.

Definition at line 186 of file UiSnapShotReportWriter.java.

Referenced by org.sleuthkit.autopsy.report.uisnapshot.UiSnapShotReportWriter.writeIndexHTML(), org.sleuthkit.autopsy.timeline.snapshot.SnapShotReportWriter.writeSnapShotHTMLFile(), org.sleuthkit.autopsy.communications.snapshot.CommSnapShotReportWriter.writeSnapShotHTMLFile(), and org.sleuthkit.autopsy.report.uisnapshot.UiSnapShotReportWriter.writeSummaryHTML().

Case org.sleuthkit.autopsy.report.uisnapshot.UiSnapShotReportWriter.getCurrentCase ( )
protected
Path org.sleuthkit.autopsy.report.uisnapshot.UiSnapShotReportWriter.getReportFolderPath ( )
protected
String org.sleuthkit.autopsy.report.uisnapshot.UiSnapShotReportWriter.getReportName ( )
protected
Path org.sleuthkit.autopsy.report.uisnapshot.UiSnapShotReportWriter.writeIndexHTML ( ) throws IOException
private

Generate and write the main html page with frames for navigation on the left and content on the right.

Returns
The Path of the written html file.
Exceptions
IOExceptionIf there is a problem writing the html file to disk.

Definition at line 138 of file UiSnapShotReportWriter.java.

References org.sleuthkit.autopsy.report.uisnapshot.UiSnapShotReportWriter.fillTemplateAndWrite().

Referenced by org.sleuthkit.autopsy.report.uisnapshot.UiSnapShotReportWriter.writeReport().

Path org.sleuthkit.autopsy.report.uisnapshot.UiSnapShotReportWriter.writeReport ( ) throws IOException

Generate and write the report to disk.

Returns
The Path to the "main file" of the report. This is the file that Autopsy shows in the results view when the Reports Node is selected in the DirectoryTree.
Exceptions
IOExceptionIf there is a problem writing the report.

Definition at line 84 of file UiSnapShotReportWriter.java.

References org.sleuthkit.autopsy.report.uisnapshot.UiSnapShotReportWriter.copyResources(), org.sleuthkit.autopsy.report.uisnapshot.UiSnapShotReportWriter.writeIndexHTML(), org.sleuthkit.autopsy.report.uisnapshot.UiSnapShotReportWriter.writeSnapShotHTMLFile(), and org.sleuthkit.autopsy.report.uisnapshot.UiSnapShotReportWriter.writeSummaryHTML().

Referenced by org.sleuthkit.autopsy.communications.VisualizationPanel.createReport().

abstract void org.sleuthkit.autopsy.report.uisnapshot.UiSnapShotReportWriter.writeSnapShotHTMLFile ( ) throws IOException
abstractprotected

Generate and write the html page that shows the snapshot and the state of any filters.

Exceptions
IOExceptionIf there is a problem writing the html file to disk.

Referenced by org.sleuthkit.autopsy.report.uisnapshot.UiSnapShotReportWriter.writeReport().

void org.sleuthkit.autopsy.report.uisnapshot.UiSnapShotReportWriter.writeSummaryHTML ( ) throws IOException
private

Member Data Documentation

final Case org.sleuthkit.autopsy.report.uisnapshot.UiSnapShotReportWriter.currentCase
private
Date org.sleuthkit.autopsy.report.uisnapshot.UiSnapShotReportWriter.generationDate
private
final MustacheFactory org.sleuthkit.autopsy.report.uisnapshot.UiSnapShotReportWriter.mf = new DefaultMustacheFactory()
staticprivate

mustache.java template factory.

Definition at line 48 of file UiSnapShotReportWriter.java.

final ReportBranding org.sleuthkit.autopsy.report.uisnapshot.UiSnapShotReportWriter.reportBranding
private

Definition at line 53 of file UiSnapShotReportWriter.java.

final Path org.sleuthkit.autopsy.report.uisnapshot.UiSnapShotReportWriter.reportFolderPath
private
final String org.sleuthkit.autopsy.report.uisnapshot.UiSnapShotReportWriter.reportName
private

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

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