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

Merge branch 'develop' into 'master'

Release: merge 'develop' into 'master' created by Enriko Käsper

See merge request teis/common-api-gateway!159
parents c9e931eb dae11b2b
# Changelog # Changelog
## [1.16.0] - 2020-12-14
* added title field into CopyRiskAssessmentDto class
## [1.15.1] - 2020-12-02 ## [1.15.1] - 2020-12-02
* fixed file max size validation in file upload functionality. * fixed file max size validation in file upload functionality.
......
package ee.sm.ti.teis.commongateway.messages.message.dto;
import ee.sm.ti.teis.commongateway.classifier.ClassifierItemLightDto;
import ee.sm.ti.teis.commongateway.file.FileReferenceDto;
import ee.sm.ti.teis.types.enums.AddresseeType;
import ee.sm.ti.teis.types.enums.MessageStatus;
import ee.sm.ti.teis.types.enums.ObjectStatus;
import ee.sm.ti.teis.types.enums.SenderType;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class MessageTestDto {
private UUID id;
private UUID messageDefinitionId;
private AddresseeType addresseeType;
private UUID employerId;
private String reference;
private String teaser;
private String content;
private String path;
private MessageStatus status;
private LocalDateTime sentAt;
private String sentBy;
private SenderType senderType;
private UUID senderId;
private LocalDateTime editedAt;
private String editedBy;
private LocalDateTime emailSentAt;
private LocalDateTime readAt;
private String readBy;
private ClassifierItemLightDto contextType;
private List<MessageDataObjectReferenceDto> messageDataObjectReferences;
@Builder.Default
private List<FileReferenceDto> files = new ArrayList<>();
private ObjectStatus objectStatus;
}
...@@ -2,9 +2,9 @@ package ee.sm.ti.teis.commongateway.messages.message.response; ...@@ -2,9 +2,9 @@ package ee.sm.ti.teis.commongateway.messages.message.response;
import ee.sm.ti.teis.AbstractDTO; import ee.sm.ti.teis.AbstractDTO;
import ee.sm.ti.teis.ErrorDTO; import ee.sm.ti.teis.ErrorDTO;
import ee.sm.ti.teis.commongateway.messages.message.dto.MessageDto; import ee.sm.ti.teis.commongateway.messages.message.dto.MessageTestDto;
public class MessageResponse extends AbstractDTO<MessageDto, ErrorDTO> { public class MessageResponse extends AbstractDTO<MessageTestDto, ErrorDTO> {
public static final String ROUTING_KEY = "api.MessageResponse"; public static final String ROUTING_KEY = "api.MessageResponse";
......
...@@ -6,6 +6,7 @@ import lombok.Builder; ...@@ -6,6 +6,7 @@ import lombok.Builder;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import javax.validation.constraints.NotBlank;
import java.util.List; import java.util.List;
@Data @Data
...@@ -15,6 +16,8 @@ import java.util.List; ...@@ -15,6 +16,8 @@ import java.util.List;
public class CopyRiskAssessmentDto { public class CopyRiskAssessmentDto {
private RiskAssessmentPublicDto riskAssessment; private RiskAssessmentPublicDto riskAssessment;
@NotBlank
private String title;
private List<AssessedBusinessTypePublicDto> assessedBusinessType; private List<AssessedBusinessTypePublicDto> assessedBusinessType;
} }
...@@ -2,6 +2,7 @@ package ee.sm.ti.teis.commongateway.messages.message; ...@@ -2,6 +2,7 @@ package ee.sm.ti.teis.commongateway.messages.message;
import ee.sm.ti.teis.commongateway.file.FileReferenceDto; import ee.sm.ti.teis.commongateway.file.FileReferenceDto;
import ee.sm.ti.teis.commongateway.messages.message.dto.MessageDto; 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.dto.MessageWithEmployerDto; import ee.sm.ti.teis.commongateway.messages.message.dto.MessageWithEmployerDto;
import ee.sm.ti.teis.commongateway.messages.message.request.*; import ee.sm.ti.teis.commongateway.messages.message.request.*;
import ee.sm.ti.teis.commongateway.messages.message.response.*; import ee.sm.ti.teis.commongateway.messages.message.response.*;
...@@ -85,7 +86,7 @@ public class MessageProcessingService { ...@@ -85,7 +86,7 @@ public class MessageProcessingService {
throw new NoResponseFromRabbitException(request.getRequestMetaDTO().getRequestId()); throw new NoResponseFromRabbitException(request.getRequestMetaDTO().getRequestId());
} }
public MessageDto getMessage(MessageRequest request) { public MessageTestDto getMessage(MessageRequest request) {
MessageResponse response = MessageResponse response =
(MessageResponse) gwRabbitTemplate.convertSendAndReceive(request.routingKey(), request); (MessageResponse) gwRabbitTemplate.convertSendAndReceive(request.routingKey(), request);
......
package ee.sm.ti.teis.commongateway.messages.message; package ee.sm.ti.teis.commongateway.messages.message;
import ee.sm.ti.teis.commongateway.messages.message.dto.MessageDto; 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.commongateway.messages.message.request.MessageRequest;
import ee.sm.ti.teis.gatewaycommon.controller.TeisBaseController; import ee.sm.ti.teis.gatewaycommon.controller.TeisBaseController;
import ee.sm.ti.teis.servicerequest.RequestMetaDTO; import ee.sm.ti.teis.servicerequest.RequestMetaDTO;
...@@ -29,7 +30,7 @@ public class MessageTestController extends TeisBaseController { ...@@ -29,7 +30,7 @@ public class MessageTestController extends TeisBaseController {
@ApiResponse(code = 400, message = "Sisendi parameetrid ei vasta nõuetele"), @ApiResponse(code = 400, message = "Sisendi parameetrid ei vasta nõuetele"),
@ApiResponse(code = 404, message = "Sisendis esitatud andmetega objekti ei eksisteeri")}) @ApiResponse(code = 404, message = "Sisendis esitatud andmetega objekti ei eksisteeri")})
@GetMapping(value = "{id}") @GetMapping(value = "{id}")
public MessageDto getMessage(@PathVariable UUID id, RequestMetaDTO requestMetaDTO) { public MessageTestDto getMessage(@PathVariable UUID id, RequestMetaDTO requestMetaDTO) {
MessageRequest request = new MessageRequest(); MessageRequest request = new MessageRequest();
request.setPayload(id, requestMetaDTO); request.setPayload(id, requestMetaDTO);
......
theGroup=ee.sm.ti.teis theGroup=ee.sm.ti.teis
//commonApiGatewayVersion=forSearch ^commonApiGatewayVersion=.*?-SNAPSHOT //commonApiGatewayVersion=forSearch ^commonApiGatewayVersion=.*?-SNAPSHOT
theVersion=1.15.1 theVersion=1.16.0
commonsVersion=1.15.0 commonsVersion=1.16.0
pluginVersion=1.2.0 pluginVersion=1.2.0
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