diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/MultiUserCasesPanel.java b/Core/src/org/sleuthkit/autopsy/casemodule/MultiUserCasesPanel.java index f47e5ec024..be57faba9a 100755 --- a/Core/src/org/sleuthkit/autopsy/casemodule/MultiUserCasesPanel.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/MultiUserCasesPanel.java @@ -580,7 +580,9 @@ final class MultiUserCasesPanel extends javax.swing.JPanel { int modelRow = casesTable.convertRowIndexToModel(casesTable.getSelectedRow()); String caseDirectory = (String) caseTableModel.getValueAt(modelRow, COLUMN_HEADERS.OUTPUTFOLDER.ordinal()); Path caseMetadataFilePath = Paths.get(caseDirectory, (String) caseTableModel.getValueAt(modelRow, COLUMN_HEADERS.METADATA_FILE.ordinal())); - openCase(caseMetadataFilePath); + new Thread(() -> { + openCase(caseMetadataFilePath); + }).start(); } }//GEN-LAST:event_casesTableMouseClicked diff --git a/Core/src/org/sleuthkit/autopsy/communications/AccountDetailsNode.java b/Core/src/org/sleuthkit/autopsy/communications/AccountDetailsNode.java index 9d1e3b0361..88470e87e0 100644 --- a/Core/src/org/sleuthkit/autopsy/communications/AccountDetailsNode.java +++ b/Core/src/org/sleuthkit/autopsy/communications/AccountDetailsNode.java @@ -74,7 +74,7 @@ class AccountDetailsNode extends AbstractNode { @Override protected Node createNodeForKey(Content t) { if (t instanceof BlackboardArtifact) { - return new RelationShipNode((BlackboardArtifact) t); + return new RelationshipNode((BlackboardArtifact) t); } else { throw new UnsupportedOperationException("Cannot create a RelationshipNode for non BlackboardArtifact content."); } diff --git a/Core/src/org/sleuthkit/autopsy/communications/AccountDeviceInstanceKey.java b/Core/src/org/sleuthkit/autopsy/communications/AccountDeviceInstanceKey.java index 92b6938ac0..fbc2c17feb 100644 --- a/Core/src/org/sleuthkit/autopsy/communications/AccountDeviceInstanceKey.java +++ b/Core/src/org/sleuthkit/autopsy/communications/AccountDeviceInstanceKey.java @@ -31,13 +31,15 @@ class AccountDeviceInstanceKey { private final AccountDeviceInstance accountDeviceInstance; private final CommunicationsFilter filter; private final long messageCount; + private final String dataSourceName; - AccountDeviceInstanceKey(AccountDeviceInstance accountDeviceInstance, CommunicationsFilter filter, long msgCount) { + AccountDeviceInstanceKey(AccountDeviceInstance accountDeviceInstance, CommunicationsFilter filter, long msgCount, String dataSourceName) { this.accountDeviceInstance = accountDeviceInstance; this.filter = filter; this.messageCount = msgCount; + this.dataSourceName = dataSourceName; } AccountDeviceInstance getAccountDeviceInstance() { @@ -48,7 +50,11 @@ class AccountDeviceInstanceKey { return filter; } - long getMessageCount() { + long getMessageCount() { return messageCount; } + + String getDataSourceName() { + return dataSourceName; + } } diff --git a/Core/src/org/sleuthkit/autopsy/communications/AccountsRootChildren.java b/Core/src/org/sleuthkit/autopsy/communications/AccountsRootChildren.java index 9b0b5081d2..63e1e17d82 100644 --- a/Core/src/org/sleuthkit/autopsy/communications/AccountsRootChildren.java +++ b/Core/src/org/sleuthkit/autopsy/communications/AccountsRootChildren.java @@ -56,9 +56,10 @@ class AccountsRootChildren extends ChildFactory { protected boolean createKeys(List list) { List accountDeviceInstanceKeys = new ArrayList<>(); try { - for (AccountDeviceInstance adi : commsManager.getAccountDeviceInstancesWithRelationships(commsFilter)) { - long communicationsCount = commsManager.getRelationshipSourcesCount(adi, commsFilter); - accountDeviceInstanceKeys.add(new AccountDeviceInstanceKey(adi, commsFilter, communicationsCount)); + for (AccountDeviceInstance accountDeviceInstance : commsManager.getAccountDeviceInstancesWithRelationships(commsFilter)) { + long communicationsCount = commsManager.getRelationshipSourcesCount(accountDeviceInstance, commsFilter); + String dataSourceName = getDataSourceName(accountDeviceInstance); + accountDeviceInstanceKeys.add(new AccountDeviceInstanceKey(accountDeviceInstance, commsFilter, communicationsCount, dataSourceName)); }; } catch (TskCoreException tskCoreException) { logger.log(Level.SEVERE, "Error getting filtered account device instances", tskCoreException); @@ -73,6 +74,20 @@ class AccountsRootChildren extends ChildFactory { return new AccountDeviceInstanceNode(key, commsManager); } + private String getDataSourceName(AccountDeviceInstance accountDeviceInstance) { + try { + final SleuthkitCase sleuthkitCase = Case.getCurrentCase().getSleuthkitCase(); + for (DataSource dataSource : sleuthkitCase.getDataSources()) { + if (dataSource.getDeviceId().equals(accountDeviceInstance.getDeviceId())) { + return sleuthkitCase.getContentById(dataSource.getId()).getName(); + } + } + } catch (TskCoreException ex) { + logger.log(Level.SEVERE, "Error getting datasource name, falling back on device ID.", ex); + } + return accountDeviceInstance.getDeviceId(); + } + /** * Node to represent an Account in the AccountsBrowser */ @@ -121,22 +136,8 @@ class AccountsRootChildren extends ChildFactory { properties.put(new NodeProperty<>("count", Bundle.AccountNode_messageCount(), "count", accountDeviceInstanceKey.getMessageCount())); // NON-NLS properties.put(new NodeProperty<>("device", Bundle.AccountNode_device(), "device", - getDataSourceName())); // NON-NLS + accountDeviceInstanceKey.getDataSourceName())); // NON-NLS return s; } - - private String getDataSourceName() { - try { - final SleuthkitCase sleuthkitCase = Case.getCurrentCase().getSleuthkitCase(); - for (DataSource dataSource : sleuthkitCase.getDataSources()) { - if (dataSource.getDeviceId().equals(getAccountDeviceInstance().getDeviceId())) { - return sleuthkitCase.getContentById(dataSource.getId()).getName(); - } - } - } catch (TskCoreException ex) { - logger.log(Level.SEVERE, "Error getting datasource name, falling back on device ID.", ex); - } - return getAccountDeviceInstance().getDeviceId(); - } } } diff --git a/Core/src/org/sleuthkit/autopsy/communications/RelationShipNode.java b/Core/src/org/sleuthkit/autopsy/communications/RelationshipNode.java similarity index 97% rename from Core/src/org/sleuthkit/autopsy/communications/RelationShipNode.java rename to Core/src/org/sleuthkit/autopsy/communications/RelationshipNode.java index 5c060a262e..73fa033240 100644 --- a/Core/src/org/sleuthkit/autopsy/communications/RelationShipNode.java +++ b/Core/src/org/sleuthkit/autopsy/communications/RelationshipNode.java @@ -43,11 +43,11 @@ import org.sleuthkit.datamodel.TskCoreException; /** * Node for a relationship, as represented by a BlackboardArtifact. */ -public class RelationShipNode extends BlackboardArtifactNode { +public class RelationshipNode extends BlackboardArtifactNode { - private static final Logger logger = Logger.getLogger(RelationShipNode.class.getName()); + private static final Logger logger = Logger.getLogger(RelationshipNode.class.getName()); - public RelationShipNode(BlackboardArtifact artifact) { + public RelationshipNode(BlackboardArtifact artifact) { super(artifact); final String stripEnd = StringUtils.stripEnd(artifact.getDisplayName(), "s"); String removeEndIgnoreCase = StringUtils.removeEndIgnoreCase(stripEnd, "message");