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

Inherits org.sleuthkit.autopsy.discovery.ui.AbstractArtifactDetailsPanel, and org.sleuthkit.autopsy.contentviewers.artifactviewers.ArtifactContentViewer.

Public Member Functions

 GeneralPurposeArtifactViewer ()
 
Component getComponent ()
 
Component getComponent ()
 
boolean isSupported (BlackboardArtifact artifact)
 
void setArtifact (BlackboardArtifact artifact)
 

Private Member Functions

boolean addDates (String label, List< BlackboardAttribute > attrList, boolean headerExists)
 
JTextPane addDetailsHeader (int artifactTypeId)
 
JTextPane addHeader (String headerString)
 
JLabel addKeyAtCol (String keyString)
 
void addLineEndGlue ()
 
JTextPane addNameValueRow (String keyString, String valueString)
 
void addOrderings ()
 
void addPageEndGlue ()
 
void addToPanel (Component comp)
 
JTextPane addValueAtCol (String valueString)
 
void initComponents ()
 
void resetComponent ()
 
void updateView (BlackboardArtifact artifact, Map< Integer, List< BlackboardAttribute >> attributeMap, String dataSourceName, String hostName, String sourceFilePath)
 
void valueLabelMouseClicked (java.awt.event.MouseEvent evt, JTextPane valueLabel)
 

Private Attributes

final javax.swing.JPanel detailsPanel = new javax.swing.JPanel()
 
javax.swing.JScrollPane detailsScrollPane
 
final GridBagConstraints gridBagConstraints = new GridBagConstraints()
 
final GridBagLayout gridBagLayout = new GridBagLayout()
 
final Map< Integer, Integer[]> orderingMap = new HashMap<>()
 

Static Private Attributes

static final Integer[] DEFAULT_ORDERING
 
static final Insets FIRST_HEADER_INSETS = ZERO_INSETS
 
static final double GLUE_WEIGHT_X = 1.0
 
static final Insets HEADER_INSETS = new Insets(ContentViewerDefaults.getSectionSpacing(), 0, ContentViewerDefaults.getLineSpacing(), 0)
 
static final Insets KEY_COLUMN_INSETS = new Insets(0, ContentViewerDefaults.getSectionIndent(), ContentViewerDefaults.getLineSpacing(), 0)
 
static final int LABEL_COLUMN = 0
 
static final int LABEL_WIDTH = 1
 
static final Logger logger = Logger.getLogger(GeneralPurposeArtifactViewer.class.getName())
 
static final int MAX_COLS = 4
 
static final long serialVersionUID = 1L
 
static final double TEXT_WEIGHT_X = 0.0
 
static final List< Integer > TYPES_WITH_DATE_SECTION = Arrays.asList(new Integer[]{BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_COOKIE.getTypeID()})
 
static final int VALUE_COLUMN = 1
 
static final Insets VALUE_COLUMN_INSETS = new Insets(0, ContentViewerDefaults.getColumnSpacing(), ContentViewerDefaults.getLineSpacing(), 0)
 
static final int VALUE_WIDTH = 2
 
static final Insets ZERO_INSETS = new java.awt.Insets(0, 0, 0, 0)
 

Detailed Description

Panel to display the details for an Artifact.

Definition at line 62 of file GeneralPurposeArtifactViewer.java.

Constructor & Destructor Documentation

org.sleuthkit.autopsy.contentviewers.artifactviewers.GeneralPurposeArtifactViewer.GeneralPurposeArtifactViewer ( )

Member Function Documentation

boolean org.sleuthkit.autopsy.contentviewers.artifactviewers.GeneralPurposeArtifactViewer.addDates ( String  label,
List< BlackboardAttribute >  attrList,
boolean  headerExists 
)
private

Private helper method to add all dates in a given attribute list.

Parameters
labelSpecific String to use in place of attributes display name.
attrListList of attributes to add dates for.
headerExistsIf the "Dates" header has already been displayed.
Returns
True if the "Dates" header has been displayed, false otherwise.

Definition at line 344 of file GeneralPurposeArtifactViewer.java.

JTextPane org.sleuthkit.autopsy.contentviewers.artifactviewers.GeneralPurposeArtifactViewer.addDetailsHeader ( int  artifactTypeId)
private

