Commit 1179c8c3 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!153
parents 92c7b2f6 babd1c34
...@@ -8,7 +8,7 @@ stages: ...@@ -8,7 +8,7 @@ stages:
variables: variables:
BUILD_SERVICE_PROJECT_NAME: "common-api-gateway" BUILD_SERVICE_PROJECT_NAME: "common-api-gateway"
BUILD_SERVICE_LIB_PROJECT_NAME: "common-api-gateway-lib" BUILD_SERVICE_LIB_PROJECT_NAME: "common-api-gateway-lib"
USE_POSTGRES: "true" USE_POSTGRES: "false"
USE_RABBIT: "true" USE_RABBIT: "true"
USE_S3: "true" USE_S3: "true"
USE_SSO: "true" USE_SSO: "true"
......
# Changelog
## [1.14.0] - 2020-10-30
* removed Postgres database dependency
* removed Camunda BPMN dependency
* updated Spring Boot framework to version 2.3.4.RELEASE
* replaced springfox-swagger Gradle dependency with springfox-boot-starter version to 3.0.0 which causes @ApiIgnore annotation to be deprecated and removed. New Swagger UI URL is ${HOST}/context-path/swagger-ui/
* updated teis-gradle-plugin version to latest which contains different Gradle dependency configuration sets (functionalities) and therefore Gradle configuration was stripped down from microservice configuration
* updated Gradle Wrapper to version 5.6.4
\ No newline at end of file
...@@ -2,13 +2,10 @@ package ee.sm.ti.teis.commongateway.admin; ...@@ -2,13 +2,10 @@ package ee.sm.ti.teis.commongateway.admin;
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 lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.UUID; import java.util.UUID;
public class ResetMessageEmailRequest extends AbstractDTO<ResetMessageEmailRequest.Parameters, ErrorDTO> { public class ResetMessageEmailRequest extends AbstractDTO<UUID, ErrorDTO> {
public static final String ROUTING_KEY = "api.ResetMessageEmailRequest"; public static final String ROUTING_KEY = "api.ResetMessageEmailRequest";
...@@ -16,11 +13,4 @@ public class ResetMessageEmailRequest extends AbstractDTO<ResetMessageEmailReque ...@@ -16,11 +13,4 @@ public class ResetMessageEmailRequest extends AbstractDTO<ResetMessageEmailReque
public String routingKey() { public String routingKey() {
return ROUTING_KEY; return ROUTING_KEY;
} }
@Data
@AllArgsConstructor
@NoArgsConstructor
public static class Parameters {
private UUID messageId;
}
} }
...@@ -3,7 +3,9 @@ package ee.sm.ti.teis.commongateway.admin; ...@@ -3,7 +3,9 @@ package ee.sm.ti.teis.commongateway.admin;
import ee.sm.ti.teis.AbstractDTO; import ee.sm.ti.teis.AbstractDTO;
import ee.sm.ti.teis.ErrorDTO; import ee.sm.ti.teis.ErrorDTO;
public class ResetMessageEmailResponse extends AbstractDTO<String, ErrorDTO> { import java.util.UUID;
public class ResetMessageEmailResponse extends AbstractDTO<UUID, ErrorDTO> {
public static final String ROUTING_KEY = "api.ResetMessageEmailResponse"; public static final String ROUTING_KEY = "api.ResetMessageEmailResponse";
......
package ee.sm.ti.teis.commongateway.file.request;
import ee.sm.ti.teis.AbstractDTO;
import ee.sm.ti.teis.ErrorDTO;
import ee.sm.ti.teis.commongateway.file.FileReferenceDto;
import static org.springframework.util.StringUtils.isEmpty;
public class FileReferenceContextUpdatePublicRequest extends AbstractDTO<FileReferenceDto, ErrorDTO> {
public static final String ROUTING_KEY = "api.FileReferenceContextUpdatePublicRequest";
private String objectType;
public FileReferenceContextUpdatePublicRequest() {
}
public FileReferenceContextUpdatePublicRequest(String objectType) {
this.objectType = objectType;
}
@Override
public String routingKey() {
if (isEmpty(objectType)) {
return ROUTING_KEY;
}
return ROUTING_KEY.concat(".").concat(objectType.toLowerCase());
}
}
package ee.sm.ti.teis.commongateway.file.response;
import ee.sm.ti.teis.AbstractDTO;
import ee.sm.ti.teis.ErrorDTO;
import ee.sm.ti.teis.commongateway.file.FileReferenceDto;
public class FileReferenceContextUpdatePublicResponse extends AbstractDTO<FileReferenceDto, ErrorDTO> {
public static final String ROUTING_KEY = "api.FileReferenceContextUpdatePublicResponse";
@Override
public String routingKey() {
return ROUTING_KEY;
}
}
package ee.sm.ti.teis.commongateway.messages.message.dto; package ee.sm.ti.teis.commongateway.messages.message.dto;
import ee.sm.ti.teis.commongateway.classifier.ClassifierItemLightDto;
import ee.sm.ti.teis.types.enums.MessageStatus; import ee.sm.ti.teis.types.enums.MessageStatus;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
...@@ -28,6 +29,7 @@ public class CreateMessageDto { ...@@ -28,6 +29,7 @@ public class CreateMessageDto {
private String content; private String content;
@NotNull @NotNull
private MessageStatus status; private MessageStatus status;
private ClassifierItemLightDto contextType;
@Valid @Valid
private List<MessageDataObjectReferenceDto> messageDataObjectReferences; private List<MessageDataObjectReferenceDto> messageDataObjectReferences;
......
package ee.sm.ti.teis.commongateway.messages.message.dto; 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.commongateway.file.FileReferenceDto;
import ee.sm.ti.teis.types.enums.AddresseeType; import ee.sm.ti.teis.types.enums.AddresseeType;
import ee.sm.ti.teis.types.enums.MessageStatus; import ee.sm.ti.teis.types.enums.MessageStatus;
...@@ -40,6 +41,7 @@ public class MessageDto { ...@@ -40,6 +41,7 @@ public class MessageDto {
private LocalDateTime emailSentAt; private LocalDateTime emailSentAt;
private LocalDateTime readAt; private LocalDateTime readAt;
private String readBy; private String readBy;
private ClassifierItemLightDto contextType;
@Builder.Default @Builder.Default
private List<FileReferenceDto> files = new ArrayList<>(); private List<FileReferenceDto> files = new ArrayList<>();
......
package ee.sm.ti.teis.commongateway.messages.message.request;
import ee.sm.ti.teis.AbstractDTO;
import ee.sm.ti.teis.ErrorDTO;
import java.util.UUID;
public class MessageRequest extends AbstractDTO<UUID, ErrorDTO> {
public static final String ROUTING_KEY = "api.MessageRequest";
@Override
public String routingKey() {
return ROUTING_KEY;
}
}
...@@ -8,7 +8,9 @@ import lombok.NoArgsConstructor; ...@@ -8,7 +8,9 @@ import lombok.NoArgsConstructor;
import java.util.UUID; import java.util.UUID;
public class MessagesByAddresseeRequest extends AbstractDTO<MessagesByAddresseeRequest.Parameters, ErrorDTO> { import static ee.sm.ti.teis.commongateway.messages.message.request.MessagesByAddresseeRequest.Parameters;
public class MessagesByAddresseeRequest extends AbstractDTO<Parameters, ErrorDTO> {
public static final String ROUTING_KEY = "api.MessagesByAddresseeRequest"; public static final String ROUTING_KEY = "api.MessagesByAddresseeRequest";
...@@ -23,6 +25,7 @@ public class MessagesByAddresseeRequest extends AbstractDTO<MessagesByAddresseeR ...@@ -23,6 +25,7 @@ public class MessagesByAddresseeRequest extends AbstractDTO<MessagesByAddresseeR
public static class Parameters { public static class Parameters {
private UUID employerId; private UUID employerId;
private UUID officialUserId; private UUID officialUserId;
private String contextType;
} }
} }
...@@ -2,10 +2,15 @@ package ee.sm.ti.teis.commongateway.messages.message.request; ...@@ -2,10 +2,15 @@ package ee.sm.ti.teis.commongateway.messages.message.request;
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 lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.UUID; import java.util.UUID;
public class MessagesRequest extends AbstractDTO<UUID, ErrorDTO> { import static ee.sm.ti.teis.commongateway.messages.message.request.MessagesRequest.Parameters;
public class MessagesRequest extends AbstractDTO<Parameters, ErrorDTO> {
public static final String ROUTING_KEY = "api.MessagesRequest"; public static final String ROUTING_KEY = "api.MessagesRequest";
...@@ -13,4 +18,12 @@ public class MessagesRequest extends AbstractDTO<UUID, ErrorDTO> { ...@@ -13,4 +18,12 @@ public class MessagesRequest extends AbstractDTO<UUID, ErrorDTO> {
public String routingKey() { public String routingKey() {
return ROUTING_KEY; return ROUTING_KEY;
} }
@Data
@AllArgsConstructor
@NoArgsConstructor
public static class Parameters {
private UUID dataObjectId;
private String contextType;
}
} }
package ee.sm.ti.teis.commongateway.messages.message.response;
import ee.sm.ti.teis.AbstractDTO;
import ee.sm.ti.teis.ErrorDTO;
import ee.sm.ti.teis.commongateway.messages.message.dto.MessageDto;
public class MessageResponse extends AbstractDTO<MessageDto, ErrorDTO> {
public static final String ROUTING_KEY = "api.MessageResponse";
@Override
public String routingKey() {
return ROUTING_KEY;
}
}
package ee.sm.ti.teis.commongateway.representative.authority.dto;
import ee.sm.ti.teis.commongateway.person.PersonDto;
import ee.sm.ti.teis.types.enums.AuthorityType;
import ee.sm.ti.teis.types.enums.ObjectStatus;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotNull;
import java.util.UUID;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class AuthorityDto {
@NotNull
private UUID id;
@NotNull
private PersonDto person;
@NotNull
private AuthorityType authorityType;
@NotNull
private ObjectStatus objectStatus;
}
package ee.sm.ti.teis.commongateway.representative.authority.request;
import ee.sm.ti.teis.AbstractDTO;
import ee.sm.ti.teis.ErrorDTO;
public class AuthoritiesRequest extends AbstractDTO<Boolean, ErrorDTO> {
public static final String ROUTING_KEY = "api.AuthoritiesRequest";
@Override
public String routingKey() {
return ROUTING_KEY;
}
}
package ee.sm.ti.teis.commongateway.representative.authority.response;
import ee.sm.ti.teis.AbstractDTO;
import ee.sm.ti.teis.ErrorDTO;
import ee.sm.ti.teis.commongateway.representative.authority.dto.AuthorityDto;
import java.util.List;
public class AuthoritiesResponse extends AbstractDTO<List<AuthorityDto>, ErrorDTO> {
public static final String ROUTING_KEY = "api.AuthoritiesResponse";
@Override
public String routingKey() {
return ROUTING_KEY;
}
}
package ee.sm.ti.teis.commongateway.representative.authoritypermission.dto;
import ee.sm.ti.teis.commongateway.representative.authority.dto.AuthorityDto;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class AuthorityPermissionAuthorityDto {
private AuthorityDto authority;
private List<AuthorityPermissionLightDto> authorityPermissions;
}
package ee.sm.ti.teis.commongateway.representative.authoritypermission.dto;
import ee.sm.ti.teis.commongateway.person.PersonDto;
import ee.sm.ti.teis.commongateway.representative.authority.dto.AuthorityDto;
import ee.sm.ti.teis.types.enums.ObjectStatus;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotNull;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.UUID;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class AuthorityPermissionDto {
@NotNull
private UUID id;
@NotNull
private PersonDto grantor;
@NotNull
private AuthorityDto authority;
@NotNull
private LocalDateTime grantedAt;
private LocalDate validUntil;
@NotNull
private ObjectStatus objectStatus;
}
package ee.sm.ti.teis.commongateway.representative.authoritypermission.dto;
import ee.sm.ti.teis.commongateway.person.PersonDto;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotNull;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.UUID;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class AuthorityPermissionLightDto {
@NotNull
private UUID id;
@NotNull
private PersonDto grantor;
@NotNull
private UUID authorityId;
@NotNull
private LocalDateTime grantedAt;
private LocalDate validUntil;
}
package ee.sm.ti.teis.commongateway.representative.authoritypermission.dto;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotNull;
import java.time.LocalDate;
import java.util.UUID;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class CreateAuthorityPermissionDto {
@NotNull
private UUID grantorId;
@NotNull
private UUID authorityId;
private LocalDate validUntil;
}
package ee.sm.ti.teis.commongateway.representative.authoritypermission.dto;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.time.LocalDate;
import java.util.UUID;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class UpdateAuthorityPermissionValidUntilDto {
private UUID id;
private LocalDate validUntil;
}
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