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

Inherits AbstractAction.

Inherited by org.sleuthkit.autopsy.datasourcesummary.ui.DataSourceSummaryNode.DataSourceSummaryEntryNode.ViewDataSourceInContextAction.

Classes

class  AncestorVisitor
 

Public Member Functions

 ViewContextAction (String displayName, BlackboardArtifactNode artifactNode)
 
 ViewContextAction (String displayName, AbstractFsContentNode<?extends AbstractFile > fileSystemContentNode)
 
 ViewContextAction (String displayName, AbstractAbstractFileNode<?extends AbstractFile > abstractAbstractFileNode)
 
 ViewContextAction (String displayName, Content content)
 
void actionPerformed (ActionEvent event)
 

Private Member Functions

Node findParentNodeInTree (Content parentContent, Node node)
 
List< Node > getDataSourceLevelNodes (Node node)
 
Content getParentContent (Content content)
 
Node getParentNodeGroupedByDataSource (ExplorerManager treeViewExplorerMgr, Content parentContent)
 
Node getParentNodeGroupedByPersonHost (ExplorerManager treeViewExplorerMgr, Content parentContent)
 
void setNodeSelection (Content content, Node parentTreeViewNode, DirectoryTreeTopComponent treeViewTopComponent, ExplorerManager treeViewExplorerMgr)
 

Private Attributes

final Content content
 

Static Private Attributes

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

Detailed Description

An action that displays the context for some content by expanding the data sources branch of the tree view to the level of the parent of the content, selecting the parent in the tree view, then selecting the content in the results view.

Definition at line 76 of file ViewContextAction.java.

Constructor & Destructor Documentation

org.sleuthkit.autopsy.directorytree.ViewContextAction.ViewContextAction ( String  displayName,
BlackboardArtifactNode  artifactNode 
)

An action that displays the context for the source content of an artifact by expanding the data sources branch of the tree view to the level of the parent of the content, selecting the parent in the tree view, then selecting the content in the results view.

Parameters
displayNameThe display name for the action.
artifactNodeThe artifact node for the artifact.

Definition at line 91 of file ViewContextAction.java.

References org.sleuthkit.autopsy.core.UserPreferences.hideKnownFilesInDataSourcesTree(), and org.sleuthkit.autopsy.core.UserPreferences.hideSlackFilesInDataSourcesTree().

org.sleuthkit.autopsy.directorytree.ViewContextAction.ViewContextAction ( String  displayName,
AbstractFsContentNode<?extends AbstractFile >  fileSystemContentNode 
)

An action that displays the context for some file system content by expanding the data sources branch of the tree view to the level of the parent of the content, selecting the parent in the tree view, then selecting the content in the results view.

Parameters
displayNameThe display name for the action.
fileSystemContentNodeThe file system content node for the content.

Definition at line 114 of file ViewContextAction.java.

org.sleuthkit.autopsy.directorytree.ViewContextAction.ViewContextAction ( String  displayName,
AbstractAbstractFileNode<?extends AbstractFile >  abstractAbstractFileNode 
)

An action that displays the context for abstract file by expanding the data sources branch of the tree view to the level of the parent of the content, selecting the parent in the tree view, then selecting the content in the results view.

Parameters
displayNameThe display name for the action.
abstractAbstractFileNodeThe AbstractAbstractFileNode node for the content.

Definition at line 129 of file ViewContextAction.java.

org.sleuthkit.autopsy.directorytree.ViewContextAction.ViewContextAction ( String  displayName,
Content  content 
)

An action that displays the context for some content by expanding the data sources branch of the tree view to the level of the parent of the content, selecting the parent in the tree view, then selecting the content in the results view.

Parameters
displayNameThe display name for the action.
contentThe content.

Definition at line 143 of file ViewContextAction.java.

References org.sleuthkit.autopsy.directorytree.ViewContextAction.content.

Member Function Documentation

void org.sleuthkit.autopsy.directorytree.ViewContextAction.actionPerformed ( ActionEvent  event)

Displays the context for some content by expanding the data sources branch of the tree view to the level of the parent of the content, selecting the parent in the tree view, then selecting the content in the results view.

NOTE: This code will likely need updating in the event that the structure of the nodes is changed (i.e. adding parent levels). Places to look when changing node structure include:

DirectoryTreeTopComponent.viewArtifact, ViewContextAction

Parameters
eventThe action event.

Definition at line 169 of file ViewContextAction.java.

References org.sleuthkit.autopsy.coreutils.MessageNotifyUtil.Message.error(), org.sleuthkit.autopsy.directorytree.DirectoryTreeTopComponent.findInstance(), org.sleuthkit.autopsy.directorytree.DirectoryTreeTopComponent.getExplorerManager(), org.sleuthkit.autopsy.casemodule.CasePreferences.getGroupItemsInTreeByDataSource(), org.sleuthkit.autopsy.directorytree.ViewContextAction.getParentContent(), org.sleuthkit.autopsy.directorytree.ViewContextAction.getParentNodeGroupedByDataSource(), org.sleuthkit.autopsy.directorytree.ViewContextAction.getParentNodeGroupedByPersonHost(), and org.sleuthkit.autopsy.directorytree.ViewContextAction.setNodeSelection().

Node org.sleuthkit.autopsy.directorytree.ViewContextAction.findParentNodeInTree ( Content  parentContent,
Node  node 
)
private