Helper method to add an artifact specific details header.

Parameters
artifactTypeIdID of artifact type to add header for.

Definition at line 373 of file GeneralPurposeArtifactViewer.java.

JTextPane org.sleuthkit.autopsy.contentviewers.artifactviewers.GeneralPurposeArtifactViewer.addHeader ( String  headerString)
private

Adds a new heading to the panel.

Parameters
headerStringHeading string to display.
Returns
JLabel Heading label added.

Definition at line 401 of file GeneralPurposeArtifactViewer.java.

References org.sleuthkit.autopsy.contentviewers.layout.ContentViewerDefaults.getHeaderFont().

JLabel org.sleuthkit.autopsy.contentviewers.artifactviewers.GeneralPurposeArtifactViewer.addKeyAtCol ( String  keyString)
private

Adds a label/key to the panel.

Parameters
keyStringKey name to display.
Returns
Label added.

Definition at line 480 of file GeneralPurposeArtifactViewer.java.

void org.sleuthkit.autopsy.contentviewers.artifactviewers.GeneralPurposeArtifactViewer.addLineEndGlue ( )
private

Adds a filler/glue at the end of the line to keep the other columns aligned, in case the panel is resized.

Definition at line 448 of file GeneralPurposeArtifactViewer.java.

JTextPane org.sleuthkit.autopsy.contentviewers.artifactviewers.GeneralPurposeArtifactViewer.addNameValueRow ( String  keyString,
String  valueString 
)
private

Add a key value row to the specified panel with the specified layout and constraints.

Parameters
keyStringKey name to display.
valueStringValue string to display.

Definition at line 439 of file GeneralPurposeArtifactViewer.java.

void org.sleuthkit.autopsy.contentviewers.artifactviewers.GeneralPurposeArtifactViewer.addOrderings ( )
private

Private helper method to add the orderings used for each artifact type to the map for lookup.

Definition at line 111 of file GeneralPurposeArtifactViewer.java.

void org.sleuthkit.autopsy.contentviewers.artifactviewers.GeneralPurposeArtifactViewer.addPageEndGlue ( )
private

Adds a filler/glue at the bottom of the panel to keep the data rows aligned, in case the panel is resized.

Definition at line 465 of file GeneralPurposeArtifactViewer.java.

void org.sleuthkit.autopsy.contentviewers.artifactviewers.GeneralPurposeArtifactViewer.addToPanel ( Component  comp)
private

Definition at line 495 of file GeneralPurposeArtifactViewer.java.

JTextPane org.sleuthkit.autopsy.contentviewers.artifactviewers.GeneralPurposeArtifactViewer.addValueAtCol ( String  valueString)
private

Adds a value string to the panel at specified column.

Parameters
valueStringValue string to display.
Returns
Label added.

Definition at line 507 of file GeneralPurposeArtifactViewer.java.

Component org.sleuthkit.autopsy.discovery.ui.AbstractArtifactDetailsPanel.getComponent ( )
inherited

Definition at line 35 of file AbstractArtifactDetailsPanel.java.

Component org.sleuthkit.autopsy.contentviewers.artifactviewers.ArtifactContentViewer.getComponent ( )
inherited
void org.sleuthkit.autopsy.contentviewers.artifactviewers.GeneralPurposeArtifactViewer.initComponents ( )
private

This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.

Definition at line 231 of file GeneralPurposeArtifactViewer.java.

boolean org.sleuthkit.autopsy.contentviewers.artifactviewers.GeneralPurposeArtifactViewer.isSupported ( BlackboardArtifact  artifact)

Checks whether the given artifact is supported by the viewer.

Parameters
artifactArtifact to check.
Returns
True if the artifact can be displayed by the viewer, false otherwise.

Implements org.sleuthkit.autopsy.contentviewers.artifactviewers.ArtifactContentViewer.

Definition at line 205 of file GeneralPurposeArtifactViewer.java.

void org.sleuthkit.autopsy.contentviewers.artifactviewers.GeneralPurposeArtifactViewer.resetComponent ( )
private

Reset the panel so that it is empty.

