diff --git a/.github/workflows/docker-image-branch_frontend.yml b/.github/workflows/docker-image-branch_frontend.yml index d19c6e476f..5b77883b4d 100644 --- a/.github/workflows/docker-image-branch_frontend.yml +++ b/.github/workflows/docker-image-branch_frontend.yml @@ -55,7 +55,7 @@ jobs: env: DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} if: env.DOCKER_HUB_USER == '' - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: frontend push: true @@ -74,7 +74,7 @@ jobs: env: DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} if: env.DOCKER_HUB_USER != '' - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: frontend push: true diff --git a/.github/workflows/docker-image-main_backend.yml b/.github/workflows/docker-image-main_backend.yml index 486bc8c7f8..b54bc9b64c 100644 --- a/.github/workflows/docker-image-main_backend.yml +++ b/.github/workflows/docker-image-main_backend.yml @@ -61,7 +61,7 @@ jobs: env: DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} if: env.DOCKER_HUB_USER == '' - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . push: true @@ -80,7 +80,7 @@ jobs: env: DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} if: env.DOCKER_HUB_USER != '' - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . push: true diff --git a/.github/workflows/docker-image-main_frontend.yml b/.github/workflows/docker-image-main_frontend.yml index 054e6edb03..02e016740f 100644 --- a/.github/workflows/docker-image-main_frontend.yml +++ b/.github/workflows/docker-image-main_frontend.yml @@ -56,7 +56,7 @@ jobs: env: DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} if: env.DOCKER_HUB_USER == '' - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: frontend push: true @@ -75,7 +75,7 @@ jobs: env: DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} if: env.DOCKER_HUB_USER != '' - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: frontend push: true diff --git a/.github/workflows/docker-image-tag-release.yaml b/.github/workflows/docker-image-tag-release.yaml index 0bff05b2b6..2ec4ad918a 100644 --- a/.github/workflows/docker-image-tag-release.yaml +++ b/.github/workflows/docker-image-tag-release.yaml @@ -59,7 +59,7 @@ jobs: env: DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} if: env.DOCKER_HUB_USER == '' - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: frontend push: true @@ -78,7 +78,7 @@ jobs: env: DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} if: env.DOCKER_HUB_USER != '' - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: frontend push: true @@ -133,7 +133,7 @@ jobs: env: DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} if: env.DOCKER_HUB_USER == '' - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . push: true @@ -152,7 +152,7 @@ jobs: env: DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} if: env.DOCKER_HUB_USER != '' - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . push: true diff --git a/.github/workflows/helm-test.yaml b/.github/workflows/helm-test.yaml index df00ee8c42..950748c519 100644 --- a/.github/workflows/helm-test.yaml +++ b/.github/workflows/helm-test.yaml @@ -52,14 +52,14 @@ jobs: version: v0.20.0 - name: Build & push Image App to KinD - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . push: true tags: ${{ env.REGISTRY }}/${{ env.APP_NAME}}:${{ env.TAG }} - name: Build & push Image Frontend to KinD - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: ./frontend push: true diff --git a/.github/workflows/pull-request_backend.yml b/.github/workflows/pull-request_backend.yml index 34a25850c4..dfe6060961 100644 --- a/.github/workflows/pull-request_backend.yml +++ b/.github/workflows/pull-request_backend.yml @@ -101,7 +101,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build & Push docker image for GHCR ${{ env.GHCR_REGISTRY }}/${{ github.repository }}:${{ github.event.pull_request.head.sha }} - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . push: true diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 757f053022..8d43eb8fb8 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -17,42 +17,42 @@ jobs: run: echo HELM_VERSION=$(cat charts/traceability-foss/CHANGELOG.md | sed -n 's/.*\[\([0-9]\+\.[0-9]\+\.[0-9]\+\)\].*/\1/p' | head -n 1) >> $GITHUB_ENV - name: Update Chart.yaml appVersion - uses: mikefarah/yq@v4.35.1 + uses: mikefarah/yq@v4.35.2 with: cmd: yq -i eval '.appVersion = "${{ github.ref_name }}"' charts/traceability-foss/Chart.yaml - name: Update Chart.yaml version - uses: mikefarah/yq@v4.35.1 + uses: mikefarah/yq@v4.35.2 with: cmd: yq -i eval '.version = "${{ env.HELM_VERSION }}"' charts/traceability-foss/Chart.yaml - name: Update frontend dependency version in Chart.yaml - uses: mikefarah/yq@v4.35.1 + uses: mikefarah/yq@v4.35.2 with: cmd: yq -i eval '.dependencies[0].version = "${{ env.HELM_VERSION }}"' charts/traceability-foss/Chart.yaml - name: Update backend dependency version in Chart.yaml - uses: mikefarah/yq@v4.35.1 + uses: mikefarah/yq@v4.35.2 with: cmd: yq -i eval '.dependencies[1].version = "${{ env.HELM_VERSION }}"' charts/traceability-foss/Chart.yaml - name: Update frontend version in frontend/Chart.yaml - uses: mikefarah/yq@v4.35.1 + uses: mikefarah/yq@v4.35.2 with: cmd: yq -i eval '.version = "${{ env.HELM_VERSION }}"' charts/traceability-foss/charts/frontend/Chart.yaml - name: Update frontend appVersion in frontend/Chart.yaml - uses: mikefarah/yq@v4.35.1 + uses: mikefarah/yq@v4.35.2 with: cmd: yq -i eval '.appVersion = "${{ github.ref_name }}"' charts/traceability-foss/charts/frontend/Chart.yaml - name: Update backend version in backend/Chart.yaml - uses: mikefarah/yq@v4.35.1 + uses: mikefarah/yq@v4.35.2 with: cmd: yq -i eval '.version = "${{ env.HELM_VERSION }}"' charts/traceability-foss/charts/backend/Chart.yaml - name: Update backend appVersion in frontend/Chart.yaml - uses: mikefarah/yq@v4.35.1 + uses: mikefarah/yq@v4.35.2 with: cmd: yq -i eval '.appVersion = "${{ github.ref_name }}"' charts/traceability-foss/charts/backend/Chart.yaml diff --git a/.github/workflows/trivy.yml b/.github/workflows/trivy.yml index 617b4e6afc..599bf66f90 100644 --- a/.github/workflows/trivy.yml +++ b/.github/workflows/trivy.yml @@ -170,7 +170,7 @@ jobs: cache: 'maven' - name: Locally build docker image - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . push: false diff --git a/CHANGELOG.md b/CHANGELOG.md index 27b8efba39..f03b292c2a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,15 +20,22 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Added global search field to other parts - Added possiblity to provide multiple semanticDataModels in filter - Added two new columns for amount of open Notifications per part in part views (asBuilt) +- Added test dependencies to dash ip check ### Changed - updated IRS helm chart from 6.6.1 to 6.7.2 - Updated policy related logic to reflect IRS changes - +- Moved response handling from the backend folder to the model folder, addressing a TODO item. +- replaced StartQualityAlertRequest with StartQualityNotification +- updated mikefarah/yq from 4.35.1 to 4.35.2 +- updated maven-site-plugin from 4.0.0-M5 to 4.0.0-M9 +- updated testcontainer-postgresql from 1.17.6 to 1.19.0 +- updated docker/build-push-action from 4 to 5 - Updated user manual to reflect current state of the part views ### Removed - Owner filter and replaced it with the new filter query param +- Removed profile based feature flag for investigations / alerts ## [7.1.0 - 29.09.2023] ### Added diff --git a/DEPENDENCIES_BACKEND b/DEPENDENCIES_BACKEND index 0f9cf5bc85..a475cbed37 100644 --- a/DEPENDENCIES_BACKEND +++ b/DEPENDENCIES_BACKEND @@ -14,24 +14,54 @@ maven/mavencentral/com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/2.15 maven/mavencentral/com.fasterxml.jackson.datatype/jackson-datatype-jakarta-jsonp/2.15.2, Apache-2.0, approved, #9179 maven/mavencentral/com.fasterxml.jackson.datatype/jackson-datatype-jdk8/2.15.2, Apache-2.0, approved, #8808 maven/mavencentral/com.fasterxml.jackson.datatype/jackson-datatype-jsr310/2.15.2, Apache-2.0, approved, #7930 +maven/mavencentral/com.fasterxml.jackson.module/jackson-module-jakarta-xmlbind-annotations/2.14.1, Apache-2.0, approved, #5308 +maven/mavencentral/com.fasterxml.jackson.module/jackson-module-jakarta-xmlbind-annotations/2.15.2, Apache-2.0, approved, #9241 maven/mavencentral/com.fasterxml.jackson.module/jackson-module-parameter-names/2.15.2, Apache-2.0, approved, #8803 maven/mavencentral/com.fasterxml/classmate/1.5.1, Apache-2.0, approved, clearlydefined +maven/mavencentral/com.github.docker-java/docker-java-api/3.3.0, Apache-2.0, approved, #10346 +maven/mavencentral/com.github.docker-java/docker-java-transport-zerodep/3.3.0, Apache-2.0 AND (Apache-2.0 AND BSD-3-Clause), approved, #7946 +maven/mavencentral/com.github.docker-java/docker-java-transport/3.3.0, Apache-2.0, approved, #7942 maven/mavencentral/com.github.scribejava/scribejava-core/8.3.3, MIT, approved, #4703 maven/mavencentral/com.github.scribejava/scribejava-java8/8.3.3, MIT, approved, #4706 maven/mavencentral/com.github.stephenc.jcip/jcip-annotations/1.0-1, Apache-2.0, approved, CQ21949 maven/mavencentral/com.google.code.findbugs/jsr305/3.0.2, Apache-2.0, approved, #20 +maven/mavencentral/com.jayway.jsonpath/json-path/2.8.0, Apache-2.0, approved, clearlydefined maven/mavencentral/com.nimbusds/content-type/2.2, Apache-2.0, approved, clearlydefined maven/mavencentral/com.nimbusds/lang-tag/1.7, Apache-2.0, approved, clearlydefined maven/mavencentral/com.nimbusds/nimbus-jose-jwt/9.31, Apache-2.0, approved, clearlydefined maven/mavencentral/com.nimbusds/oauth2-oidc-sdk/9.43.3, Apache-2.0, approved, clearlydefined +maven/mavencentral/com.squareup.okhttp3/okhttp-dnsoverhttps/4.10.0, Apache-2.0, approved, clearlydefined +maven/mavencentral/com.squareup.okhttp3/okhttp-dnsoverhttps/4.11.0, Apache-2.0, approved, clearlydefined maven/mavencentral/com.squareup.okhttp3/okhttp/4.10.0, Apache-2.0 AND MPL-2.0, approved, #3057 maven/mavencentral/com.squareup.okio/okio-jvm/3.0.0, Apache-2.0, approved, clearlydefined +maven/mavencentral/com.sun.istack/istack-commons-runtime/4.1.1, BSD-3-Clause, approved, #2590 +maven/mavencentral/com.sun.istack/istack-commons-runtime/4.1.2, BSD-3-Clause, approved, #2590 +maven/mavencentral/com.tngtech.archunit/archunit/1.1.0, Apache-2.0, approved, #11048 +maven/mavencentral/com.vaadin.external.google/android-json/0.0.20131108.vaadin1, Apache-2.0, approved, CQ21310 +maven/mavencentral/com.xebialabs.restito/restito/1.1.0, MIT, approved, clearlydefined maven/mavencentral/com.zaxxer/HikariCP/5.0.1, Apache-2.0, approved, clearlydefined +maven/mavencentral/commons-codec/commons-codec/1.11, Apache-2.0 AND BSD-3-Clause, approved, CQ15971 +maven/mavencentral/commons-codec/commons-codec/1.15, Apache-2.0 AND BSD-3-Clause AND LicenseRef-Public-Domain, approved, CQ22641 maven/mavencentral/commons-fileupload/commons-fileupload/1.5, Apache-2.0, approved, #7109 maven/mavencentral/commons-io/commons-io/2.13.0, Apache-2.0, approved, #8717 maven/mavencentral/commons-logging/commons-logging/1.2, Apache-2.0, approved, CQ10162 maven/mavencentral/dev.failsafe/failsafe-okhttp/3.3.2, Apache-2.0, approved, #9178 maven/mavencentral/dev.failsafe/failsafe/3.3.2, Apache-2.0, approved, #9268 +maven/mavencentral/io.cucumber/ci-environment/9.2.0, MIT, approved, clearlydefined +maven/mavencentral/io.cucumber/cucumber-core/7.12.1, MIT AND (Apache-2.0 AND MIT), approved, #11050 +maven/mavencentral/io.cucumber/cucumber-expressions/16.1.2, MIT, approved, clearlydefined +maven/mavencentral/io.cucumber/cucumber-gherkin-messages/7.12.1, None, restricted, #11045 +maven/mavencentral/io.cucumber/cucumber-gherkin/7.12.1, MIT, approved, clearlydefined +maven/mavencentral/io.cucumber/cucumber-java/7.12.1, MIT, approved, clearlydefined +maven/mavencentral/io.cucumber/cucumber-junit-platform-engine/7.12.1, None, restricted, #11046 +maven/mavencentral/io.cucumber/cucumber-plugin/7.12.1, MIT, approved, clearlydefined +maven/mavencentral/io.cucumber/datatable/7.12.1, None, restricted, #11047 +maven/mavencentral/io.cucumber/docstring/7.12.1, MIT, approved, clearlydefined +maven/mavencentral/io.cucumber/gherkin/26.2.0, MIT, approved, clearlydefined +maven/mavencentral/io.cucumber/html-formatter/20.3.1, MIT, approved, clearlydefined +maven/mavencentral/io.cucumber/junit-xml-formatter/0.2.0, None, restricted, #11043 +maven/mavencentral/io.cucumber/messages/22.0.0, MIT, approved, clearlydefined +maven/mavencentral/io.cucumber/tag-expressions/5.0.1, MIT, approved, clearlydefined maven/mavencentral/io.github.classgraph/classgraph/4.8.149, MIT, approved, CQ22530 maven/mavencentral/io.github.openfeign.form/feign-form-spring/3.8.0, Apache-2.0, approved, clearlydefined maven/mavencentral/io.github.openfeign.form/feign-form/3.8.0, Apache-2.0, approved, clearlydefined @@ -45,6 +75,8 @@ maven/mavencentral/io.github.resilience4j/resilience4j-bulkhead/2.0.2, Apache-2. maven/mavencentral/io.github.resilience4j/resilience4j-bulkhead/2.1.0, Apache-2.0, approved, #10172 maven/mavencentral/io.github.resilience4j/resilience4j-circuitbreaker/2.0.2, Apache-2.0, approved, clearlydefined maven/mavencentral/io.github.resilience4j/resilience4j-circuitbreaker/2.1.0, Apache-2.0, approved, #10170 +maven/mavencentral/io.github.resilience4j/resilience4j-circularbuffer/2.0.2, Apache-2.0, approved, clearlydefined +maven/mavencentral/io.github.resilience4j/resilience4j-circularbuffer/2.1.0, Apache-2.0, approved, clearlydefined maven/mavencentral/io.github.resilience4j/resilience4j-consumer/2.0.2, Apache-2.0, approved, clearlydefined maven/mavencentral/io.github.resilience4j/resilience4j-consumer/2.1.0, Apache-2.0, approved, #10165 maven/mavencentral/io.github.resilience4j/resilience4j-core/2.0.2, Apache-2.0, approved, clearlydefined @@ -52,6 +84,8 @@ maven/mavencentral/io.github.resilience4j/resilience4j-core/2.1.0, Apache-2.0, a maven/mavencentral/io.github.resilience4j/resilience4j-feign/2.1.0, Apache-2.0, approved, clearlydefined maven/mavencentral/io.github.resilience4j/resilience4j-framework-common/2.0.2, Apache-2.0, approved, clearlydefined maven/mavencentral/io.github.resilience4j/resilience4j-framework-common/2.1.0, Apache-2.0, approved, clearlydefined +maven/mavencentral/io.github.resilience4j/resilience4j-micrometer/2.0.2, Apache-2.0, approved, clearlydefined +maven/mavencentral/io.github.resilience4j/resilience4j-micrometer/2.1.0, Apache-2.0, approved, #10916 maven/mavencentral/io.github.resilience4j/resilience4j-ratelimiter/2.0.2, Apache-2.0, approved, clearlydefined maven/mavencentral/io.github.resilience4j/resilience4j-ratelimiter/2.1.0, Apache-2.0, approved, #10168 maven/mavencentral/io.github.resilience4j/resilience4j-retry/2.1.0, Apache-2.0, approved, clearlydefined @@ -63,6 +97,18 @@ maven/mavencentral/io.github.resilience4j/resilience4j-timelimiter/2.1.0, Apache maven/mavencentral/io.micrometer/micrometer-commons/1.11.3, Apache-2.0 AND (Apache-2.0 AND MIT), approved, #9243 maven/mavencentral/io.micrometer/micrometer-core/1.11.3, Apache-2.0 AND (Apache-2.0 AND MIT), approved, #9238 maven/mavencentral/io.micrometer/micrometer-observation/1.11.3, Apache-2.0, approved, #9242 +maven/mavencentral/io.opentelemetry/opentelemetry-api/1.25.0, Apache-2.0, approved, clearlydefined +maven/mavencentral/io.opentelemetry/opentelemetry-api/1.27.0, Apache-2.0, approved, clearlydefined +maven/mavencentral/io.opentelemetry/opentelemetry-context/1.25.0, Apache-2.0, approved, clearlydefined +maven/mavencentral/io.opentelemetry/opentelemetry-context/1.27.0, Apache-2.0, approved, clearlydefined +maven/mavencentral/io.rest-assured/json-path/5.3.1, Apache-2.0, approved, #9261 +maven/mavencentral/io.rest-assured/json-path/5.3.2, Apache-2.0, approved, #9261 +maven/mavencentral/io.rest-assured/rest-assured-common/5.3.1, Apache-2.0, approved, #9264 +maven/mavencentral/io.rest-assured/rest-assured-common/5.3.2, Apache-2.0, approved, #9264 +maven/mavencentral/io.rest-assured/rest-assured/5.3.2, Apache-2.0, approved, #9262 +maven/mavencentral/io.rest-assured/xml-path/5.3.1, Apache-2.0, approved, #9267 +maven/mavencentral/io.rest-assured/xml-path/5.3.2, Apache-2.0, approved, #9267 +maven/mavencentral/io.smallrye/jandex/3.0.5, Apache-2.0, approved, clearlydefined maven/mavencentral/io.swagger.core.v3/swagger-annotations-jakarta/2.2.8, Apache-2.0, approved, #5947 maven/mavencentral/io.swagger.core.v3/swagger-core-jakarta/2.2.8, Apache-2.0, approved, #5929 maven/mavencentral/io.swagger.core.v3/swagger-models-jakarta/2.2.8, Apache-2.0, approved, #5919 @@ -71,6 +117,7 @@ maven/mavencentral/io.swagger/swagger-annotations/1.6.11, Apache-2.0, approved, maven/mavencentral/jakarta.activation/jakarta.activation-api/2.1.0, EPL-2.0 OR BSD-3-Clause OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jaf maven/mavencentral/jakarta.activation/jakarta.activation-api/2.1.2, EPL-2.0 OR BSD-3-Clause OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jaf maven/mavencentral/jakarta.annotation/jakarta.annotation-api/2.1.1, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.ca +maven/mavencentral/jakarta.inject/jakarta.inject-api/2.0.1, Apache-2.0, approved, clearlydefined maven/mavencentral/jakarta.json/jakarta.json-api/2.1.1, EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0, approved, #7907 maven/mavencentral/jakarta.json/jakarta.json-api/2.1.2, EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0, approved, #7907 maven/mavencentral/jakarta.persistence/jakarta.persistence-api/3.1.0, EPL-2.0 OR BSD-3-Clause AND (EPL-2.0 OR BSD-3-Clause AND BSD-3-Clause), approved, #7696 @@ -78,26 +125,60 @@ maven/mavencentral/jakarta.transaction/jakarta.transaction-api/2.0.1, EPL-2.0 OR maven/mavencentral/jakarta.validation/jakarta.validation-api/3.0.2, Apache-2.0, approved, ee4j.validation maven/mavencentral/jakarta.ws.rs/jakarta.ws.rs-api/3.1.0, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.rest maven/mavencentral/jakarta.xml.bind/jakarta.xml.bind-api/4.0.0, BSD-3-Clause, approved, ee4j.jaxb +maven/mavencentral/junit/junit/4.13.2, EPL-2.0, approved, CQ23636 +maven/mavencentral/net.bytebuddy/byte-buddy-agent/1.14.6, Apache-2.0, approved, #7164 +maven/mavencentral/net.bytebuddy/byte-buddy/1.12.21, Apache-2.0 AND BSD-3-Clause, approved, #1811 +maven/mavencentral/net.bytebuddy/byte-buddy/1.14.6, Apache-2.0 AND BSD-3-Clause, approved, #7163 +maven/mavencentral/net.java.dev.jna/jna/5.12.1, Apache-2.0 OR LGPL-2.1-or-later, approved, #3217 +maven/mavencentral/net.javacrumbs.json-unit/json-unit-assertj/2.38.0, Apache-2.0, approved, clearlydefined +maven/mavencentral/net.javacrumbs.json-unit/json-unit-core/2.38.0, Apache-2.0, approved, clearlydefined +maven/mavencentral/net.javacrumbs.json-unit/json-unit-json-path/2.38.0, Apache-2.0, approved, #11049 maven/mavencentral/net.javacrumbs.shedlock/shedlock-core/5.7.0, Apache-2.0, approved, #10582 maven/mavencentral/net.javacrumbs.shedlock/shedlock-provider-jdbc-template/5.7.0, Apache-2.0, approved, #10584 maven/mavencentral/net.javacrumbs.shedlock/shedlock-spring/5.7.0, Apache-2.0, approved, #10583 +maven/mavencentral/net.minidev/accessors-smart/2.4.11, Apache-2.0, approved, #7515 maven/mavencentral/net.minidev/accessors-smart/2.4.9, Apache-2.0, approved, #7515 maven/mavencentral/net.minidev/json-smart/2.4.10, Apache-2.0, approved, #3288 +maven/mavencentral/net.minidev/json-smart/2.4.11, Apache-2.0, approved, #3288 maven/mavencentral/org.antlr/antlr4-runtime/4.10.1, BSD-3-Clause AND LicenseRef-Public-domain AND MIT AND LicenseRef-Unicode-TOU, approved, #7065 maven/mavencentral/org.apache.commons/commons-collections4/4.4, Apache-2.0, approved, clearlydefined +maven/mavencentral/org.apache.commons/commons-compress/1.23.0, Apache-2.0 AND BSD-3-Clause, approved, #7506 maven/mavencentral/org.apache.commons/commons-lang3/3.11, Apache-2.0, approved, CQ22642 maven/mavencentral/org.apache.commons/commons-lang3/3.12.0, Apache-2.0, approved, clearlydefined maven/mavencentral/org.apache.commons/commons-text/1.10.0, Apache-2.0, approved, clearlydefined +maven/mavencentral/org.apache.groovy/groovy-json/4.0.11, Apache-2.0, approved, #7411 +maven/mavencentral/org.apache.groovy/groovy-json/4.0.14, Apache-2.0, approved, #7411 +maven/mavencentral/org.apache.groovy/groovy-xml/4.0.11, Apache-2.0, approved, #10179 +maven/mavencentral/org.apache.groovy/groovy-xml/4.0.14, Apache-2.0, approved, #10179 +maven/mavencentral/org.apache.groovy/groovy/4.0.11, Apache-2.0 AND BSD-3-Clause AND MIT, approved, #1742 +maven/mavencentral/org.apache.groovy/groovy/4.0.14, Apache-2.0 AND BSD-3-Clause AND MIT, approved, #1742 +maven/mavencentral/org.apache.httpcomponents/httpclient/4.5.13, Apache-2.0 AND LicenseRef-Public-Domain, approved, CQ23527 +maven/mavencentral/org.apache.httpcomponents/httpcore/4.4.13, Apache-2.0, approved, CQ23528 +maven/mavencentral/org.apache.httpcomponents/httpcore/4.4.16, Apache-2.0, approved, CQ23528 +maven/mavencentral/org.apache.httpcomponents/httpmime/4.5.13, Apache-2.0, approved, CQ11718 maven/mavencentral/org.apache.logging.log4j/log4j-api/2.20.0, Apache-2.0, approved, clearlydefined maven/mavencentral/org.apache.logging.log4j/log4j-to-slf4j/2.20.0, Apache-2.0, approved, #8799 +maven/mavencentral/org.apache.mina/mina-core/2.1.6, Apache-2.0, approved, #3289 maven/mavencentral/org.apache.tomcat.embed/tomcat-embed-core/10.1.12, Apache-2.0 AND (EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0) AND (CDDL-1.0 OR GPL-2.0-only WITH Classpath-exception-2.0) AND W3C AND CC0-1.0, approved, #5949 maven/mavencentral/org.apache.tomcat.embed/tomcat-embed-el/10.1.12, Apache-2.0, approved, #6997 maven/mavencentral/org.apache.tomcat.embed/tomcat-embed-websocket/10.1.12, Apache-2.0, approved, #7920 +maven/mavencentral/org.apiguardian/apiguardian-api/1.1.2, Apache-2.0, approved, clearlydefined maven/mavencentral/org.aspectj/aspectjweaver/1.9.20, EPL-1.0, approved, tools.aspectj +maven/mavencentral/org.assertj/assertj-core/3.24.2, Apache-2.0, approved, #6161 maven/mavencentral/org.attoparser/attoparser/2.0.7.RELEASE, Apache-2.0, approved, CQ18900 +maven/mavencentral/org.awaitility/awaitility-proxy/3.0.0, Apache-2.0, approved, #11044 +maven/mavencentral/org.awaitility/awaitility/3.0.0, Apache-2.0, approved, #11042 +maven/mavencentral/org.bitbucket.b_c/jose4j/0.9.3, Apache-2.0, approved, #4707 maven/mavencentral/org.bouncycastle/bcpkix-jdk15on/1.69, MIT, approved, clearlydefined +maven/mavencentral/org.bouncycastle/bcpkix-jdk18on/1.75, MIT, approved, #9166 maven/mavencentral/org.bouncycastle/bcprov-jdk15on/1.69, MIT, approved, clearlydefined +maven/mavencentral/org.bouncycastle/bcprov-jdk18on/1.75, MIT AND CC0-1.0, approved, #9167 maven/mavencentral/org.bouncycastle/bcutil-jdk15on/1.69, MIT, approved, clearlydefined +maven/mavencentral/org.bouncycastle/bcutil-jdk18on/1.75, MIT, approved, #9170 +maven/mavencentral/org.ccil.cowan.tagsoup/tagsoup/1.2.1, Apache-2.0, approved, clearlydefined +maven/mavencentral/org.checkerframework/checker-qual/3.31.0, MIT, approved, clearlydefined +maven/mavencentral/org.eclipse.angus/angus-activation/2.0.0, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.angus +maven/mavencentral/org.eclipse.angus/angus-activation/2.0.1, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.angus maven/mavencentral/org.eclipse.edc/aggregate-service-spi/0.1.3, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.edc/asset-spi/0.1.3, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.edc/catalog-spi/0.1.3, Apache-2.0, approved, technology.edc @@ -126,10 +207,13 @@ maven/mavencentral/org.eclipse.edc/dsp/0.1.3, Apache-2.0, approved, technology.e maven/mavencentral/org.eclipse.edc/http-spi/0.1.3, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.edc/http/0.1.3, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.edc/jersey-core/0.1.3, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/jersey-providers/0.1.3, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.edc/jetty-core/0.1.3, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.edc/json-ld-spi/0.1.3, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.edc/json-ld/0.1.3, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.edc/policy-engine-spi/0.1.3, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/policy-engine/0.1.3, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/policy-evaluator/0.1.3, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.edc/policy-model/0.1.3, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.edc/policy-spi/0.1.3, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.edc/runtime-metamodel/0.1.3, Apache-2.0, approved, technology.edc @@ -138,15 +222,77 @@ maven/mavencentral/org.eclipse.edc/transaction-spi/0.1.3, Apache-2.0, approved, maven/mavencentral/org.eclipse.edc/transfer-data-plane-spi/0.1.3, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.edc/transfer-spi/0.1.3, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.edc/transform-spi/0.1.3, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/util/0.1.3, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.edc/validator-spi/0.1.3, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.edc/web-spi/0.1.3, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.jetty.toolchain/jetty-jakarta-servlet-api/5.0.2, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty.toolchain/jetty-jakarta-websocket-api/2.0.0, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty.websocket/websocket-core-client/11.0.15, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty.websocket/websocket-core-common/11.0.15, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty.websocket/websocket-core-server/11.0.15, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty.websocket/websocket-jakarta-client/11.0.15, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty.websocket/websocket-jakarta-common/11.0.15, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty.websocket/websocket-jakarta-server/11.0.15, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty.websocket/websocket-servlet/11.0.15, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-alpn-client/11.0.15, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-annotations/11.0.15, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-client/11.0.15, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-http/11.0.15, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-io/11.0.15, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-jndi/11.0.15, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-plus/11.0.15, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-security/11.0.15, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-server/11.0.15, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-servlet/11.0.15, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-util/11.0.15, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-webapp/11.0.15, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-xml/11.0.15, EPL-2.0 OR Apache-2.0, approved, rt.jetty maven/mavencentral/org.eclipse.tractusx.irs/irs-registry-client/1.2.1-20231005.130041-12, Apache-2.0, approved, automotive.tractusx maven/mavencentral/org.eclipse.tractusx.traceability/tx-backend/0.0.1-SNAPSHOT, Apache-2.0, approved, automotive.tractusx maven/mavencentral/org.eclipse.tractusx.traceability/tx-models/0.0.1-SNAPSHOT, Apache-2.0, approved, automotive.tractusx maven/mavencentral/org.flywaydb/flyway-core/9.16.3, Apache-2.0, approved, #7935 +maven/mavencentral/org.glassfish.grizzly/grizzly-framework/2.3.25, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.grizzly +maven/mavencentral/org.glassfish.grizzly/grizzly-http-server/2.3.25, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.grizzly +maven/mavencentral/org.glassfish.grizzly/grizzly-http/2.3.25, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.grizzly +maven/mavencentral/org.glassfish.hk2.external/aopalliance-repackaged/3.0.4, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.glassfish +maven/mavencentral/org.glassfish.hk2/hk2-api/3.0.4, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.glassfish +maven/mavencentral/org.glassfish.hk2/hk2-locator/3.0.4, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.glassfish +maven/mavencentral/org.glassfish.hk2/hk2-utils/3.0.4, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.glassfish +maven/mavencentral/org.glassfish.hk2/osgi-resource-locator/1.0.3, CDDL-1.0, approved, CQ10889 +maven/mavencentral/org.glassfish.jaxb/jaxb-core/4.0.2, BSD-3-Clause, approved, ee4j.jaxb +maven/mavencentral/org.glassfish.jaxb/jaxb-core/4.0.3, BSD-3-Clause, approved, ee4j.jaxb +maven/mavencentral/org.glassfish.jaxb/jaxb-runtime/4.0.2, BSD-3-Clause, approved, ee4j.jaxb +maven/mavencentral/org.glassfish.jaxb/jaxb-runtime/4.0.3, BSD-3-Clause, approved, ee4j.jaxb +maven/mavencentral/org.glassfish.jaxb/txw2/4.0.2, BSD-3-Clause, approved, ee4j.jaxb +maven/mavencentral/org.glassfish.jaxb/txw2/4.0.3, BSD-3-Clause, approved, ee4j.jaxb +maven/mavencentral/org.glassfish.jersey.containers/jersey-container-servlet-core/3.1.2, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey +maven/mavencentral/org.glassfish.jersey.containers/jersey-container-servlet-core/3.1.3, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey +maven/mavencentral/org.glassfish.jersey.containers/jersey-container-servlet/3.1.2, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey +maven/mavencentral/org.glassfish.jersey.containers/jersey-container-servlet/3.1.3, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey +maven/mavencentral/org.glassfish.jersey.core/jersey-client/3.1.2, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey +maven/mavencentral/org.glassfish.jersey.core/jersey-client/3.1.3, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey +maven/mavencentral/org.glassfish.jersey.core/jersey-common/3.1.2, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey +maven/mavencentral/org.glassfish.jersey.core/jersey-common/3.1.3, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey +maven/mavencentral/org.glassfish.jersey.core/jersey-server/3.1.2, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey +maven/mavencentral/org.glassfish.jersey.core/jersey-server/3.1.3, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey +maven/mavencentral/org.glassfish.jersey.ext/jersey-entity-filtering/3.1.2, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey +maven/mavencentral/org.glassfish.jersey.ext/jersey-entity-filtering/3.1.3, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey +maven/mavencentral/org.glassfish.jersey.inject/jersey-hk2/3.1.2, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey +maven/mavencentral/org.glassfish.jersey.inject/jersey-hk2/3.1.3, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey +maven/mavencentral/org.glassfish.jersey.media/jersey-media-json-jackson/3.1.2, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey +maven/mavencentral/org.glassfish.jersey.media/jersey-media-json-jackson/3.1.3, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey +maven/mavencentral/org.glassfish.jersey.media/jersey-media-multipart/3.1.2, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey +maven/mavencentral/org.glassfish.jersey.media/jersey-media-multipart/3.1.3, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey maven/mavencentral/org.glassfish/jakarta.json/2.0.1, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jsonp +maven/mavencentral/org.hamcrest/hamcrest-core/2.2, BSD-3-Clause, approved, clearlydefined +maven/mavencentral/org.hamcrest/hamcrest-library/2.2, BSD-3-Clause, approved, CQ22925 +maven/mavencentral/org.hamcrest/hamcrest/2.2, BSD-3-Clause, approved, clearlydefined +maven/mavencentral/org.hdrhistogram/HdrHistogram/2.1.12, BSD-2-Clause OR LicenseRef-Public-Domain, approved, CQ13192 +maven/mavencentral/org.hibernate.common/hibernate-commons-annotations/6.0.6.Final, LGPL-2.1-only, approved, #6962 maven/mavencentral/org.hibernate.orm/hibernate-core/6.2.7.Final, LGPL-2.1-only AND Apache-2.0 AND MIT AND CC-PDDC AND (EPL-2.0 OR BSD-3-Clause), approved, #9121 maven/mavencentral/org.hibernate.validator/hibernate-validator/8.0.1.Final, Apache-2.0, approved, clearlydefined +maven/mavencentral/org.javassist/javassist/3.29.0-GA, Apache-2.0 AND LGPL-2.1-or-later AND MPL-1.1, approved, #6023 +maven/mavencentral/org.javassist/javassist/3.29.2-GA, Apache-2.0 AND LGPL-2.1-or-later AND MPL-1.1, approved, #6023 maven/mavencentral/org.jboss.logging/jboss-logging/3.5.0.Final, Apache-2.0, approved, #9471 maven/mavencentral/org.jboss.logging/jboss-logging/3.5.3.Final, Apache-2.0, approved, #9471 maven/mavencentral/org.jetbrains.kotlin/kotlin-stdlib-common/1.5.31, Apache-2.0, approved, clearlydefined @@ -158,10 +304,33 @@ maven/mavencentral/org.jetbrains.kotlin/kotlin-stdlib-jdk8/1.8.22, Apache-2.0, a maven/mavencentral/org.jetbrains.kotlin/kotlin-stdlib/1.6.20, Apache-2.0, approved, clearlydefined maven/mavencentral/org.jetbrains.kotlin/kotlin-stdlib/1.8.22, Apache-2.0, approved, #8865 maven/mavencentral/org.jetbrains/annotations/24.0.1, Apache-2.0, approved, #7417 +maven/mavencentral/org.junit.jupiter/junit-jupiter-api/5.9.3, EPL-2.0, approved, #3133 +maven/mavencentral/org.junit.jupiter/junit-jupiter-engine/5.9.3, EPL-2.0, approved, #3125 +maven/mavencentral/org.junit.jupiter/junit-jupiter-params/5.9.3, EPL-2.0, approved, #3134 +maven/mavencentral/org.junit.jupiter/junit-jupiter/5.9.3, EPL-2.0, approved, #6972 +maven/mavencentral/org.junit.platform/junit-platform-commons/1.9.3, EPL-2.0, approved, #3130 +maven/mavencentral/org.junit.platform/junit-platform-engine/1.9.3, EPL-2.0, approved, #3128 +maven/mavencentral/org.junit.platform/junit-platform-launcher/1.9.3, EPL-2.0, approved, #3132 +maven/mavencentral/org.junit.platform/junit-platform-suite-api/1.9.3, EPL-2.0, approved, #3136 +maven/mavencentral/org.junit.platform/junit-platform-suite-commons/1.9.3, EPL-2.0, approved, #3131 +maven/mavencentral/org.junit.platform/junit-platform-suite-engine/1.9.3, EPL-2.0, approved, #3135 +maven/mavencentral/org.junit.platform/junit-platform-suite/1.9.3, EPL-2.0, approved, #10175 +maven/mavencentral/org.jvnet.mimepull/mimepull/1.9.15, CDDL-1.1 OR GPL-2.0-only WITH Classpath-exception-2.0, approved, CQ21484 +maven/mavencentral/org.latencyutils/LatencyUtils/2.0.3, BSD-2-Clause, approved, CQ17408 +maven/mavencentral/org.mockito/mockito-core/4.8.1, MIT, approved, clearlydefined +maven/mavencentral/org.mockito/mockito-inline/4.8.1, MIT, approved, #4341 +maven/mavencentral/org.mockito/mockito-junit-jupiter/4.8.1, MIT, approved, clearlydefined +maven/mavencentral/org.objenesis/objenesis/2.5.1, Apache-2.0, approved, clearlydefined +maven/mavencentral/org.objenesis/objenesis/3.2, Apache-2.0, approved, clearlydefined maven/mavencentral/org.openapitools/jackson-databind-nullable/0.2.6, Apache-2.0, approved, #3294 +maven/mavencentral/org.opentest4j/opentest4j/1.2.0, Apache-2.0, approved, clearlydefined +maven/mavencentral/org.ow2.asm/asm-commons/9.5, BSD-3-Clause, approved, #7553 +maven/mavencentral/org.ow2.asm/asm-tree/9.5, BSD-3-Clause, approved, #7555 maven/mavencentral/org.ow2.asm/asm/9.3, BSD-3-Clause, approved, clearlydefined maven/mavencentral/org.postgresql/postgresql/42.6.0, BSD-2-Clause AND Apache-2.0, approved, #9159 maven/mavencentral/org.projectlombok/lombok/1.18.28, MIT AND LicenseRef-Public-Domain, approved, CQ23907 +maven/mavencentral/org.rnorth.duct-tape/duct-tape/1.0.8, MIT, approved, clearlydefined +maven/mavencentral/org.skyscreamer/jsonassert/1.5.1, Apache-2.0, approved, clearlydefined maven/mavencentral/org.slf4j/jul-to-slf4j/2.0.7, MIT, approved, #7698 maven/mavencentral/org.slf4j/slf4j-api/1.7.30, MIT, approved, CQ13368 maven/mavencentral/org.slf4j/slf4j-api/2.0.7, MIT, approved, #5915 @@ -180,11 +349,14 @@ maven/mavencentral/org.springframework.boot/spring-boot-starter-logging/3.1.3, A maven/mavencentral/org.springframework.boot/spring-boot-starter-oauth2-client/3.1.3, Apache-2.0, approved, #8806 maven/mavencentral/org.springframework.boot/spring-boot-starter-oauth2-resource-server/3.1.3, Apache-2.0, approved, #8804 maven/mavencentral/org.springframework.boot/spring-boot-starter-security/3.1.3, Apache-2.0, approved, #9337 +maven/mavencentral/org.springframework.boot/spring-boot-starter-test/3.1.3, Apache-2.0, approved, #9353 maven/mavencentral/org.springframework.boot/spring-boot-starter-thymeleaf/3.1.3, Apache-2.0, approved, #10092 maven/mavencentral/org.springframework.boot/spring-boot-starter-tomcat/3.1.3, Apache-2.0, approved, #9351 maven/mavencentral/org.springframework.boot/spring-boot-starter-validation/3.1.3, Apache-2.0, approved, #9335 maven/mavencentral/org.springframework.boot/spring-boot-starter-web/3.1.3, Apache-2.0, approved, #9347 maven/mavencentral/org.springframework.boot/spring-boot-starter/3.1.3, Apache-2.0, approved, #9349 +maven/mavencentral/org.springframework.boot/spring-boot-test-autoconfigure/3.1.3, Apache-2.0, approved, #9339 +maven/mavencentral/org.springframework.boot/spring-boot-test/3.1.3, Apache-2.0, approved, #9346 maven/mavencentral/org.springframework.boot/spring-boot/3.1.3, Apache-2.0, approved, #9352 maven/mavencentral/org.springframework.cloud/spring-cloud-commons/4.0.3, Apache-2.0, approved, #7292 maven/mavencentral/org.springframework.cloud/spring-cloud-context/4.0.3, Apache-2.0, approved, #7306 @@ -201,6 +373,7 @@ maven/mavencentral/org.springframework.security/spring-security-oauth2-core/6.1. maven/mavencentral/org.springframework.security/spring-security-oauth2-jose/6.1.3, Apache-2.0, approved, #9345 maven/mavencentral/org.springframework.security/spring-security-oauth2-resource-server/6.1.3, Apache-2.0, approved, #8798 maven/mavencentral/org.springframework.security/spring-security-rsa/1.0.11.RELEASE, Apache-2.0, approved, CQ20647 +maven/mavencentral/org.springframework.security/spring-security-test/6.1.3, Apache-2.0, approved, #10674 maven/mavencentral/org.springframework.security/spring-security-web/6.1.3, Apache-2.0, approved, #9800 maven/mavencentral/org.springframework/spring-aop/6.0.11, Apache-2.0, approved, #5940 maven/mavencentral/org.springframework/spring-aspects/6.0.11, Apache-2.0, approved, #5930 @@ -213,12 +386,19 @@ maven/mavencentral/org.springframework/spring-jcl/6.0.11, Apache-2.0, approved, maven/mavencentral/org.springframework/spring-jcl/6.0.12, Apache-2.0, approved, #3283 maven/mavencentral/org.springframework/spring-jdbc/6.0.11, Apache-2.0, approved, #5924 maven/mavencentral/org.springframework/spring-orm/6.0.11, Apache-2.0, approved, #5925 +maven/mavencentral/org.springframework/spring-test/6.0.11, Apache-2.0, approved, #7003 maven/mavencentral/org.springframework/spring-tx/6.0.11, Apache-2.0, approved, #5926 maven/mavencentral/org.springframework/spring-web/6.0.11, Apache-2.0, approved, #5942 maven/mavencentral/org.springframework/spring-webmvc/6.0.11, Apache-2.0, approved, #5944 +maven/mavencentral/org.testcontainers/database-commons/1.18.3, MIT, approved, clearlydefined +maven/mavencentral/org.testcontainers/jdbc/1.18.3, MIT, approved, clearlydefined +maven/mavencentral/org.testcontainers/junit-jupiter/1.19.0, MIT, approved, #10344 +maven/mavencentral/org.testcontainers/postgresql/1.19.0, MIT, approved, #10350 +maven/mavencentral/org.testcontainers/testcontainers/1.18.3, MIT, approved, #7938 maven/mavencentral/org.thymeleaf/thymeleaf-spring6/3.1.2.RELEASE, Apache-2.0, approved, #10581 maven/mavencentral/org.thymeleaf/thymeleaf/3.1.2.RELEASE, Apache-2.0, approved, CQ23960 maven/mavencentral/org.unbescape/unbescape/1.1.6.RELEASE, Apache-2.0, approved, CQ18904 maven/mavencentral/org.webjars/swagger-ui/4.18.1, Apache-2.0, approved, #7850 maven/mavencentral/org.webjars/webjars-locator-core/0.52, MIT, approved, clearlydefined +maven/mavencentral/org.xmlunit/xmlunit-core/2.9.1, Apache-2.0, approved, #6272 maven/mavencentral/org.yaml/snakeyaml/2.2, Apache-2.0 AND (Apache-2.0 OR BSD-3-Clause OR EPL-1.0 OR GPL-2.0-or-later OR LGPL-2.1-or-later), approved, #10232 diff --git a/DEPENDENCIES_FRONTEND b/DEPENDENCIES_FRONTEND index 0a768061f8..4ca953dfc0 100644 --- a/DEPENDENCIES_FRONTEND +++ b/DEPENDENCIES_FRONTEND @@ -16,7 +16,7 @@ npm/npmjs/-/ajv/6.12.6, MIT, approved, #979 npm/npmjs/-/ajv/8.11.0, MIT, approved, #4969 npm/npmjs/-/ajv/8.12.0, MIT AND OFL-1.1 AND (EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0), approved, #6025 npm/npmjs/-/angular-i18next/15.0.5, MIT, approved, clearlydefined -npm/npmjs/-/angular-split/15.0.0, , restricted, clearlydefined +npm/npmjs/-/angular-split/15.0.0, Apache-2.0, approved, clearlydefined npm/npmjs/-/ansi-colors/4.1.3, MIT, approved, clearlydefined npm/npmjs/-/ansi-escapes/4.3.2, MIT, approved, clearlydefined npm/npmjs/-/ansi-html-community/0.0.8, Apache-2.0, approved, clearlydefined @@ -1517,7 +1517,7 @@ npm/npmjs/@types/send/0.17.1, MIT, approved, #10832 npm/npmjs/@types/serve-index/1.9.1, MIT, approved, #10976 npm/npmjs/@types/serve-static/1.15.1, MIT, approved, #9188 npm/npmjs/@types/set-cookie-parser/2.4.2, MIT, approved, clearlydefined -npm/npmjs/@types/sinonjs__fake-timers/8.1.1, MIT, approved, clearlydefined +npm/npmjs/@types/sinonjs__fake-timers/8.1.1, MIT, approved, #11000 npm/npmjs/@types/sizzle/2.3.3, MIT, approved, clearlydefined npm/npmjs/@types/sockjs/0.3.33, MIT, approved, #10984 npm/npmjs/@types/testing-library__jasmine-dom/1.3.0, MIT, approved, clearlydefined diff --git a/frontend/src/app/modules/page/other-parts/presentation/other-parts.component.spec.ts b/frontend/src/app/modules/page/other-parts/presentation/other-parts.component.spec.ts index 6242b37b6d..614bb3b3f0 100644 --- a/frontend/src/app/modules/page/other-parts/presentation/other-parts.component.spec.ts +++ b/frontend/src/app/modules/page/other-parts/presentation/other-parts.component.spec.ts @@ -196,52 +196,36 @@ describe('Other Parts', () => { expect(updateCustomerPartsSpy).toHaveBeenCalledWith(searchValue); }); - it('should reset form on search', async () => { + it('should trigger part search and reset filter', async () => { const { fixture } = await renderOtherParts(); const { componentInstance } = fixture; - // Mock the necessary data and components - componentInstance.supplierPartsComponents = [ - { - updateSupplierParts: jasmine.createSpy('updateSupplierParts'), // - partsTableComponents: [ - { - multiSelectAutocompleteComponent: { - theSearchElement: 'test', // Mock theSearchElement to be truthy - }, - filterFormGroup: { - reset: jasmine.createSpy('reset'), // Spy on reset method - }, - }, - ], - }, - ] as any; - - componentInstance.customerPartsComponents = [ - { - updateCustomerParts: jasmine.createSpy('updateCustomerParts'), - partsTableComponents: [ - { - multiSelectAutocompleteComponent: { - theSearchElement: 'test', // Mock theSearchElement to be truthy - }, - filterFormGroup: { - reset: jasmine.createSpy('reset'), // Spy on reset method - }, - }, - ], - }, - ] as any; - - // Call the method - componentInstance.triggerPartSearch(); + const searchValue = 'testSearchValue'; - // Expectations - expect(componentInstance.supplierPartsComponents[0].partsTableComponents[0].filterFormGroup.reset).toHaveBeenCalled(); - expect(componentInstance.customerPartsComponents[0].partsTableComponents[0].filterFormGroup.reset).toHaveBeenCalled(); - }); + const updateSupplierPartsSpy = spyOn( + SupplierPartsComponent.prototype, + 'updateSupplierParts', + ); + const updateCustomerPartsSpy = spyOn( + CustomerPartsComponent.prototype, + 'updateCustomerParts', + ); + + componentInstance.searchControl.setValue(searchValue); + // Spy on the private method without calling it directly + const resetFilterAndShowToastSpy = spyOn(componentInstance, 'resetFilterAndShowToast'); + + // Act + componentInstance.triggerPartSearch(); + + // Assert + expect(updateSupplierPartsSpy).toHaveBeenCalledWith('testSearchValue'); + expect(updateCustomerPartsSpy).toHaveBeenCalledWith('testSearchValue'); + expect(resetFilterAndShowToastSpy).toHaveBeenCalledOnceWith(); + + }); }); }); diff --git a/frontend/src/app/modules/page/other-parts/presentation/other-parts.component.ts b/frontend/src/app/modules/page/other-parts/presentation/other-parts.component.ts index 5b2d202290..e3595ae297 100644 --- a/frontend/src/app/modules/page/other-parts/presentation/other-parts.component.ts +++ b/frontend/src/app/modules/page/other-parts/presentation/other-parts.component.ts @@ -19,107 +19,102 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { Component, OnDestroy, OnInit, QueryList, ViewChildren } from '@angular/core'; -import { FormControl, FormGroup } from '@angular/forms'; -import { MatTabChangeEvent } from '@angular/material/tabs'; -import { OtherPartsFacade } from '@page/other-parts/core/other-parts.facade'; -import { CustomerPartsComponent } from '@page/other-parts/presentation/customer-parts/customer-parts.component'; -import { SupplierPartsComponent } from '@page/other-parts/presentation/supplier-parts/supplier-parts.component'; -import { MainAspectType } from '@page/parts/model/mainAspectType.enum'; -import { BomLifecycleSize } from '@shared/components/bom-lifecycle-activator/bom-lifecycle-activator.model'; -import { ToastService } from '@shared/components/toasts/toast.service'; -import { PartDetailsFacade } from '@shared/modules/part-details/core/partDetails.facade'; -import { BomLifecycleSettingsService, UserSettingView } from '@shared/service/bom-lifecycle-settings.service'; -import { StaticIdService } from '@shared/service/staticId.service'; +import {Component, OnDestroy, OnInit, QueryList, ViewChildren} from '@angular/core'; +import {FormControl, FormGroup} from '@angular/forms'; +import {MatTabChangeEvent} from '@angular/material/tabs'; +import {OtherPartsFacade} from '@page/other-parts/core/other-parts.facade'; +import {CustomerPartsComponent} from '@page/other-parts/presentation/customer-parts/customer-parts.component'; +import {SupplierPartsComponent} from '@page/other-parts/presentation/supplier-parts/supplier-parts.component'; +import {MainAspectType} from '@page/parts/model/mainAspectType.enum'; +import {BomLifecycleSize} from '@shared/components/bom-lifecycle-activator/bom-lifecycle-activator.model'; +import {ToastService} from '@shared/components/toasts/toast.service'; +import {PartDetailsFacade} from '@shared/modules/part-details/core/partDetails.facade'; +import {BomLifecycleSettingsService, UserSettingView} from '@shared/service/bom-lifecycle-settings.service'; +import {StaticIdService} from '@shared/service/staticId.service'; +import {resetMultiSelectionAutoCompleteComponent} from "@page/parts/core/parts.helper"; @Component({ - selector: 'app-other-parts', - templateUrl: './other-parts.component.html', - styleUrls: [ './other-parts.component.scss' ], + selector: 'app-other-parts', + templateUrl: './other-parts.component.html', + styleUrls: ['./other-parts.component.scss'], }) export class OtherPartsComponent implements OnDestroy, OnInit { - public selectedTab = 0; - public showStartInvestigationArray = [ true, false ]; + public selectedTab = 0; + public showStartInvestigationArray = [true, false]; - public readonly supplierTabLabelId = this.staticIdService.generateId('OtherParts.supplierTabLabel'); - public readonly customerTabLabelId = this.staticIdService.generateId('OtherParts.customerTabLabel'); + public readonly supplierTabLabelId = this.staticIdService.generateId('OtherParts.supplierTabLabel'); + public readonly customerTabLabelId = this.staticIdService.generateId('OtherParts.customerTabLabel'); - public searchFormGroup = new FormGroup({}); - public searchControl: FormControl; - @ViewChildren(SupplierPartsComponent) supplierPartsComponents: QueryList; - @ViewChildren(CustomerPartsComponent) customerPartsComponents: QueryList; + public searchFormGroup = new FormGroup({}); + public searchControl: FormControl; + @ViewChildren(SupplierPartsComponent) supplierPartsComponents: QueryList; + @ViewChildren(CustomerPartsComponent) customerPartsComponents: QueryList; - constructor( - private readonly otherPartsFacade: OtherPartsFacade, - private readonly partDetailsFacade: PartDetailsFacade, - private readonly staticIdService: StaticIdService, - public userSettings: BomLifecycleSettingsService, - public toastService: ToastService, - ) { - } + constructor( + private readonly otherPartsFacade: OtherPartsFacade, + private readonly partDetailsFacade: PartDetailsFacade, + private readonly staticIdService: StaticIdService, + public userSettings: BomLifecycleSettingsService, + public toastService: ToastService, + ) { + } - ngOnInit(): void { - this.searchFormGroup.addControl('partSearch', new FormControl([])); - this.searchControl = this.searchFormGroup.get('partSearch') as unknown as FormControl; - } + ngOnInit(): void { + this.searchFormGroup.addControl('partSearch', new FormControl([])); + this.searchControl = this.searchFormGroup.get('partSearch') as unknown as FormControl; + } - public bomLifecycleSize: BomLifecycleSize = this.userSettings.getSize(UserSettingView.OTHER_PARTS); + public bomLifecycleSize: BomLifecycleSize = this.userSettings.getSize(UserSettingView.OTHER_PARTS); - public ngOnDestroy(): void { - this.otherPartsFacade.unsubscribeParts(); - } + public ngOnDestroy(): void { + this.otherPartsFacade.unsubscribeParts(); + } - triggerPartSearch() { + triggerPartSearch() { - this.resetFilterAndShowToast(); + this.resetFilterAndShowToast(); - const searchValue = this.searchFormGroup.get('partSearch').value; + const searchValue = this.searchFormGroup.get('partSearch').value; - for (const supplierPartsComponent of this.supplierPartsComponents) { - supplierPartsComponent.updateSupplierParts(searchValue); - } - for (const customerPartsComponent of this.customerPartsComponents) { - customerPartsComponent.updateCustomerParts(searchValue); + for (const supplierPartsComponent of this.supplierPartsComponents) { + supplierPartsComponent.updateSupplierParts(searchValue); + } + for (const customerPartsComponent of this.customerPartsComponents) { + customerPartsComponent.updateCustomerParts(searchValue); + } } - } - private resetFilterAndShowToast() { - let filterSet = false; + private resetFilterAndShowToast() { + let oneFilterSet = false; - for (const supplierPartsComponent of this.supplierPartsComponents) { - for (const partsTableComponent of supplierPartsComponent.partsTableComponents) { - if (partsTableComponent.multiSelectAutocompleteComponent.theSearchElement) { - filterSet = true; - partsTableComponent.filterFormGroup.reset(); - } - } - } - for (const customerPartsComponent of this.customerPartsComponents) { - for (const partsTableComponent of customerPartsComponent.partsTableComponents) { - if (partsTableComponent.multiSelectAutocompleteComponent.theSearchElement) { - filterSet = true; - partsTableComponent.filterFormGroup.reset(); - } - } - } - if (filterSet) { - this.toastService.info('parts.input.global-search.toastInfo'); + const resetComponents = ( + components: QueryList | QueryList + ) => { + for (const component of components) { + let filterIsSet = resetMultiSelectionAutoCompleteComponent(component.partsTableComponents, oneFilterSet); + if (filterIsSet){ + this.toastService.info("parts.input.global-search.toastInfo"); + } + } + }; + + resetComponents(this.supplierPartsComponents); + resetComponents(this.customerPartsComponents); } - return filterSet; - } - public onTabChange({ index }: MatTabChangeEvent): void { - this.selectedTab = index; - this.partDetailsFacade.selectedPart = null; - } - public handleTableActivationEvent(bomLifecycleSize: BomLifecycleSize) { - this.bomLifecycleSize = bomLifecycleSize; - } + public onTabChange({index}: MatTabChangeEvent): void { + this.selectedTab = index; + this.partDetailsFacade.selectedPart = null; + } + + public handleTableActivationEvent(bomLifecycleSize: BomLifecycleSize) { + this.bomLifecycleSize = bomLifecycleSize; + } - protected readonly MainAspectType = MainAspectType; - protected readonly UserSettingView = UserSettingView; + protected readonly MainAspectType = MainAspectType; + protected readonly UserSettingView = UserSettingView; } diff --git a/frontend/src/app/modules/page/parts/core/parts.helper.spec.ts b/frontend/src/app/modules/page/parts/core/parts.helper.spec.ts new file mode 100644 index 0000000000..abbea6efec --- /dev/null +++ b/frontend/src/app/modules/page/parts/core/parts.helper.spec.ts @@ -0,0 +1,72 @@ +/******************************************************************************** + * Copyright (c) 2023 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ + +import {PartsTableComponent} from '@shared/components/parts-table/parts-table.component'; +import {resetMultiSelectionAutoCompleteComponent} from "@page/parts/core/parts.helper"; +import {QueryList} from "@angular/core"; + +describe('resetMultiSelectionAutoCompleteComponent', () => { + it('should reset multiSelectAutocompleteComponents and set oneFilterSet to true if filterFormGroup is dirty', () => { + // Arrange + + const mockQueryList = (items: T[]): QueryList => { + const queryList = new QueryList(); + queryList.reset(items); + return queryList; + }; + + const multiSelectAutoCompleteComponents = [ + { + theSearchElement: 'test', + clickClear: jasmine.createSpy('clickClear'), + formControl: {reset: jasmine.createSpy('reset')}, + + }] + const queryListMultiSelect = mockQueryList(multiSelectAutoCompleteComponents); + + const partsTableComponents: PartsTableComponent[] = [ + { + // @ts-ignore + multiSelectAutocompleteComponents: queryListMultiSelect, + // @ts-ignore + filterFormGroup: { + dirty: true, + }, + }, + ]; + + const partsTableComponentsQueryList = mockQueryList(partsTableComponents); + + let oneFilterSet = false; + + // Act + oneFilterSet = resetMultiSelectionAutoCompleteComponent(partsTableComponentsQueryList, oneFilterSet); + + // Assert + expect(oneFilterSet).toBe(true); + + partsTableComponents.forEach((partsTableComponent) => { + partsTableComponent.multiSelectAutocompleteComponents.forEach((multiSelectAutocompleteComponent) => { + expect(multiSelectAutocompleteComponent.theSearchElement).toBeNull(); + expect(multiSelectAutocompleteComponent.clickClear).toHaveBeenCalled(); + expect(multiSelectAutocompleteComponent.formControl.reset).toHaveBeenCalled(); + }); + }); + }); +}); diff --git a/frontend/src/app/modules/page/parts/core/parts.helper.ts b/frontend/src/app/modules/page/parts/core/parts.helper.ts index 5683e8f247..b91ac2996c 100644 --- a/frontend/src/app/modules/page/parts/core/parts.helper.ts +++ b/frontend/src/app/modules/page/parts/core/parts.helper.ts @@ -17,3 +17,19 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ +import {QueryList} from "@angular/core"; +import {PartsTableComponent} from "@shared/components/parts-table/parts-table.component"; + +export function resetMultiSelectionAutoCompleteComponent(partsTableComponents: QueryList, oneFilterSet: boolean): boolean { + for (const partsTableComponent of partsTableComponents) { + for (const multiSelectAutocompleteComponent of partsTableComponent.multiSelectAutocompleteComponents) { + multiSelectAutocompleteComponent.theSearchElement = null; + multiSelectAutocompleteComponent.clickClear(); + multiSelectAutocompleteComponent.formControl.reset(); + if (partsTableComponent.filterFormGroup.dirty && !oneFilterSet) { + oneFilterSet = true; + } + } + } + return oneFilterSet; +} diff --git a/frontend/src/app/modules/page/parts/presentation/parts.component.ts b/frontend/src/app/modules/page/parts/presentation/parts.component.ts index a13ea34a73..6dac6fc3bb 100644 --- a/frontend/src/app/modules/page/parts/presentation/parts.component.ts +++ b/frontend/src/app/modules/page/parts/presentation/parts.component.ts @@ -35,6 +35,7 @@ import {toAssetFilter, toGlobalSearchAssetFilter} from "@shared/helper/filter-he import {FormControl, FormGroup} from "@angular/forms"; import {ToastService} from "@shared/components/toasts/toast.service"; import {PartsTableComponent} from "@shared/components/parts-table/parts-table.component"; +import {resetMultiSelectionAutoCompleteComponent} from "@page/parts/core/parts.helper"; @Component({ @@ -122,11 +123,9 @@ export class PartsComponent implements OnInit, OnDestroy, AfterViewInit { private resetFilterAndShowToast() { - for (const partTableComponent of this.partsTableComponents) { - if (partTableComponent.filterFormGroup.dirty) { - partTableComponent.filterFormGroup.reset(); - this.toastService.info("parts.input.global-search.toastInfo"); - } + let filterIsSet = resetMultiSelectionAutoCompleteComponent(this.partsTableComponents, false); + if (filterIsSet) { + this.toastService.info("parts.input.global-search.toastInfo"); } } diff --git a/frontend/src/app/modules/shared/components/multi-select-autocomplete/multi-select-autocomplete.component.ts b/frontend/src/app/modules/shared/components/multi-select-autocomplete/multi-select-autocomplete.component.ts index 5e5c3062f2..614bc937e1 100644 --- a/frontend/src/app/modules/shared/components/multi-select-autocomplete/multi-select-autocomplete.component.ts +++ b/frontend/src/app/modules/shared/components/multi-select-autocomplete/multi-select-autocomplete.component.ts @@ -68,7 +68,7 @@ export class MultiSelectAutocompleteComponent implements OnChanges { selectAllChecked = false; displayString = ''; - shouldHideTextSearchOptionField():boolean{ + shouldHideTextSearchOptionField(): boolean { return !this.textSearch || this.textSearch && (this.theSearchElement === null || this.theSearchElement === ''); } @@ -138,13 +138,14 @@ export class MultiSelectAutocompleteComponent implements OnChanges { clickClear(): void { this.formControl.patchValue(""); + this.formControl.reset(); this.searchInput.value = ''; this.theSearchElement = ''; this.selectedValue = []; } - resetFilter(): void{ + resetFilter(): void { this.searchInput.value = ''; } diff --git a/frontend/src/app/modules/shared/components/parts-table/parts-table.component.scss b/frontend/src/app/modules/shared/components/parts-table/parts-table.component.scss index e6131b9d68..e704c9ab9d 100644 --- a/frontend/src/app/modules/shared/components/parts-table/parts-table.component.scss +++ b/frontend/src/app/modules/shared/components/parts-table/parts-table.component.scss @@ -21,25 +21,7 @@ table { @apply font-light; } -/* Remove grey background of filter selection */ -.mdc-text-field--filled:not(.mdc-text-field--disabled) { - background-color: unset !important; -} - -/* Empty block below multi select */ -.mat-mdc-form-field-subscript-wrapper { - display: none; -} - -/* Remove border*/ -.mdc-line-ripple::before { - border-bottom-width: 0 !important; -} - -.mdc-line-ripple::after { - border-bottom-width: 0 !important; -} .table--select-all { display: inline-flex; @@ -81,9 +63,6 @@ table { outline: 1px solid currentColor; } -.cdk-overlay-pane { - width: unset !important; -} .table--no-data { display: flex; diff --git a/frontend/src/app/modules/shared/components/parts-table/parts-table.component.ts b/frontend/src/app/modules/shared/components/parts-table/parts-table.component.ts index 27e0689ac2..6fbc131c33 100644 --- a/frontend/src/app/modules/shared/components/parts-table/parts-table.component.ts +++ b/frontend/src/app/modules/shared/components/parts-table/parts-table.component.ts @@ -17,47 +17,47 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { SelectionModel } from '@angular/cdk/collections'; +import {SelectionModel} from '@angular/cdk/collections'; import { - Component, - ElementRef, - EventEmitter, - Input, - OnInit, - Output, - ViewChild, - ViewEncapsulation, + Component, + ElementRef, + EventEmitter, + Input, + OnInit, + Output, + QueryList, + ViewChild, + ViewChildren, } from '@angular/core'; -import { FormControl, FormGroup } from '@angular/forms'; -import { MatPaginator, PageEvent } from '@angular/material/paginator'; -import { MatSort, Sort } from '@angular/material/sort'; -import { MatTableDataSource } from '@angular/material/table'; -import { Pagination } from '@core/model/pagination.model'; -import { SemanticDataModel } from '@page/parts/model/parts.model'; -import { MultiSelectAutocompleteComponent } from '@shared/components/multi-select-autocomplete/multi-select-autocomplete.component'; +import {FormControl, FormGroup} from '@angular/forms'; +import {MatPaginator, PageEvent} from '@angular/material/paginator'; +import {MatSort, Sort} from '@angular/material/sort'; +import {MatTableDataSource} from '@angular/material/table'; +import {Pagination} from '@core/model/pagination.model'; +import {SemanticDataModel} from '@page/parts/model/parts.model'; import { - CreateHeaderFromColumns, - PartTableType, - TableConfig, - TableEventConfig, - TableHeaderSort, + MultiSelectAutocompleteComponent +} from '@shared/components/multi-select-autocomplete/multi-select-autocomplete.component'; +import { + CreateHeaderFromColumns, + PartTableType, + TableConfig, + TableEventConfig, + TableHeaderSort, } from '@shared/components/table/table.model'; -import { addSelectedValues, removeSelectedValues } from '@shared/helper/table-helper'; +import {addSelectedValues, removeSelectedValues} from '@shared/helper/table-helper'; @Component({ selector: 'app-parts-table', templateUrl: './parts-table.component.html', - styleUrls: ['parts-table.component.scss'], - encapsulation: ViewEncapsulation.None, + styleUrls: ['parts-table.component.scss'] }) export class PartsTableComponent implements OnInit { @ViewChild(MatSort) sort: MatSort; @ViewChild(MatPaginator) paginator: MatPaginator; @ViewChild('tableElement', {read: ElementRef}) tableElementRef: ElementRef; - - @ViewChild(MultiSelectAutocompleteComponent) multiSelectAutocompleteComponent: MultiSelectAutocompleteComponent; - + @ViewChildren(MultiSelectAutocompleteComponent) multiSelectAutocompleteComponents: QueryList; @Input() multiSelectActive = false; @Input() labelId: string; @@ -434,7 +434,7 @@ export class PartsTableComponent implements OnInit { value: SemanticDataModel.BATCH, }, { display: 'JustInSequence', - value: SemanticDataModel.JUSTINSEQUENCE, + value: SemanticDataModel.JUSTINSEQUENCE, }, { display: 'SerialPart', value: SemanticDataModel.SERIALPART, diff --git a/frontend/src/app/modules/shared/components/unscoped-styles.scss b/frontend/src/app/modules/shared/components/unscoped-styles.scss index 6e286c422c..40d2905731 100644 --- a/frontend/src/app/modules/shared/components/unscoped-styles.scss +++ b/frontend/src/app/modules/shared/components/unscoped-styles.scss @@ -25,3 +25,31 @@ ::before { border-style: unset; } + +/* Sets the opened local filter to be full width*/ +.cdk-overlay-pane { + width: unset !important; +} + +app-multiselect { + + /* Remove border*/ + .mdc-line-ripple::before { + border-bottom-width: 0 !important; + } + + .mdc-line-ripple::after { + border-bottom-width: 0 !important; + + } + + /* Remove grey background of filter selection */ + .mdc-text-field--filled:not(.mdc-text-field--disabled) { + background-color: unset !important; + } + + /* Empty block below multi select */ + .mat-mdc-form-field-subscript-wrapper { + display: none; + } +} diff --git a/frontend/src/app/modules/shared/service/alerts.service.ts b/frontend/src/app/modules/shared/service/alerts.service.ts index 4bc549da45..2963098d5d 100644 --- a/frontend/src/app/modules/shared/service/alerts.service.ts +++ b/frontend/src/app/modules/shared/service/alerts.service.ts @@ -83,7 +83,7 @@ export class AlertsService { } public postAlert(partIds: string[], description: string, severity: Severity, bpn: string, isAsBuilt: boolean): Observable { - const body = { partIds, description, severity, bpn, isAsBuilt }; + const body = { partIds, description, severity, receiverBpn: bpn, isAsBuilt }; return this.apiService.post(`${this.url}/alerts`, body).pipe(map(({ id }) => id)); } diff --git a/pom.xml b/pom.xml index 4b608949c3..6e818ea702 100644 --- a/pom.xml +++ b/pom.xml @@ -62,7 +62,7 @@ SPDX-License-Identifier: Apache-2.0 3.9.1.2184 3.1.2 3.0.0-M8 - 4.0.0-M5 + 4.0.0-M9 0.1.3 0.0.1-SNAPSHOT @@ -86,7 +86,7 @@ SPDX-License-Identifier: Apache-2.0 2.13.0 0.9.3 1.1.0 - 1.17.6 + 1.19.0 5.3.2 2.0.4 @@ -254,6 +254,17 @@ SPDX-License-Identifier: Apache-2.0 org.eclipse.dash license-tool-plugin ${eclipse-dash-ip.version} + + test + + + + license-check + + license-check + + + org.apache.maven.plugins diff --git a/tx-backend/openapi/traceability-foss-backend.json b/tx-backend/openapi/traceability-foss-backend.json index 2f91b71f48..d245301bc8 100644 --- a/tx-backend/openapi/traceability-foss-backend.json +++ b/tx-backend/openapi/traceability-foss-backend.json @@ -41,8 +41,8 @@ "description" : "The endpoint returns a result of BPN EDC URL mappings.", "operationId" : "getBpnEdcs", "responses" : { - "403" : { - "description" : "Forbidden.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -51,8 +51,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -61,8 +61,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -71,12 +71,14 @@ } } }, - "400" : { - "description" : "Bad request.", + "200" : { + "description" : "Returns the paged result found", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } @@ -101,20 +103,18 @@ } } }, - "200" : { - "description" : "Returns the paged result found", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -155,20 +155,18 @@ "required" : true }, "responses" : { - "200" : { - "description" : "Returns the paged result found for BpnEdcMapping", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -177,8 +175,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -187,8 +185,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -197,8 +195,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -207,8 +205,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -217,8 +215,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -227,12 +225,14 @@ } } }, - "404" : { - "description" : "Not found.", + "200" : { + "description" : "Returns the paged result found for BpnEdcMapping", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } @@ -269,20 +269,18 @@ "required" : true }, "responses" : { - "200" : { - "description" : "Returns the paged result found for BpnEdcMapping", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -291,8 +289,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -301,8 +299,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -311,8 +309,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -321,8 +319,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -331,8 +329,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -341,12 +339,14 @@ } } }, - "404" : { - "description" : "Not found.", + "200" : { + "description" : "Returns the paged result found for BpnEdcMapping", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } @@ -380,14 +380,10 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", + "200" : { + "description" : "Returns the paged result found", "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } + "application/json" : {} } }, "415" : { @@ -410,8 +406,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -440,14 +436,18 @@ } } }, - "200" : { - "description" : "Returns the paged result found", + "404" : { + "description" : "Not found.", "content" : { - "application/json" : {} + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } } }, - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -493,16 +493,6 @@ "required" : true }, "responses" : { - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "415" : { "description" : "Unsupported media type", "content" : { @@ -523,8 +513,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -553,11 +543,21 @@ } } }, + "404" : { + "description" : "Not found.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, "204" : { "description" : "No Content." }, - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -595,16 +595,6 @@ "required" : true }, "responses" : { - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "415" : { "description" : "Unsupported media type", "content" : { @@ -625,8 +615,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -665,6 +655,16 @@ } } }, + "400" : { + "description" : "Bad request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, "201" : { "description" : "Created.", "content" : { @@ -715,8 +715,8 @@ "required" : true }, "responses" : { - "403" : { - "description" : "Forbidden.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -725,8 +725,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -735,8 +735,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -748,8 +748,8 @@ "204" : { "description" : "No content." }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -758,8 +758,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -768,8 +768,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -778,8 +778,8 @@ } } }, - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -828,8 +828,8 @@ "required" : true }, "responses" : { - "403" : { - "description" : "Forbidden.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -838,8 +838,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -848,8 +848,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -861,8 +861,8 @@ "204" : { "description" : "No content." }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -871,8 +871,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -881,8 +881,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -891,8 +891,8 @@ } } }, - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -931,8 +931,8 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -941,8 +941,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -951,18 +951,8 @@ } } }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1003,6 +993,16 @@ } } } + }, + "400" : { + "description" : "Bad request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } } }, "security" : [ @@ -1034,8 +1034,8 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1044,8 +1044,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1054,8 +1054,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1067,8 +1067,8 @@ "204" : { "description" : "No content." }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1077,8 +1077,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1087,8 +1087,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1097,8 +1097,8 @@ } } }, - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1136,16 +1136,6 @@ "required" : true }, "responses" : { - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "415" : { "description" : "Unsupported media type", "content" : { @@ -1166,8 +1156,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1206,6 +1196,16 @@ } } }, + "400" : { + "description" : "Bad request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, "201" : { "description" : "Created.", "content" : { @@ -1245,16 +1245,6 @@ "required" : true }, "responses" : { - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "415" : { "description" : "Unsupported media type", "content" : { @@ -1275,8 +1265,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1315,6 +1305,16 @@ } } }, + "400" : { + "description" : "Bad request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, "201" : { "description" : "Created." } @@ -1347,8 +1347,8 @@ "required" : true }, "responses" : { - "403" : { - "description" : "Forbidden.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1357,8 +1357,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1367,18 +1367,20 @@ } } }, - "500" : { - "description" : "Internal server error.", + "200" : { + "description" : "Returns the paged result found for Asset", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1407,20 +1409,18 @@ } } }, - "200" : { - "description" : "Returns the paged result found for Asset", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1458,16 +1458,6 @@ "required" : true }, "responses" : { - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "415" : { "description" : "Unsupported media type", "content" : { @@ -1488,8 +1478,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1528,6 +1518,16 @@ } } }, + "400" : { + "description" : "Bad request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, "201" : { "description" : "Created." } @@ -1572,16 +1572,6 @@ } } }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "415" : { "description" : "Unsupported media type", "content" : { @@ -1602,8 +1592,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1641,6 +1631,16 @@ } } } + }, + "400" : { + "description" : "Bad request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } } }, "security" : [ @@ -1664,23 +1664,13 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/StartQualityAlertRequest" + "$ref" : "#/components/schemas/StartQualityNotificationRequest" } } }, "required" : true }, "responses" : { - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "415" : { "description" : "Unsupported media type", "content" : { @@ -1701,8 +1691,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1741,6 +1731,16 @@ } } }, + "400" : { + "description" : "Bad request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, "201" : { "description" : "Created.", "content" : { @@ -1791,8 +1791,8 @@ "required" : true }, "responses" : { - "403" : { - "description" : "Forbidden.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1801,8 +1801,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1811,8 +1811,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1824,8 +1824,8 @@ "204" : { "description" : "No content." }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1834,8 +1834,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1844,8 +1844,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1854,8 +1854,8 @@ } } }, - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1904,16 +1904,6 @@ "required" : true }, "responses" : { - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "415" : { "description" : "Unsupported media type", "content" : { @@ -1934,11 +1924,8 @@ } } }, - "204" : { - "description" : "No content." - }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1947,6 +1934,9 @@ } } }, + "204" : { + "description" : "No content." + }, "401" : { "description" : "Authorization failed.", "content" : { @@ -1976,9 +1966,19 @@ } } } - } - }, - "security" : [ + }, + "400" : { + "description" : "Bad request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security" : [ { "oAuth2" : [ "profile email" @@ -2007,8 +2007,8 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2017,8 +2017,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2027,8 +2027,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2040,8 +2040,8 @@ "204" : { "description" : "No content." }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2050,8 +2050,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2060,8 +2060,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2070,8 +2070,8 @@ } } }, - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2110,16 +2110,6 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "415" : { "description" : "Unsupported media type", "content" : { @@ -2140,8 +2130,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2182,6 +2172,16 @@ } } } + }, + "400" : { + "description" : "Bad request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } } }, "security" : [ @@ -2212,8 +2212,8 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2222,8 +2222,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2232,8 +2232,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2242,8 +2242,18 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2379,18 +2389,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2399,8 +2399,8 @@ } } }, - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2446,66 +2446,6 @@ "required" : true }, "responses" : { - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "200" : { "description" : "Returns the updated asset", "content" : { @@ -2633,8 +2573,8 @@ } } }, - "404" : { - "description" : "Not found.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2642,36 +2582,17 @@ } } } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/assets/as-built/{assetId}" : { - "get" : { - "tags" : [ - "AssetsAsBuilt" - ], - "summary" : "Get asset by id", - "description" : "The endpoint returns an asset filtered by id .", - "operationId" : "assetById_1", - "parameters" : [ - { - "name" : "assetId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" + }, + "500" : { + "description" : "Internal server error.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } } - } - ], - "responses" : { + }, "403" : { "description" : "Forbidden.", "content" : { @@ -2682,8 +2603,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2692,8 +2613,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2702,8 +2623,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2712,8 +2633,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2721,9 +2642,38 @@ } } } - }, - "429" : { - "description" : "Too many requests.", + } + }, + "security" : [ + { + "oAuth2" : [ + "profile email" + ] + } + ] + } + }, + "/assets/as-built/{assetId}" : { + "get" : { + "tags" : [ + "AssetsAsBuilt" + ], + "summary" : "Get asset by id", + "description" : "The endpoint returns an asset filtered by id .", + "operationId" : "assetById_1", + "parameters" : [ + { + "name" : "assetId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + } + ], + "responses" : { + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2732,8 +2682,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2868,6 +2818,56 @@ } } } + }, + "403" : { + "description" : "Forbidden.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "401" : { + "description" : "Authorization failed.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "429" : { + "description" : "Too many requests.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "400" : { + "description" : "Bad request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } } }, "security" : [ @@ -2906,6 +2906,26 @@ "required" : true }, "responses" : { + "415" : { + "description" : "Unsupported media type", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "500" : { + "description" : "Internal server error.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, "403" : { "description" : "Forbidden.", "content" : { @@ -2916,8 +2936,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2926,8 +2946,18 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -3072,36 +3102,6 @@ } } } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } } }, "security" : [ @@ -3122,16 +3122,6 @@ "description" : "The endpoint returns all shell descriptors.", "operationId" : "findAll", "responses" : { - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "415" : { "description" : "Unsupported media type", "content" : { @@ -3152,8 +3142,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3204,6 +3194,16 @@ } } } + }, + "400" : { + "description" : "Bad request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } } }, "security" : [ @@ -3223,16 +3223,6 @@ "description" : "The endpoint deletes all shell descriptors.", "operationId" : "deleteAll", "responses" : { - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "415" : { "description" : "Unsupported media type", "content" : { @@ -3253,8 +3243,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3295,6 +3285,16 @@ } } } + }, + "400" : { + "description" : "Bad request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } } }, "security" : [ @@ -3315,16 +3315,6 @@ "description" : "The endpoint Triggers reload of shell descriptors.", "operationId" : "reload", "responses" : { - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "415" : { "description" : "Unsupported media type", "content" : { @@ -3345,8 +3335,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3378,8 +3368,18 @@ "202" : { "description" : "Created registry reload job." }, - "404" : { - "description" : "Not found.", + "404" : { + "description" : "Not found.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3418,16 +3418,6 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "415" : { "description" : "Unsupported media type", "content" : { @@ -3448,8 +3438,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3503,6 +3493,16 @@ } } } + }, + "400" : { + "description" : "Bad request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } } }, "security" : [ @@ -3533,8 +3533,8 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3543,8 +3543,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3553,8 +3553,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3563,12 +3563,14 @@ } } }, - "400" : { - "description" : "Bad request.", + "200" : { + "description" : "Returns the paged result found for Asset", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } @@ -3593,20 +3595,18 @@ } } }, - "200" : { - "description" : "Returns the paged result found for Asset", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3644,16 +3644,6 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "415" : { "description" : "Unsupported media type", "content" : { @@ -3674,8 +3664,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3725,6 +3715,16 @@ } } } + }, + "400" : { + "description" : "Bad request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } } }, "security" : [ @@ -3745,16 +3745,6 @@ "description" : "The endpoint can return limited data based on the user role", "operationId" : "dashboard", "responses" : { - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "415" : { "description" : "Unsupported media type", "content" : { @@ -3775,8 +3765,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3824,6 +3814,16 @@ } } } + }, + "400" : { + "description" : "Bad request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } } }, "security" : [ @@ -3862,8 +3862,8 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3872,8 +3872,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3882,8 +3882,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3892,8 +3892,18 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -4034,18 +4044,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -4054,8 +4054,8 @@ } } }, - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -4101,16 +4101,6 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "415" : { "description" : "Unsupported media type", "content" : { @@ -4131,8 +4121,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -4171,6 +4161,16 @@ } } }, + "400" : { + "description" : "Bad request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, "200" : { "description" : "Returns the asset by childId", "content" : { @@ -4337,16 +4337,6 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "415" : { "description" : "Unsupported media type", "content" : { @@ -4367,8 +4357,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -4418,6 +4408,16 @@ } } } + }, + "400" : { + "description" : "Bad request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } } }, "security" : [ @@ -4456,16 +4456,6 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "415" : { "description" : "Unsupported media type", "content" : { @@ -4486,8 +4476,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -4516,6 +4506,26 @@ } } }, + "404" : { + "description" : "Not found.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "400" : { + "description" : "Bad request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, "200" : { "description" : "Returns the paged result found for Asset", "content" : { @@ -4647,16 +4657,6 @@ } } } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } } }, "security" : [ @@ -4694,17 +4694,7 @@ } } ], - "responses" : { - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, + "responses" : { "415" : { "description" : "Unsupported media type", "content" : { @@ -4725,8 +4715,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -4891,6 +4881,16 @@ } } } + }, + "400" : { + "description" : "Bad request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } } }, "security" : [ @@ -4931,16 +4931,6 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "415" : { "description" : "Unsupported media type", "content" : { @@ -4961,8 +4951,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5012,6 +5002,16 @@ } } } + }, + "400" : { + "description" : "Bad request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } } }, "security" : [ @@ -5032,16 +5032,6 @@ "description" : "The endpoint returns a map for assets consumed by the map.", "operationId" : "assetsCountryMap", "responses" : { - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "415" : { "description" : "Unsupported media type", "content" : { @@ -5062,8 +5052,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5115,6 +5105,16 @@ } } } + }, + "400" : { + "description" : "Bad request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } } }, "security" : [ @@ -5146,16 +5146,6 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "415" : { "description" : "Unsupported media type", "content" : { @@ -5176,8 +5166,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5230,6 +5220,16 @@ } } } + }, + "400" : { + "description" : "Bad request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } } }, "security" : [ @@ -5260,8 +5260,8 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -5270,8 +5270,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5280,8 +5280,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5290,12 +5290,13 @@ } } }, - "400" : { - "description" : "Bad request.", + "200" : { + "description" : "Returns the paged result found for Asset", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "type" : "array" } } } @@ -5320,19 +5321,18 @@ } } }, - "200" : { - "description" : "Returns the paged result found for Asset", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5370,8 +5370,8 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -5380,8 +5380,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5390,8 +5390,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5400,12 +5400,13 @@ } } }, - "400" : { - "description" : "Bad request.", + "200" : { + "description" : "Returns the paged result found for Asset", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "type" : "array" } } } @@ -5430,19 +5431,18 @@ } } }, - "200" : { - "description" : "Returns the paged result found for Asset", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5470,16 +5470,6 @@ "description" : "Deletes all submodels from the system.", "operationId" : "deleteSubmodels", "responses" : { - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "415" : { "description" : "Unsupported media type", "content" : { @@ -5500,8 +5490,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5530,11 +5520,21 @@ } } }, + "404" : { + "description" : "Not found.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, "204" : { "description" : "No Content." }, - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5572,16 +5572,6 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "415" : { "description" : "Unsupported media type", "content" : { @@ -5602,8 +5592,11 @@ } } }, - "400" : { - "description" : "Bad request.", + "204" : { + "description" : "Deleted." + }, + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5632,9 +5625,6 @@ } } }, - "204" : { - "description" : "Deleted." - }, "404" : { "description" : "Not found.", "content" : { @@ -5644,6 +5634,16 @@ } } } + }, + "400" : { + "description" : "Bad request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } } }, "security" : [ @@ -5832,47 +5832,6 @@ } } }, - "StartQualityAlertRequest" : { - "required" : [ - "bpn", - "severity" - ], - "type" : "object", - "properties" : { - "partIds" : { - "maxItems" : 100, - "minItems" : 1, - "type" : "array", - "items" : { - "type" : "string" - } - }, - "description" : { - "maxLength" : 1000, - "minLength" : 15, - "type" : "string" - }, - "targetDate" : { - "type" : "string", - "format" : "date-time" - }, - "severity" : { - "type" : "string", - "enum" : [ - "MINOR", - "MAJOR", - "CRITICAL", - "LIFE_THREATENING" - ] - }, - "bpn" : { - "type" : "string" - }, - "asBuilt" : { - "type" : "boolean" - } - } - }, "UpdateAssetRequest" : { "required" : [ "qualityType" @@ -6348,32 +6307,6 @@ } } }, - "responses" : { - "badRequestAPI" : { - "description" : "Bad request", - "content" : { - "application/json" : { - "examples" : { - "default" : { - "value" : "{\"code\" : 400, \"Status\" : \"Bad request\", \"Message\" : \"Bad request\"}" - } - } - } - } - }, - "internalServerErrorAPI" : { - "description" : "Internal server error", - "content" : { - "application/json" : { - "examples" : { - "default" : { - "value" : "{\"code\" : 500, \"Status\" : \"Internal server error\", \"Message\" : \"Internal server error\"}" - } - } - } - } - } - }, "securitySchemes" : { "oAuth2" : { "type" : "oauth2", diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/base/mapper/AssetBaseResponseMapper.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/base/mapper/AssetBaseResponseMapper.java index 3b30cdc323..6f3d2b37f6 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/base/mapper/AssetBaseResponseMapper.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/base/mapper/AssetBaseResponseMapper.java @@ -32,7 +32,6 @@ import assets.response.base.SemanticDataModelResponse; import lombok.AllArgsConstructor; import lombok.Data; -import lombok.experimental.SuperBuilder; import lombok.extern.slf4j.Slf4j; import org.eclipse.tractusx.traceability.assets.domain.asbuilt.model.aspect.DetailAspectDataAsBuilt; import org.eclipse.tractusx.traceability.assets.domain.asbuilt.model.aspect.DetailAspectDataTractionBatteryCode; @@ -55,7 +54,6 @@ @AllArgsConstructor @Slf4j @Data -@SuperBuilder public class AssetBaseResponseMapper { public static List fromList(List detailAspectModels) { diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ApplicationProfiles.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ApplicationProfiles.java index d24c149241..e445525575 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ApplicationProfiles.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ApplicationProfiles.java @@ -29,6 +29,7 @@ public class ApplicationProfiles { public static final String NOT_TESTS = "!" + TESTS; public static final String NOT_INTEGRATION_TESTS = "!" + INTEGRATION_SPRING_BOOT; public static final String DEV = "dev"; + public static final String STABLE = "stable"; private ApplicationProfiles() { } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/FeatureFlags.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/FeatureFlags.java index 0f67414393..d11d281a34 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/FeatureFlags.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/FeatureFlags.java @@ -21,12 +21,6 @@ package org.eclipse.tractusx.traceability.common.config; public class FeatureFlags { - - public static final String NOTIFICATIONS_ENABLED_PROFILES = ApplicationProfiles.LOCAL + " | " + - ApplicationProfiles.INTEGRATION_SPRING_BOOT + " | " + - ApplicationProfiles.TESTS + " | " + - ApplicationProfiles.DEV; - private FeatureFlags() { } } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/OpenApiConfig.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/OpenApiConfig.java index c809883178..a2724001f6 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/OpenApiConfig.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/OpenApiConfig.java @@ -24,11 +24,8 @@ import io.swagger.v3.oas.annotations.OpenAPIDefinition; import io.swagger.v3.oas.models.Components; import io.swagger.v3.oas.models.OpenAPI; -import io.swagger.v3.oas.models.examples.Example; import io.swagger.v3.oas.models.info.Info; import io.swagger.v3.oas.models.info.License; -import io.swagger.v3.oas.models.media.Content; -import io.swagger.v3.oas.models.responses.ApiResponse; import io.swagger.v3.oas.models.security.OAuthFlow; import io.swagger.v3.oas.models.security.OAuthFlows; import io.swagger.v3.oas.models.security.Scopes; @@ -36,7 +33,6 @@ import io.swagger.v3.oas.models.security.SecurityScheme; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.http.MediaType; @Configuration @OpenAPIDefinition @@ -44,23 +40,7 @@ public class OpenApiConfig { @Bean public OpenAPI baseOpenAPI() { - ApiResponse badRequestAPI = new ApiResponse().content( - new Content().addMediaType( - MediaType.APPLICATION_JSON_VALUE, - new io.swagger.v3.oas.models.media.MediaType().addExamples( - "default", - new Example().value("{\"code\" : 400, \"Status\" : \"Bad request\", \"Message\" : \"Bad request\"}") - ))).description("Bad request"); - ApiResponse internalServerErrorAPI = new ApiResponse().content( - new Content().addMediaType( - MediaType.APPLICATION_JSON_VALUE, - new io.swagger.v3.oas.models.media.MediaType().addExamples( - "default", - new Example().value("{\"code\" : 500, \"Status\" : \"Internal server error\", \"Message\" : \"Internal server error\"}") - ))).description("Internal server error"); Components components = new Components(); - components.addResponses("badRequestAPI", badRequestAPI); - components.addResponses("internalServerErrorAPI", internalServerErrorAPI); components.addSecuritySchemes("oAuth2", new SecurityScheme().type(SecurityScheme.Type.OAUTH2) .flows(new OAuthFlows().clientCredentials( new OAuthFlow().scopes( diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/SecurityConfig.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/SecurityConfig.java index d1c7204cff..e8338df155 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/SecurityConfig.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/SecurityConfig.java @@ -57,11 +57,13 @@ public class SecurityConfig { "/actuator/**", "/registry/reload", "/submodel/**" + }; @Value("${jwt.resource-client}") private String resourceClient; + @Bean SecurityFilterChain securityFilterChain(final HttpSecurity httpSecurity) throws Exception { diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/model/SecurityUtils.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/model/SecurityUtils.java index d0d2bda19e..3631e29ba7 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/model/SecurityUtils.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/model/SecurityUtils.java @@ -21,13 +21,12 @@ import org.apache.commons.text.StringEscapeUtils; -import org.eclipse.tractusx.traceability.qualitynotification.application.alert.request.StartQualityAlertRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.CloseQualityNotificationRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityNotificationRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationRequest; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotification; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotificationContent; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotificationHeader; +import qualitynotification.base.request.CloseQualityNotificationRequest; +import qualitynotification.base.request.StartQualityNotificationRequest; +import qualitynotification.base.request.UpdateQualityNotificationRequest; import java.util.List; import java.util.Objects; @@ -58,7 +57,7 @@ public static StartQualityNotificationRequest sanitize(StartQualityNotificationR String cleanDescription = sanitize(request.getDescription()); String cleanReceiverBpn = sanitize(request.getReceiverBpn()); List cleanPartIds = sanitize(request.getPartIds()); - return StartQualityNotificationRequest.builder() + return StartQualityNotificationRequest.builder() .description(cleanDescription) .targetDate(request.getTargetDate()) .severity(request.getSeverity()) @@ -68,19 +67,6 @@ public static StartQualityNotificationRequest sanitize(StartQualityNotificationR .build(); } - public static StartQualityAlertRequest sanitize(StartQualityAlertRequest request) { - String cleanDescription = sanitize(request.getDescription()); - List cleanPartIds = sanitize(request.getPartIds()); - String cleanBpn = sanitize(request.getBpn()); - return StartQualityAlertRequest.builder() - .partIds(cleanPartIds) - .description(cleanDescription) - .targetDate(request.getTargetDate()) - .severity(request.getSeverity()) - .bpn(cleanBpn) - .isAsBuilt(request.isAsBuilt()) - .build(); - } public static CloseQualityNotificationRequest sanitize(CloseQualityNotificationRequest closeInvestigationRequest) { String cleanReason = sanitize(closeInvestigationRequest.getReason()); diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/discovery/infrastructure/repository/FeignDiscoveryRepositoryImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/discovery/infrastructure/repository/FeignDiscoveryRepositoryImpl.java index 4cb72726e2..9adbff4a9a 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/discovery/infrastructure/repository/FeignDiscoveryRepositoryImpl.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/discovery/infrastructure/repository/FeignDiscoveryRepositoryImpl.java @@ -24,9 +24,9 @@ import org.eclipse.tractusx.irs.registryclient.discovery.DiscoveryFinderRequest; import org.eclipse.tractusx.irs.registryclient.discovery.DiscoveryResponse; import org.eclipse.tractusx.irs.registryclient.discovery.EdcDiscoveryResult; +import org.eclipse.tractusx.traceability.common.properties.EdcProperties; import org.eclipse.tractusx.traceability.discovery.domain.model.Discovery; import org.eclipse.tractusx.traceability.discovery.domain.repository.DiscoveryRepository; -import org.eclipse.tractusx.traceability.common.properties.EdcProperties; import org.springframework.stereotype.Component; import java.util.ArrayList; @@ -43,6 +43,7 @@ public class FeignDiscoveryRepositoryImpl implements DiscoveryRepository { private final EdcProperties edcProperties; private final DiscoveryFinderClient discoveryFinderClient; + @Override public Optional retrieveDiscoveryByFinderAndEdcDiscoveryService(String bpn) { DiscoveryFinderRequest request = new DiscoveryFinderRequest(List.of("bpn")); DiscoveryResponse discoveryEndpoints = discoveryFinderClient.findDiscoveryEndpoints(request); diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/request/StartQualityAlertRequest.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/request/StartQualityAlertRequest.java deleted file mode 100644 index 243908186b..0000000000 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/request/StartQualityAlertRequest.java +++ /dev/null @@ -1,58 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2023 Contributors to the Eclipse Foundation - * - * See the NOTICE file(s) distributed with this work for additional - * information regarding copyright ownership. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ********************************************************************************/ - -package org.eclipse.tractusx.traceability.qualitynotification.application.alert.request; - -import io.swagger.annotations.ApiModelProperty; -import jakarta.validation.constraints.Future; -import jakarta.validation.constraints.NotNull; -import jakarta.validation.constraints.Size; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.QualityNotificationSeverityRequest; - -import java.time.Instant; -import java.util.List; - -// TODO move to tx-models -@Data -@Builder -@NoArgsConstructor -@AllArgsConstructor -public class StartQualityAlertRequest { - @Size(min = 1, max = 100, message = "Specify at least 1 and at most 100 partIds") - @ApiModelProperty(example = "[\"urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca978\"]") - private List partIds; - @Size(min = 15, max = 1000, message = "Description should have at least 15 characters and at most 1000 characters") - @ApiModelProperty(example = "The description") - private String description; - @ApiModelProperty(example = "2099-03-11T22:44:06.333826952Z") - @Future(message = "Specify at least the current day or a date in future") - private Instant targetDate; - @NotNull - @ApiModelProperty(example = "MINOR") - private QualityNotificationSeverityRequest severity; - @NotNull - @ApiModelProperty(example = "BPN00001123123AS") - private String bpn; - @ApiModelProperty(example = "true") - private boolean isAsBuilt = true; -} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertController.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertController.java index 0fc06aae27..b3d89060cd 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertController.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertController.java @@ -30,29 +30,29 @@ import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.validation.Valid; import lombok.extern.slf4j.Slf4j; -import org.eclipse.tractusx.traceability.common.config.FeatureFlags; import org.eclipse.tractusx.traceability.common.model.PageResult; import org.eclipse.tractusx.traceability.common.request.OwnPageable; import org.eclipse.tractusx.traceability.common.response.ErrorResponse; import org.eclipse.tractusx.traceability.qualitynotification.application.alert.mapper.AlertResponseMapper; -import org.eclipse.tractusx.traceability.qualitynotification.application.alert.request.StartQualityAlertRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.CloseQualityNotificationRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.QualityNotificationStatusRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.service.QualityNotificationService; import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.context.annotation.Profile; import org.springframework.http.HttpStatus; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import qualitynotification.alert.response.AlertResponse; +import qualitynotification.base.request.CloseQualityNotificationRequest; +import qualitynotification.base.request.QualityNotificationStatusRequest; +import qualitynotification.base.request.StartQualityNotificationRequest; +import qualitynotification.base.request.UpdateQualityNotificationRequest; import qualitynotification.base.response.QualityNotificationIdResponse; import static org.eclipse.tractusx.traceability.common.model.SecurityUtils.sanitize; import static org.eclipse.tractusx.traceability.qualitynotification.application.validation.UpdateQualityNotificationValidator.validate; +import static org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.StartQualityNotificationDomain.from; +import static org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationStatus.from; + -@Profile(FeatureFlags.NOTIFICATIONS_ENABLED_PROFILES) @RestController @RequestMapping(value = "/alerts", consumes = "application/json", produces = "application/json") @PreAuthorize("hasAnyRole('ROLE_ADMIN', 'ROLE_SUPERVISOR', 'ROLE_USER')") @@ -119,18 +119,10 @@ public AlertController(@Qualifier("alertServiceImpl") QualityNotificationService schema = @Schema(implementation = ErrorResponse.class)))}) @PostMapping @ResponseStatus(HttpStatus.CREATED) - public QualityNotificationIdResponse alertAssets(@RequestBody @Valid StartQualityAlertRequest request) { - StartQualityAlertRequest cleanStartQualityAlertRequest = sanitize(request); - log.info(API_LOG_START + " with params: {}", cleanStartQualityAlertRequest); - //TODO refactor this method to only take request as parameter - return new QualityNotificationIdResponse(alertService.start( - cleanStartQualityAlertRequest.getPartIds(), - cleanStartQualityAlertRequest.getDescription(), - cleanStartQualityAlertRequest.getTargetDate(), - cleanStartQualityAlertRequest.getSeverity().toDomain(), - cleanStartQualityAlertRequest.getBpn(), - cleanStartQualityAlertRequest.isAsBuilt() - ).value()); + public QualityNotificationIdResponse alertAssets(@RequestBody @Valid StartQualityNotificationRequest request) { + StartQualityNotificationRequest cleanStartQualityNotificationRequest = sanitize(request); + log.info(API_LOG_START + " with params: {}", cleanStartQualityNotificationRequest); + return new QualityNotificationIdResponse(alertService.start(from(cleanStartQualityNotificationRequest)).value()); } @Operation(operationId = "getCreatedAlerts", @@ -489,7 +481,7 @@ public void closeAlert( @Valid @RequestBody CloseQualityNotificationRequest closeAlertRequest) { CloseQualityNotificationRequest cleanCloseAlertRequest = sanitize(closeAlertRequest); log.info(API_LOG_START + "/{}/close with params {}", alertId, cleanCloseAlertRequest); - alertService.update(alertId, QualityNotificationStatusRequest.toDomain(QualityNotificationStatusRequest.CLOSED), cleanCloseAlertRequest.getReason()); + alertService.update(alertId, from(QualityNotificationStatusRequest.CLOSED), cleanCloseAlertRequest.getReason()); } @Operation(operationId = "updateAlert", @@ -554,7 +546,7 @@ public void updateAlert( UpdateQualityNotificationRequest cleanUpdateAlertRequest = sanitize(updateAlertRequest); validate(cleanUpdateAlertRequest); log.info(API_LOG_START + "/{}/update with params {}", alertId, cleanUpdateAlertRequest); - alertService.update(alertId, cleanUpdateAlertRequest.getStatus().toDomain(), cleanUpdateAlertRequest.getReason()); + alertService.update(alertId, from(cleanUpdateAlertRequest.getStatus()), cleanUpdateAlertRequest.getReason()); } } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/service/QualityNotificationService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/service/QualityNotificationService.java index b70df4e566..95a742faed 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/service/QualityNotificationService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/service/QualityNotificationService.java @@ -19,19 +19,15 @@ package org.eclipse.tractusx.traceability.qualitynotification.application.base.service; import org.eclipse.tractusx.traceability.common.model.PageResult; +import org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.StartQualityNotificationDomain; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotification; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationId; -import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationSeverity; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationStatus; import org.springframework.data.domain.Pageable; -import java.time.Instant; -import java.util.List; - public interface QualityNotificationService { - // TODO refactor to use request object instead of all params. - QualityNotificationId start(List partIds, String description, Instant targetDate, QualityNotificationSeverity severity, String targetBpn, boolean isAsBuilt); + QualityNotificationId start(StartQualityNotificationDomain startQualityAlertDomain); PageResult getCreated(Pageable pageable); diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/investigation/rest/InvestigationsController.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/investigation/rest/InvestigationsController.java index 0f1f332be4..4cd92faa72 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/investigation/rest/InvestigationsController.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/investigation/rest/InvestigationsController.java @@ -32,29 +32,28 @@ import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.validation.Valid; import lombok.extern.slf4j.Slf4j; -import org.eclipse.tractusx.traceability.common.config.FeatureFlags; import org.eclipse.tractusx.traceability.common.model.PageResult; import org.eclipse.tractusx.traceability.common.request.OwnPageable; import org.eclipse.tractusx.traceability.common.response.ErrorResponse; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.CloseQualityNotificationRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.QualityNotificationStatusRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityNotificationRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.service.QualityNotificationService; import org.eclipse.tractusx.traceability.qualitynotification.application.investigation.mapper.InvestigationResponseMapper; import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.context.annotation.Profile; import org.springframework.http.HttpStatus; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +import qualitynotification.base.request.CloseQualityNotificationRequest; +import qualitynotification.base.request.QualityNotificationStatusRequest; +import qualitynotification.base.request.StartQualityNotificationRequest; +import qualitynotification.base.request.UpdateQualityNotificationRequest; import qualitynotification.base.response.QualityNotificationIdResponse; import qualitynotification.investigation.response.InvestigationResponse; import static org.eclipse.tractusx.traceability.common.model.SecurityUtils.sanitize; import static org.eclipse.tractusx.traceability.qualitynotification.application.validation.UpdateQualityNotificationValidator.validate; +import static org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.StartQualityNotificationDomain.from; +import static org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationStatus.from; -@Profile(FeatureFlags.NOTIFICATIONS_ENABLED_PROFILES) @RestController @RequestMapping(value = "/investigations", consumes = "application/json", produces = "application/json") @PreAuthorize("hasAnyRole('ROLE_ADMIN', 'ROLE_SUPERVISOR', 'ROLE_USER')") @@ -125,14 +124,8 @@ public InvestigationsController(@Qualifier("investigationServiceImpl") QualityNo public QualityNotificationIdResponse investigateAssets(@RequestBody @Valid StartQualityNotificationRequest request) { StartQualityNotificationRequest cleanRequest = sanitize(request); log.info(API_LOG_START + " with params: {}", cleanRequest); - return new QualityNotificationIdResponse(investigationService.start( - cleanRequest.getPartIds(), - cleanRequest.getDescription(), - cleanRequest.getTargetDate(), - cleanRequest.getSeverity().toDomain(), - cleanRequest.getReceiverBpn(), - cleanRequest.isAsBuilt()) - .value()); + return new QualityNotificationIdResponse(investigationService.start(from(cleanRequest)).value()); + } @Operation(operationId = "getCreatedInvestigations", @@ -484,7 +477,7 @@ public void cancelInvestigation(@PathVariable Long investigationId) { public void closeInvestigation(@PathVariable Long investigationId, @Valid @RequestBody CloseQualityNotificationRequest closeInvestigationRequest) { CloseQualityNotificationRequest cleanCloseQualityNotificationRequest = sanitize(closeInvestigationRequest); log.info(API_LOG_START + "/{}/close with params {}", investigationId, cleanCloseQualityNotificationRequest); - investigationService.update(investigationId, QualityNotificationStatusRequest.toDomain(QualityNotificationStatusRequest.CLOSED), cleanCloseQualityNotificationRequest.getReason()); + investigationService.update(investigationId, from(QualityNotificationStatusRequest.CLOSED), cleanCloseQualityNotificationRequest.getReason()); } @Operation(operationId = "updateInvestigation", @@ -547,7 +540,7 @@ public void updateInvestigation(@PathVariable Long investigationId, @Valid @Requ UpdateQualityNotificationRequest cleanUpdateQualityNotificationRequest = sanitize(updateInvestigationRequest); validate(cleanUpdateQualityNotificationRequest); log.info(API_LOG_START + "/{}/update with params {}", investigationId, cleanUpdateQualityNotificationRequest); - investigationService.update(investigationId, cleanUpdateQualityNotificationRequest.getStatus().toDomain(), cleanUpdateQualityNotificationRequest.getReason()); + investigationService.update(investigationId, from(cleanUpdateQualityNotificationRequest.getStatus()), cleanUpdateQualityNotificationRequest.getReason()); } } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/validation/UpdateQualityNotificationValidator.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/validation/UpdateQualityNotificationValidator.java index 0065b143c5..68ec0733df 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/validation/UpdateQualityNotificationValidator.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/validation/UpdateQualityNotificationValidator.java @@ -21,8 +21,8 @@ package org.eclipse.tractusx.traceability.qualitynotification.application.validation; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationRequest; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationStatus; +import qualitynotification.base.request.UpdateQualityNotificationRequest; import java.util.Set; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/model/exception/StartQualityNotificationDomain.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/model/exception/StartQualityNotificationDomain.java new file mode 100644 index 0000000000..bc92d6bba6 --- /dev/null +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/model/exception/StartQualityNotificationDomain.java @@ -0,0 +1,62 @@ +/******************************************************************************** + * Copyright (c) 2023 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ + +package org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception; + +import lombok.Builder; +import lombok.Data; +import lombok.Getter; +import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationSeverity; +import qualitynotification.base.request.StartQualityNotificationRequest; + +import java.time.Instant; +import java.util.List; + +@Builder +@Getter +@Data +public class StartQualityNotificationDomain { + + private List partIds; + + private String description; + + private Instant targetDate; + + private QualityNotificationSeverity severity; + + private boolean isAsBuilt; + + private String receiverBpn; + + + + public static StartQualityNotificationDomain from(StartQualityNotificationRequest startQualityNotificationRequest) { + return StartQualityNotificationDomain.builder() + .partIds(startQualityNotificationRequest.getPartIds()) + .description(startQualityNotificationRequest.getDescription()) + .targetDate(startQualityNotificationRequest.getTargetDate()) + .severity(QualityNotificationSeverity.from(startQualityNotificationRequest.getSeverity())) + .receiverBpn(startQualityNotificationRequest.getReceiverBpn()) + .isAsBuilt(startQualityNotificationRequest.isAsBuilt()) + .build(); + } + + +} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/service/AlertServiceImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/service/AlertServiceImpl.java index 9ab66a6840..af95dc32fd 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/service/AlertServiceImpl.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/service/AlertServiceImpl.java @@ -23,18 +23,15 @@ import lombok.extern.slf4j.Slf4j; import org.eclipse.tractusx.traceability.assets.domain.asbuilt.service.AssetAsBuiltServiceImpl; import org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.AlertNotFoundException; +import org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.StartQualityNotificationDomain; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.AlertRepository; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotification; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationId; -import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationSeverity; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.service.AbstractQualityNotificationService; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.service.NotificationPublisherService; import org.eclipse.tractusx.traceability.qualitynotification.domain.repository.QualityNotificationRepository; import org.springframework.stereotype.Service; -import java.time.Instant; -import java.util.List; - @Slf4j @Service("alertServiceImpl") @RequiredArgsConstructor @@ -60,8 +57,8 @@ protected AssetAsBuiltServiceImpl getAssetAsBuiltServiceImpl() { } @Override - public QualityNotificationId start(List partIds, String description, Instant targetDate, QualityNotificationSeverity severity, String targetBpn, boolean isAsBuilt) { - QualityNotification notification = notificationPublisherService.startAlert(partIds, description, targetDate, severity, targetBpn, isAsBuilt); + public QualityNotificationId start(StartQualityNotificationDomain startQualityAlertDomain) { + QualityNotification notification = notificationPublisherService.startAlert(startQualityAlertDomain.getPartIds(), startQualityAlertDomain.getDescription(), startQualityAlertDomain.getTargetDate(), startQualityAlertDomain.getSeverity(), startQualityAlertDomain.getReceiverBpn(), startQualityAlertDomain.isAsBuilt()); QualityNotificationId createdAlertId = alertRepository.saveQualityNotificationEntity(notification); log.info("Start Alert {}", notification); diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/model/QualityNotificationSeverity.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/model/QualityNotificationSeverity.java index 188e4a98da..daaea19d3a 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/model/QualityNotificationSeverity.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/model/QualityNotificationSeverity.java @@ -21,6 +21,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import qualitynotification.base.request.QualityNotificationSeverityRequest; @ApiModel(description = "Describes the criticality of a notification") public enum QualityNotificationSeverity { @@ -48,4 +49,8 @@ public static QualityNotificationSeverity fromString(String str) { public String getRealName() { return realName; } + + public static QualityNotificationSeverity from(QualityNotificationSeverityRequest qualityNotificationSeverityRequest) { + return QualityNotificationSeverity.fromString(qualityNotificationSeverityRequest.getRealName()); + } } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/model/QualityNotificationStatus.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/model/QualityNotificationStatus.java index 813b632ebb..72d784a646 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/model/QualityNotificationStatus.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/model/QualityNotificationStatus.java @@ -19,6 +19,9 @@ package org.eclipse.tractusx.traceability.qualitynotification.domain.base.model; +import qualitynotification.base.request.QualityNotificationStatusRequest; +import qualitynotification.base.request.UpdateQualityNotificationStatusRequest; + import java.util.Arrays; import java.util.List; import java.util.Map; @@ -95,4 +98,12 @@ private boolean isSideEligibleForTransition(QualityNotificationStatus from, Qual public boolean isActiveState() { return ACTIVE_STATES.contains(this); } + + public static QualityNotificationStatus from(QualityNotificationStatusRequest qualityNotificationStatusRequest) { + return QualityNotificationStatus.fromStringValue(qualityNotificationStatusRequest.name()); + } + + public static QualityNotificationStatus from(UpdateQualityNotificationStatusRequest qualityNotificationStatusRequest) { + return QualityNotificationStatus.fromStringValue(qualityNotificationStatusRequest.name()); + } } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/investigation/service/InvestigationServiceImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/investigation/service/InvestigationServiceImpl.java index 118fcba13c..5a82e06340 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/investigation/service/InvestigationServiceImpl.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/investigation/service/InvestigationServiceImpl.java @@ -22,19 +22,16 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.eclipse.tractusx.traceability.assets.domain.asbuilt.service.AssetAsBuiltServiceImpl; +import org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.StartQualityNotificationDomain; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.InvestigationRepository; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotification; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationId; -import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationSeverity; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.service.AbstractQualityNotificationService; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.service.NotificationPublisherService; import org.eclipse.tractusx.traceability.qualitynotification.domain.investigation.model.exception.InvestigationNotFoundException; import org.eclipse.tractusx.traceability.qualitynotification.domain.repository.QualityNotificationRepository; import org.springframework.stereotype.Service; -import java.time.Instant; -import java.util.List; - @Slf4j @RequiredArgsConstructor @Service("investigationServiceImpl") @@ -60,8 +57,8 @@ protected AssetAsBuiltServiceImpl getAssetAsBuiltServiceImpl() { } @Override - public QualityNotificationId start(List partIds, String description, Instant targetDate, QualityNotificationSeverity severity, String receiverBpn, boolean isAsBuilt) { - QualityNotification notification = getNotificationPublisherService().startInvestigation(partIds, description, targetDate, severity, receiverBpn, isAsBuilt); + public QualityNotificationId start(StartQualityNotificationDomain startQualityAlertDomain) { + QualityNotification notification = getNotificationPublisherService().startInvestigation(startQualityAlertDomain.getPartIds(), startQualityAlertDomain.getDescription(), startQualityAlertDomain.getTargetDate(), startQualityAlertDomain.getSeverity(), startQualityAlertDomain.getReceiverBpn(), startQualityAlertDomain.isAsBuilt()); QualityNotificationId createdInvestigationId = getQualityNotificationRepository().saveQualityNotificationEntity(notification); log.info("Start Investigation {}", notification); diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/alert/model/AlertNotificationEntity.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/alert/model/AlertNotificationEntity.java index e94734efb2..222c7d3bb1 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/alert/model/AlertNotificationEntity.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/alert/model/AlertNotificationEntity.java @@ -27,7 +27,6 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; import lombok.AllArgsConstructor; -import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @@ -48,7 +47,6 @@ @SuperBuilder @AllArgsConstructor @NoArgsConstructor -@EqualsAndHashCode @Entity @Table(name = "alert_notification") public class AlertNotificationEntity extends QualityNotificationMessageBaseEntity { diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/edc/EdcController.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/edc/EdcController.java index 24900d7773..b40a1cbb5e 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/edc/EdcController.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/edc/EdcController.java @@ -30,14 +30,12 @@ import jakarta.validation.Valid; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.eclipse.tractusx.traceability.common.config.FeatureFlags; import org.eclipse.tractusx.traceability.common.response.ErrorResponse; import org.eclipse.tractusx.traceability.qualitynotification.domain.alert.service.AlertsReceiverService; import org.eclipse.tractusx.traceability.qualitynotification.domain.investigation.model.exception.InvestigationIllegalUpdate; import org.eclipse.tractusx.traceability.qualitynotification.domain.investigation.service.InvestigationsReceiverService; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotification; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.NotificationType; -import org.springframework.context.annotation.Profile; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -46,7 +44,6 @@ import static org.eclipse.tractusx.traceability.common.model.SecurityUtils.sanitize; @Slf4j -@Profile(FeatureFlags.NOTIFICATIONS_ENABLED_PROFILES) @Hidden @RestController @Validated diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/investigation/model/InvestigationNotificationEntity.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/investigation/model/InvestigationNotificationEntity.java index f1fd75abb5..69bee1f0cd 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/investigation/model/InvestigationNotificationEntity.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/investigation/model/InvestigationNotificationEntity.java @@ -27,7 +27,6 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; import lombok.AllArgsConstructor; -import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @@ -48,7 +47,6 @@ @SuperBuilder @AllArgsConstructor @NoArgsConstructor -@EqualsAndHashCode @Entity @Table(name = "investigation_notification") public class InvestigationNotificationEntity extends QualityNotificationMessageBaseEntity { diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/model/EdcNotificationModelTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/model/EdcNotificationModelTest.java index bb96fee0ad..55f9d31039 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/model/EdcNotificationModelTest.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/model/EdcNotificationModelTest.java @@ -18,12 +18,15 @@ ********************************************************************************/ package org.eclipse.tractusx.traceability.infrastructure.edc.model; -import org.eclipse.tractusx.traceability.qualitynotification.application.alert.request.StartQualityAlertRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.*; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotification; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotificationContent; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotificationHeader; import org.junit.jupiter.api.Test; +import qualitynotification.base.request.CloseQualityNotificationRequest; +import qualitynotification.base.request.QualityNotificationSeverityRequest; +import qualitynotification.base.request.StartQualityNotificationRequest; +import qualitynotification.base.request.UpdateQualityNotificationRequest; +import qualitynotification.base.request.UpdateQualityNotificationStatusRequest; import java.time.Instant; import java.util.ArrayList; @@ -95,28 +98,6 @@ public void testSanitizeStartQualityNotificationRequest() { } - @Test - public void testSanitizeStartQualityAlertRequest() { - //GIVEN - List partIds = new ArrayList<>(); - partIds.add("urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca978"); - partIds.add("urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca979\n"); - Instant targetDate = Instant.parse("2023-09-22T14:30:00Z".trim()); - QualityNotificationSeverityRequest severity = QualityNotificationSeverityRequest.MINOR; - StartQualityAlertRequest request = new StartQualityAlertRequest(partIds, "The description\n", targetDate, severity, "BPN00001123123AS\n", true); - - - //WHEN - StartQualityAlertRequest cleanRequest = sanitize(request); - - //THEN - assertEquals("urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca979 ", cleanRequest.getPartIds().get(1)); - assertEquals("The description ", cleanRequest.getDescription()); - assertTrue(cleanRequest.isAsBuilt()); - assertEquals("BPN00001123123AS ", cleanRequest.getBpn()); - - } - @Test public void testSanitizeCloseInvestigationRequest() { //GIVEN diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/DashboardControllerIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/DashboardControllerIT.java index 6bdd59adef..9f39dbd89d 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/DashboardControllerIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/DashboardControllerIT.java @@ -28,9 +28,6 @@ import org.eclipse.tractusx.traceability.integration.common.support.AlertsSupport; import org.eclipse.tractusx.traceability.integration.common.support.AssetsSupport; import org.eclipse.tractusx.traceability.integration.common.support.InvestigationsSupport; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.QualityNotificationSeverityRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityNotificationRequest; -import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.model.NotificationStatusBaseEntity; import org.jose4j.lang.JoseException; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -40,6 +37,8 @@ import org.springframework.beans.factory.annotation.Autowired; import org.testcontainers.shaded.com.fasterxml.jackson.core.JsonProcessingException; import org.testcontainers.shaded.com.fasterxml.jackson.databind.ObjectMapper; +import qualitynotification.base.request.QualityNotificationSeverityRequest; +import qualitynotification.base.request.StartQualityNotificationRequest; import java.util.List; import java.util.stream.Stream; diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/alert/PublisherAlertsControllerIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/alert/PublisherAlertsControllerIT.java index ca2386eccb..f288e3cb21 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/alert/PublisherAlertsControllerIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/alert/PublisherAlertsControllerIT.java @@ -30,11 +30,6 @@ import org.eclipse.tractusx.traceability.integration.common.support.AlertNotificationsSupport; import org.eclipse.tractusx.traceability.integration.common.support.AlertsSupport; import org.eclipse.tractusx.traceability.integration.common.support.AssetsSupport; -import org.eclipse.tractusx.traceability.qualitynotification.application.alert.request.StartQualityAlertRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.CloseQualityNotificationRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.QualityNotificationSeverityRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationStatusRequest; import org.eclipse.tractusx.traceability.qualitynotification.domain.alert.service.AlertsReceiverService; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationAffectedPart; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationMessage; @@ -51,6 +46,11 @@ import org.springframework.transaction.annotation.Transactional; import org.testcontainers.shaded.com.fasterxml.jackson.core.JsonProcessingException; import org.testcontainers.shaded.com.fasterxml.jackson.databind.ObjectMapper; +import qualitynotification.base.request.CloseQualityNotificationRequest; +import qualitynotification.base.request.QualityNotificationSeverityRequest; +import qualitynotification.base.request.StartQualityNotificationRequest; +import qualitynotification.base.request.UpdateQualityNotificationRequest; +import qualitynotification.base.request.UpdateQualityNotificationStatusRequest; import java.time.Instant; import java.util.List; @@ -121,15 +121,15 @@ void shouldStartAlert() throws JsonProcessingException, JoseException { ); String description = "at least 15 characters long investigation description"; QualityNotificationSeverityRequest severity = QualityNotificationSeverityRequest.MINOR; - String bpn = "BPN"; + String receiverBpn = "BPN"; assetsSupport.defaultAssetsStored(); - val request = StartQualityAlertRequest.builder() + val request = StartQualityNotificationRequest.builder() .partIds(partIds) .description(description) .severity(severity) - .bpn(bpn) + .receiverBpn(receiverBpn) .isAsBuilt(true) .build(); @@ -177,15 +177,15 @@ void shouldStartAlertForAsPlanned() throws JsonProcessingException, JoseExceptio ); String description = "at least 15 characters long investigation description"; QualityNotificationSeverityRequest severity = QualityNotificationSeverityRequest.MINOR; - String bpn = "BPN"; + String receiverBpn = "BPN"; assetsSupport.defaultAssetsAsPlannedStored(); - val request = StartQualityAlertRequest.builder() + val request = StartQualityNotificationRequest.builder() .partIds(partIds) .description(description) .severity(severity) - .bpn(bpn) + .receiverBpn(receiverBpn) .isAsBuilt(false) .build(); @@ -234,7 +234,7 @@ void givenMissingSeverity_whenStartAlert_thenBadRequest() throws JsonProcessingE "urn:uuid:0ce83951-bc18-4e8f-892d-48bad4eb67ef" // BPN: BPNL00000003AXS3 ); String description = "at least 15 characters long investigation description"; - val request = StartQualityAlertRequest.builder() + val request = StartQualityNotificationRequest.builder() .partIds(partIds) .description(description) .build(); @@ -261,11 +261,11 @@ void givenDescriptionOverMaxLength_whenStartAlert_thenBadRequest() throws JsonPr String description = RandomStringUtils.random(1001); - val request = StartQualityAlertRequest.builder() + val request = StartQualityNotificationRequest.builder() .partIds(partIds) .description(description) .severity(QualityNotificationSeverityRequest.MINOR) - .bpn("BPN") + .receiverBpn("BPN") .build(); // when/then @@ -326,11 +326,11 @@ void givenWrongStatus_whenUpdateAlert_thenBadRequest() throws JsonProcessingExce void shouldCancelAlert() throws JsonProcessingException, JoseException { // given assetsSupport.defaultAssetsStored(); - val startAlertRequest = StartQualityAlertRequest.builder() + val startAlertRequest = StartQualityNotificationRequest.builder() .partIds(List.of("urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca978")) .description("at least 15 characters long investigation description") .severity(QualityNotificationSeverityRequest.MAJOR) - .bpn("BPN") + .receiverBpn("BPN") .isAsBuilt(true) .build(); @@ -392,11 +392,11 @@ void shouldApproveAlertStatus() throws JsonProcessingException, JoseException { assetsSupport.defaultAssetsStored(); - val startAlertRequest = StartQualityAlertRequest.builder() + val startAlertRequest = StartQualityNotificationRequest.builder() .partIds(partIds) .description(description) .severity(QualityNotificationSeverityRequest.MINOR) - .bpn("BPN") + .receiverBpn("BPN") .isAsBuilt(true) .build(); @@ -447,11 +447,11 @@ void shouldCloseAlertStatus() throws JsonProcessingException, JoseException { assetsSupport.defaultAssetsStored(); - val startAlertRequest = StartQualityAlertRequest.builder() + val startAlertRequest = StartQualityNotificationRequest.builder() .partIds(partIds) .description(description) .severity(QualityNotificationSeverityRequest.MINOR) - .bpn("BPN") + .receiverBpn("BPN") .isAsBuilt(true) .build(); @@ -556,11 +556,11 @@ void shouldBeCreatedBySender() throws JsonProcessingException, JoseException { ); String description = "at least 15 characters long investigation description"; assetsSupport.defaultAssetsStored(); - val startAlertRequest = StartQualityAlertRequest.builder() + val startAlertRequest = StartQualityNotificationRequest.builder() .partIds(partIds) .description(description) .severity(QualityNotificationSeverityRequest.MINOR) - .bpn("BPN") + .receiverBpn("BPN") .isAsBuilt(true) .build(); diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/alert/ReceiverAlertsControllerIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/alert/ReceiverAlertsControllerIT.java index 79ad799030..18fccbcf74 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/alert/ReceiverAlertsControllerIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/alert/ReceiverAlertsControllerIT.java @@ -22,7 +22,6 @@ import io.restassured.http.ContentType; import org.eclipse.tractusx.traceability.integration.IntegrationTestSpecification; import org.eclipse.tractusx.traceability.integration.common.support.AlertsSupport; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationStatusRequest; import org.hamcrest.Matchers; import org.jose4j.lang.JoseException; import org.junit.jupiter.api.Test; @@ -30,6 +29,7 @@ import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; import org.springframework.beans.factory.annotation.Autowired; +import qualitynotification.base.request.UpdateQualityNotificationStatusRequest; import java.util.stream.Stream; diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/PublisherInvestigationsControllerIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/PublisherInvestigationsControllerIT.java index beba5ae8c2..ac0dab8e81 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/PublisherInvestigationsControllerIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/PublisherInvestigationsControllerIT.java @@ -29,12 +29,6 @@ import org.eclipse.tractusx.traceability.integration.common.support.AssetsSupport; import org.eclipse.tractusx.traceability.integration.common.support.InvestigationNotificationsSupport; import org.eclipse.tractusx.traceability.integration.common.support.InvestigationsSupport; -import org.eclipse.tractusx.traceability.qualitynotification.application.alert.request.StartQualityAlertRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.CloseQualityNotificationRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.QualityNotificationSeverityRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityNotificationRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationStatusRequest; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationAffectedPart; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationMessage; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationSeverity; @@ -51,6 +45,11 @@ import org.springframework.transaction.annotation.Transactional; import org.testcontainers.shaded.com.fasterxml.jackson.core.JsonProcessingException; import org.testcontainers.shaded.com.fasterxml.jackson.databind.ObjectMapper; +import qualitynotification.base.request.CloseQualityNotificationRequest; +import qualitynotification.base.request.QualityNotificationSeverityRequest; +import qualitynotification.base.request.StartQualityNotificationRequest; +import qualitynotification.base.request.UpdateQualityNotificationRequest; +import qualitynotification.base.request.UpdateQualityNotificationStatusRequest; import java.time.Instant; import java.util.List; @@ -111,6 +110,7 @@ void shouldReceiveNotification() { investigationNotificationsSupport.assertNotificationsSize(1); } + @Test void shouldStartInvestigation() throws JsonProcessingException, JoseException { // given List partIds = List.of( @@ -199,7 +199,7 @@ void givenDescriptionExceedsMaxLength_whenStartInvestigation_thenBadRequest() th String description = RandomStringUtils.random(1001); - val request = StartQualityAlertRequest.builder() + val request = StartQualityNotificationRequest.builder() .partIds(partIds) .description(description) .severity(QualityNotificationSeverityRequest.MINOR) diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/ReceiverInvestigationsControllerIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/ReceiverInvestigationsControllerIT.java index 89f4ca8832..0cc19a3436 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/ReceiverInvestigationsControllerIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/ReceiverInvestigationsControllerIT.java @@ -23,7 +23,6 @@ import lombok.val; import org.eclipse.tractusx.traceability.integration.IntegrationTestSpecification; import org.eclipse.tractusx.traceability.integration.common.support.InvestigationsSupport; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationStatusRequest; import org.hamcrest.Matchers; import org.jose4j.lang.JoseException; import org.junit.jupiter.api.Test; @@ -31,6 +30,7 @@ import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; import org.springframework.beans.factory.annotation.Autowired; +import qualitynotification.base.request.UpdateQualityNotificationStatusRequest; import java.util.stream.Stream; diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertControllerTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertControllerTest.java index cee1f3f9ad..828f56ba9a 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertControllerTest.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertControllerTest.java @@ -19,11 +19,6 @@ package org.eclipse.tractusx.traceability.qualitynotification.application.alert.rest; -import org.eclipse.tractusx.traceability.qualitynotification.application.alert.request.StartQualityAlertRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.CloseQualityNotificationRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.QualityNotificationSeverityRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationStatusRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.service.QualityNotificationService; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotification; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationId; @@ -34,8 +29,14 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; import org.mockito.Mock; +import org.mockito.Mockito; import org.mockito.junit.jupiter.MockitoExtension; import qualitynotification.alert.response.AlertResponse; +import qualitynotification.base.request.CloseQualityNotificationRequest; +import qualitynotification.base.request.QualityNotificationSeverityRequest; +import qualitynotification.base.request.StartQualityNotificationRequest; +import qualitynotification.base.request.UpdateQualityNotificationRequest; +import qualitynotification.base.request.UpdateQualityNotificationStatusRequest; import qualitynotification.base.response.QualityNotificationIdResponse; import qualitynotification.base.response.QualityNotificationReasonResponse; import qualitynotification.base.response.QualityNotificationSeverityResponse; @@ -46,6 +47,7 @@ import java.util.List; import static org.assertj.core.api.Assertions.assertThat; +import static org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.StartQualityNotificationDomain.from; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @@ -56,6 +58,7 @@ class AlertControllerTest { @Mock private QualityNotificationService alertService; + @InjectMocks private AlertController controller; @@ -65,20 +68,14 @@ void givenRequestBody_whenAlertAssets_thenResponse() { final List partIds = List.of("partId1", "partId2"); final Instant targetDate = Instant.parse("2099-03-11T22:44:06.333826952Z"); final QualityNotificationId notificationId = new QualityNotificationId(666L); - final StartQualityAlertRequest request = StartQualityAlertRequest.builder() + final StartQualityNotificationRequest request = StartQualityNotificationRequest.builder() .partIds(partIds) .description("description") .targetDate(targetDate) .severity(QualityNotificationSeverityRequest.MINOR) - .bpn("BPN00001") + .receiverBpn("BPN00001") .build(); - when(alertService.start( - request.getPartIds(), - request.getDescription(), - request.getTargetDate(), - request.getSeverity().toDomain(), - request.getBpn(), request.isAsBuilt() - )).thenReturn(notificationId); + when(alertService.start(Mockito.eq(from(request)))).thenReturn(notificationId); // when final QualityNotificationIdResponse result = controller.alertAssets(request); diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/application/request/QualityNotificationSeverityRequestTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/application/request/QualityNotificationSeverityRequestTest.java index bde14b9781..876f5e0ba1 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/application/request/QualityNotificationSeverityRequestTest.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/application/request/QualityNotificationSeverityRequestTest.java @@ -21,12 +21,12 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.exc.ValueInstantiationException; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.QualityNotificationSeverityRequest; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; +import qualitynotification.base.request.QualityNotificationSeverityRequest; import java.io.IOException; import java.util.NoSuchElementException; diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/investigation/rest/validation/UpdateQualityNotificationValidatorTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/investigation/rest/validation/UpdateQualityNotificationValidatorTest.java index 9ef7cb93ea..70f0f312f2 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/investigation/rest/validation/UpdateQualityNotificationValidatorTest.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/investigation/rest/validation/UpdateQualityNotificationValidatorTest.java @@ -21,8 +21,6 @@ package org.eclipse.tractusx.traceability.qualitynotification.investigation.rest.validation; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationStatusRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.validation.UpdateQualityNotificationValidationException; import org.eclipse.tractusx.traceability.qualitynotification.application.validation.UpdateQualityNotificationValidator; import org.junit.jupiter.api.DisplayName; @@ -30,6 +28,8 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; import org.mockito.junit.jupiter.MockitoExtension; +import qualitynotification.base.request.UpdateQualityNotificationRequest; +import qualitynotification.base.request.UpdateQualityNotificationStatusRequest; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; diff --git a/tx-models/src/main/java/assets/response/asplanned/AssetAsPlannedResponse.java b/tx-models/src/main/java/assets/response/asplanned/AssetAsPlannedResponse.java index 9877f10ca4..6fd517ea9b 100644 --- a/tx-models/src/main/java/assets/response/asplanned/AssetAsPlannedResponse.java +++ b/tx-models/src/main/java/assets/response/asplanned/AssetAsPlannedResponse.java @@ -22,11 +22,9 @@ import assets.response.base.AssetBaseResponse; import io.swagger.v3.oas.annotations.media.ArraySchema; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.*; import lombok.experimental.SuperBuilder; @SuperBuilder -@Data @ArraySchema(arraySchema = @Schema(description = "Assets", additionalProperties = Schema.AdditionalPropertiesValue.FALSE), maxItems = Integer.MAX_VALUE) public class AssetAsPlannedResponse extends AssetBaseResponse { diff --git a/tx-models/src/main/java/qualitynotification/alert/response/AlertResponse.java b/tx-models/src/main/java/qualitynotification/alert/response/AlertResponse.java index da4067c601..89035568ac 100644 --- a/tx-models/src/main/java/qualitynotification/alert/response/AlertResponse.java +++ b/tx-models/src/main/java/qualitynotification/alert/response/AlertResponse.java @@ -21,12 +21,11 @@ import io.swagger.v3.oas.annotations.media.ArraySchema; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; import lombok.ToString; import lombok.experimental.SuperBuilder; import qualitynotification.base.response.QualityNotificationResponse; -@Data + @ToString(callSuper = true) @SuperBuilder @ArraySchema(arraySchema = @Schema(description = "Alerts", additionalProperties = Schema.AdditionalPropertiesValue.FALSE), maxItems = Integer.MAX_VALUE) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/CloseQualityNotificationRequest.java b/tx-models/src/main/java/qualitynotification/base/request/CloseQualityNotificationRequest.java similarity index 92% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/CloseQualityNotificationRequest.java rename to tx-models/src/main/java/qualitynotification/base/request/CloseQualityNotificationRequest.java index f325607e0e..f28020c8d6 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/CloseQualityNotificationRequest.java +++ b/tx-models/src/main/java/qualitynotification/base/request/CloseQualityNotificationRequest.java @@ -19,14 +19,14 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.qualitynotification.application.base.request; +package qualitynotification.base.request; import io.swagger.annotations.ApiModelProperty; import jakarta.validation.constraints.Size; import lombok.Getter; import lombok.Setter; import lombok.ToString; -// TODO move to tx-models + @Setter @Getter @ToString diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/QualityNotificationSeverityRequest.java b/tx-models/src/main/java/qualitynotification/base/request/QualityNotificationSeverityRequest.java similarity index 87% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/QualityNotificationSeverityRequest.java rename to tx-models/src/main/java/qualitynotification/base/request/QualityNotificationSeverityRequest.java index ebb8c79179..4aadc9fe0e 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/QualityNotificationSeverityRequest.java +++ b/tx-models/src/main/java/qualitynotification/base/request/QualityNotificationSeverityRequest.java @@ -17,18 +17,17 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.qualitynotification.application.base.request; +package qualitynotification.base.request; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationSeverity; import java.util.NoSuchElementException; import java.util.stream.Collectors; import java.util.stream.Stream; -// TODO move to tx-models + @ApiModel(description = "Describes the criticality of a notification") public enum QualityNotificationSeverityRequest { MINOR("MINOR"), @@ -58,9 +57,6 @@ private static String supportedQualityNotificationSeverityRequest() { .collect(Collectors.joining(", ")); } - public QualityNotificationSeverity toDomain() { - return QualityNotificationSeverity.fromString(this.getRealName()); - } public String getRealName() { return this.realName; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/QualityNotificationStatusRequest.java b/tx-models/src/main/java/qualitynotification/base/request/QualityNotificationStatusRequest.java similarity index 69% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/QualityNotificationStatusRequest.java rename to tx-models/src/main/java/qualitynotification/base/request/QualityNotificationStatusRequest.java index a04d28ca7b..2d8a0a098d 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/QualityNotificationStatusRequest.java +++ b/tx-models/src/main/java/qualitynotification/base/request/QualityNotificationStatusRequest.java @@ -16,16 +16,13 @@ * * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.qualitynotification.application.base.request; +package qualitynotification.base.request; import io.swagger.annotations.ApiModel; -import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationStatus; -// TODO move to tx-models + @ApiModel(description = "Describes status for closed action") public enum QualityNotificationStatusRequest { - CLOSED; + CLOSED + - public static QualityNotificationStatus toDomain(QualityNotificationStatusRequest qualityNotificationStatusRequest) { - return QualityNotificationStatus.fromStringValue(qualityNotificationStatusRequest.name()); - } } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/StartQualityNotificationRequest.java b/tx-models/src/main/java/qualitynotification/base/request/StartQualityNotificationRequest.java similarity index 95% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/StartQualityNotificationRequest.java rename to tx-models/src/main/java/qualitynotification/base/request/StartQualityNotificationRequest.java index c9a4515fc5..deac1229ea 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/StartQualityNotificationRequest.java +++ b/tx-models/src/main/java/qualitynotification/base/request/StartQualityNotificationRequest.java @@ -19,7 +19,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.qualitynotification.application.base.request; +package qualitynotification.base.request; import io.swagger.annotations.ApiModelProperty; import jakarta.validation.constraints.Future; @@ -32,7 +32,7 @@ import java.time.Instant; import java.util.List; -// TODO move to tx-models + @Data @Builder @NoArgsConstructor @@ -54,4 +54,5 @@ public class StartQualityNotificationRequest { private boolean isAsBuilt = true; @ApiModelProperty(example = "BPN00001123123AS") private String receiverBpn; + } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/UpdateQualityNotificationRequest.java b/tx-models/src/main/java/qualitynotification/base/request/UpdateQualityNotificationRequest.java similarity index 92% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/UpdateQualityNotificationRequest.java rename to tx-models/src/main/java/qualitynotification/base/request/UpdateQualityNotificationRequest.java index db705e1dbc..3e7a71394a 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/UpdateQualityNotificationRequest.java +++ b/tx-models/src/main/java/qualitynotification/base/request/UpdateQualityNotificationRequest.java @@ -19,12 +19,12 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.qualitynotification.application.base.request; +package qualitynotification.base.request; import io.swagger.annotations.ApiModelProperty; import jakarta.validation.constraints.NotNull; import lombok.Data; -// TODO move to tx-models + @Data public class UpdateQualityNotificationRequest { @NotNull(message = "status must be present") diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/UpdateQualityNotificationStatusRequest.java b/tx-models/src/main/java/qualitynotification/base/request/UpdateQualityNotificationStatusRequest.java similarity index 85% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/UpdateQualityNotificationStatusRequest.java rename to tx-models/src/main/java/qualitynotification/base/request/UpdateQualityNotificationStatusRequest.java index d4facdbcaa..c14c664db4 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/UpdateQualityNotificationStatusRequest.java +++ b/tx-models/src/main/java/qualitynotification/base/request/UpdateQualityNotificationStatusRequest.java @@ -17,16 +17,15 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.qualitynotification.application.base.request; +package qualitynotification.base.request; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.v3.oas.annotations.media.Schema; -import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationStatus; import java.util.NoSuchElementException; import java.util.stream.Collectors; import java.util.stream.Stream; -// TODO move to tx-models + @Schema(description = "The UpdateInvestigationStatus") public enum UpdateQualityNotificationStatusRequest { ACKNOWLEDGED, @@ -47,9 +46,6 @@ private static String supportedUpdateInvestigationStatus() { return Stream.of(UpdateQualityNotificationStatusRequest.values()).map(Enum::name).collect(Collectors.joining(", ")); } - public QualityNotificationStatus toDomain() { - return QualityNotificationStatus.fromStringValue(this.name()); - } } diff --git a/tx-models/src/main/java/qualitynotification/investigation/response/InvestigationResponse.java b/tx-models/src/main/java/qualitynotification/investigation/response/InvestigationResponse.java index da3be53330..c9538083a4 100644 --- a/tx-models/src/main/java/qualitynotification/investigation/response/InvestigationResponse.java +++ b/tx-models/src/main/java/qualitynotification/investigation/response/InvestigationResponse.java @@ -21,12 +21,10 @@ import io.swagger.v3.oas.annotations.media.ArraySchema; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; import lombok.experimental.SuperBuilder; import qualitynotification.base.response.QualityNotificationResponse; -@Data @SuperBuilder @ArraySchema(arraySchema = @Schema(description = "Investigations", additionalProperties = Schema.AdditionalPropertiesValue.FALSE), minItems = Integer.MIN_VALUE, maxItems = Integer.MAX_VALUE) public class InvestigationResponse extends QualityNotificationResponse {