Commit 705744ec authored by Jürgen Hannus's avatar Jürgen Hannus
Browse files

Merge branch 'develop' into 'master'

Release: merge 'develop' into 'master' created by Jürgen Hannus

See merge request teis/common-api-gateway!195
parents d025e4ad 7d90e881
package ee.sm.ti.teis.commongateway.proceduralact;
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-SNAPSHOT", forRemoval = true)
@RequiredArgsConstructor
public class ProceduralActProcessingService {
private final RabbitTemplate gwRabbitTemplate;
List<ProceduralActPublicDto> getProceduralActs(ProceduralActsPublicRequest request) {
ProceduralActsPublicResponse response =
(ProceduralActsPublicResponse) gwRabbitTemplate.convertSendAndReceive(request.routingKey(), request);
if (response != null) {
return response.processResponse();
}
throw new NoResponseFromRabbitException(request.getRequestMetaDTO().getRequestId());
}
ProceduralActPublicDto getProceduralAct(ProceduralActPublicRequest request) {
ProceduralActPublicResponse response =
(ProceduralActPublicResponse) gwRabbitTemplate.convertSendAndReceive(request.routingKey(), request);
if (response != null) {
return response.processResponse();
}
throw new NoResponseFromRabbitException(request.getRequestMetaDTO().getRequestId());
}
}
......@@ -16,7 +16,7 @@ import org.springframework.stereotype.Service;
import java.util.List;
@Service
@Deprecated(since = "1.19.0-SNAPSHOT", forRemoval = true)
@Deprecated(since = "1.19.0", forRemoval = true)
@RequiredArgsConstructor
public class ProceedingProcessingService {
......
......@@ -14,7 +14,7 @@ import org.springframework.stereotype.Service;
import java.util.List;
@Service
@Deprecated(since = "1.19.0-SNAPSHOT", forRemoval = true)
@Deprecated(since = "1.19.0", forRemoval = true)
@RequiredArgsConstructor
public class ProceedingInspectionDocumentProcessingService {
......
......@@ -15,7 +15,7 @@ import org.springframework.stereotype.Service;
import java.util.List;
@Service
@Deprecated(since = "1.19.0-SNAPSHOT", forRemoval = true)
@Deprecated(since = "1.19.0", forRemoval = true)
@RequiredArgsConstructor
public class ViolationProcessingService {
......
......@@ -9,7 +9,7 @@ import org.springframework.stereotype.Service;
import java.util.List;
@Service
@Deprecated(since = "1.19.0-SNAPSHOT", forRemoval = true)
@Deprecated(since = "1.19.0", forRemoval = true)
@RequiredArgsConstructor
public class RepresentativeProcessingService {
......
......@@ -11,7 +11,7 @@ import org.springframework.stereotype.Service;
import java.util.List;
@Service
@Deprecated(since = "1.19.0-SNAPSHOT", forRemoval = true)
@Deprecated(since = "1.19.0", forRemoval = true)
@RequiredArgsConstructor
public class AuthorityProcessingService {
......
......@@ -47,6 +47,7 @@ public class AuthorityPermissionController extends TeisBaseController {
return service.getByAuthority(request);
}
@Deprecated(since = "1.21.0", forRemoval = true)
@ApiOperation(value = "${teis.api.representatives.authority-permission.get-by-grantor}", response = AuthorityPermissionDto.class)
@GetMapping("grantor")
public List<AuthorityPermissionDto> getByGrantor(@RequestParam UUID grantorId,
......
......@@ -13,7 +13,7 @@ import org.springframework.stereotype.Service;
import java.util.List;
@Service
@Deprecated(since = "1.19.0-SNAPSHOT", forRemoval = true)
@Deprecated(since = "1.19.0", forRemoval = true)
@RequiredArgsConstructor
public class AuthorityPermissionProcessingService {
......@@ -39,6 +39,7 @@ public class AuthorityPermissionProcessingService {
throw new NoResponseFromRabbitException(request.getRequestMetaDTO().getRequestId());
}
@Deprecated(since = "1.21.0", forRemoval = true)
public List<AuthorityPermissionDto> getByGrantor(AuthorityPermissionsGrantorRequest request) {
AuthorityPermissionGrantorResponse response =
(AuthorityPermissionGrantorResponse) gwRabbitTemplate.convertSendAndReceive(request.routingKey(), request);
......
......@@ -9,7 +9,7 @@ import org.springframework.stereotype.Service;
import java.util.List;
@Service
@Deprecated(since = "1.19.0-SNAPSHOT", forRemoval = true)
@Deprecated(since = "1.19.0", forRemoval = true)
@RequiredArgsConstructor
public class RepresentativeLocationProcessingService {
......
......@@ -14,7 +14,7 @@ import org.springframework.stereotype.Service;
import java.util.List;
@Service
@Deprecated(since = "1.19.0-SNAPSHOT", forRemoval = true)
@Deprecated(since = "1.19.0", forRemoval = true)
@RequiredArgsConstructor
public class BusinessTypeProcessingService {
......
......@@ -13,7 +13,7 @@ import org.springframework.stereotype.Service;
import java.util.List;
@Service
@Deprecated(since = "1.19.0-SNAPSHOT", forRemoval = true)
@Deprecated(since = "1.19.0", forRemoval = true)
@RequiredArgsConstructor
public class RiskAssessmentProcessingService {
......
......@@ -11,7 +11,7 @@ import org.springframework.stereotype.Service;
import java.util.List;
@Service
@Deprecated(since = "1.19.0-SNAPSHOT", forRemoval = true)
@Deprecated(since = "1.19.0", forRemoval = true)
@RequiredArgsConstructor
public class RiskFactorProcessingService {
......
......@@ -10,7 +10,7 @@ import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.stereotype.Service;
@Service
@Deprecated(since = "1.19.0-SNAPSHOT", forRemoval = true)
@Deprecated(since = "1.19.0", forRemoval = true)
@RequiredArgsConstructor
public class RiskFactorAssessmentProcessingService {
......
......@@ -9,7 +9,7 @@ import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.stereotype.Service;
@Service
@Deprecated(since = "1.19.0-SNAPSHOT", forRemoval = true)
@Deprecated(since = "1.19.0", forRemoval = true)
@RequiredArgsConstructor
public class RiskFactorDetailsAssessmentProcessingService {
......
......@@ -13,7 +13,7 @@ import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.stereotype.Service;
@Service
@Deprecated(since = "1.19.0-SNAPSHOT", forRemoval = true)
@Deprecated(since = "1.19.0", forRemoval = true)
@RequiredArgsConstructor
public class RiskIndicatorValueProcessingService {
......
......@@ -10,7 +10,7 @@ import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.stereotype.Service;
@Service
@Deprecated(since = "1.19.0-SNAPSHOT", forRemoval = true)
@Deprecated(since = "1.19.0", forRemoval = true)
@RequiredArgsConstructor
public class RiskStatementAssessmentProcessingService {
......
......@@ -9,7 +9,7 @@ import java.util.List;
import java.util.Set;
@Service
@Deprecated(since = "1.19.0-SNAPSHOT", forRemoval = true)
@Deprecated(since = "1.19.0", forRemoval = true)
@RequiredArgsConstructor
public class RoleProcessingService {
......
......@@ -14,7 +14,7 @@ import org.springframework.stereotype.Service;
import java.util.List;
@Service
@Deprecated(since = "1.19.0-SNAPSHOT", forRemoval = true)
@Deprecated(since = "1.19.0", forRemoval = true)
@RequiredArgsConstructor
public class PrivilegeProcessingService {
......
......@@ -10,7 +10,7 @@ import org.springframework.stereotype.Service;
import java.util.List;
@Service
@Deprecated(since = "1.19.0-SNAPSHOT", forRemoval = true)
@Deprecated(since = "1.19.0", forRemoval = true)
@RequiredArgsConstructor
public class AuthProcessingService {
......
package ee.sm.ti.teis.commongateway.signing;
import ee.sm.ti.teis.commongateway.file.FileMetadataDto;
import ee.sm.ti.teis.commongateway.signing.dto.SignFileDto;
import ee.sm.ti.teis.commongateway.signing.request.SignExistingFileRequest;
import ee.sm.ti.teis.gatewaycommon.controller.TeisBaseController;
import ee.sm.ti.teis.gatewaycommon.rabbit.RequestProcessingService;
......@@ -8,14 +9,13 @@ import ee.sm.ti.teis.servicerequest.RequestMetaDTO;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.context.annotation.Profile;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.UUID;
import static org.apache.commons.lang3.StringUtils.isEmpty;
@Profile({"dev", "test", "local", "integtest"})
@RestController
@RequestMapping("signing")
......@@ -26,10 +26,11 @@ public class SigningTestController extends TeisBaseController {
@ApiOperation(value = "${teis.api.signings.sign-file-by-id}", response = FileMetadataDto.class)
@PostMapping("sign-file/{fileId}")
public FileMetadataDto signFile(@PathVariable("fileId") UUID fileId, RequestMetaDTO requestMetaDTO,
public FileMetadataDto signFile(@PathVariable("fileId") UUID fileId,
@RequestParam(value = "bucket", required = false) String bucket, RequestMetaDTO requestMetaDTO,
HttpServletResponse response) {
SignExistingFileRequest request = new SignExistingFileRequest();
request.setPayload(fileId, requestMetaDTO);
request.setPayload(SignFileDto.builder().fileId(fileId).bucket(isEmpty(bucket) ? "teis" : bucket).build(), requestMetaDTO);
return (FileMetadataDto) service.sendAndReceive(request);
}
......
Markdown is supported
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