Definition at line 190 of file GeneralPurposeArtifactViewer.java.

void org.sleuthkit.autopsy.contentviewers.artifactviewers.GeneralPurposeArtifactViewer.setArtifact ( BlackboardArtifact  artifact)

Called to display the contents of the given artifact.

Parameters
artifactthe artifact to display.

Implements org.sleuthkit.autopsy.contentviewers.artifactviewers.ArtifactContentViewer.

Definition at line 152 of file GeneralPurposeArtifactViewer.java.

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

void org.sleuthkit.autopsy.contentviewers.artifactviewers.GeneralPurposeArtifactViewer.updateView ( BlackboardArtifact  artifact,
Map< Integer, List< BlackboardAttribute >>  attributeMap,
String  dataSourceName,
String  hostName,
String  sourceFilePath 
)
private

Update the view to reflect the current artifact's details.

Parameters
artifactThe artifact being displayed.
attributeMapThe map of attributes that exist for the artifact.
dataSourceNameThe name of the datasource that caused the creation of the artifact.
hostNameThe host name.
sourceFilePathThe path of the file that caused the creation of the artifact.

Definition at line 270 of file GeneralPurposeArtifactViewer.java.

References org.sleuthkit.autopsy.coreutils.TimeZoneUtils.getFormattedTime().

void org.sleuthkit.autopsy.contentviewers.artifactviewers.GeneralPurposeArtifactViewer.valueLabelMouseClicked ( java.awt.event.MouseEvent  evt,
JTextPane  valueLabel 
)
private

Event handler for mouse click event. Attaches a 'Copy' menu item to right click.

Parameters
evtEvent to check.
valueLabelLabel to attach the menu item to.

Definition at line 547 of file GeneralPurposeArtifactViewer.java.

Member Data Documentation

final Integer [] org.sleuthkit.autopsy.contentviewers.artifactviewers.GeneralPurposeArtifactViewer.DEFAULT_ORDERING
staticprivate
Initial value:
= new Integer[]{BlackboardAttribute.ATTRIBUTE_TYPE.TSK_TITLE.getTypeID(), BlackboardAttribute.ATTRIBUTE_TYPE.TSK_NAME.getTypeID(),
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED.getTypeID(), BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME_CREATED.getTypeID(),
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME_START.getTypeID(), BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME_END.getTypeID(),
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DOMAIN.getTypeID(), BlackboardAttribute.ATTRIBUTE_TYPE.TSK_URL.getTypeID(),
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_REFERRER.getTypeID(), BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PROG_NAME.getTypeID(),
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_VALUE.getTypeID(), BlackboardAttribute.ATTRIBUTE_TYPE.TSK_TEXT.getTypeID(),
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PATH.getTypeID(), BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PATH_ID.getTypeID(),
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_HEADERS.getTypeID()}

Definition at line 81 of file GeneralPurposeArtifactViewer.java.

final javax.swing.JPanel org.sleuthkit.autopsy.contentviewers.artifactviewers.GeneralPurposeArtifactViewer.detailsPanel = new javax.swing.JPanel()
private

Definition at line 93 of file GeneralPurposeArtifactViewer.java.

javax.swing.JScrollPane org.sleuthkit.autopsy.contentviewers.artifactviewers.GeneralPurposeArtifactViewer.detailsScrollPane
private

Definition at line 564 of file GeneralPurposeArtifactViewer.java.

final Insets org.sleuthkit.autopsy.contentviewers.artifactviewers.GeneralPurposeArtifactViewer.FIRST_HEADER_INSETS = ZERO_INSETS
staticprivate

Definition at line 70 of file GeneralPurposeArtifactViewer.java.

final double org.sleuthkit.autopsy.contentviewers.artifactviewers.GeneralPurposeArtifactViewer.GLUE_WEIGHT_X = 1.0
staticprivate

Definition at line 75 of file GeneralPurposeArtifactViewer.java.

final GridBagConstraints org.sleuthkit.autopsy.contentviewers.artifactviewers.GeneralPurposeArtifactViewer.gridBagConstraints = new GridBagConstraints()
private

Definition at line 91 of file GeneralPurposeArtifactViewer.java.

