mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-17 10:17:41 +00:00
Interface and lookup for directory tree artifact viewer - to support viewing artifacts triggered from other modules
This commit is contained in:
parent
670c206f45
commit
21768f5965
@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2011 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
package org.sleuthkit.autopsy.corecomponentinterfaces;
|
||||
|
||||
import org.sleuthkit.datamodel.BlackboardArtifact;
|
||||
|
||||
/**
|
||||
* Additional functionality of viewers
|
||||
* supporting black board results
|
||||
* such as the directory tree
|
||||
*/
|
||||
public interface BlackboardResultViewer {
|
||||
|
||||
/**
|
||||
* View artifact in a viewer
|
||||
* @param art artifact to view
|
||||
*/
|
||||
void viewArtifact(BlackboardArtifact art);
|
||||
|
||||
/**
|
||||
* View content associated with the artifact
|
||||
* @param art artifact content to view
|
||||
*/
|
||||
void viewArtifactContent(BlackboardArtifact art);
|
||||
|
||||
}
|
@ -31,7 +31,6 @@ import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import javax.swing.Action;
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.SwingUtilities;
|
||||
import javax.swing.tree.TreeSelectionModel;
|
||||
@ -48,6 +47,7 @@ import org.openide.nodes.Node;
|
||||
import org.openide.nodes.NodeNotFoundException;
|
||||
import org.openide.nodes.NodeOp;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.corecomponentinterfaces.BlackboardResultViewer;
|
||||
import org.sleuthkit.autopsy.corecomponents.DataResultTopComponent;
|
||||
import org.sleuthkit.autopsy.corecomponents.TableFilterNode;
|
||||
import org.sleuthkit.autopsy.datamodel.ArtifactTypeNode;
|
||||
@ -66,7 +66,7 @@ import org.sleuthkit.datamodel.Content;
|
||||
* Top component which displays something.
|
||||
*/
|
||||
// Registered as a service provider for DataExplorer in layer.xml
|
||||
public final class DirectoryTreeTopComponent extends TopComponent implements DataExplorer, ExplorerManager.Provider {
|
||||
public final class DirectoryTreeTopComponent extends TopComponent implements DataExplorer, ExplorerManager.Provider, BlackboardResultViewer {
|
||||
|
||||
private transient ExplorerManager em = new ExplorerManager();
|
||||
private static DirectoryTreeTopComponent instance;
|
||||
@ -704,7 +704,8 @@ public final class DirectoryTreeTopComponent extends TopComponent implements Dat
|
||||
return this;
|
||||
}
|
||||
|
||||
public void openNode(BlackboardArtifact art) {
|
||||
@Override
|
||||
public void viewArtifact(BlackboardArtifact art) {
|
||||
BlackboardArtifact.ARTIFACT_TYPE type = BlackboardArtifact.ARTIFACT_TYPE.fromID(art.getArtifactTypeID());
|
||||
Children rootChilds = em.getRootContext().getChildren();
|
||||
Node extractedContent = rootChilds.findChild(ExtractedContentNode.EXTRACTED_NAME);
|
||||
@ -716,6 +717,11 @@ public final class DirectoryTreeTopComponent extends TopComponent implements Dat
|
||||
logger.log(Level.WARNING, "Property Veto: ", ex);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void viewArtifactContent(BlackboardArtifact art) {
|
||||
|
||||
}
|
||||
// private class HistoryManager<T> {
|
||||
// private Stack<T> past, future;
|
||||
//
|
||||
|
@ -28,6 +28,11 @@
|
||||
<attr name="instanceCreate" methodvalue="org.sleuthkit.autopsy.directorytree.DirectoryTreeTopComponent.getDefault"/>
|
||||
<attr name="position" intvalue="100"/>
|
||||
</file>
|
||||
<file name="org-sleuthkit-autopsy-directorytree-DirectoryTreeTopComponent2.instance">
|
||||
<attr name="instanceOf" stringvalue="org.sleuthkit.autopsy.corecomponentinterfaces.BlackboardResultViewer"/>
|
||||
<attr name="instanceCreate" methodvalue="org.sleuthkit.autopsy.directorytree.DirectoryTreeTopComponent.getDefault"/>
|
||||
<attr name="position" intvalue="100"/>
|
||||
</file>
|
||||
</folder>
|
||||
<folder name="Windows2">
|
||||
<folder name="Components">
|
||||
|
Loading…
x
Reference in New Issue
Block a user