Searches tree for parent node by getting an ordered list of the ancestors of the specified content.

Parameters
parentContentparent content for the content to be searched for
nodeNode tree to search
Returns
Node object of the matching parent, NULL if not found

Convert the list of ancestors into a list of tree nodes.

IMPORTANT: The "dummy" root node used to create this single layer of children needs to be wrapped in a DirectoryTreeFilterNode so that its child nodes will also be wrapped in DirectoryTreeFilterNodes, via DirectoryTreeFilterNodeChildren. Otherwise, the display names of the nodes in the branch will not have child node counts and will not match the display names of the corresponding nodes in the actual tree view.

Definition at line 406 of file ViewContextAction.java.

Referenced by org.sleuthkit.autopsy.directorytree.ViewContextAction.getParentNodeGroupedByDataSource(), and org.sleuthkit.autopsy.directorytree.ViewContextAction.getParentNodeGroupedByPersonHost().

List<Node> org.sleuthkit.autopsy.directorytree.ViewContextAction.getDataSourceLevelNodes ( Node  node)
private

If the node has lookup of host or person, returns children. If not, just returns itself.

Parameters
nodeThe node.
Returns
The child nodes that are at the data source level.

Definition at line 376 of file ViewContextAction.java.

References org.sleuthkit.autopsy.datamodel.DataSourcesNode.getNameIdentifier(), and org.sleuthkit.autopsy.datamodel.PersonNode.getUnknownPersonId().

Referenced by org.sleuthkit.autopsy.directorytree.ViewContextAction.getParentNodeGroupedByDataSource(), and org.sleuthkit.autopsy.directorytree.ViewContextAction.getParentNodeGroupedByPersonHost().

Content org.sleuthkit.autopsy.directorytree.ViewContextAction.getParentContent ( Content  content)
private

Get the parent content for the content to be selected in the results view. If the parent content is null, then the specified content is a data source, and the parent tree view node is the "Data Sources" node. Otherwise, the tree view needs to be searched to find the parent treeview node.

Parameters
contentThe content whose parent will be returned. If this item is a datasource, it will be returned.
Returns
The content if content is a data source or the parent of this content.

Definition at line 217 of file ViewContextAction.java.

References org.sleuthkit.autopsy.coreutils.MessageNotifyUtil.Message.error().

Referenced by org.sleuthkit.autopsy.directorytree.ViewContextAction.actionPerformed().

Node org.sleuthkit.autopsy.directorytree.ViewContextAction.getParentNodeGroupedByDataSource ( ExplorerManager  treeViewExplorerMgr,
Content  parentContent 
)
private

Returns the node in the tree related to the parentContent or null if can't be found. This method should be used when view is grouped by data source.

Parameters
treeViewExplorerMgrThe explorer manager.
parentContentThe content whose equivalent node will be returned if found.
Returns
The node if found or null.

Definition at line 241 of file ViewContextAction.java.

References org.sleuthkit.autopsy.directorytree.ViewContextAction.findParentNodeInTree(), org.sleuthkit.autopsy.directorytree.ViewContextAction.getDataSourceLevelNodes(), and org.sleuthkit.autopsy.datamodel.DataSourcesNode.getNameIdentifier().

Referenced by org.sleuthkit.autopsy.directorytree.ViewContextAction.actionPerformed().

Node org.sleuthkit.autopsy.directorytree.ViewContextAction.getParentNodeGroupedByPersonHost ( ExplorerManager  treeViewExplorerMgr,
Content  parentContent 
)
private

Returns the node in the tree related to the parentContent or null if can't be found. This method should be used when view is grouped by hosts/persons.

Parameters
treeViewExplorerMgrThe explorer manager.
parentContentThe content whose equivalent node will be returned if found.
Returns
The node if found or null.

Definition at line 273 of file ViewContextAction.java.

References org.sleuthkit.autopsy.coreutils.MessageNotifyUtil.Message.error(), org.sleuthkit.autopsy.directorytree.ViewContextAction.findParentNodeInTree(), org.sleuthkit.autopsy.casemodule.Case.getCurrentCaseThrows(), org.sleuthkit.autopsy.directorytree.ViewContextAction.getDataSourceLevelNodes(), org.sleuthkit.autopsy.datamodel.DataSourceFilesNode.getNameIdentifier(), and org.sleuthkit.autopsy.casemodule.Case.getSleuthkitCase().

Referenced by org.sleuthkit.autopsy.directorytree.ViewContextAction.actionPerformed().

void org.sleuthkit.autopsy.directorytree.ViewContextAction.setNodeSelection ( Content  content,
Node  parentTreeViewNode,
DirectoryTreeTopComponent  treeViewTopComponent,
ExplorerManager  treeViewExplorerMgr 
)
private

Member Data Documentation

final Content org.sleuthkit.autopsy.directorytree.ViewContextAction.content
private
final Logger org.sleuthkit.autopsy.directorytree.ViewContextAction.logger = Logger.getLogger(ViewContextAction.class.getName())
staticprivate

Definition at line 79 of file ViewContextAction.java.

final long org.sleuthkit.autopsy.directorytree.ViewContextAction.serialVersionUID = 1L
staticprivate

Definition at line 78 of file ViewContextAction.java.


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

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