Merge pull request #3146 from zhhl/3116-updateCreditCardHMTLReportTitle

3116: Update the credit card account HMTL report title from Accounts:…
This commit is contained in:
Richard Cordovano 2017-10-25 15:25:01 -04:00 committed by GitHub
commit dbda7d3da6

View File

@ -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,14 @@ 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;
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);
}
} else {