Skip to content

Commit

Permalink
MOSIP-27014 Fixed ack template issue. (#894)
Browse files Browse the repository at this point in the history
* Fixed service history issue.

* MOSIP-27014 Fixed ack template issue.
  • Loading branch information
kameshsr authored Apr 25, 2023
1 parent e0de961 commit 8383614
Showing 1 changed file with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public class TemplateUtil {
private static final String LOGO_URL = "logoUrl";
private static final CharSequence GENERATED = "generated";
private static final CharSequence REVOKED = "revoked";
private static final String UNKNOWN = "Unknown";

@Autowired
private ResidentTransactionRepository residentTransactionRepository;
Expand Down Expand Up @@ -113,8 +114,15 @@ public Tuple2<Map<String, String>, ResidentTransactionEntity> getCommonTemplateV
templateVariables.put(TemplateVariablesConstants.PURPOSE, residentTransactionEntity.getPurpose());
templateVariables.put(TemplateVariablesConstants.ATTRIBUTE_LIST, getAttributesDisplayText(replaceNullWithEmptyString(
residentTransactionEntity.getAttributeList()), languageCode));
templateVariables.put(TemplateVariablesConstants.AUTHENTICATION_MODE,
getAuthTypeCodeTemplateValue(replaceNullWithEmptyString(residentTransactionEntity.getAuthTypeCode()), languageCode));
String authenticationMode =
getAuthTypeCodeTemplateValue(replaceNullWithEmptyString(residentTransactionEntity.getAuthTypeCode()), languageCode);
if(authenticationMode.equalsIgnoreCase(UNKNOWN)){
templateVariables.put(TemplateVariablesConstants.AUTHENTICATION_MODE,
replaceNullWithEmptyString(residentTransactionEntity.getAuthTypeCode()));
}else {
templateVariables.put(TemplateVariablesConstants.AUTHENTICATION_MODE,
authenticationMode);
}
try {
templateVariables.put(TemplateVariablesConstants.INDIVIDUAL_ID, getIndividualIdType());
} catch (ApisResourceAccessException e) {
Expand Down Expand Up @@ -295,7 +303,7 @@ public Tuple2<Map<String, String>, String> getAckTemplateVariablesForDownloadPer
/**
* This method will replace attribute placeholder in template and add attribute list into it.
* @param fileText This contains value of template.
* @param purpose This contains purpose of request type stored in template.
* @param attributes This contains attributes of request type stored in template.
* @param languageCode This contains logged-in language code.
* @return purpose after adding attributes.
*/
Expand Down

0 comments on commit 8383614

Please sign in to comment.