diff --git a/src/main/java/org/tkit/onecx/product/store/domain/models/Microservice.java b/src/main/java/org/tkit/onecx/product/store/domain/models/Microservice.java index 68ba473..cf24b6b 100644 --- a/src/main/java/org/tkit/onecx/product/store/domain/models/Microservice.java +++ b/src/main/java/org/tkit/onecx/product/store/domain/models/Microservice.java @@ -36,4 +36,7 @@ public class Microservice extends TraceableEntity { @Column(name = "PRODUCT_NAME") private String productName; + @Column(name = "OPERATOR", nullable = false) + private boolean operator; + } diff --git a/src/main/java/org/tkit/onecx/product/store/rs/internal/mappers/MicroserviceMapper.java b/src/main/java/org/tkit/onecx/product/store/rs/internal/mappers/MicroserviceMapper.java index a904c30..381ebf1 100644 --- a/src/main/java/org/tkit/onecx/product/store/rs/internal/mappers/MicroserviceMapper.java +++ b/src/main/java/org/tkit/onecx/product/store/rs/internal/mappers/MicroserviceMapper.java @@ -19,6 +19,7 @@ public interface MicroserviceMapper { @Mapping(target = "creationUser", ignore = true) @Mapping(target = "creationDate", ignore = true) @Mapping(target = "controlTraceabilityManual", ignore = true) + @Mapping(target = "operator", constant = "false") Microservice create(CreateMicroserviceRequestDTO dto); @Mapping(target = "persisted", ignore = true) @@ -29,6 +30,7 @@ public interface MicroserviceMapper { @Mapping(target = "creationUser", ignore = true) @Mapping(target = "creationDate", ignore = true) @Mapping(target = "controlTraceabilityManual", ignore = true) + @Mapping(target = "operator", constant = "false") void update(UpdateMicroserviceRequestDTO dto, @MappingTarget Microservice data); MicroserviceSearchCriteria map(MicroserviceSearchCriteriaDTO dto); diff --git a/src/main/java/org/tkit/onecx/product/store/rs/operator/ms/v1/mappers/OperatorMsMapperV1.java b/src/main/java/org/tkit/onecx/product/store/rs/operator/ms/v1/mappers/OperatorMsMapperV1.java index 9155f0f..9a9a0a5 100644 --- a/src/main/java/org/tkit/onecx/product/store/rs/operator/ms/v1/mappers/OperatorMsMapperV1.java +++ b/src/main/java/org/tkit/onecx/product/store/rs/operator/ms/v1/mappers/OperatorMsMapperV1.java @@ -20,6 +20,7 @@ public interface OperatorMsMapperV1 { @Mapping(target = "creationUser", ignore = true) @Mapping(target = "creationDate", ignore = true) @Mapping(target = "controlTraceabilityManual", ignore = true) + @Mapping(target = "operator", constant = "true") @Mapping(target = "appId", ignore = true) Microservice create(UpdateMsRequestMsDTOv1 dto); @@ -32,6 +33,7 @@ public interface OperatorMsMapperV1 { @Mapping(target = "creationUser", ignore = true) @Mapping(target = "creationDate", ignore = true) @Mapping(target = "controlTraceabilityManual", ignore = true) + @Mapping(target = "operator", constant = "true") @Mapping(target = "appId", ignore = true) void update(@MappingTarget Microservice ms, UpdateMsRequestMsDTOv1 dto); } diff --git a/src/main/openapi/onecx-product-store-internal.yaml b/src/main/openapi/onecx-product-store-internal.yaml index 6f16f10..ebff938 100644 --- a/src/main/openapi/onecx-product-store-internal.yaml +++ b/src/main/openapi/onecx-product-store-internal.yaml @@ -692,6 +692,8 @@ components: type: string description: type: string + iconName: + type: string technology: type: string remoteBaseUrl: @@ -741,6 +743,8 @@ components: type: string productName: type: string + operator: + type: boolean MicrofrontendSearchCriteria: type: object properties: @@ -1005,6 +1009,8 @@ components: type: string productName: type: string + operator: + type: boolean UIEndpoint: required: - path diff --git a/src/main/resources/db/changeLog.xml b/src/main/resources/db/changeLog.xml index 5eb5a3e..70efd6d 100644 --- a/src/main/resources/db/changeLog.xml +++ b/src/main/resources/db/changeLog.xml @@ -7,4 +7,5 @@ + \ No newline at end of file diff --git a/src/main/resources/db/v1/2024-02-22-ms-operator-field.xml b/src/main/resources/db/v1/2024-02-22-ms-operator-field.xml new file mode 100644 index 0000000..ac2facf --- /dev/null +++ b/src/main/resources/db/v1/2024-02-22-ms-operator-field.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/resources/data/test-internal.xml b/src/test/resources/data/test-internal.xml index 218649b..058a8f6 100644 --- a/src/test/resources/data/test-internal.xml +++ b/src/test/resources/data/test-internal.xml @@ -15,9 +15,9 @@ operator="false" optlock="0" app_version="1.0.0" contact="developers@1000kit.org" description="some text" icon_name="sun" note="some notes" technology="Angular" creationDate="2024-01-11 12:21:38.914993" modificationDate="2024-01-11 12:21:38.914993" classification="searching"/> - - - + + + diff --git a/src/test/resources/data/test-operator-ms.xml b/src/test/resources/data/test-operator-ms.xml index 2c7629a..08aa9ab 100644 --- a/src/test/resources/data/test-operator-ms.xml +++ b/src/test/resources/data/test-operator-ms.xml @@ -3,8 +3,8 @@ + operator="false"/> + operator="false"/> \ No newline at end of file diff --git a/src/test/resources/data/test-v1.xml b/src/test/resources/data/test-v1.xml index a8dac0b..3dff22f 100644 --- a/src/test/resources/data/test-v1.xml +++ b/src/test/resources/data/test-v1.xml @@ -6,8 +6,8 @@ - - + +