diff --git a/Core/src/org/sleuthkit/autopsy/datasourceprocessors/xry/XRYCallsFileParser.java b/Core/src/org/sleuthkit/autopsy/datasourceprocessors/xry/XRYCallsFileParser.java index 2e3bb1d8d7..2181c6e660 100755 --- a/Core/src/org/sleuthkit/autopsy/datasourceprocessors/xry/XRYCallsFileParser.java +++ b/Core/src/org/sleuthkit/autopsy/datasourceprocessors/xry/XRYCallsFileParser.java @@ -287,7 +287,7 @@ final class XRYCallsFileParser extends AbstractSingleEntityParser { if (callerId != null) { try { currentCase.getCommunicationsManager().createAccountFileInstance( - Account.Type.PHONE, callerId, PARSER_NAME, parent, null); + Account.Type.PHONE, callerId, PARSER_NAME, parent, null, null); } catch (InvalidAccountIDException ex) { logger.log(Level.WARNING, String.format("Invalid account identifier %s", callerId), ex); } @@ -300,7 +300,7 @@ final class XRYCallsFileParser extends AbstractSingleEntityParser { for (String phone : calleeList) { try { currentCase.getCommunicationsManager().createAccountFileInstance( - Account.Type.PHONE, phone, PARSER_NAME, parent, null); + Account.Type.PHONE, phone, PARSER_NAME, parent, null, null); } catch (InvalidAccountIDException ex) { logger.log(Level.WARNING, String.format("Invalid account identifier %s", phone), ex); } diff --git a/Core/src/org/sleuthkit/autopsy/datasourceprocessors/xry/XRYMessagesFileParser.java b/Core/src/org/sleuthkit/autopsy/datasourceprocessors/xry/XRYMessagesFileParser.java index c51deab219..b4ba356cf9 100755 --- a/Core/src/org/sleuthkit/autopsy/datasourceprocessors/xry/XRYMessagesFileParser.java +++ b/Core/src/org/sleuthkit/autopsy/datasourceprocessors/xry/XRYMessagesFileParser.java @@ -318,7 +318,7 @@ final class XRYMessagesFileParser implements XRYFileParser { } else { try { currentCase.getCommunicationsManager().createAccountFileInstance( - Account.Type.PHONE, pair.getValue(), PARSER_NAME, parent, null); + Account.Type.PHONE, pair.getValue(), PARSER_NAME, parent, null, null); } catch (InvalidAccountIDException ex) { logger.log(Level.WARNING, String.format("Invalid account identifier %s", pair.getValue()), ex); } diff --git a/Core/test/unit/src/org/sleuthkit/autopsy/datasourcesummary/datamodel/UserActivitySummaryTest.java b/Core/test/unit/src/org/sleuthkit/autopsy/datasourcesummary/datamodel/UserActivitySummaryTest.java index 2b6a1c6600..05506ecd56 100644 --- a/Core/test/unit/src/org/sleuthkit/autopsy/datasourcesummary/datamodel/UserActivitySummaryTest.java +++ b/Core/test/unit/src/org/sleuthkit/autopsy/datasourcesummary/datamodel/UserActivitySummaryTest.java @@ -1047,9 +1047,9 @@ public class UserActivitySummaryTest { UserActivitySummary summary = getTestClass(tskPair.getLeft(), false, null); for (Entry path : expected.entrySet()) { - Assert.assertTrue(path.getValue().equalsIgnoreCase(summary.getShortFolderName(path.getKey(), "Item.exe"))); - Assert.assertTrue(path.getValue().equalsIgnoreCase(summary.getShortFolderName(path.getKey().toUpperCase(), "Item.exe".toUpperCase()))); - Assert.assertTrue(path.getValue().equalsIgnoreCase(summary.getShortFolderName(path.getKey().toLowerCase(), "Item.exe".toLowerCase()))); + Assert.assertTrue(path.getValue().equalsIgnoreCase(UserActivitySummary.getShortFolderName(path.getKey(), "Item.exe"))); + Assert.assertTrue(path.getValue().equalsIgnoreCase(UserActivitySummary.getShortFolderName(path.getKey().toUpperCase(), "Item.exe".toUpperCase()))); + Assert.assertTrue(path.getValue().equalsIgnoreCase(UserActivitySummary.getShortFolderName(path.getKey().toLowerCase(), "Item.exe".toLowerCase()))); } } diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/RegexQuery.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/RegexQuery.java index b6c74b3da2..52f4033ba6 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/RegexQuery.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/RegexQuery.java @@ -638,7 +638,7 @@ final class RegexQuery implements KeywordSearchQuery { * for the hit and looked up based on the parsed bank identifcation * number. */ - Collection attributes = new ArrayList<>(); + List attributes = new ArrayList<>(); Map parsedTrackAttributeMap = new HashMap<>(); Matcher matcher = CREDIT_CARD_TRACK1_PATTERN.matcher(hit.getSnippet()); @@ -720,13 +720,10 @@ final class RegexQuery implements KeywordSearchQuery { * Create an account instance. */ try { - AccountFileInstance ccAccountInstance = Case.getCurrentCaseThrows().getSleuthkitCase().getCommunicationsManager().createAccountFileInstance(Account.Type.CREDIT_CARD, ccnAttribute.getValueString(), MODULE_NAME, content, ingestJobId); - - ccAccountInstance.addAttributes(attributes); - + Case.getCurrentCaseThrows().getSleuthkitCase().getCommunicationsManager().createAccountFileInstance(Account.Type.CREDIT_CARD, + ccnAttribute.getValueString(), MODULE_NAME, content, attributes, ingestJobId); } catch (TskCoreException | NoCurrentCaseException ex) { LOGGER.log(Level.SEVERE, "Error creating CCN account instance", ex); //NON-NLS - } } diff --git a/thunderbirdparser/src/org/sleuthkit/autopsy/thunderbirdparser/ThunderbirdMboxFileIngestModule.java b/thunderbirdparser/src/org/sleuthkit/autopsy/thunderbirdparser/ThunderbirdMboxFileIngestModule.java index 516b786c7d..ea95afa9f6 100644 --- a/thunderbirdparser/src/org/sleuthkit/autopsy/thunderbirdparser/ThunderbirdMboxFileIngestModule.java +++ b/thunderbirdparser/src/org/sleuthkit/autopsy/thunderbirdparser/ThunderbirdMboxFileIngestModule.java @@ -152,7 +152,7 @@ public final class ThunderbirdMboxFileIngestModule implements FileIngestModule { if (isMbox || isEMLFile || isPstFile || isVcardFile) { try { communicationArtifactsHelper = new CommunicationArtifactsHelper(currentCase.getSleuthkitCase(), - EmailParserModuleFactory.getModuleName(), abstractFile, Account.Type.EMAIL); + EmailParserModuleFactory.getModuleName(), abstractFile, Account.Type.EMAIL, context.getJobId()); } catch (TskCoreException ex) { logger.log(Level.SEVERE, String.format("Failed to create CommunicationArtifactsHelper for file with object id = %d", abstractFile.getId()), ex); return ProcessResult.ERROR; @@ -713,7 +713,7 @@ public final class ThunderbirdMboxFileIngestModule implements FileIngestModule { if (senderAddressList.size() == 1) { senderAddress = senderAddressList.get(0); try { - senderAccountInstance = accountFileInstanceCache.getAccountInstance(senderAddress); + senderAccountInstance = accountFileInstanceCache.getAccountInstance(senderAddress, context); } catch (TskCoreException ex) { logger.log(Level.WARNING, "Failed to create account for email address " + senderAddress, ex); //NON-NLS } @@ -736,7 +736,7 @@ public final class ThunderbirdMboxFileIngestModule implements FileIngestModule { return null; } try { - AccountFileInstance recipientAccountInstance = accountFileInstanceCache.getAccountInstance(addr); + AccountFileInstance recipientAccountInstance = accountFileInstanceCache.getAccountInstance(addr, context); recipientAccountInstances.add(recipientAccountInstance); } catch (TskCoreException ex) { logger.log(Level.WARNING, "Failed to create account for email address " + addr, ex); //NON-NLS @@ -864,19 +864,20 @@ public final class ThunderbirdMboxFileIngestModule implements FileIngestModule { * Get the account file instance from the cache or the database. * * @param email The email for this account. + * @param context The current ingest job context. * * @return The corresponding AccountFileInstance * * @throws TskCoreException */ - AccountFileInstance getAccountInstance(String email) throws TskCoreException { + AccountFileInstance getAccountInstance(String email, IngestJobContext context) throws TskCoreException { if (cacheMap.containsKey(email)) { return cacheMap.get(email); } AccountFileInstance accountInstance = currentCase.getSleuthkitCase().getCommunicationsManager().createAccountFileInstance(Account.Type.EMAIL, email, - EmailParserModuleFactory.getModuleName(), file); + EmailParserModuleFactory.getModuleName(), file, null, context.getJobId()); cacheMap.put(email, accountInstance); return accountInstance; } diff --git a/thunderbirdparser/src/org/sleuthkit/autopsy/thunderbirdparser/VcardParser.java b/thunderbirdparser/src/org/sleuthkit/autopsy/thunderbirdparser/VcardParser.java index f83025cbb8..1c2bab5fef 100755 --- a/thunderbirdparser/src/org/sleuthkit/autopsy/thunderbirdparser/VcardParser.java +++ b/thunderbirdparser/src/org/sleuthkit/autopsy/thunderbirdparser/VcardParser.java @@ -521,7 +521,7 @@ final class VcardParser { // Add phone number as a TSK_ACCOUNT. try { AccountFileInstance phoneAccountInstance = tskCase.getCommunicationsManager().createAccountFileInstance(Account.Type.PHONE, - telephoneText, EmailParserModuleFactory.getModuleName(), abstractFile); + telephoneText, EmailParserModuleFactory.getModuleName(), abstractFile, null, context.getJobId()); accountInstances.add(phoneAccountInstance); } catch(TskCoreException ex) { @@ -549,7 +549,7 @@ final class VcardParser { // Add e-mail as a TSK_ACCOUNT. try { AccountFileInstance emailAccountInstance = tskCase.getCommunicationsManager().createAccountFileInstance(Account.Type.EMAIL, - emailValue, EmailParserModuleFactory.getModuleName(), abstractFile); + emailValue, EmailParserModuleFactory.getModuleName(), abstractFile, null, context.getJobId()); accountInstances.add(emailAccountInstance); } catch(TskCoreException ex) { @@ -575,7 +575,7 @@ final class VcardParser { DataSource dataSource = tskCase.getDataSource(dataSourceObjId); deviceId = dataSource.getDeviceId(); deviceAccountInstance = tskCase.getCommunicationsManager().createAccountFileInstance(Account.Type.DEVICE, - deviceId, EmailParserModuleFactory.getModuleName(), abstractFile); + deviceId, EmailParserModuleFactory.getModuleName(), abstractFile, null, context.getJobId()); } catch (TskCoreException ex) { logger.log(Level.WARNING, String.format(