mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-15 09:17:42 +00:00
update for Artifact Comment
This commit is contained in:
parent
6356a72591
commit
df1c1763a8
@ -77,6 +77,7 @@ import org.jsoup.nodes.Element;
|
|||||||
"AnnotationsContentViewer.tagEntryDataLabel.tag=Tag:",
|
"AnnotationsContentViewer.tagEntryDataLabel.tag=Tag:",
|
||||||
"AnnotationsContentViewer.tagEntryDataLabel.tagUser=Examiner:",
|
"AnnotationsContentViewer.tagEntryDataLabel.tagUser=Examiner:",
|
||||||
"AnnotationsContentViewer.tagEntryDataLabel.comment=Comment:",
|
"AnnotationsContentViewer.tagEntryDataLabel.comment=Comment:",
|
||||||
|
"AnnotationsContentViewer.fileHitEntry.artifactCommentTitle=Artifact Comment",
|
||||||
"AnnotationsContentViewer.fileHitEntry.hashSetHitTitle=Hash Set Hit Comments",
|
"AnnotationsContentViewer.fileHitEntry.hashSetHitTitle=Hash Set Hit Comments",
|
||||||
"AnnotationsContentViewer.fileHitEntry.onHashSetHitEmpty=There are no hash set hits for the selected content.",
|
"AnnotationsContentViewer.fileHitEntry.onHashSetHitEmpty=There are no hash set hits for the selected content.",
|
||||||
"AnnotationsContentViewer.fileHitEntry.interestingFileHitTitle=Interesting File Hit Comments",
|
"AnnotationsContentViewer.fileHitEntry.interestingFileHitTitle=Interesting File Hit Comments",
|
||||||
@ -88,8 +89,10 @@ import org.jsoup.nodes.Element;
|
|||||||
public class AnnotationsContentViewer extends javax.swing.JPanel implements DataContentViewer {
|
public class AnnotationsContentViewer extends javax.swing.JPanel implements DataContentViewer {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Describes a key value pair for an item of type T where the key is the field name to display and
|
* Describes a key value pair for an item of type T where the key is the
|
||||||
* the value is retrieved from item of type T using a provided Function<T, string>.
|
* field name to display and the value is retrieved from item of type T
|
||||||
|
* using a provided Function<T, string>.
|
||||||
|
*
|
||||||
* @param <T> The item type.
|
* @param <T> The item type.
|
||||||
*/
|
*/
|
||||||
private static class ItemEntry<T> {
|
private static class ItemEntry<T> {
|
||||||
@ -117,6 +120,7 @@ public class AnnotationsContentViewer extends javax.swing.JPanel implements Data
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Describes a section that will be appended to the annotations view panel.
|
* Describes a section that will be appended to the annotations view panel.
|
||||||
|
*
|
||||||
* @param <T> The item type for items to display.
|
* @param <T> The item type for items to display.
|
||||||
*/
|
*/
|
||||||
private static class SectionConfig<T> {
|
private static class SectionConfig<T> {
|
||||||
@ -148,16 +152,18 @@ public class AnnotationsContentViewer extends javax.swing.JPanel implements Data
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Describes key-value pairs on the object to display to the user.
|
* @return Describes key-value pairs on the object to display to the
|
||||||
|
* user.
|
||||||
*/
|
*/
|
||||||
List<ItemEntry<T>> getAttributes() {
|
List<ItemEntry<T>> getAttributes() {
|
||||||
return attributes;
|
return attributes;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return If the table should be shown as a series of key-value pairs as rows. Otherwise,
|
* @return If the table should be shown as a series of key-value pairs
|
||||||
* data is shown in a table where the column headers are the keys and each row represents one
|
* as rows. Otherwise, data is shown in a table where the column
|
||||||
* item to display.
|
* headers are the keys and each row represents one item to
|
||||||
|
* display.
|
||||||
*/
|
*/
|
||||||
boolean isIsVerticalTable() {
|
boolean isIsVerticalTable() {
|
||||||
return isVerticalTable;
|
return isVerticalTable;
|
||||||
@ -240,6 +246,11 @@ public class AnnotationsContentViewer extends javax.swing.JPanel implements Data
|
|||||||
Bundle.AnnotationsContentViewer_fileHitEntry_onHashSetHitEmpty(),
|
Bundle.AnnotationsContentViewer_fileHitEntry_onHashSetHitEmpty(),
|
||||||
FILESET_HIT_ENTRIES, true);
|
FILESET_HIT_ENTRIES, true);
|
||||||
|
|
||||||
|
private static final SectionConfig<BlackboardArtifact> ARTIFACT_COMMENT_CONFIG = new SectionConfig<>(
|
||||||
|
Bundle.AnnotationsContentViewer_fileHitEntry_artifactCommentTitle(),
|
||||||
|
"",
|
||||||
|
FILESET_HIT_ENTRIES, true);
|
||||||
|
|
||||||
// central repository attributes and table configuration
|
// central repository attributes and table configuration
|
||||||
private static final List<ItemEntry<CorrelationAttributeInstance>> CR_COMMENTS_ENTRIES = Arrays.asList(
|
private static final List<ItemEntry<CorrelationAttributeInstance>> CR_COMMENTS_ENTRIES = Arrays.asList(
|
||||||
new ItemEntry<>(Bundle.AnnotationsContentViewer_centralRepositoryEntryDataLabel_case(),
|
new ItemEntry<>(Bundle.AnnotationsContentViewer_centralRepositoryEntryDataLabel_case(),
|
||||||
@ -328,12 +339,9 @@ public class AnnotationsContentViewer extends javax.swing.JPanel implements Data
|
|||||||
appendEntries(parent, CR_COMMENTS_CONFIG, centralRepoComments, false);
|
appendEntries(parent, CR_COMMENTS_CONFIG, centralRepoComments, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (BlackboardArtifact.ARTIFACT_TYPE.TSK_HASHSET_HIT.getTypeID() == bba.getArtifactTypeID()) {
|
if (BlackboardArtifact.ARTIFACT_TYPE.TSK_HASHSET_HIT.getTypeID() == bba.getArtifactTypeID()
|
||||||
appendEntries(parent, HASHSET_CONFIG, Arrays.asList(bba), false);
|
|| BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_FILE_HIT.getTypeID() == bba.getArtifactTypeID()) {
|
||||||
}
|
appendEntries(parent, ARTIFACT_COMMENT_CONFIG, Arrays.asList(bba), false);
|
||||||
|
|
||||||
if (BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_FILE_HIT.getTypeID() == bba.getArtifactTypeID()) {
|
|
||||||
appendEntries(parent, INTERESTING_FILE_CONFIG, Arrays.asList(bba), false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Element sourceFileSection = appendSection(parent, Bundle.AnnotationsContentViewer_sourceFile_title());
|
Element sourceFileSection = appendSection(parent, Bundle.AnnotationsContentViewer_sourceFile_title());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user