Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/cbrelease-4.8.11' into cbrelease…
Browse files Browse the repository at this point in the history
…-4.8.12
  • Loading branch information
karthik-tarento committed Mar 22, 2024
2 parents 3355e9b + 0406353 commit c4d9a2d
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public PullURIResponse generateURIResponse(String digiLockerHmac, String request
} catch (IOException e) {
logger.error("Not able to process the request requestBody: " + requestBody, e);
responseStatus.setStatus("0");
response.getDocDetails().setDocContent("Document is not available.");
return response;
}
CertificateAddInfoDTO certificateAddInfoDTO = new CertificateAddInfoDTO();
Expand Down Expand Up @@ -105,6 +106,7 @@ public PullURIResponse generateURIResponse(String digiLockerHmac, String request
if ((CollectionUtils.isEmpty(userEnrollmentInfo)) || (CollectionUtils.isNotEmpty(userEnrollmentInfo) && userEnrollmentInfo.size() > 1)) {
logger.error("Issue with getting the userEnrollment List" + userEnrollmentInfo);
response.setResponseStatus(new ResponseStatus("0", dateFormat.format(new Date()), request.getTxn()));
response.getDocDetails().setDocContent("Document is not available.");
return response;
} else {
URIResponseDocDetails docDetails = response.getDocDetails();
Expand Down Expand Up @@ -134,7 +136,7 @@ public PullURIResponse generateURIResponse(String digiLockerHmac, String request
userEnrollment = userEnrollment.stream().filter(enroll -> ((String) enroll.get("token")).equalsIgnoreCase(certificateAccessCode)).collect(Collectors.toList());
dockerLookUpInfo.put(Constants.CERTIFICATE_ID, userEnrollment.get(0).get(Constants.IDENTIFIER));
try {
dockerLookUpInfo.put(Constants.LAST_ISSUED_ON, simpleDateFormat.format(dateFormat.parse((String) userEnrollment.get(0).get(Constants.LAST_ISSUED_ON))));
dockerLookUpInfo.put(Constants.LAST_ISSUED_ON, dateFormat.parse((String) userEnrollment.get(0).get(Constants.LAST_ISSUED_ON)));
} catch (ParseException e) {
responseStatus.setStatus("0");
logger.error("Not able to parse date");
Expand All @@ -151,7 +153,7 @@ public PullURIResponse generateURIResponse(String digiLockerHmac, String request
certificateAddInfoDTO.setDocumentInfo(request.getDocDetails().getDocType());
certificateAddInfoDTO.setCertificateName((String)dockerLookUpInfo.get(Constants.CERTIFICATE_NAME));
certificateAddInfoDTO.setDocumentName(DocumentType.getValueForKey(request.getDocDetails().getDocType()));
certificateAddInfoDTO.setCertificateIssueOn((String)dockerLookUpInfo.get(Constants.LAST_ISSUED_ON));
certificateAddInfoDTO.setCertificateIssueOn(simpleDateFormat.format((Date)dockerLookUpInfo.get(Constants.LAST_ISSUED_ON)));
certificateAddInfoDTO.setUserName((String)getUserInfo.get(Constants.FIRSTNAME));
certificateAddInfoDTO.setSwd((String)getUserInfo.get(Constants.CHANNEL));
certificateAddInfoDTO.setSwdIndicator(String.valueOf(((String)getUserInfo.get(Constants.CHANNEL)).charAt(0)));
Expand Down Expand Up @@ -209,6 +211,7 @@ public PullDocResponse generateDocResponse(String digiLockerHmac, String request
} catch (IOException e) {
logger.error("Not able to process the request requestBody: " + requestBody, e);
responseStatus.setStatus("0");
response.getDocDetails().setDocContent("Document is not available.");
return response;
}
CertificateAddInfoDTO certificateAddInfoDTO = new CertificateAddInfoDTO();
Expand Down

0 comments on commit c4d9a2d

Please sign in to comment.