mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-13 08:26:15 +00:00
Merge pull request #4955 from APriestman/5253_callLogs
5253 Put call logs under a call log node instead of unthreaded
This commit is contained in:
commit
71cf19cccb
@ -27,6 +27,7 @@ MessageViewer_columnHeader_To=To
|
|||||||
MessageViewer_no_messages=<No messages found for selected account>
|
MessageViewer_no_messages=<No messages found for selected account>
|
||||||
MessageViewer_tabTitle=Messages
|
MessageViewer_tabTitle=Messages
|
||||||
MessageViewer_viewMessage_all=All
|
MessageViewer_viewMessage_all=All
|
||||||
|
MessageViewer_viewMessage_calllogs=Call Logs
|
||||||
MessageViewer_viewMessage_selected=Selected
|
MessageViewer_viewMessage_selected=Selected
|
||||||
MessageViewer_viewMessage_unthreaded=Unthreaded
|
MessageViewer_viewMessage_unthreaded=Unthreaded
|
||||||
SummaryViewer.countsPanel.border.title=Counts
|
SummaryViewer.countsPanel.border.title=Counts
|
||||||
|
@ -48,6 +48,7 @@ import org.sleuthkit.autopsy.datamodel.BlackboardArtifactNode;
|
|||||||
class MessageNode extends BlackboardArtifactNode {
|
class MessageNode extends BlackboardArtifactNode {
|
||||||
|
|
||||||
public static final String UNTHREADED_ID = "<UNTHREADED>";
|
public static final String UNTHREADED_ID = "<UNTHREADED>";
|
||||||
|
public static final String CALL_LOG_ID = "<CALLLOG>";
|
||||||
|
|
||||||
private static final Logger logger = Logger.getLogger(MessageNode.class.getName());
|
private static final Logger logger = Logger.getLogger(MessageNode.class.getName());
|
||||||
|
|
||||||
@ -87,9 +88,14 @@ class MessageNode extends BlackboardArtifactNode {
|
|||||||
|
|
||||||
sheetSet.put(new NodeProperty<>("Type", Bundle.MessageNode_Node_Property_Type(), "", getDisplayName())); //NON-NLS
|
sheetSet.put(new NodeProperty<>("Type", Bundle.MessageNode_Node_Property_Type(), "", getDisplayName())); //NON-NLS
|
||||||
|
|
||||||
sheetSet.put(new NodeProperty<>("ThreadID", "ThreadID","",threadID == null ? UNTHREADED_ID : threadID)); //NON-NLS
|
|
||||||
|
|
||||||
final BlackboardArtifact artifact = getArtifact();
|
final BlackboardArtifact artifact = getArtifact();
|
||||||
|
if (artifact.getArtifactTypeID() == BlackboardArtifact.ARTIFACT_TYPE.TSK_CALLLOG.getTypeID()) {
|
||||||
|
sheetSet.put(new NodeProperty<>("ThreadID", "ThreadID","",CALL_LOG_ID)); //NON-NLS
|
||||||
|
} else {
|
||||||
|
sheetSet.put(new NodeProperty<>("ThreadID", "ThreadID","",threadID == null ? UNTHREADED_ID : threadID)); //NON-NLS
|
||||||
|
}
|
||||||
|
|
||||||
BlackboardArtifact.ARTIFACT_TYPE fromID = BlackboardArtifact.ARTIFACT_TYPE.fromID(artifact.getArtifactTypeID());
|
BlackboardArtifact.ARTIFACT_TYPE fromID = BlackboardArtifact.ARTIFACT_TYPE.fromID(artifact.getArtifactTypeID());
|
||||||
if (null != fromID) {
|
if (null != fromID) {
|
||||||
|
@ -82,7 +82,8 @@ public class MessageViewer extends JPanel implements RelationshipsViewer {
|
|||||||
"MessageViewer_no_messages=<No messages found for selected account>",
|
"MessageViewer_no_messages=<No messages found for selected account>",
|
||||||
"MessageViewer_viewMessage_all=All",
|
"MessageViewer_viewMessage_all=All",
|
||||||
"MessageViewer_viewMessage_selected=Selected",
|
"MessageViewer_viewMessage_selected=Selected",
|
||||||
"MessageViewer_viewMessage_unthreaded=Unthreaded",})
|
"MessageViewer_viewMessage_unthreaded=Unthreaded",
|
||||||
|
"MessageViewer_viewMessage_calllogs=Call Logs"})
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates new form MessageViewer
|
* Creates new form MessageViewer
|
||||||
@ -227,9 +228,13 @@ public class MessageViewer extends JPanel implements RelationshipsViewer {
|
|||||||
|
|
||||||
if (!subject.isEmpty()) {
|
if (!subject.isEmpty()) {
|
||||||
threadNameLabel.setText(subject);
|
threadNameLabel.setText(subject);
|
||||||
|
} else {
|
||||||
|
if (threadIDList.contains(MessageNode.CALL_LOG_ID)) {
|
||||||
|
threadNameLabel.setText(Bundle.MessageViewer_viewMessage_calllogs());
|
||||||
} else {
|
} else {
|
||||||
threadNameLabel.setText(Bundle.MessageViewer_viewMessage_unthreaded());
|
threadNameLabel.setText(Bundle.MessageViewer_viewMessage_unthreaded());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
showMessagesPane();
|
showMessagesPane();
|
||||||
}
|
}
|
||||||
|
@ -98,10 +98,16 @@ public class MessagesChildNodeFactory extends ChildFactory<BlackboardArtifact>{
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// We want all artifacts that do not have "threadIDs" to appear as one thread in the UI
|
// We want email and message artifacts that do not have "threadIDs" to appear as one thread in the UI
|
||||||
// To achive this assign any artifact that does not have a threadID
|
// To achive this assign any artifact that does not have a threadID
|
||||||
// the "UNTHREADED_ID"
|
// the "UNTHREADED_ID"
|
||||||
String artifactThreadID = MessageNode.UNTHREADED_ID;
|
// All call logs will default to a single call logs thread
|
||||||
|
String artifactThreadID;
|
||||||
|
if (fromID == BlackboardArtifact.ARTIFACT_TYPE.TSK_CALLLOG) {
|
||||||
|
artifactThreadID = MessageNode.CALL_LOG_ID;
|
||||||
|
} else {
|
||||||
|
artifactThreadID = MessageNode.UNTHREADED_ID;
|
||||||
|
}
|
||||||
BlackboardAttribute attribute = bba.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_THREAD_ID));
|
BlackboardAttribute attribute = bba.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_THREAD_ID));
|
||||||
|
|
||||||
if(attribute != null) {
|
if(attribute != null) {
|
||||||
|
@ -123,10 +123,16 @@ final class ThreadChildNodeFactory extends ChildFactory<BlackboardArtifact> {
|
|||||||
|| fromID == BlackboardArtifact.ARTIFACT_TYPE.TSK_CALLLOG
|
|| fromID == BlackboardArtifact.ARTIFACT_TYPE.TSK_CALLLOG
|
||||||
|| fromID == BlackboardArtifact.ARTIFACT_TYPE.TSK_MESSAGE) {
|
|| fromID == BlackboardArtifact.ARTIFACT_TYPE.TSK_MESSAGE) {
|
||||||
|
|
||||||
// We want all artifacts that do not have "threadIDs" to appear as one thread in the UI
|
// We want email and message artifacts that do not have "threadIDs" to appear as one thread in the UI
|
||||||
// To achive this assign any artifact that does not have a threadID
|
// To achive this assign any artifact that does not have a threadID
|
||||||
// the "UNTHREADED_ID"
|
// the "UNTHREADED_ID"
|
||||||
String threadID = MessageNode.UNTHREADED_ID;
|
// All call logs will default to a single call logs thread
|
||||||
|
String threadID;
|
||||||
|
if (fromID == BlackboardArtifact.ARTIFACT_TYPE.TSK_CALLLOG) {
|
||||||
|
threadID = MessageNode.CALL_LOG_ID;
|
||||||
|
} else {
|
||||||
|
threadID = MessageNode.UNTHREADED_ID;
|
||||||
|
}
|
||||||
BlackboardAttribute attribute = bba.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_THREAD_ID));
|
BlackboardAttribute attribute = bba.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_THREAD_ID));
|
||||||
|
|
||||||
if(attribute != null) {
|
if(attribute != null) {
|
||||||
@ -169,14 +175,47 @@ final class ThreadChildNodeFactory extends ChildFactory<BlackboardArtifact> {
|
|||||||
|
|
||||||
if (attribute != null) {
|
if (attribute != null) {
|
||||||
return new ThreadNode(bba, attribute.getValueString(), preferredAction);
|
return new ThreadNode(bba, attribute.getValueString(), preferredAction);
|
||||||
|
} else {
|
||||||
|
if (bba.getArtifactTypeID() == BlackboardArtifact.ARTIFACT_TYPE.TSK_CALLLOG.getTypeID()) {
|
||||||
|
return new CallLogNode();
|
||||||
} else {
|
} else {
|
||||||
// Only one of these should occur.
|
// Only one of these should occur.
|
||||||
return new UnthreadedNode();
|
return new UnthreadedNode();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An this node represents the "unthreaded" thread.
|
* This node represents the "call log" thread.
|
||||||
|
*/
|
||||||
|
final class CallLogNode extends AbstractNode {
|
||||||
|
/**
|
||||||
|
* Construct an instance of a CallLogNode.
|
||||||
|
*/
|
||||||
|
CallLogNode() {
|
||||||
|
super(Children.LEAF);
|
||||||
|
setDisplayName("Call Logs");
|
||||||
|
this.setIconBaseWithExtension("org/sleuthkit/autopsy/communications/images/unthreaded.png" );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Sheet createSheet() {
|
||||||
|
Sheet sheet = super.createSheet();
|
||||||
|
Sheet.Set sheetSet = sheet.get(Sheet.PROPERTIES);
|
||||||
|
if (sheetSet == null) {
|
||||||
|
sheetSet = Sheet.createPropertiesSet();
|
||||||
|
sheet.put(sheetSet);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Give this node a threadID of "CALL_LOG_ID"
|
||||||
|
sheetSet.put(new NodeProperty<>("ThreadID", "ThreadID","",MessageNode.CALL_LOG_ID));
|
||||||
|
|
||||||
|
return sheet;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This node represents the "unthreaded" thread.
|
||||||
*/
|
*/
|
||||||
final class UnthreadedNode extends AbstractNode {
|
final class UnthreadedNode extends AbstractNode {
|
||||||
/**
|
/**
|
||||||
|
@ -25,7 +25,7 @@ import org.openide.nodes.Sheet;
|
|||||||
import org.sleuthkit.datamodel.BlackboardArtifact;
|
import org.sleuthkit.datamodel.BlackboardArtifact;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An AbstractNode subclass which wraps a MessagNode object. Doing this allows
|
* An AbstractNode subclass which wraps a MessageNode object. Doing this allows
|
||||||
* for the reuse of the createSheet and other function from MessageNode, but
|
* for the reuse of the createSheet and other function from MessageNode, but
|
||||||
* also some customizing of how a ThreadNode is shown.
|
* also some customizing of how a ThreadNode is shown.
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user