final GridBagLayout org.sleuthkit.autopsy.contentviewers.artifactviewers.GeneralPurposeArtifactViewer.gridBagLayout = new GridBagLayout()
private

Definition at line 90 of file GeneralPurposeArtifactViewer.java.

final Insets org.sleuthkit.autopsy.contentviewers.artifactviewers.GeneralPurposeArtifactViewer.HEADER_INSETS = new Insets(ContentViewerDefaults.getSectionSpacing(), 0, ContentViewerDefaults.getLineSpacing(), 0)
staticprivate

Definition at line 71 of file GeneralPurposeArtifactViewer.java.

final Insets org.sleuthkit.autopsy.contentviewers.artifactviewers.GeneralPurposeArtifactViewer.KEY_COLUMN_INSETS = new Insets(0, ContentViewerDefaults.getSectionIndent(), ContentViewerDefaults.getLineSpacing(), 0)
staticprivate

Definition at line 73 of file GeneralPurposeArtifactViewer.java.

final int org.sleuthkit.autopsy.contentviewers.artifactviewers.GeneralPurposeArtifactViewer.LABEL_COLUMN = 0
staticprivate

Definition at line 77 of file GeneralPurposeArtifactViewer.java.

final int org.sleuthkit.autopsy.contentviewers.artifactviewers.GeneralPurposeArtifactViewer.LABEL_WIDTH = 1
staticprivate

Definition at line 80 of file GeneralPurposeArtifactViewer.java.

final Logger org.sleuthkit.autopsy.contentviewers.artifactviewers.GeneralPurposeArtifactViewer.logger = Logger.getLogger(GeneralPurposeArtifactViewer.class.getName())
staticprivate

Definition at line 65 of file GeneralPurposeArtifactViewer.java.

final int org.sleuthkit.autopsy.contentviewers.artifactviewers.GeneralPurposeArtifactViewer.MAX_COLS = 4
staticprivate

Definition at line 67 of file GeneralPurposeArtifactViewer.java.

final Map<Integer, Integer[]> org.sleuthkit.autopsy.contentviewers.artifactviewers.GeneralPurposeArtifactViewer.orderingMap = new HashMap<>()
private

Definition at line 92 of file GeneralPurposeArtifactViewer.java.

final long org.sleuthkit.autopsy.contentviewers.artifactviewers.GeneralPurposeArtifactViewer.serialVersionUID = 1L
staticprivate

Definition at line 64 of file GeneralPurposeArtifactViewer.java.

final double org.sleuthkit.autopsy.contentviewers.artifactviewers.GeneralPurposeArtifactViewer.TEXT_WEIGHT_X = 0.0
staticprivate

Definition at line 76 of file GeneralPurposeArtifactViewer.java.

final List<Integer> org.sleuthkit.autopsy.contentviewers.artifactviewers.GeneralPurposeArtifactViewer.TYPES_WITH_DATE_SECTION = Arrays.asList(new Integer[]{BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_COOKIE.getTypeID()})
staticprivate

Definition at line 89 of file GeneralPurposeArtifactViewer.java.

final int org.sleuthkit.autopsy.contentviewers.artifactviewers.GeneralPurposeArtifactViewer.VALUE_COLUMN = 1
staticprivate

Definition at line 78 of file GeneralPurposeArtifactViewer.java.

final Insets org.sleuthkit.autopsy.contentviewers.artifactviewers.GeneralPurposeArtifactViewer.VALUE_COLUMN_INSETS = new Insets(0, ContentViewerDefaults.getColumnSpacing(), ContentViewerDefaults.getLineSpacing(), 0)
staticprivate

Definition at line 72 of file GeneralPurposeArtifactViewer.java.

final int org.sleuthkit.autopsy.contentviewers.artifactviewers.GeneralPurposeArtifactViewer.VALUE_WIDTH = 2
staticprivate

Definition at line 79 of file GeneralPurposeArtifactViewer.java.

final Insets org.sleuthkit.autopsy.contentviewers.artifactviewers.GeneralPurposeArtifactViewer.ZERO_INSETS = new java.awt.Insets(0, 0, 0, 0)
staticprivate

Definition at line 68 of file GeneralPurposeArtifactViewer.java.


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

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