Merge pull request #5286 from esaunders/5547-interesting-hits-paging-fix

Set the internal name of the InterestingItemTypeNode to be something …
This commit is contained in:
Richard Cordovano 2019-10-02 17:21:00 -04:00 committed by GitHub
commit bb366807a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -399,7 +399,12 @@ public class InterestingHits implements AutopsyVisitableItem {
super(Children.create(new HitFactory(setName, typeName), true), Lookups.singleton(setName)); super(Children.create(new HitFactory(setName, typeName), true), Lookups.singleton(setName));
this.typeName = typeName; this.typeName = typeName;
this.setName = setName; this.setName = setName;
super.setName(typeName); /**
* We use the combination of setName and typeName as the name of
* the node to ensure that nodes have a unique name. This comes into
* play when associating paging state with the node.
*/
super.setName(setName + "_" + typeName);
updateDisplayName(); updateDisplayName();
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/interesting_item.png"); //NON-NLS this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/interesting_item.png"); //NON-NLS
interestingResults.addObserver(this); interestingResults.addObserver(this);
@ -456,7 +461,12 @@ public class InterestingHits implements AutopsyVisitableItem {
private final Map<Long, BlackboardArtifact> artifactHits = new HashMap<>(); private final Map<Long, BlackboardArtifact> artifactHits = new HashMap<>();
private HitFactory(String setName, String typeName) { private HitFactory(String setName, String typeName) {
super(typeName); /**
* The node name passed to the parent constructor must be the
* same as the name set in the InterestingItemTypeNode constructor,
* i.e. setName underscore typeName
*/
super(setName + "_" + typeName);
this.setName = setName; this.setName = setName;
this.typeName = typeName; this.typeName = typeName;
interestingResults.addObserver(this); interestingResults.addObserver(this);