mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
Remove ContentNode.getName() and .getId()
This commit is contained in:
parent
483e5cddf5
commit
dfcf854109
@ -66,15 +66,6 @@ abstract class AbstractContentNode<T extends Content> extends AbstractNode imple
|
|||||||
return super.getName();
|
return super.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the ID of this node.
|
|
||||||
*
|
|
||||||
* @return ID the ID of this node
|
|
||||||
*/
|
|
||||||
public long getID() {
|
|
||||||
return content.getId();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the row values for this node. The main purpose of this method is to
|
* Gets the row values for this node. The main purpose of this method is to
|
||||||
* get the 'x' number of the row values for this node to set the width of each
|
* get the 'x' number of the row values for this node to set the width of each
|
||||||
@ -84,6 +75,7 @@ abstract class AbstractContentNode<T extends Content> extends AbstractNode imple
|
|||||||
* @return rowValues the row values for this node.
|
* @return rowValues the row values for this node.
|
||||||
* @throws SQLException
|
* @throws SQLException
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
abstract public Object[][] getRowValues(int rows) throws SQLException;
|
abstract public Object[][] getRowValues(int rows) throws SQLException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -103,6 +95,7 @@ abstract class AbstractContentNode<T extends Content> extends AbstractNode imple
|
|||||||
*
|
*
|
||||||
* @return content the content of this node (can be image, volume, directory, or file)
|
* @return content the content of this node (can be image, volume, directory, or file)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public Content getContent() {
|
public Content getContent() {
|
||||||
return content;
|
return content;
|
||||||
}
|
}
|
||||||
@ -116,6 +109,7 @@ abstract class AbstractContentNode<T extends Content> extends AbstractNode imple
|
|||||||
*
|
*
|
||||||
* @return the path of this node
|
* @return the path of this node
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String[] getDisplayPath() {
|
public String[] getDisplayPath() {
|
||||||
return content.accept(getDisplayPath).toArray(new String[]{});
|
return content.accept(getDisplayPath).toArray(new String[]{});
|
||||||
}
|
}
|
||||||
@ -129,6 +123,7 @@ abstract class AbstractContentNode<T extends Content> extends AbstractNode imple
|
|||||||
*
|
*
|
||||||
* @return the path of this node
|
* @return the path of this node
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String[] getSystemPath() {
|
public String[] getSystemPath() {
|
||||||
return content.accept(getSystemPath).toArray(new String[]{});
|
return content.accept(getSystemPath).toArray(new String[]{});
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,6 @@ import org.openide.nodes.FilterNode;
|
|||||||
import org.openide.nodes.Node;
|
import org.openide.nodes.Node;
|
||||||
import org.openide.util.Lookup;
|
import org.openide.util.Lookup;
|
||||||
import org.sleuthkit.datamodel.Content;
|
import org.sleuthkit.datamodel.Content;
|
||||||
import org.sleuthkit.datamodel.TskException;
|
|
||||||
|
|
||||||
public class ContentFilterNode extends FilterNode implements ContentNode {
|
public class ContentFilterNode extends FilterNode implements ContentNode {
|
||||||
|
|
||||||
@ -38,11 +37,6 @@ public class ContentFilterNode extends FilterNode implements ContentNode {
|
|||||||
public ContentFilterNode(ContentNode original, Children children, Lookup lookup) {
|
public ContentFilterNode(ContentNode original, Children children, Lookup lookup) {
|
||||||
super((Node) original, children, lookup);
|
super((Node) original, children, lookup);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public long getID() {
|
|
||||||
return ((ContentNode) super.getOriginal()).getID();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object[][] getRowValues(int rows) throws SQLException {
|
public Object[][] getRowValues(int rows) throws SQLException {
|
||||||
|
@ -20,7 +20,6 @@ package org.sleuthkit.autopsy.datamodel;
|
|||||||
|
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import org.sleuthkit.datamodel.Content;
|
import org.sleuthkit.datamodel.Content;
|
||||||
import org.sleuthkit.datamodel.TskException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface class that all Data nodes inherit from.
|
* Interface class that all Data nodes inherit from.
|
||||||
@ -28,22 +27,6 @@ import org.sleuthkit.datamodel.TskException;
|
|||||||
*/
|
*/
|
||||||
public interface ContentNode {
|
public interface ContentNode {
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the programmatic name for this node. This is NOT the name to
|
|
||||||
* display to users, or the plain name of the Content object - use
|
|
||||||
* Node.getDisplayName() for that.
|
|
||||||
*
|
|
||||||
* @return name the programmatic name for this node
|
|
||||||
*/
|
|
||||||
public String getName();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the ID of this node.
|
|
||||||
*
|
|
||||||
* @return ID the ID of this node
|
|
||||||
*/
|
|
||||||
public long getID();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the row values for this node. The main purpose of this method is to
|
* Gets the row values for this node. The main purpose of this method is to
|
||||||
* get the 'x' number of the row values for this node to set the width of each
|
* get the 'x' number of the row values for this node to set the width of each
|
||||||
|
@ -39,7 +39,6 @@ import org.openide.nodes.Node;
|
|||||||
import org.openide.nodes.Sheet;
|
import org.openide.nodes.Sheet;
|
||||||
import org.sleuthkit.autopsy.datamodel.ContentNodeVisitor;
|
import org.sleuthkit.autopsy.datamodel.ContentNodeVisitor;
|
||||||
import org.sleuthkit.datamodel.Content;
|
import org.sleuthkit.datamodel.Content;
|
||||||
import org.sleuthkit.datamodel.TskException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class wraps nodes as they are passed to the DataResult viewers. It
|
* This class wraps nodes as they are passed to the DataResult viewers. It
|
||||||
@ -190,11 +189,6 @@ public class DataResultFilterNode extends FilterNode implements ContentNode {
|
|||||||
return propertySets;
|
return propertySets;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public long getID() {
|
|
||||||
return ((ContentNode) currentNode).getID();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object[][] getRowValues(int rows) throws SQLException {
|
public Object[][] getRowValues(int rows) throws SQLException {
|
||||||
return ((ContentNode) currentNode).getRowValues(rows);
|
return ((ContentNode) currentNode).getRowValues(rows);
|
||||||
|
@ -29,9 +29,7 @@ import javax.swing.Action;
|
|||||||
import org.openide.nodes.FilterNode;
|
import org.openide.nodes.FilterNode;
|
||||||
import org.openide.nodes.Node;
|
import org.openide.nodes.Node;
|
||||||
import org.sleuthkit.datamodel.Content;
|
import org.sleuthkit.datamodel.Content;
|
||||||
import org.sleuthkit.datamodel.TskException;
|
|
||||||
import org.sleuthkit.autopsy.directorytree.ChangeViewAction;
|
import org.sleuthkit.autopsy.directorytree.ChangeViewAction;
|
||||||
import org.sleuthkit.autopsy.directorytree.ExtractAction;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class wraps nodes as they are passed to the DataResult viewers. It
|
* This class wraps nodes as they are passed to the DataResult viewers. It
|
||||||
@ -96,11 +94,6 @@ public class DataResultFilterNode extends FilterNode implements ContentNode {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public long getID() {
|
|
||||||
return ((ContentNode) currentNode).getID();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object[][] getRowValues(int rows) throws SQLException {
|
public Object[][] getRowValues(int rows) throws SQLException {
|
||||||
return ((ContentNode) currentNode).getRowValues(rows);
|
return ((ContentNode) currentNode).getRowValues(rows);
|
||||||
|
@ -47,11 +47,6 @@ class SearchNode extends AbstractNode implements ContentNode {
|
|||||||
return "Search Result";
|
return "Search Result";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public long getID() {
|
|
||||||
return -1; // change this later when needed
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object[][] getRowValues(int rows) throws SQLException {
|
public Object[][] getRowValues(int rows) throws SQLException {
|
||||||
int totalNodes = children.getNodesCount();
|
int totalNodes = children.getNodesCount();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user