Commit 425beb1c authored by Kristel Meikas's avatar Kristel Meikas
Browse files

Merge branch 'develop' into 'master'

Release: merge 'develop' into 'master' created by Kristel Meikas

See merge request teis/common-api-gateway!199
parents 705744ec c3294cc5
......@@ -4,6 +4,7 @@ import ee.sm.ti.teis.commongateway.messages.message.dto.MessageDto;
import ee.sm.ti.teis.commongateway.messages.message.dto.MessageTestDto;
import ee.sm.ti.teis.commongateway.messages.message.request.MessageRequest;
import ee.sm.ti.teis.gatewaycommon.controller.TeisBaseController;
import ee.sm.ti.teis.gatewaycommon.rabbit.RequestProcessingService;
import ee.sm.ti.teis.servicerequest.RequestMetaDTO;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
......@@ -21,7 +22,7 @@ import java.util.UUID;
@RequiredArgsConstructor
public class MessageTestController extends TeisBaseController {
private final MessageProcessingService service;
private final RequestProcessingService service;
@ApiOperation(value = "${teis.api.messages.message.get-message}", response = MessageDto.class)
@GetMapping(value = "{id}")
......@@ -29,7 +30,7 @@ public class MessageTestController extends TeisBaseController {
MessageRequest request = new MessageRequest();
request.setPayload(id, requestMetaDTO);
return service.getMessage(request);
return (MessageTestDto) service.sendAndReceive(request);
}
}
......@@ -6,6 +6,7 @@ import ee.sm.ti.teis.commongateway.payments.claim.dto.ClaimsDto;
import ee.sm.ti.teis.commongateway.payments.claim.request.ClaimRequest;
import ee.sm.ti.teis.commongateway.payments.claim.request.ClaimsRequest;
import ee.sm.ti.teis.gatewaycommon.controller.TeisBaseController;
import ee.sm.ti.teis.gatewaycommon.rabbit.RequestProcessingService;
import ee.sm.ti.teis.servicerequest.RequestMetaDTO;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
......@@ -21,7 +22,7 @@ import java.util.UUID;
@RequiredArgsConstructor
public class ClaimController extends TeisBaseController {
private final ClaimProcessingService service;
private final RequestProcessingService service;
@ApiOperation(value = "${teis.api.payments.get-claims}", response = ClaimsDto.class)
@GetMapping
......@@ -30,7 +31,7 @@ public class ClaimController extends TeisBaseController {
ClaimsRequest request = new ClaimsRequest();
request.setPayload(new ClaimsRequest.Parameters(searchFilterDto), requestMetaDTO);
return service.getClaims(request);
return (ClaimsDto) service.sendAndReceive(request);
}
@ApiOperation(value = "${teis.api.payments.get-claim}", response = ClaimDto.class)
......@@ -39,6 +40,6 @@ public class ClaimController extends TeisBaseController {
ClaimRequest request = new ClaimRequest();
request.setPayload(id, requestMetaDTO);
return service.getClaim(request);
return (ClaimDto) service.sendAndReceive(request);
}
}
package ee.sm.ti.teis.commongateway.payments.claim;
import ee.sm.ti.teis.commongateway.payments.claim.dto.ClaimDto;
import ee.sm.ti.teis.commongateway.payments.claim.dto.ClaimsDto;
import ee.sm.ti.teis.commongateway.payments.claim.request.*;
import ee.sm.ti.teis.commongateway.payments.claim.response.*;
import ee.sm.ti.teis.gatewaycommon.error.NoResponseFromRabbitException;
import lombok.RequiredArgsConstructor;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.stereotype.Service;
@Service
@Deprecated(since = "1.19.0", forRemoval = true)
@RequiredArgsConstructor
public class ClaimProcessingService {
private final RabbitTemplate gwRabbitTemplate;
public ClaimDto create(CreateClaimRequest request) {
CreateClaimResponse response =
(CreateClaimResponse) gwRabbitTemplate.convertSendAndReceive(request.routingKey(), request);
if (response != null) {
return response.processResponse();
}
throw new NoResponseFromRabbitException(request.getRequestMetaDTO().getRequestId());
}
public ClaimsDto getClaims(ClaimsRequest request) {
ClaimsResponse response =
(ClaimsResponse) gwRabbitTemplate.convertSendAndReceive(request.routingKey(), request);
if (response != null) {
return response.processResponse();
}
throw new NoResponseFromRabbitException(request.getRequestMetaDTO().getRequestId());
}
public ClaimDto getClaim(ClaimRequest request) {
ClaimResponse response =
(ClaimResponse) gwRabbitTemplate.convertSendAndReceive(request.routingKey(), request);
if (response != null) {
return response.processResponse();
}
throw new NoResponseFromRabbitException(request.getRequestMetaDTO().getRequestId());
}
public void patch(PatchClaimRequest request) {
PatchClaimResponse response =
(PatchClaimResponse) gwRabbitTemplate.convertSendAndReceive(request.routingKey(), request);
if (response != null) {
response.processResponse();
return;
}
throw new NoResponseFromRabbitException(request.getRequestMetaDTO().getRequestId());
}
public void delete(DeleteClaimRequest request) {
DeleteClaimResponse response =
(DeleteClaimResponse) gwRabbitTemplate.convertSendAndReceive(request.routingKey(), request);
if (response != null) {
response.processResponse();
return;
}
throw new NoResponseFromRabbitException(request.getRequestMetaDTO().getRequestId());
}
}
......@@ -6,6 +6,7 @@ import ee.sm.ti.teis.commongateway.payments.claim.request.CreateClaimRequest;
import ee.sm.ti.teis.commongateway.payments.claim.request.DeleteClaimRequest;
import ee.sm.ti.teis.commongateway.payments.claim.request.PatchClaimRequest;
import ee.sm.ti.teis.gatewaycommon.controller.TeisBaseController;
import ee.sm.ti.teis.gatewaycommon.rabbit.RequestProcessingService;
import ee.sm.ti.teis.servicerequest.RequestMetaDTO;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
......@@ -20,7 +21,7 @@ import java.util.UUID;
@RequiredArgsConstructor
public class ClaimTestController extends TeisBaseController {
private final ClaimProcessingService service;
private final RequestProcessingService service;
@ApiOperation(value = "${teis.api.payments.create-claim}", response = ClaimDto.class)
@PostMapping
......@@ -28,7 +29,7 @@ public class ClaimTestController extends TeisBaseController {
CreateClaimRequest request = new CreateClaimRequest();
request.setPayload(dto, requestMetaDTO);
return service.create(request);
return (ClaimDto) service.sendAndReceive(request);
}
@ApiOperation(value = "${teis.api.payments.patch-claim}")
......@@ -37,16 +38,17 @@ public class ClaimTestController extends TeisBaseController {
PatchClaimRequest request = new PatchClaimRequest();
request.setPayload(dto, requestMetaDTO);
service.patch(request);
service.sendAndReceive(request);
}
@ApiOperation(value = "${teis.api.payments.delete-claim}")
@DeleteMapping
public void delete(@RequestParam(required = false) UUID claimId, @RequestParam(required = false) UUID dataObjectId, RequestMetaDTO requestMetaDTO) {
public void delete(@RequestParam(required = false) UUID claimId, @RequestParam(required = false) UUID dataObjectId,
RequestMetaDTO requestMetaDTO) {
DeleteClaimRequest request = new DeleteClaimRequest();
request.setPayload(new DeleteClaimRequest.Parameters(claimId, dataObjectId), requestMetaDTO);
service.delete(request);
service.sendAndReceive(request);
}
}
package ee.sm.ti.teis.commongateway.person;
import ee.sm.ti.teis.gatewaycommon.controller.TeisBaseController;
import ee.sm.ti.teis.gatewaycommon.rabbit.RequestProcessingService;
import ee.sm.ti.teis.servicerequest.RequestMetaDTO;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
......@@ -22,7 +23,7 @@ import java.math.BigInteger;
@RequiredArgsConstructor
public class LegalPersonController extends TeisBaseController {
private final PersonProcessingService personProcessingService;
private final RequestProcessingService service;
@ApiOperation(value = "${teis.api.messages.get-legal-person}", response = PersonDto.class)
@GetMapping(produces = MediaType.APPLICATION_JSON_VALUE)
......@@ -31,6 +32,6 @@ public class LegalPersonController extends TeisBaseController {
RequestMetaDTO requestMetaDTO) {
GetOrCreatePersonRequest request = new GetOrCreatePersonRequest();
request.setPayload(new GetOrCreatePersonRequest.Parameters(String.valueOf(regCode), name), requestMetaDTO);
return personProcessingService.getLegalPerson(request);
return (PersonDto) service.sendAndReceive(request);
}
}
......@@ -2,6 +2,7 @@ package ee.sm.ti.teis.commongateway.person;
import ee.sm.ti.teis.commongateway.person.search.PersonSearchFilterDto;
import ee.sm.ti.teis.gatewaycommon.controller.TeisBaseController;
import ee.sm.ti.teis.gatewaycommon.rabbit.RequestProcessingService;
import ee.sm.ti.teis.servicerequest.RequestMetaDTO;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
......@@ -17,7 +18,7 @@ import java.util.List;
@RequiredArgsConstructor
public class PersonController extends TeisBaseController {
private final PersonProcessingService personProcessingService;
private final RequestProcessingService service;
@ApiOperation(value = "${teis.api.messages.get-person}", response = PersonDto.class)
@ApiImplicitParams(@ApiImplicitParam(name = "id", value = "${teis.api.messages.get-person-default-id}", required = true))
......@@ -26,7 +27,7 @@ public class PersonController extends TeisBaseController {
PersonRequest request = new PersonRequest();
request.setPayload(new PersonRequest.Parameters(id), requestMetaDTO);
return personProcessingService.getPerson(request);
return (PersonDto) service.sendAndReceive(request);
}
@ApiOperation(value = "${teis.api.messages.get-persons}", response = PersonDto.class)
......@@ -40,7 +41,7 @@ public class PersonController extends TeisBaseController {
PersonsRequest request = new PersonsRequest();
request.setPayload(new PersonsRequest.Parameters(personFilter), requestMetaDTO);
return personProcessingService.getPersons(request);
return (List<PersonDto>) service.sendAndReceive(request);
}
@ApiOperation(value = "${teis.api.messages.post-person}", response = PersonDto.class)
......@@ -49,6 +50,6 @@ public class PersonController extends TeisBaseController {
CreatePersonRequest request = new CreatePersonRequest();
request.setPayload(new CreatePersonRequest.Parameters(person), requestMetaDTO);
return personProcessingService.createPerson(request);
return (PersonDto) service.sendAndReceive(request);
}
}
......@@ -6,10 +6,7 @@ import lombok.RequiredArgsConstructor;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
@Deprecated(since = "1.19.0", forRemoval = true)
@RequiredArgsConstructor
public class PersonProcessingService {
......@@ -23,22 +20,6 @@ public class PersonProcessingService {
throw new NoResponseFromRabbitException(requestDTO.getRequestMetaDTO().getRequestId());
}
PersonDto createPerson(CreatePersonRequest request) {
CreatePersonResponse response = (CreatePersonResponse) gwRabbitTemplate.convertSendAndReceive(request.routingKey(), request);
if (response != null) {
return response.processResponse();
}
throw new NoResponseFromRabbitException(request.getRequestMetaDTO().getRequestId());
}
public List<PersonDto> getPersons(PersonsRequest requestDTO) {
PersonsResponse response = (PersonsResponse) gwRabbitTemplate.convertSendAndReceive(requestDTO.routingKey(), requestDTO);
if (response != null) {
return response.processResponse();
}
throw new NoResponseFromRabbitException(requestDTO.getRequestMetaDTO().getRequestId());
}
PersonDto updatePerson(UpdatePersonRequest request) {
UpdatePersonResponse response = (UpdatePersonResponse) gwRabbitTemplate.convertSendAndReceive(request.routingKey(), request);
if (response != null) {
......@@ -59,11 +40,4 @@ public class PersonProcessingService {
updatePerson(updatePersonRequest);
}
PersonDto getLegalPerson(GetOrCreatePersonRequest requestDTO) {
GetOrCreatePersonResponse response = (GetOrCreatePersonResponse) gwRabbitTemplate.convertSendAndReceive(requestDTO.routingKey(), requestDTO);
if (response != null) {
return response.processResponse();
}
throw new NoResponseFromRabbitException(requestDTO.getRequestMetaDTO().getRequestId());
}
}
package ee.sm.ti.teis.commongateway.person;
import ee.sm.ti.teis.gatewaycommon.controller.TeisBaseController;
import ee.sm.ti.teis.gatewaycommon.rabbit.RequestProcessingService;
import ee.sm.ti.teis.servicerequest.RequestMetaDTO;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
......@@ -18,7 +19,7 @@ import java.util.UUID;
@RequiredArgsConstructor
public class PersonTestController extends TeisBaseController {
private final PersonProcessingService personProcessingService;
private final RequestProcessingService service;
@ApiOperation(value = "${teis.api.messages.put-person}", response = PersonDto.class)
@ApiImplicitParams(@ApiImplicitParam(name = "id", value = "${teis.api.messages.put-person-id}", required = true))
......@@ -28,6 +29,6 @@ public class PersonTestController extends TeisBaseController {
person.setId(UUID.fromString(id));
request.setPayload(new UpdatePersonRequest.Parameters(person), requestMetaDTO);
return personProcessingService.updatePerson(request);
return (PersonDto) service.sendAndReceive(request);
}
}
......@@ -6,6 +6,7 @@ import ee.sm.ti.teis.commongateway.proceedings.proceeding.request.MessagePermiss
import ee.sm.ti.teis.commongateway.proceedings.proceeding.request.ProceedingPublicRequest;
import ee.sm.ti.teis.commongateway.proceedings.proceeding.request.ProceedingsPublicRequest;
import ee.sm.ti.teis.gatewaycommon.controller.TeisBaseController;
import ee.sm.ti.teis.gatewaycommon.rabbit.RequestProcessingService;
import ee.sm.ti.teis.servicerequest.RequestMetaDTO;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
......@@ -22,7 +23,7 @@ import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE;
@RequiredArgsConstructor
public class ProceedingController extends TeisBaseController {
private final ProceedingProcessingService processingService;
private final RequestProcessingService service;
@ApiOperation(value = "${teis.api.messages.proceeding.get-proceeding}", response = ProceedingPublicDto.class)
@ApiImplicitParams(@ApiImplicitParam(name = "id", value = "${teis.api.messages.proceeding.get-proceeding-id}"))
......@@ -31,7 +32,7 @@ public class ProceedingController extends TeisBaseController {
ProceedingPublicRequest request = new ProceedingPublicRequest();
request.setPayload(id, requestMetaDTO);
return processingService.getProceeding(request);
return (ProceedingPublicDto) service.sendAndReceive(request);
}
@ApiOperation(value = "${teis.api.messages.proceeding.get-proceedings}", response = ProceedingPublicDto.class)
......@@ -40,7 +41,7 @@ public class ProceedingController extends TeisBaseController {
ProceedingsPublicRequest request = new ProceedingsPublicRequest();
request.setPayload(legalPersonId, requestMetaDTO);
return processingService.getProceedings(request);
return (List<ProceedingPublicDto>) service.sendAndReceive(request);
}
@ApiOperation(value = "${teis.api.messages.proceeding.get-message-permissions}", response = MessagePermissionDto.class)
......@@ -50,7 +51,7 @@ public class ProceedingController extends TeisBaseController {
MessagePermissionRequest request = new MessagePermissionRequest();
request.setPayload(id, requestMetaDTO);
return processingService.getMessagePermission(request);
return (List<MessagePermissionDto>) service.sendAndReceive(request);
}
}
package ee.sm.ti.teis.commongateway.proceedings.proceeding;
import ee.sm.ti.teis.commongateway.proceedings.proceeding.dto.MessagePermissionDto;
import ee.sm.ti.teis.commongateway.proceedings.proceeding.dto.ProceedingPublicDto;
import ee.sm.ti.teis.commongateway.proceedings.proceeding.request.MessagePermissionRequest;
import ee.sm.ti.teis.commongateway.proceedings.proceeding.request.ProceedingPublicRequest;
import ee.sm.ti.teis.commongateway.proceedings.proceeding.request.ProceedingsPublicRequest;
import ee.sm.ti.teis.commongateway.proceedings.proceeding.response.MessagePermissionResponse;
import ee.sm.ti.teis.commongateway.proceedings.proceeding.response.ProceedingPublicResponse;
import ee.sm.ti.teis.commongateway.proceedings.proceeding.response.ProceedingsPublicResponse;
import ee.sm.ti.teis.gatewaycommon.error.NoResponseFromRabbitException;
import lombok.RequiredArgsConstructor;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
@Deprecated(since = "1.19.0", forRemoval = true)
@RequiredArgsConstructor
public class ProceedingProcessingService {
private final RabbitTemplate gwRabbitTemplate;
ProceedingPublicDto getProceeding(ProceedingPublicRequest request) {
ProceedingPublicResponse response =
(ProceedingPublicResponse) gwRabbitTemplate.convertSendAndReceive(request.routingKey(), request);
if (response != null) {
return response.processResponse();
}
throw new NoResponseFromRabbitException(request.getRequestMetaDTO().getRequestId());
}
List<ProceedingPublicDto> getProceedings(ProceedingsPublicRequest request) {
ProceedingsPublicResponse response =
(ProceedingsPublicResponse) gwRabbitTemplate.convertSendAndReceive(request.routingKey(), request);
if (response != null) {
return response.processResponse();
}
throw new NoResponseFromRabbitException(request.getRequestMetaDTO().getRequestId());
}
public List<MessagePermissionDto> getMessagePermission(MessagePermissionRequest request) {
MessagePermissionResponse response =
(MessagePermissionResponse) gwRabbitTemplate.convertSendAndReceive(request.routingKey(), request);
if (response != null) {
return response.processResponse();
}
throw new NoResponseFromRabbitException(request.getRequestMetaDTO().getRequestId());
}
}
......@@ -8,6 +8,7 @@ import ee.sm.ti.teis.commongateway.weblink.CreateWebLinkRequest;
import ee.sm.ti.teis.commongateway.weblink.DeleteWebLinkRequest;
import ee.sm.ti.teis.commongateway.weblink.WebLinkDto;
import ee.sm.ti.teis.gatewaycommon.controller.TeisBaseController;
import ee.sm.ti.teis.gatewaycommon.rabbit.RequestProcessingService;
import ee.sm.ti.teis.servicerequest.RequestMetaDTO;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
......@@ -24,7 +25,7 @@ import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE;
@RequiredArgsConstructor
public class ProceedingInspectionDocumentController extends TeisBaseController {
private final ProceedingInspectionDocumentProcessingService processingService;
private final RequestProcessingService service;
@ApiOperation(value = "${teis.api.messages.proceeding.get-proceeding-inspection-documents}",
response = ProceedingInspectionDocumentPublicDto.class)
......@@ -34,7 +35,7 @@ public class ProceedingInspectionDocumentController extends TeisBaseController {
ProceedingInspectionDocumentsPublicRequest request = new ProceedingInspectionDocumentsPublicRequest();
request.setPayload(id, requestMetaDTO);
return processingService.getProceedingDocuments(request);
return (List<ProceedingInspectionDocumentPublicDto>) service.sendAndReceive(request);
}
@ApiOperation(value = "${teis.api.messages.proceeding.create-proceeding-inspection-documents}",
......@@ -47,7 +48,7 @@ public class ProceedingInspectionDocumentController extends TeisBaseController {
payload.setProceedingId(id);
request.setPayload(payload, requestMetaDTO);
return processingService.createDocument(request);
return (ProceedingInspectionDocumentPublicDto) service.sendAndReceive(request);
}
@ApiOperation(value = "${teis.api.messages.proceeding.create-proceeding-inspection-document-weblinks}",
......@@ -58,7 +59,7 @@ public class ProceedingInspectionDocumentController extends TeisBaseController {
CreateWebLinkRequest request = new CreateWebLinkRequest();
request.setPayload(new CreateWebLinkRequest.Parameters(url, id), requestMetaDTO);
return processingService.createWebLink(request);
return (List<WebLinkDto>) service.sendAndReceive(request);
}
@ApiOperation(value = "${teis.api.messages.proceeding.delete-proceeding-inspection-document-weblinks}")
......@@ -66,7 +67,7 @@ public class ProceedingInspectionDocumentController extends TeisBaseController {
public void deleteWebLink(@PathVariable UUID documentId, @PathVariable UUID webLinkId, RequestMetaDTO requestMetaDTO) {
DeleteWebLinkRequest request = new DeleteWebLinkRequest();
request.setPayload(new DeleteWebLinkRequest.Parameters(documentId, webLinkId), requestMetaDTO);
processingService.deleteWebLink(request);
service.sendAndReceive(request);
}
}
package ee.sm.ti.teis.commongateway.proceedings.proceeding.inspection.document;
import ee.sm.ti.teis.commongateway.proceedings.proceeding.dto.ProceedingInspectionDocumentPublicDto;
import ee.sm.ti.teis.commongateway.proceedings.proceeding.request.CreateProceedingInspectionDocumentPublicRequest;
import ee.sm.ti.teis.commongateway.proceedings.proceeding.request.ProceedingInspectionDocumentsPublicRequest;
import ee.sm.ti.teis.commongateway.proceedings.proceeding.response.CreateProceedingsInspectionDocumentPublicResponse;
import ee.sm.ti.teis.commongateway.proceedings.proceeding.response.ProceedingsInspectionDocumentsPublicResponse;
import ee.sm.ti.teis.commongateway.weblink.*;
import ee.sm.ti.teis.gatewaycommon.error.NoResponseFromRabbitException;
import lombok.RequiredArgsConstructor;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
@Deprecated(since = "1.19.0", forRemoval = true)
@RequiredArgsConstructor
public class ProceedingInspectionDocumentProcessingService {
private final RabbitTemplate gwRabbitTemplate;
List<ProceedingInspectionDocumentPublicDto> getProceedingDocuments(ProceedingInspectionDocumentsPublicRequest request) {
ProceedingsInspectionDocumentsPublicResponse response =
(ProceedingsInspectionDocumentsPublicResponse) gwRabbitTemplate.convertSendAndReceive(request.routingKey(), request);
if (response != null) {
return response.processResponse();
}
throw new NoResponseFromRabbitException(request.getRequestMetaDTO().getRequestId());
}
public List<WebLinkDto> createWebLink(CreateWebLinkRequest requestDTO) {
CreateWebLinkResponse response =
(CreateWebLinkResponse) gwRabbitTemplate.convertSendAndReceive(requestDTO.routingKey(), requestDTO);
if (response != null) {
return response.processResponse();
}
throw new NoResponseFromRabbitException(requestDTO.getRequestMetaDTO().getRequestId());
}
public ProceedingInspectionDocumentPublicDto createDocument(CreateProceedingInspectionDocumentPublicRequest requestDTO) {
CreateProceedingsInspectionDocumentPublicResponse response =
(CreateProceedingsInspectionDocumentPublicResponse) gwRabbitTemplate.convertSendAndReceive(requestDTO.routingKey(),
requestDTO);
if (response != null) {
return response.processResponse();
}
throw new NoResponseFromRabbitException(requestDTO.getRequestMetaDTO().getRequestId());
}
public void deleteWebLink(DeleteWebLinkRequest requestDTO) {
DeleteWebLinkResponse response = (DeleteWebLinkResponse) gwRabbitTemplate.convertSendAndReceive(requestDTO.routingKey(),
requestDTO);
if (response != null) {
response.processResponse();
return;
}
throw new NoResponseFromRabbitException(requestDTO.getRequestMetaDTO().getRequestId());
}
public List<WebLinkDto> getWebLinks(WebLinksTestRequest requestDTO) {
WebLinksTestResponse response =
(WebLinksTestResponse) gwRabbitTemplate.convertSendAndReceive(requestDTO.routingKey(), requestDTO);
if (response != null) {
return response.processResponse();
}
throw new NoResponseFromRabbitException(requestDTO.getRequestMetaDTO().getRequestId());
}
}
......@@ -3,6 +3,7 @@ package ee.sm.ti.teis.commongateway.proceedings.proceeding.inspection.document;
import ee.sm.ti.teis.commongateway.weblink.WebLinkDto;
import ee.sm.ti.teis.commongateway.weblink.WebLinksTestRequest;
import ee.sm.ti.teis.gatewaycommon.controller.TeisBaseController;
import ee.sm.ti.teis.gatewaycommon.rabbit.RequestProcessingService;
import ee.sm.ti.teis.servicerequest.RequestMetaDTO;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
......@@ -21,7 +22,7 @@ import java.util.UUID;
@RequiredArgsConstructor