Commit 722f2ac3 authored by Enriko Käsper's avatar Enriko Käsper
Browse files

Merge branch 'develop' into 'master'

Release: merge 'develop' into 'master' created by Siiri Tann

See merge request teis/payments-service!54
parents c6028ade bf568f24
# Changelog
## [1.14.0] - 2021-12-16
* TEIS-2535: fixed DomainCacheConfigs according to changes in commons library
* TEIS-2599: security and metrics update
## [1.13.0] - 2021-02-07
* added functionality to fill claim definition created_at null values
......
theGroup=ee.sm.ti.teis
theVersion=1.13.0
pluginVersion=1.2.0
commonsVersion=1.14.0
officeApiGatewayVersion=1.15.0
theVersion=1.14.0
pluginVersion=1.4.1
commonsVersion=1.28.0
officeApiGatewayVersion=1.28.0
......@@ -4,8 +4,8 @@ import ee.sm.ti.teis.PaymentsAppTestBase;
import ee.sm.ti.teis.commongateway.payments.claim.dto.*;
import ee.sm.ti.teis.commongateway.payments.claim.request.ClaimRequest;
import ee.sm.ti.teis.commongateway.payments.claim.response.ClaimResponse;
import ee.sm.ti.teis.commongateway.person.LegalPersonDto;
import ee.sm.ti.teis.commongateway.person.PersonDto;
import ee.sm.ti.teis.commongateway.persons.person.dto.LegalPersonDto;
import ee.sm.ti.teis.commongateway.persons.person.dto.PersonDto;
import ee.sm.ti.teis.servicecommon.test.ListenerGetObjectRequestTestBase;
import ee.sm.ti.teis.servicerequest.RequestMetaDTO;
import org.junit.jupiter.api.BeforeEach;
......@@ -147,7 +147,7 @@ public class ClaimGwListenerTest extends PaymentsAppTestBase implements Listener
@Override
@Test
public void missingPrivilege_forbidden() {
public void missingRequiredPrivilege_forbidden() {
request.setPayload(UUID.randomUUID(), requestMetaDTO);
ClaimResponse response = listener.getClaim(request);
......
......@@ -7,8 +7,8 @@ import ee.sm.ti.teis.commongateway.payments.claim.dto.ClaimSearchFilterDto;
import ee.sm.ti.teis.commongateway.payments.claim.request.ClaimsRequest;
import ee.sm.ti.teis.commongateway.payments.claim.request.ClaimsRequest.Parameters;
import ee.sm.ti.teis.commongateway.payments.claim.response.ClaimsResponse;
import ee.sm.ti.teis.commongateway.person.LegalPersonDto;
import ee.sm.ti.teis.commongateway.person.PersonDto;
import ee.sm.ti.teis.commongateway.persons.person.dto.LegalPersonDto;
import ee.sm.ti.teis.commongateway.persons.person.dto.PersonDto;
import ee.sm.ti.teis.servicecommon.test.ListenerGetListRequestTestBase;
import ee.sm.ti.teis.servicerequest.RequestMetaDTO;
import org.jetbrains.annotations.NotNull;
......@@ -130,7 +130,7 @@ public class ClaimsGwListenerTest extends PaymentsAppTestBase implements Listene
@Override
@Test
public void missingPrivilege_forbidden() {
public void missingRequiredPrivilege_forbidden() {
ClaimsResponse response = listener.getClaims(composeClaimsRequest(null, null, UUID.randomUUID(), null, null, requestMetaDTO));
assertResponseForbidden(response.getError());
......
......@@ -7,7 +7,7 @@ import ee.sm.ti.teis.commongateway.payments.claim.dto.ClaimDto;
import ee.sm.ti.teis.commongateway.payments.claim.dto.DataObjectReferenceDto;
import ee.sm.ti.teis.commongateway.payments.claim.request.CreateClaimRequest;
import ee.sm.ti.teis.commongateway.payments.claim.response.CreateClaimResponse;
import ee.sm.ti.teis.commongateway.person.PersonDto;
import ee.sm.ti.teis.commongateway.persons.person.dto.PersonDto;
import ee.sm.ti.teis.domain.admin.UrlPath;
import ee.sm.ti.teis.domain.task.Task;
import ee.sm.ti.teis.payments.serviceclient.TaskServiceClient.CreateTaskMsResponse;
......
......@@ -158,7 +158,7 @@ public class CreateClaimMsListenerTest extends PaymentsAppTestBase implements Li
}
@Override
public void missingPrivilege_forbidden() {
public void missingRequiredPrivilege_forbidden() {
// not applicable
}
......
......@@ -81,7 +81,7 @@ public class CreateEnforcementGwListenerTest extends PaymentsAppTestBase impleme
@Override
@Test
public void missingPrivilege_forbidden() {
public void missingRequiredPrivilege_forbidden() {
request.getRequestMetaDTO().setPrivileges(emptyList());
CreateEnforcementResponse response = listener.create(request);
......
......@@ -116,7 +116,7 @@ public class UpdateEnforcementGwListenerTest extends PaymentsAppTestBase impleme
@Override
@Test
public void missingPrivilege_forbidden() {
public void missingRequiredPrivilege_forbidden() {
request.getRequestMetaDTO().setPrivileges(emptyList());
UpdateEnforcementResponse response = listener.update(request);
......
......@@ -51,7 +51,7 @@ public class CreatePaymentGwListenerTest extends PaymentsAppTestBase implements
@Override
@Test
public void missingPrivilege_forbidden() {
public void missingRequiredPrivilege_forbidden() {
requestMetaDTO.setPrivileges(null);
request.setRequestMetaDTO(requestMetaDTO);
......
......@@ -54,7 +54,7 @@ public class DeletePaymentGwListenerTest extends PaymentsAppTestBase implements
@Override
@Test
public void missingPrivilege_forbidden() {
public void missingRequiredPrivilege_forbidden() {
requestMetaDTO.setPrivileges(null);
request.setRequestMetaDTO(requestMetaDTO);
......
......@@ -61,7 +61,7 @@ public class PatchPaymentGwListenerTest extends PaymentsAppTestBase implements L
@Override
@Test
public void missingPrivilege_forbidden() {
public void missingRequiredPrivilege_forbidden() {
requestMetaDTO.setPrivileges(null);
request.setRequestMetaDTO(requestMetaDTO);
......
package ee.sm.ti.teis.payments.payment.listener;
import ee.sm.ti.teis.PaymentsAppTestBase;
import ee.sm.ti.teis.commongateway.person.LegalPersonDto;
import ee.sm.ti.teis.commongateway.person.PersonDto;
import ee.sm.ti.teis.commongateway.persons.person.dto.LegalPersonDto;
import ee.sm.ti.teis.commongateway.persons.person.dto.PersonDto;
import ee.sm.ti.teis.officegateway.payments.payment.dto.ClaimLightDto;
import ee.sm.ti.teis.officegateway.payments.payment.dto.PaymentDetailsDto;
import ee.sm.ti.teis.officegateway.payments.payment.dto.ReconciliationForPaymentDetailsDto;
......@@ -51,7 +51,7 @@ public class PaymentGwListenerTest extends PaymentsAppTestBase implements Listen
@Override
@Test
public void missingPrivilege_forbidden() {
public void missingRequiredPrivilege_forbidden() {
requestMetaDTO.setPrivileges(null);
request.setRequestMetaDTO(requestMetaDTO);
......
......@@ -46,7 +46,7 @@ public class PaymentsGwListenerTest extends PaymentsAppTestBase implements Liste
@Override
@Test
public void missingPrivilege_forbidden() {
public void missingRequiredPrivilege_forbidden() {
requestMetaDTO.setPrivileges(null);
request.setRequestMetaDTO(requestMetaDTO);
......
......@@ -59,7 +59,7 @@ public class UpdatePaymentGwListenerTest extends PaymentsAppTestBase implements
@Override
@Test
public void missingPrivilege_forbidden() {
public void missingRequiredPrivilege_forbidden() {
requestMetaDTO.setPrivileges(emptyList());
request.setPayload(payload, requestMetaDTO);
......
......@@ -79,7 +79,7 @@ public class CreateReconciliationGwListenerTest extends PaymentsAppTestBase impl
@Override
@Test
public void missingPrivilege_forbidden() {
public void missingRequiredPrivilege_forbidden() {
request.getRequestMetaDTO().setPrivileges(emptyList());
CreateReconciliationResponse response = listener.create(request);
......
......@@ -4,7 +4,7 @@ import ee.sm.ti.teis.PaymentsAppTestBase;
import ee.sm.ti.teis.commongateway.payments.claim.dto.ClaimDefinitionDto;
import ee.sm.ti.teis.commongateway.payments.claim.dto.ClaimDto;
import ee.sm.ti.teis.commongateway.payments.claim.request.CreateClaimRequest;
import ee.sm.ti.teis.commongateway.person.PersonDto;
import ee.sm.ti.teis.commongateway.persons.person.dto.PersonDto;
import ee.sm.ti.teis.domain.admin.UrlPath;
import ee.sm.ti.teis.officegateway.payments.payment.dto.CreatePaymentDto;
import ee.sm.ti.teis.officegateway.payments.payment.dto.PaymentDto;
......@@ -128,7 +128,7 @@ public class DeleteReconciliationGwListenerTest extends PaymentsAppTestBase impl
@Override
@Test
public void missingPrivilege_forbidden() {
public void missingRequiredPrivilege_forbidden() {
requestMetaDTO.setPrivileges(emptyList());
request.setPayload(UUID.fromString("e5b5af0f-a342-4055-ac63-55ed79978289"), requestMetaDTO);
......
package ee.sm.ti.teis.payments.claim.mapper;
import ee.sm.ti.teis.commongateway.person.PersonDto;
import ee.sm.ti.teis.commongateway.persons.person.dto.PersonDto;
import ee.sm.ti.teis.domain.person.Person;
import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;
......
......@@ -4,7 +4,7 @@ import ee.sm.ti.teis.cache.classifier.ClassifierService;
import ee.sm.ti.teis.cache.person.PersonService;
import ee.sm.ti.teis.commongateway.classifier.ClassifierItemLightDto;
import ee.sm.ti.teis.commongateway.payments.claim.dto.*;
import ee.sm.ti.teis.commongateway.person.PersonDto;
import ee.sm.ti.teis.commongateway.persons.person.dto.PersonDto;
import ee.sm.ti.teis.domain.ClassifierItem;
import ee.sm.ti.teis.domain.payments.claim.*;
import ee.sm.ti.teis.domain.person.Person;
......
......@@ -14,20 +14,9 @@ import java.util.Set;
import static ee.sm.ti.teis.cache.classifier.ClassifierDefinitionCacheUpdateService.ClassifierDefinitionCacheResponseDTO;
import static ee.sm.ti.teis.cache.classifier.ClassifierDefinitionCacheUpdateService.ClassifierDefinitionReinitializeDTO;
import static ee.sm.ti.teis.cache.classifier.ClassifierItemCacheUpdateService.ClassifierItemCacheResponseDTO;
import static ee.sm.ti.teis.cache.classifier.ClassifierItemCacheUpdateService.ClassifierItemCreatedDTO;
import static ee.sm.ti.teis.cache.classifier.ClassifierItemCacheUpdateService.ClassifierItemReinitializeDTO;
import static ee.sm.ti.teis.cache.classifier.ClassifierItemCacheUpdateService.ClassifierItemUpdatedDTO;
import static ee.sm.ti.teis.cache.person.IndividualPersonCacheUpdateService.IndividualPersonCacheResponseDTO;
import static ee.sm.ti.teis.cache.person.IndividualPersonCacheUpdateService.IndividualPersonCreatedDTO;
import static ee.sm.ti.teis.cache.person.IndividualPersonCacheUpdateService.IndividualPersonDeletedDTO;
import static ee.sm.ti.teis.cache.person.IndividualPersonCacheUpdateService.IndividualPersonReinitializeDTO;
import static ee.sm.ti.teis.cache.person.IndividualPersonCacheUpdateService.IndividualPersonUpdatedDTO;
import static ee.sm.ti.teis.cache.person.LegalPersonCacheUpdateService.LegalPersonCacheResponseDTO;
import static ee.sm.ti.teis.cache.person.LegalPersonCacheUpdateService.LegalPersonCreatedDTO;
import static ee.sm.ti.teis.cache.person.LegalPersonCacheUpdateService.LegalPersonDeletedDTO;
import static ee.sm.ti.teis.cache.person.LegalPersonCacheUpdateService.LegalPersonReinitializeDTO;
import static ee.sm.ti.teis.cache.person.LegalPersonCacheUpdateService.LegalPersonUpdatedDTO;
import static ee.sm.ti.teis.cache.classifier.ClassifierItemCacheUpdateService.*;
import static ee.sm.ti.teis.cache.person.IndividualPersonCacheUpdateService.*;
import static ee.sm.ti.teis.cache.person.LegalPersonCacheUpdateService.*;
@Component
@RequiredArgsConstructor
......@@ -76,24 +65,24 @@ public class DomainCacheConfig implements DomainCacheList {
individualPersonCacheUpdateService.deleted(deletedDTO.getPayload().getId(), deletedDTO.getPayload());
}
@RabbitListener(queues = "#{@legalPersonCacheUpdateService.cacheResponseQueueName}")
@RabbitListener(queues = "#{@legalPersonCacheUpdateService.cacheResponseQueueName}", concurrency = "1")
public void legalPersonCacheResponseEvent(LegalPersonCacheResponseDTO cacheResponseDTO) {
legalPersonCacheUpdateService.processSnapshot(cacheResponseDTO.getPayload(), cacheResponseDTO.getRequestMetaDTO());
legalPersonCacheUpdateService.processSnapshot(cacheResponseDTO.getPayload(), cacheResponseDTO.getRequestMetaDTO().getUserId());
}
@RabbitListener(queues = "#{@individualPersonCacheUpdateService.cacheResponseQueueName}")
@RabbitListener(queues = "#{@individualPersonCacheUpdateService.cacheResponseQueueName}", concurrency = "1")
public void individualPersonCacheResponseEvent(IndividualPersonCacheResponseDTO cacheResponseDTO) {
individualPersonCacheUpdateService.processSnapshot(cacheResponseDTO.getPayload(), cacheResponseDTO.getRequestMetaDTO());
individualPersonCacheUpdateService.processSnapshot(cacheResponseDTO.getPayload(), cacheResponseDTO.getRequestMetaDTO().getUserId());
}
@RabbitListener(queues = "#{@classifierItemCacheUpdateService.cacheResponseQueueName}")
@RabbitListener(queues = "#{@classifierItemCacheUpdateService.cacheResponseQueueName}", concurrency = "1")
public void classifierItemCacheResponseEvent(ClassifierItemCacheResponseDTO cacheResponseDTO) {
classifierItemCacheUpdateService.processSnapshot(cacheResponseDTO.getPayload(), cacheResponseDTO.getRequestMetaDTO());
classifierItemCacheUpdateService.processSnapshot(cacheResponseDTO.getPayload(), cacheResponseDTO.getRequestMetaDTO().getUserId());
}
@RabbitListener(queues = "#{@classifierDefinitionCacheUpdateService.cacheResponseQueueName}")
@RabbitListener(queues = "#{@classifierDefinitionCacheUpdateService.cacheResponseQueueName}", concurrency = "1")
public void classifierDefinitionCacheResponseEvent(ClassifierDefinitionCacheResponseDTO cacheResponseDTO) {
classifierDefinitionCacheUpdateService.processSnapshot(cacheResponseDTO.getPayload(), cacheResponseDTO.getRequestMetaDTO());
classifierDefinitionCacheUpdateService.processSnapshot(cacheResponseDTO.getPayload(), cacheResponseDTO.getRequestMetaDTO().getUserId());
}
@RabbitListener(queues = "#{@classifierItemCacheUpdateService.createdEventsQueueName}")
......
......@@ -41,6 +41,9 @@ management:
enabled: true
show-details: always
info.enabled: true
endpoints:
web:
exposure.include: health, info, prometheus, metrics
teis:
datasource:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment