Skip to content

Commit

Permalink
Mosip 32461 (mosip#1880)
Browse files Browse the repository at this point in the history
* MOSIP-32461 intial changes

Signed-off-by: Sowmya Ujjappa Banakar <[email protected]>

* MOSIP-32461 few test cases fixed

Signed-off-by: Sowmya Ujjappa Banakar <[email protected]>

* MOSIP-32461 code fix

Signed-off-by: Sowmya Ujjappa Banakar <[email protected]>

* MOSIP-32461 code changes

Signed-off-by: Sowmya Ujjappa Banakar <[email protected]>

* MOSIP-32461 code fix

Signed-off-by: Sowmya Ujjappa Banakar <[email protected]>

* MOSIP-32461 code fix

Signed-off-by: Sowmya Ujjappa Banakar <[email protected]>

* MOSIP-32461 code fix

Signed-off-by: Sowmya Ujjappa Banakar <[email protected]>

* MOSIP-32461 code fix

Signed-off-by: Sowmya Ujjappa Banakar <[email protected]>

* MOSIP-32461 code changes

Signed-off-by: Sowmya Ujjappa Banakar <[email protected]>

* MOSIP-32461 code changes

Signed-off-by: Sowmya Ujjappa Banakar <[email protected]>

* MOSIP-32461 code changes

Signed-off-by: Sowmya Ujjappa Banakar <[email protected]>

* MOSIP-32461 docker changes

Signed-off-by: Sowmya Ujjappa Banakar <[email protected]>

* MOSIP-32461 docker changes

Signed-off-by: Sowmya Ujjappa Banakar <[email protected]>

* MOSIP-32461 docker changes

Signed-off-by: Sowmya Ujjappa Banakar <[email protected]>

* MOSIP-32461 docker changes

Signed-off-by: Sowmya Ujjappa Banakar <[email protected]>

* MOSIP-32461 activemq exclude from spring boot

Signed-off-by: Sowmya Ujjappa Banakar <[email protected]>

* MOSIP-32461 activemq exclude from spring boot

Signed-off-by: Sowmya Ujjappa Banakar <[email protected]>

* MOSIP-32461 code changes

Signed-off-by: Sowmya Ujjappa Banakar <[email protected]>

* MOSIP-32461 code changes

Signed-off-by: Sowmya Ujjappa Banakar <[email protected]>

* MOSIP-32461 docker changes

Signed-off-by: Sowmya Ujjappa Banakar <[email protected]>

* MOSIP-32461 docker changes

Signed-off-by: Sowmya Ujjappa Banakar <[email protected]>

* MOSIP-32461 Code changes

Signed-off-by: Sowmya Ujjappa Banakar <[email protected]>

* MOSIP-32461 Code changes

Signed-off-by: Sowmya Ujjappa Banakar <[email protected]>

* MOSIP-32461 code changes

Signed-off-by: Sowmya Ujjappa Banakar <[email protected]>

* MOSIP-32461 code changes

Signed-off-by: Sowmya Ujjappa Banakar <[email protected]>

---------

Signed-off-by: Sowmya Ujjappa Banakar <[email protected]>
Co-authored-by: Sowmya Ujjappa Banakar <[email protected]>
Signed-off-by: Sowmya Ujjappa Banakar <[email protected]>
  • Loading branch information
sowmya695 and Sowmya Ujjappa Banakar committed Jun 20, 2024
1 parent 58071a0 commit d0414ad
Show file tree
Hide file tree
Showing 7 changed files with 989 additions and 989 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,27 +122,19 @@ public ResponseEntity<Object> packetExternalStatus(
}
List<PacketExternalStatusDTO> packetExternalStatusDTOList = packetExternalStatusService
.getByPacketIds(packetIdList);

PacketExternalStatusResponseDTO packetExternalStatusResponseDTO = buildPacketStatusResponse(
packetExternalStatusDTOList, packetExternalStatusRequestDTO.getRequest());
String res = objectMapper.writeValueAsString(packetExternalStatusResponseDTO);
if (isEnabled) {
PacketExternalStatusResponseDTO packetExternalStatusResponseDTO = buildPacketStatusResponse(
packetExternalStatusDTOList, packetExternalStatusRequestDTO.getRequest());

HttpHeaders headers = new HttpHeaders();
String res=null;
try {

res=objectMapper.writeValueAsString(packetExternalStatusResponseDTO);
} catch (Exception e1) {
logger.error("Error while processing dto ",e1);

}
headers.add(RESPONSE_SIGNATURE,
digitalSignatureUtility.getDigitalSignature(res));
return ResponseEntity.status(HttpStatus.OK).headers(headers)
.body(res);
}

return ResponseEntity.status(HttpStatus.OK)
.body(buildPacketStatusResponse(packetExternalStatusDTOList, packetExternalStatusRequestDTO.getRequest()));
.body(res);
} catch (RegStatusAppException e) {
throw new RegStatusAppException(PlatformErrorMessages.RPR_RGS_DATA_VALIDATION_FAILED, e);
} catch (Exception e) {
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,17 @@ public ResponseEntity<Object> syncRegistrationController(
env.getProperty(REG_SYNC_SERVICE_ID), syncResponseList)) {
syncResponseList = syncRegistrationService.sync(registrationSyncRequestDTO.getRequest(), referenceId, timeStamp);
}
RegSyncResponseDTO responseDto = buildRegistrationSyncResponse(syncResponseList);
String res = objectMapper.writeValueAsString(responseDto);
if (isEnabled) {
RegSyncResponseDTO responseDto = buildRegistrationSyncResponse(syncResponseList);

HttpHeaders headers = new HttpHeaders();
headers.add(RESPONSE_SIGNATURE,
digitalSignatureUtility.getDigitalSignature(objectMapper.writeValueAsString(responseDto)));
return ResponseEntity.ok().headers(headers).body(responseDto);
digitalSignatureUtility.getDigitalSignature(res));
return ResponseEntity.ok().headers(headers).body(res);
}

return ResponseEntity.ok().body(buildRegistrationSyncResponse(syncResponseList));
return ResponseEntity.ok().body(res);

} catch (JsonProcessingException e) {
throw new RegStatusAppException(PlatformErrorMessages.RPR_RGS_DATA_VALIDATION_FAILED, e);
Expand Down Expand Up @@ -155,15 +157,16 @@ public ResponseEntity<Object> syncRegistrationController2(
env.getProperty(REG_SYNC_SERVICE_ID), syncResponseList)) {
syncResponseList = syncRegistrationService.syncV2(registrationSyncRequestDTO.getRequest(), referenceId, timeStamp);
}
RegSyncResponseDTO responseDto = buildRegistrationSyncResponse(syncResponseList);
String res = objectMapper.writeValueAsString(responseDto);
if (isEnabled) {
RegSyncResponseDTO responseDto = buildRegistrationSyncResponse(syncResponseList);
HttpHeaders headers = new HttpHeaders();
headers.add(RESPONSE_SIGNATURE,
digitalSignatureUtility.getDigitalSignature(objectMapper.writeValueAsString(responseDto)));
return ResponseEntity.ok().headers(headers).body(responseDto);
digitalSignatureUtility.getDigitalSignature(res));
return ResponseEntity.ok().headers(headers).body(res);
}

return ResponseEntity.ok().body(buildRegistrationSyncResponse(syncResponseList));
return ResponseEntity.ok().body(res);

} catch (JsonProcessingException e) {
throw new RegStatusAppException(PlatformErrorMessages.RPR_RGS_DATA_VALIDATION_FAILED, e);
Expand Down
Loading

0 comments on commit d0414ad

Please sign in to comment.