Skip to content

Commit

Permalink
feat: added operator to ms and icon in mfe api (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
JordenReuter authored Feb 22, 2024
1 parent 2a06819 commit fe8814a
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,7 @@ public class Microservice extends TraceableEntity {
@Column(name = "PRODUCT_NAME")
private String productName;

@Column(name = "OPERATOR", nullable = false)
private boolean operator;

}
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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);
}
6 changes: 6 additions & 0 deletions src/main/openapi/onecx-product-store-internal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,8 @@ components:
type: string
description:
type: string
iconName:
type: string
technology:
type: string
remoteBaseUrl:
Expand Down Expand Up @@ -741,6 +743,8 @@ components:
type: string
productName:
type: string
operator:
type: boolean
MicrofrontendSearchCriteria:
type: object
properties:
Expand Down Expand Up @@ -1005,6 +1009,8 @@ components:
type: string
productName:
type: string
operator:
type: boolean
UIEndpoint:
required:
- path
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/db/changeLog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
<include relativeToChangelogFile="true" file="v1/2024-02-01-mfe-attrs.xml"/>
<include relativeToChangelogFile="true" file="v1/2023-12-07-create-tables-image.xml"/>
<include relativeToChangelogFile="true" file="v1/2024-02-19-create-ms-table.xml"/>
<include relativeToChangelogFile="true" file="v1/2024-02-22-ms-operator-field.xml"/>
</databaseChangeLog>
15 changes: 15 additions & 0 deletions src/main/resources/db/v1/2024-02-22-ms-operator-field.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd"
objectQuotingStrategy="QUOTE_ONLY_RESERVED_WORDS">

<changeSet author="dev (generated)" id="1706808517706-9">
<addColumn tableName="microservice">
<column name="operator" type="BOOLEAN">
<constraints nullable="false"/>
</column>
</addColumn>
</changeSet>
</databaseChangeLog>
6 changes: 3 additions & 3 deletions src/test/resources/data/test-internal.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
operator="false" optlock="0" app_version="1.0.0" contact="[email protected]" 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"/>

<MICROSERVICE guid="m1" app_id="ms1" product_name="product1" name="coolname" optlock="0" version="1.0.0"/>
<MICROSERVICE guid="m2" app_id="ms2" product_name="product2" optlock="0"/>
<MICROSERVICE guid="ms1" app_id="msOne" product_name="productOne" name="displayname-1" optlock="0" version="1.0.0" description="some text" creationDate="2024-01-11 12:21:38.914993" modificationDate="2024-01-11 12:21:38.914993" />
<MICROSERVICE guid="m1" app_id="ms1" product_name="product1" name="coolname" optlock="0" version="1.0.0" operator="false"/>
<MICROSERVICE guid="m2" app_id="ms2" product_name="product2" optlock="0" operator="false"/>
<MICROSERVICE guid="ms1" app_id="msOne" product_name="productOne" name="displayname-1" optlock="0" version="1.0.0" description="some text" creationDate="2024-01-11 12:21:38.914993" modificationDate="2024-01-11 12:21:38.914993" operator="false"/>

<UI_ENDPOINT guid="ui1" microfrontend_id="m1" name="e1" path="p1" />
<UI_ENDPOINT guid="ui2" microfrontend_id="m1" name="e2" path="p2" />
Expand Down
4 changes: 2 additions & 2 deletions src/test/resources/data/test-operator-ms.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

<MICROSERVICE guid="m1" app_id="ms1" product_name="p1" name="display_name1" optlock="0"
version="1.0.0" description="some text" creationDate="2024-01-11 12:21:38.914993" modificationDate="2024-01-11 12:21:38.914993"
/>
operator="false"/>

<MICROSERVICE guid="m2" app_id="ms2" product_name="p2" name="display_name2" optlock="0" version="1.0.0" description="some text" creationDate="2024-01-11 12:21:38.914993" modificationDate="2024-01-11 12:21:38.914993"
/>
operator="false"/>
</dataset>
4 changes: 2 additions & 2 deletions src/test/resources/data/test-v1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<MICROFRONTEND guid="m1" app_id="mfe1" product_name="product1" remote_entry="remote-entry1" exposed_module="exposed-module1" app_name="display_name1" remote_base_url="remote_base_url1" operator="false" optlock="0"/>
<MICROFRONTEND guid="m2" app_id="mfe2" product_name="product1" remote_entry="remote-entry2" exposed_module="exposed-module2" app_name="display_name2" remote_base_url="remote_base_url2" operator="false" optlock="0"/>

<MICROSERVICE guid="m1" app_id="mfe1" product_name="product1" optlock="0"/>
<MICROSERVICE guid="m2" app_id="mfe2" product_name="product1" optlock="0"/>
<MICROSERVICE guid="m1" app_id="mfe1" product_name="product1" optlock="0" operator="false"/>
<MICROSERVICE guid="m2" app_id="mfe2" product_name="product1" optlock="0" operator="false"/>

<UI_ENDPOINT guid="ui1" microfrontend_id="m1" name="e1" path="p1" />
<UI_ENDPOINT guid="ui2" microfrontend_id="m1" name="e2" path="p2" />
Expand Down

0 comments on commit fe8814a

Please sign in to comment.