From 98f01f5921a2690b785ace903e64e1577aa32913 Mon Sep 17 00:00:00 2001 From: "U-BASIS\\zhaohui" Date: Thu, 19 Oct 2017 11:48:13 -0400 Subject: [PATCH 1/2] 3116: Update the credit card account HMTL report title from Accounts: CREDIT_CARD to Accounts: Credit Card --- .../org/sleuthkit/autopsy/report/TableReportGenerator.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Core/src/org/sleuthkit/autopsy/report/TableReportGenerator.java b/Core/src/org/sleuthkit/autopsy/report/TableReportGenerator.java index 234ed1509c..ee435787aa 100755 --- a/Core/src/org/sleuthkit/autopsy/report/TableReportGenerator.java +++ b/Core/src/org/sleuthkit/autopsy/report/TableReportGenerator.java @@ -44,6 +44,7 @@ import org.sleuthkit.autopsy.coreutils.ImageUtils; import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.datamodel.ContentUtils; import org.sleuthkit.datamodel.AbstractFile; +import org.sleuthkit.datamodel.Account; import org.sleuthkit.datamodel.BlackboardArtifact; import org.sleuthkit.datamodel.BlackboardArtifactTag; import org.sleuthkit.datamodel.BlackboardAttribute; @@ -174,7 +175,11 @@ class TableReportGenerator { * does not require a artifact name, so we make a synthetic * compund name by appending a ":" and the account type. */ - final String compundDataTypeName = BlackboardArtifact.ARTIFACT_TYPE.TSK_ACCOUNT.getDisplayName() + ": " + accountType; + String accountDisplayname = accountType; + if (accountType != null && accountType.equals(Account.Type.CREDIT_CARD.name())) { + accountDisplayname = Account.Type.CREDIT_CARD.getDisplayName(); + } + final String compundDataTypeName = BlackboardArtifact.ARTIFACT_TYPE.TSK_ACCOUNT.getDisplayName() + ": " + accountDisplayname; writeTableForDataType(new ArrayList<>(groupedArtifacts.get(accountType)), type, compundDataTypeName, comment); } } else { From af6fb2fceec93b2548602834999151f210f40749 Mon Sep 17 00:00:00 2001 From: "U-BASIS\\zhaohui" Date: Wed, 25 Oct 2017 15:00:05 -0400 Subject: [PATCH 2/2] 3116: A more generic way to get account display name for all availabe account types. --- .../org/sleuthkit/autopsy/report/TableReportGenerator.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/report/TableReportGenerator.java b/Core/src/org/sleuthkit/autopsy/report/TableReportGenerator.java index ee435787aa..3df94c1d1c 100755 --- a/Core/src/org/sleuthkit/autopsy/report/TableReportGenerator.java +++ b/Core/src/org/sleuthkit/autopsy/report/TableReportGenerator.java @@ -176,8 +176,11 @@ class TableReportGenerator { * compund name by appending a ":" and the account type. */ String accountDisplayname = accountType; - if (accountType != null && accountType.equals(Account.Type.CREDIT_CARD.name())) { - accountDisplayname = Account.Type.CREDIT_CARD.getDisplayName(); + for (Account.Type acct : Account.Type.values()) { + if (acct.equals(Account.Type.valueOf(accountType))) { + accountDisplayname = acct.getDisplayName(); + break; + } } final String compundDataTypeName = BlackboardArtifact.ARTIFACT_TYPE.TSK_ACCOUNT.getDisplayName() + ": " + accountDisplayname; writeTableForDataType(new ArrayList<>(groupedArtifacts.get(accountType)), type, compundDataTypeName, comment);