From ad68711b0380576a4971e9d6868795a89c147821 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Tue, 5 Sep 2023 00:44:09 +0200 Subject: [PATCH 01/84] feature: TRACEFOSS-2627 resiliency check --- .../charts/backend/templates/_helpers.tpl | 1 + .../charts/backend/templates/deployment.yaml | 7 +++++++ charts/traceability-foss/charts/backend/values.yaml | 6 +++++- charts/traceability-foss/values.yaml | 4 ++++ 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/charts/traceability-foss/charts/backend/templates/_helpers.tpl b/charts/traceability-foss/charts/backend/templates/_helpers.tpl index 955b1534d0..7597f1394b 100644 --- a/charts/traceability-foss/charts/backend/templates/_helpers.tpl +++ b/charts/traceability-foss/charts/backend/templates/_helpers.tpl @@ -80,3 +80,4 @@ Create the name of the service account to use {{- default "default" .Values.serviceAccount.name }} {{- end }} {{- end }} + diff --git a/charts/traceability-foss/charts/backend/templates/deployment.yaml b/charts/traceability-foss/charts/backend/templates/deployment.yaml index 32ad409e95..7c1597bc6d 100644 --- a/charts/traceability-foss/charts/backend/templates/deployment.yaml +++ b/charts/traceability-foss/charts/backend/templates/deployment.yaml @@ -56,6 +56,13 @@ spec: serviceAccountName: {{ include "traceability-foss-backend.serviceAccountName" . }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} + initContainers: + - name: wait-for-controlplane + image: appropriate/curl:latest + command: [ 'sh', '-c', 'until curl -s http://{{ .Values.serviceAccounts.edc }}:8080/api/check/liveness; do echo waiting for other pod; sleep 2; done;' ] + - name: wait-for-irs + image: appropriate/curl:latest + command: [ 'sh', '-c', 'until curl -s http://{{ .Values.serviceAccounts.irs }}tx-irs-dev:8080/actuator/health/liveness; do echo waiting for other pod; sleep 2; done;' ] containers: - name: {{ .Chart.Name }} securityContext: diff --git a/charts/traceability-foss/charts/backend/values.yaml b/charts/traceability-foss/charts/backend/values.yaml index 322c1e98e8..c5e902f22a 100644 --- a/charts/traceability-foss/charts/backend/values.yaml +++ b/charts/traceability-foss/charts/backend/values.yaml @@ -1,4 +1,4 @@ -# +charts/traceability-foss/charts/backend/values.yaml# # Copyright (c) 2022, 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # Copyright (c) 2022, 2023 ZF Friedrichshafen AG # Copyright (c) 2022, 2023 Contributors to the Eclipse Foundation @@ -170,3 +170,7 @@ portal: config: allowedCorsOriginFirst: "https://replace.me" allowedCorsOriginSecond: "https://replace.me" + +serviceAccounts: + irs: {{- tpl (.Values.irs-helm.serviceAccount.name | default "" ) . }} + edc: {{- tpl (.Values.tractusx-connector.serviceAccount.name | default "" ) . }} diff --git a/charts/traceability-foss/values.yaml b/charts/traceability-foss/values.yaml index 47cde04ce8..694e7abb80 100644 --- a/charts/traceability-foss/values.yaml +++ b/charts/traceability-foss/values.yaml @@ -305,6 +305,10 @@ backend: allowedCorsOriginFirst: "https://replace.me" allowedCorsOriginSecond: "https://replace.me" + serviceAccounts: + irs: {{- tpl (.Values.irs-helm.serviceAccount.name | default "" ) . }} + edc: {{- tpl (.Values.tractusx-connector.serviceAccount.name | default "" ) . }} + ######################### # PG Admin configuration # ######################### From 12ed4eaa0270ba4b0b5b3b57001d3ea99dc42218 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Tue, 5 Sep 2023 00:50:09 +0200 Subject: [PATCH 02/84] feature: TRACEFOSS-2627 resiliency check --- charts/traceability-foss/charts/backend/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/traceability-foss/charts/backend/values.yaml b/charts/traceability-foss/charts/backend/values.yaml index c5e902f22a..e4ab315292 100644 --- a/charts/traceability-foss/charts/backend/values.yaml +++ b/charts/traceability-foss/charts/backend/values.yaml @@ -172,5 +172,5 @@ config: allowedCorsOriginSecond: "https://replace.me" serviceAccounts: - irs: {{- tpl (.Values.irs-helm.serviceAccount.name | default "" ) . }} - edc: {{- tpl (.Values.tractusx-connector.serviceAccount.name | default "" ) . }} + irs: "CHANGEME" + edc: "CHANGEME" From f17a4edacf0e87a63186255c2d76dc300ea41120 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Tue, 5 Sep 2023 00:55:54 +0200 Subject: [PATCH 03/84] feature: TRACEFOSS-2627 resiliency check --- .../charts/backend/templates/deployment.yaml | 4 ++-- charts/traceability-foss/values.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/charts/traceability-foss/charts/backend/templates/deployment.yaml b/charts/traceability-foss/charts/backend/templates/deployment.yaml index 7c1597bc6d..e7c58dbcb2 100644 --- a/charts/traceability-foss/charts/backend/templates/deployment.yaml +++ b/charts/traceability-foss/charts/backend/templates/deployment.yaml @@ -59,10 +59,10 @@ spec: initContainers: - name: wait-for-controlplane image: appropriate/curl:latest - command: [ 'sh', '-c', 'until curl -s http://{{ .Values.serviceAccounts.edc }}:8080/api/check/liveness; do echo waiting for other pod; sleep 2; done;' ] + command: [ 'sh', '-c', 'until curl -s http://{{ .Values.serviceAccounts.edc }}-controlplane:8080/api/check/liveness; do echo waiting for other pod; sleep 2; done;' ] - name: wait-for-irs image: appropriate/curl:latest - command: [ 'sh', '-c', 'until curl -s http://{{ .Values.serviceAccounts.irs }}tx-irs-dev:8080/actuator/health/liveness; do echo waiting for other pod; sleep 2; done;' ] + command: [ 'sh', '-c', 'until curl -s http://{{ .Values.serviceAccounts.irs }}:8080/actuator/health/liveness; do echo waiting for other pod; sleep 2; done;' ] containers: - name: {{ .Chart.Name }} securityContext: diff --git a/charts/traceability-foss/values.yaml b/charts/traceability-foss/values.yaml index 694e7abb80..2b0a58daff 100644 --- a/charts/traceability-foss/values.yaml +++ b/charts/traceability-foss/values.yaml @@ -306,8 +306,8 @@ backend: allowedCorsOriginSecond: "https://replace.me" serviceAccounts: - irs: {{- tpl (.Values.irs-helm.serviceAccount.name | default "" ) . }} - edc: {{- tpl (.Values.tractusx-connector.serviceAccount.name | default "" ) . }} + irs: {{- tpl (.Values.irs-helm.nameOverride | default "" ) . }} + edc: {{- tpl (.Values.tractusx-connector.nameOverride | default "" ) . }} ######################### # PG Admin configuration # From 928c6b3ae65b7114e3d6601698d7d192ba02bd92 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Tue, 5 Sep 2023 00:57:45 +0200 Subject: [PATCH 04/84] feature: TRACEFOSS-2627 resiliency check --- charts/traceability-foss/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/traceability-foss/values.yaml b/charts/traceability-foss/values.yaml index 2b0a58daff..a51acbcc31 100644 --- a/charts/traceability-foss/values.yaml +++ b/charts/traceability-foss/values.yaml @@ -306,8 +306,8 @@ backend: allowedCorsOriginSecond: "https://replace.me" serviceAccounts: - irs: {{- tpl (.Values.irs-helm.nameOverride | default "" ) . }} - edc: {{- tpl (.Values.tractusx-connector.nameOverride | default "" ) . }} + irs: "testirs" # {{- tpl (.Values.irs-helm.nameOverride | default "" ) . }} + edc: "testedc" # {{- tpl (.Values.tractusx-connector.nameOverride | default "" ) . }} ######################### # PG Admin configuration # From 8d8ebf94eae7bd95c6ad20ffb9b85b5f76bdce57 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Tue, 5 Sep 2023 00:59:08 +0200 Subject: [PATCH 05/84] feature: TRACEFOSS-2627 resiliency check --- charts/traceability-foss/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/traceability-foss/values.yaml b/charts/traceability-foss/values.yaml index a51acbcc31..7080cc16b3 100644 --- a/charts/traceability-foss/values.yaml +++ b/charts/traceability-foss/values.yaml @@ -306,8 +306,8 @@ backend: allowedCorsOriginSecond: "https://replace.me" serviceAccounts: - irs: "testirs" # {{- tpl (.Values.irs-helm.nameOverride | default "" ) . }} - edc: "testedc" # {{- tpl (.Values.tractusx-connector.nameOverride | default "" ) . }} + irs: testirs # {{- tpl (.Values.irs-helm.nameOverride | default "" ) . }} + edc: testedc # {{- tpl (.Values.tractusx-connector.nameOverride | default "" ) . }} ######################### # PG Admin configuration # From 11a3e0acb4242e68de5e348dc8d2a950093ca639 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Tue, 5 Sep 2023 01:02:13 +0200 Subject: [PATCH 06/84] feature: TRACEFOSS-2627 resiliency check --- .../charts/backend/templates/deployment.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/traceability-foss/charts/backend/templates/deployment.yaml b/charts/traceability-foss/charts/backend/templates/deployment.yaml index e7c58dbcb2..349f49cbea 100644 --- a/charts/traceability-foss/charts/backend/templates/deployment.yaml +++ b/charts/traceability-foss/charts/backend/templates/deployment.yaml @@ -59,10 +59,10 @@ spec: initContainers: - name: wait-for-controlplane image: appropriate/curl:latest - command: [ 'sh', '-c', 'until curl -s http://{{ .Values.serviceAccounts.edc }}-controlplane:8080/api/check/liveness; do echo waiting for other pod; sleep 2; done;' ] + command: [ 'sh', '-c', 'until curl -s http://{{ .Values.serviceAccounts.edc . }}-controlplane:8080/api/check/liveness; do echo waiting for other pod; sleep 2; done;' ] - name: wait-for-irs image: appropriate/curl:latest - command: [ 'sh', '-c', 'until curl -s http://{{ .Values.serviceAccounts.irs }}:8080/actuator/health/liveness; do echo waiting for other pod; sleep 2; done;' ] + command: [ 'sh', '-c', 'until curl -s http://{{ .Values.serviceAccounts.irs . }}:8080/actuator/health/liveness; do echo waiting for other pod; sleep 2; done;' ] containers: - name: {{ .Chart.Name }} securityContext: From c19031e4e093bf0279d7f93d21090fb033b99a34 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Tue, 5 Sep 2023 01:03:43 +0200 Subject: [PATCH 07/84] feature: TRACEFOSS-2627 resiliency check --- charts/traceability-foss/charts/backend/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/traceability-foss/charts/backend/values.yaml b/charts/traceability-foss/charts/backend/values.yaml index e4ab315292..ef8ede1a13 100644 --- a/charts/traceability-foss/charts/backend/values.yaml +++ b/charts/traceability-foss/charts/backend/values.yaml @@ -172,5 +172,5 @@ config: allowedCorsOriginSecond: "https://replace.me" serviceAccounts: - irs: "CHANGEME" - edc: "CHANGEME" + irs: CHANGEME + edc: CHANGEME From 413716913314e87107149271f0828e4e49b2b67c Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Tue, 5 Sep 2023 01:13:07 +0200 Subject: [PATCH 08/84] feature: TRACEFOSS-2627 resiliency check --- charts/traceability-foss/values.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/charts/traceability-foss/values.yaml b/charts/traceability-foss/values.yaml index 7080cc16b3..36908d6e15 100644 --- a/charts/traceability-foss/values.yaml +++ b/charts/traceability-foss/values.yaml @@ -305,9 +305,9 @@ backend: allowedCorsOriginFirst: "https://replace.me" allowedCorsOriginSecond: "https://replace.me" - serviceAccounts: - irs: testirs # {{- tpl (.Values.irs-helm.nameOverride | default "" ) . }} - edc: testedc # {{- tpl (.Values.tractusx-connector.nameOverride | default "" ) . }} +# serviceAccounts: +# irs: testirs # {{- tpl (.Values.irs-helm.nameOverride | default "" ) . }} +# edc: testedc # {{- tpl (.Values.tractusx-connector.nameOverride | default "" ) . }} ######################### # PG Admin configuration # From 51a7a9c6e9edca14357d29fea4d5a16d11484387 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Tue, 5 Sep 2023 01:14:25 +0200 Subject: [PATCH 09/84] feature: TRACEFOSS-2627 resiliency check --- .../charts/backend/templates/deployment.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/traceability-foss/charts/backend/templates/deployment.yaml b/charts/traceability-foss/charts/backend/templates/deployment.yaml index 349f49cbea..e7c58dbcb2 100644 --- a/charts/traceability-foss/charts/backend/templates/deployment.yaml +++ b/charts/traceability-foss/charts/backend/templates/deployment.yaml @@ -59,10 +59,10 @@ spec: initContainers: - name: wait-for-controlplane image: appropriate/curl:latest - command: [ 'sh', '-c', 'until curl -s http://{{ .Values.serviceAccounts.edc . }}-controlplane:8080/api/check/liveness; do echo waiting for other pod; sleep 2; done;' ] + command: [ 'sh', '-c', 'until curl -s http://{{ .Values.serviceAccounts.edc }}-controlplane:8080/api/check/liveness; do echo waiting for other pod; sleep 2; done;' ] - name: wait-for-irs image: appropriate/curl:latest - command: [ 'sh', '-c', 'until curl -s http://{{ .Values.serviceAccounts.irs . }}:8080/actuator/health/liveness; do echo waiting for other pod; sleep 2; done;' ] + command: [ 'sh', '-c', 'until curl -s http://{{ .Values.serviceAccounts.irs }}:8080/actuator/health/liveness; do echo waiting for other pod; sleep 2; done;' ] containers: - name: {{ .Chart.Name }} securityContext: From dbb5e70841c2cd03bcdc2d76e436bf2a8529cb95 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Tue, 5 Sep 2023 01:18:01 +0200 Subject: [PATCH 10/84] feature: TRACEFOSS-2627 resiliency check --- .../traceability-foss/charts/backend/templates/_helpers.tpl | 6 ++++++ .../charts/backend/templates/deployment.yaml | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/charts/traceability-foss/charts/backend/templates/_helpers.tpl b/charts/traceability-foss/charts/backend/templates/_helpers.tpl index 7597f1394b..eb9ec8bf70 100644 --- a/charts/traceability-foss/charts/backend/templates/_helpers.tpl +++ b/charts/traceability-foss/charts/backend/templates/_helpers.tpl @@ -81,3 +81,9 @@ Create the name of the service account to use {{- end }} {{- end }} +{{/* +includeIRS +*/}} +{{- define "traceability-foss-backend.serviceAccounts.irs" -}} +{{- .Values.serviceAccounts.irs }} +{{- end }} diff --git a/charts/traceability-foss/charts/backend/templates/deployment.yaml b/charts/traceability-foss/charts/backend/templates/deployment.yaml index e7c58dbcb2..809286be05 100644 --- a/charts/traceability-foss/charts/backend/templates/deployment.yaml +++ b/charts/traceability-foss/charts/backend/templates/deployment.yaml @@ -59,10 +59,10 @@ spec: initContainers: - name: wait-for-controlplane image: appropriate/curl:latest - command: [ 'sh', '-c', 'until curl -s http://{{ .Values.serviceAccounts.edc }}-controlplane:8080/api/check/liveness; do echo waiting for other pod; sleep 2; done;' ] + command: [ 'sh', '-c', 'until curl -s http://{{ include "traceability-foss-backend.serviceAccounts.irs" }}-controlplane:8080/api/check/liveness; do echo waiting for other pod; sleep 2; done;' ] - name: wait-for-irs image: appropriate/curl:latest - command: [ 'sh', '-c', 'until curl -s http://{{ .Values.serviceAccounts.irs }}:8080/actuator/health/liveness; do echo waiting for other pod; sleep 2; done;' ] + command: [ 'sh', '-c', 'until curl -s http://{{ include "traceability-foss-backend.serviceAccounts.irs" }}:8080/actuator/health/liveness; do echo waiting for other pod; sleep 2; done;' ] containers: - name: {{ .Chart.Name }} securityContext: From 17b3053a247defbdb5dd96fa31d400513769f735 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Tue, 5 Sep 2023 01:19:17 +0200 Subject: [PATCH 11/84] feature: TRACEFOSS-2627 resiliency check --- .../charts/backend/templates/deployment.yaml | 4 ++-- charts/traceability-foss/values.yaml | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/charts/traceability-foss/charts/backend/templates/deployment.yaml b/charts/traceability-foss/charts/backend/templates/deployment.yaml index 809286be05..34b7a1faad 100644 --- a/charts/traceability-foss/charts/backend/templates/deployment.yaml +++ b/charts/traceability-foss/charts/backend/templates/deployment.yaml @@ -59,10 +59,10 @@ spec: initContainers: - name: wait-for-controlplane image: appropriate/curl:latest - command: [ 'sh', '-c', 'until curl -s http://{{ include "traceability-foss-backend.serviceAccounts.irs" }}-controlplane:8080/api/check/liveness; do echo waiting for other pod; sleep 2; done;' ] + command: [ 'sh', '-c', 'until curl -s http://{{ include "traceability-foss-backend.serviceAccounts.irs" . }}-controlplane:8080/api/check/liveness; do echo waiting for other pod; sleep 2; done;' ] - name: wait-for-irs image: appropriate/curl:latest - command: [ 'sh', '-c', 'until curl -s http://{{ include "traceability-foss-backend.serviceAccounts.irs" }}:8080/actuator/health/liveness; do echo waiting for other pod; sleep 2; done;' ] + command: [ 'sh', '-c', 'until curl -s http://{{ include "traceability-foss-backend.serviceAccounts.irs" . }}:8080/actuator/health/liveness; do echo waiting for other pod; sleep 2; done;' ] containers: - name: {{ .Chart.Name }} securityContext: diff --git a/charts/traceability-foss/values.yaml b/charts/traceability-foss/values.yaml index 36908d6e15..47cde04ce8 100644 --- a/charts/traceability-foss/values.yaml +++ b/charts/traceability-foss/values.yaml @@ -305,10 +305,6 @@ backend: allowedCorsOriginFirst: "https://replace.me" allowedCorsOriginSecond: "https://replace.me" -# serviceAccounts: -# irs: testirs # {{- tpl (.Values.irs-helm.nameOverride | default "" ) . }} -# edc: testedc # {{- tpl (.Values.tractusx-connector.nameOverride | default "" ) . }} - ######################### # PG Admin configuration # ######################### From b2b84ed5c3667f65e82109166538e9eef3e38510 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Tue, 5 Sep 2023 01:21:11 +0200 Subject: [PATCH 12/84] feature: TRACEFOSS-2627 resiliency check --- charts/traceability-foss/values.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/charts/traceability-foss/values.yaml b/charts/traceability-foss/values.yaml index 47cde04ce8..a51acbcc31 100644 --- a/charts/traceability-foss/values.yaml +++ b/charts/traceability-foss/values.yaml @@ -305,6 +305,10 @@ backend: allowedCorsOriginFirst: "https://replace.me" allowedCorsOriginSecond: "https://replace.me" + serviceAccounts: + irs: "testirs" # {{- tpl (.Values.irs-helm.nameOverride | default "" ) . }} + edc: "testedc" # {{- tpl (.Values.tractusx-connector.nameOverride | default "" ) . }} + ######################### # PG Admin configuration # ######################### From 76b4259839fca4dd9697cb1584b57a7d01e4eae2 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Tue, 5 Sep 2023 01:22:41 +0200 Subject: [PATCH 13/84] feature: TRACEFOSS-2627 resiliency check --- charts/traceability-foss/charts/backend/templates/_helpers.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/traceability-foss/charts/backend/templates/_helpers.tpl b/charts/traceability-foss/charts/backend/templates/_helpers.tpl index eb9ec8bf70..b8db17490b 100644 --- a/charts/traceability-foss/charts/backend/templates/_helpers.tpl +++ b/charts/traceability-foss/charts/backend/templates/_helpers.tpl @@ -85,5 +85,5 @@ Create the name of the service account to use includeIRS */}} {{- define "traceability-foss-backend.serviceAccounts.irs" -}} -{{- .Values.serviceAccounts.irs }} +{{- default .Values.serviceAccounts.irs }} {{- end }} From 85ee65ab881c9419b7d3b70afff5f188004da15f Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Tue, 5 Sep 2023 01:23:56 +0200 Subject: [PATCH 14/84] feature: TRACEFOSS-2627 resiliency check --- .../charts/backend/templates/_helpers.tpl | 12 ++++++------ .../charts/backend/templates/deployment.yaml | 14 +++++++------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/charts/traceability-foss/charts/backend/templates/_helpers.tpl b/charts/traceability-foss/charts/backend/templates/_helpers.tpl index b8db17490b..c0b52a72aa 100644 --- a/charts/traceability-foss/charts/backend/templates/_helpers.tpl +++ b/charts/traceability-foss/charts/backend/templates/_helpers.tpl @@ -81,9 +81,9 @@ Create the name of the service account to use {{- end }} {{- end }} -{{/* -includeIRS -*/}} -{{- define "traceability-foss-backend.serviceAccounts.irs" -}} -{{- default .Values.serviceAccounts.irs }} -{{- end }} +{{/**/}} +{{/*includeIRS*/}} +{{/**/}} +{{/*{{- define "traceability-foss-backend.serviceAccounts.irs" -}}*/}} +{{/*{{- default .Values.serviceAccounts.irs }}*/}} +{{/*{{- end }}*/}} diff --git a/charts/traceability-foss/charts/backend/templates/deployment.yaml b/charts/traceability-foss/charts/backend/templates/deployment.yaml index 34b7a1faad..2b6224a7f2 100644 --- a/charts/traceability-foss/charts/backend/templates/deployment.yaml +++ b/charts/traceability-foss/charts/backend/templates/deployment.yaml @@ -56,13 +56,13 @@ spec: serviceAccountName: {{ include "traceability-foss-backend.serviceAccountName" . }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} - initContainers: - - name: wait-for-controlplane - image: appropriate/curl:latest - command: [ 'sh', '-c', 'until curl -s http://{{ include "traceability-foss-backend.serviceAccounts.irs" . }}-controlplane:8080/api/check/liveness; do echo waiting for other pod; sleep 2; done;' ] - - name: wait-for-irs - image: appropriate/curl:latest - command: [ 'sh', '-c', 'until curl -s http://{{ include "traceability-foss-backend.serviceAccounts.irs" . }}:8080/actuator/health/liveness; do echo waiting for other pod; sleep 2; done;' ] +# initContainers: + # - name: wait-for-controlplane + # image: appropriate/curl:latest + # command: [ 'sh', '-c', 'until curl -s http://{{ include "traceability-foss-backend.serviceAccounts.irs" . }}-controlplane:8080/api/check/liveness; do echo waiting for other pod; sleep 2; done;' ] + # - name: wait-for-irs + # image: appropriate/curl:latest + # command: [ 'sh', '-c', 'until curl -s http://{{ include "traceability-foss-backend.serviceAccounts.irs" . }}:8080/actuator/health/liveness; do echo waiting for other pod; sleep 2; done;' ] containers: - name: {{ .Chart.Name }} securityContext: From 42940d078c7e77a31cb29f5891a573cc92fe155d Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Tue, 5 Sep 2023 01:25:51 +0200 Subject: [PATCH 15/84] feature: TRACEFOSS-2627 resiliency check --- charts/traceability-foss/charts/backend/values.yaml | 2 +- charts/traceability-foss/values.yaml | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/charts/traceability-foss/charts/backend/values.yaml b/charts/traceability-foss/charts/backend/values.yaml index ef8ede1a13..76e9d0571e 100644 --- a/charts/traceability-foss/charts/backend/values.yaml +++ b/charts/traceability-foss/charts/backend/values.yaml @@ -1,4 +1,4 @@ -charts/traceability-foss/charts/backend/values.yaml# +# # Copyright (c) 2022, 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # Copyright (c) 2022, 2023 ZF Friedrichshafen AG # Copyright (c) 2022, 2023 Contributors to the Eclipse Foundation diff --git a/charts/traceability-foss/values.yaml b/charts/traceability-foss/values.yaml index a51acbcc31..47cde04ce8 100644 --- a/charts/traceability-foss/values.yaml +++ b/charts/traceability-foss/values.yaml @@ -305,10 +305,6 @@ backend: allowedCorsOriginFirst: "https://replace.me" allowedCorsOriginSecond: "https://replace.me" - serviceAccounts: - irs: "testirs" # {{- tpl (.Values.irs-helm.nameOverride | default "" ) . }} - edc: "testedc" # {{- tpl (.Values.tractusx-connector.nameOverride | default "" ) . }} - ######################### # PG Admin configuration # ######################### From b6b1aa033f5a6a56c01e8d7e2ed6c57504374d46 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Tue, 5 Sep 2023 01:27:09 +0200 Subject: [PATCH 16/84] feature: TRACEFOSS-2627 resiliency check --- .../charts/backend/templates/deployment.yaml | 14 +++++++------- charts/traceability-foss/values.yaml | 4 ++++ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/charts/traceability-foss/charts/backend/templates/deployment.yaml b/charts/traceability-foss/charts/backend/templates/deployment.yaml index 2b6224a7f2..34b7a1faad 100644 --- a/charts/traceability-foss/charts/backend/templates/deployment.yaml +++ b/charts/traceability-foss/charts/backend/templates/deployment.yaml @@ -56,13 +56,13 @@ spec: serviceAccountName: {{ include "traceability-foss-backend.serviceAccountName" . }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} -# initContainers: - # - name: wait-for-controlplane - # image: appropriate/curl:latest - # command: [ 'sh', '-c', 'until curl -s http://{{ include "traceability-foss-backend.serviceAccounts.irs" . }}-controlplane:8080/api/check/liveness; do echo waiting for other pod; sleep 2; done;' ] - # - name: wait-for-irs - # image: appropriate/curl:latest - # command: [ 'sh', '-c', 'until curl -s http://{{ include "traceability-foss-backend.serviceAccounts.irs" . }}:8080/actuator/health/liveness; do echo waiting for other pod; sleep 2; done;' ] + initContainers: + - name: wait-for-controlplane + image: appropriate/curl:latest + command: [ 'sh', '-c', 'until curl -s http://{{ include "traceability-foss-backend.serviceAccounts.irs" . }}-controlplane:8080/api/check/liveness; do echo waiting for other pod; sleep 2; done;' ] + - name: wait-for-irs + image: appropriate/curl:latest + command: [ 'sh', '-c', 'until curl -s http://{{ include "traceability-foss-backend.serviceAccounts.irs" . }}:8080/actuator/health/liveness; do echo waiting for other pod; sleep 2; done;' ] containers: - name: {{ .Chart.Name }} securityContext: diff --git a/charts/traceability-foss/values.yaml b/charts/traceability-foss/values.yaml index 47cde04ce8..32cc4b4fbf 100644 --- a/charts/traceability-foss/values.yaml +++ b/charts/traceability-foss/values.yaml @@ -305,6 +305,10 @@ backend: allowedCorsOriginFirst: "https://replace.me" allowedCorsOriginSecond: "https://replace.me" + serviceAccounts: + irs: CHANGEME + edc: CHANGEME + ######################### # PG Admin configuration # ######################### From d31613512c5af9dce0db7bb554f0d307e5062466 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Tue, 5 Sep 2023 08:15:40 +0200 Subject: [PATCH 17/84] feature: TRACEFOSS-2627 resiliency check --- charts/traceability-foss/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/traceability-foss/values.yaml b/charts/traceability-foss/values.yaml index 32cc4b4fbf..2b0a58daff 100644 --- a/charts/traceability-foss/values.yaml +++ b/charts/traceability-foss/values.yaml @@ -306,8 +306,8 @@ backend: allowedCorsOriginSecond: "https://replace.me" serviceAccounts: - irs: CHANGEME - edc: CHANGEME + irs: {{- tpl (.Values.irs-helm.nameOverride | default "" ) . }} + edc: {{- tpl (.Values.tractusx-connector.nameOverride | default "" ) . }} ######################### # PG Admin configuration # From adea1eea8c7a24f63cc24e8706291cda4dd7aa2c Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Tue, 5 Sep 2023 08:19:57 +0200 Subject: [PATCH 18/84] feature: TRACEFOSS-2627 resiliency check --- .../charts/backend/templates/_helpers.tpl | 12 ++++++------ .../charts/backend/templates/deployment.yaml | 4 ++-- charts/traceability-foss/values.yaml | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/charts/traceability-foss/charts/backend/templates/_helpers.tpl b/charts/traceability-foss/charts/backend/templates/_helpers.tpl index c0b52a72aa..528ff4c088 100644 --- a/charts/traceability-foss/charts/backend/templates/_helpers.tpl +++ b/charts/traceability-foss/charts/backend/templates/_helpers.tpl @@ -81,9 +81,9 @@ Create the name of the service account to use {{- end }} {{- end }} -{{/**/}} -{{/*includeIRS*/}} -{{/**/}} -{{/*{{- define "traceability-foss-backend.serviceAccounts.irs" -}}*/}} -{{/*{{- default .Values.serviceAccounts.irs }}*/}} -{{/*{{- end }}*/}} +{{/* +Create the name of the service account to use +*/}} +{{- define "traceability-foss-backend.dependencies.irs" -}} +{{- default "default" .Values.dependencies.irs }} +{{- end }} diff --git a/charts/traceability-foss/charts/backend/templates/deployment.yaml b/charts/traceability-foss/charts/backend/templates/deployment.yaml index 34b7a1faad..25e3f71bbe 100644 --- a/charts/traceability-foss/charts/backend/templates/deployment.yaml +++ b/charts/traceability-foss/charts/backend/templates/deployment.yaml @@ -59,10 +59,10 @@ spec: initContainers: - name: wait-for-controlplane image: appropriate/curl:latest - command: [ 'sh', '-c', 'until curl -s http://{{ include "traceability-foss-backend.serviceAccounts.irs" . }}-controlplane:8080/api/check/liveness; do echo waiting for other pod; sleep 2; done;' ] + command: [ 'sh', '-c', 'until curl -s http://{{ include "traceability-foss-backend.dependencies.irs" . }}-controlplane:8080/api/check/liveness; do echo waiting for other pod; sleep 2; done;' ] - name: wait-for-irs image: appropriate/curl:latest - command: [ 'sh', '-c', 'until curl -s http://{{ include "traceability-foss-backend.serviceAccounts.irs" . }}:8080/actuator/health/liveness; do echo waiting for other pod; sleep 2; done;' ] + command: [ 'sh', '-c', 'until curl -s http://{{ include "traceability-foss-backend.dependencies.irs" . }}:8080/actuator/health/liveness; do echo waiting for other pod; sleep 2; done;' ] containers: - name: {{ .Chart.Name }} securityContext: diff --git a/charts/traceability-foss/values.yaml b/charts/traceability-foss/values.yaml index 2b0a58daff..c2afef79c0 100644 --- a/charts/traceability-foss/values.yaml +++ b/charts/traceability-foss/values.yaml @@ -305,7 +305,7 @@ backend: allowedCorsOriginFirst: "https://replace.me" allowedCorsOriginSecond: "https://replace.me" - serviceAccounts: + dependencies: irs: {{- tpl (.Values.irs-helm.nameOverride | default "" ) . }} edc: {{- tpl (.Values.tractusx-connector.nameOverride | default "" ) . }} From ba1f5c107837a2956b7025e90ea08e09023b7268 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Tue, 5 Sep 2023 08:25:49 +0200 Subject: [PATCH 19/84] feature: TRACEFOSS-2627 resiliency check --- charts/traceability-foss/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/traceability-foss/values.yaml b/charts/traceability-foss/values.yaml index c2afef79c0..ceb7be7a91 100644 --- a/charts/traceability-foss/values.yaml +++ b/charts/traceability-foss/values.yaml @@ -306,8 +306,8 @@ backend: allowedCorsOriginSecond: "https://replace.me" dependencies: - irs: {{- tpl (.Values.irs-helm.nameOverride | default "" ) . }} - edc: {{- tpl (.Values.tractusx-connector.nameOverride | default "" ) . }} + irs: {{ tpl (.Values.irs-helm.nameOverride | default "" ) . }} + edc: {{ tpl (.Values.tractusx-connector.nameOverride | default "" ) . }} ######################### # PG Admin configuration # From dc17946e8784a3254173bdd801112956f6e8cd8a Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Tue, 5 Sep 2023 08:32:02 +0200 Subject: [PATCH 20/84] feature: TRACEFOSS-2627 resiliency check --- charts/traceability-foss/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/traceability-foss/values.yaml b/charts/traceability-foss/values.yaml index ceb7be7a91..e7b8f4445c 100644 --- a/charts/traceability-foss/values.yaml +++ b/charts/traceability-foss/values.yaml @@ -306,8 +306,8 @@ backend: allowedCorsOriginSecond: "https://replace.me" dependencies: - irs: {{ tpl (.Values.irs-helm.nameOverride | default "" ) . }} - edc: {{ tpl (.Values.tractusx-connector.nameOverride | default "" ) . }} + irs: {{ (.Values.irs-helm.nameOverride | default "" ) . }} + edc: {{ (.Values.irs-helm.nameOverride | default "" ) . }} ######################### # PG Admin configuration # From 32de8c46f0f83fcc82a4f3c5d05dc8e24c94f479 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Tue, 5 Sep 2023 08:33:47 +0200 Subject: [PATCH 21/84] feature: TRACEFOSS-2627 resiliency check --- charts/traceability-foss/values.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/charts/traceability-foss/values.yaml b/charts/traceability-foss/values.yaml index e7b8f4445c..63c7b86fe1 100644 --- a/charts/traceability-foss/values.yaml +++ b/charts/traceability-foss/values.yaml @@ -306,8 +306,10 @@ backend: allowedCorsOriginSecond: "https://replace.me" dependencies: - irs: {{ (.Values.irs-helm.nameOverride | default "" ) . }} - edc: {{ (.Values.irs-helm.nameOverride | default "" ) . }} + irs: >- + {{ (.Values.irs-helm.nameOverride | default "" ) . }} + edc: >- + {{ (.Values.irs-helm.nameOverride | default "" ) . }} ######################### # PG Admin configuration # From ec203e091fabec9757dd225ac26a74b968632048 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Tue, 5 Sep 2023 08:38:43 +0200 Subject: [PATCH 22/84] feature: TRACEFOSS-2627 resiliency check --- charts/traceability-foss/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/traceability-foss/values.yaml b/charts/traceability-foss/values.yaml index 63c7b86fe1..3f4473e177 100644 --- a/charts/traceability-foss/values.yaml +++ b/charts/traceability-foss/values.yaml @@ -307,9 +307,9 @@ backend: dependencies: irs: >- - {{ (.Values.irs-helm.nameOverride | default "" ) . }} + {{ tpl (.Values.irs-helm.nameOverride | default "") . }} edc: >- - {{ (.Values.irs-helm.nameOverride | default "" ) . }} + {{ tpl (.Values.irs-helm.nameOverride | default "") . }} ######################### # PG Admin configuration # From bd550f454ab92ef066554cc98a4291891c0d7bc3 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Tue, 5 Sep 2023 08:44:51 +0200 Subject: [PATCH 23/84] feature: TRACEFOSS-2627 resiliency check --- charts/traceability-foss/values.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/charts/traceability-foss/values.yaml b/charts/traceability-foss/values.yaml index 3f4473e177..1835120817 100644 --- a/charts/traceability-foss/values.yaml +++ b/charts/traceability-foss/values.yaml @@ -306,10 +306,8 @@ backend: allowedCorsOriginSecond: "https://replace.me" dependencies: - irs: >- - {{ tpl (.Values.irs-helm.nameOverride | default "") . }} - edc: >- - {{ tpl (.Values.irs-helm.nameOverride | default "") . }} + irs: {{ tpl (.Values.irs-helm.nameOverride | default "") . }} + edc: {{ tpl (.Values.irs-helm.nameOverride | default "") . }} ######################### # PG Admin configuration # From 36f7dce45d53e8be8ee5fcfe1ff1b2d8cf1a2d0f Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Tue, 5 Sep 2023 11:32:49 +0200 Subject: [PATCH 24/84] feature: TRACEFOSS-2627 resiliency check --- .../charts/backend/templates/_helpers.tpl | 7 ------- .../charts/backend/templates/deployment.yaml | 6 +++--- charts/traceability-foss/charts/backend/values.yaml | 6 +++--- charts/traceability-foss/values.yaml | 5 +++-- 4 files changed, 9 insertions(+), 15 deletions(-) diff --git a/charts/traceability-foss/charts/backend/templates/_helpers.tpl b/charts/traceability-foss/charts/backend/templates/_helpers.tpl index 528ff4c088..955b1534d0 100644 --- a/charts/traceability-foss/charts/backend/templates/_helpers.tpl +++ b/charts/traceability-foss/charts/backend/templates/_helpers.tpl @@ -80,10 +80,3 @@ Create the name of the service account to use {{- default "default" .Values.serviceAccount.name }} {{- end }} {{- end }} - -{{/* -Create the name of the service account to use -*/}} -{{- define "traceability-foss-backend.dependencies.irs" -}} -{{- default "default" .Values.dependencies.irs }} -{{- end }} diff --git a/charts/traceability-foss/charts/backend/templates/deployment.yaml b/charts/traceability-foss/charts/backend/templates/deployment.yaml index 25e3f71bbe..656f526eba 100644 --- a/charts/traceability-foss/charts/backend/templates/deployment.yaml +++ b/charts/traceability-foss/charts/backend/templates/deployment.yaml @@ -57,12 +57,12 @@ spec: securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} initContainers: - - name: wait-for-controlplane + - name: wait-for-edc-controlplane image: appropriate/curl:latest - command: [ 'sh', '-c', 'until curl -s http://{{ include "traceability-foss-backend.dependencies.irs" . }}-controlplane:8080/api/check/liveness; do echo waiting for other pod; sleep 2; done;' ] + command: [ 'sh', '-c', 'until curl -s http://{{ tpl (.Values.dependencies.edc | default "") . }}-controlplane:8080/api/check/liveness; do echo waiting for other pod; sleep 2; done;' ] - name: wait-for-irs image: appropriate/curl:latest - command: [ 'sh', '-c', 'until curl -s http://{{ include "traceability-foss-backend.dependencies.irs" . }}:8080/actuator/health/liveness; do echo waiting for other pod; sleep 2; done;' ] + command: [ 'sh', '-c', 'until curl -s http://{{ tpl (.Values.dependencies.irs | default "") . }}:8080/actuator/health/liveness; do echo waiting for other pod; sleep 2; done;' ] containers: - name: {{ .Chart.Name }} securityContext: diff --git a/charts/traceability-foss/charts/backend/values.yaml b/charts/traceability-foss/charts/backend/values.yaml index 76e9d0571e..46128ea6a2 100644 --- a/charts/traceability-foss/charts/backend/values.yaml +++ b/charts/traceability-foss/charts/backend/values.yaml @@ -171,6 +171,6 @@ config: allowedCorsOriginFirst: "https://replace.me" allowedCorsOriginSecond: "https://replace.me" -serviceAccounts: - irs: CHANGEME - edc: CHANGEME +dependencies: + irs: CHANGEME # + edc: CHANGEME #-controlplane diff --git a/charts/traceability-foss/values.yaml b/charts/traceability-foss/values.yaml index 1835120817..794914294e 100644 --- a/charts/traceability-foss/values.yaml +++ b/charts/traceability-foss/values.yaml @@ -305,9 +305,10 @@ backend: allowedCorsOriginFirst: "https://replace.me" allowedCorsOriginSecond: "https://replace.me" + # required for init containers checking for dependant pod readiness before starting up backend dependencies: - irs: {{ tpl (.Values.irs-helm.nameOverride | default "") . }} - edc: {{ tpl (.Values.irs-helm.nameOverride | default "") . }} + irs: "CHANGEME" # + edc: "CHANGEME" # Date: Tue, 5 Sep 2023 21:43:55 +0200 Subject: [PATCH 25/84] feature: TRACEFOSS-2627 resiliency check --- charts/traceability-foss/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/charts/traceability-foss/CHANGELOG.md b/charts/traceability-foss/CHANGELOG.md index 5a72e1531f..d77cf0a9d2 100644 --- a/charts/traceability-foss/CHANGELOG.md +++ b/charts/traceability-foss/CHANGELOG.md @@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] ### Added +- Init pods on backend startup to check dependant deployment up status ### Changed From 7e4c263f78e98879fc063b26f62d62ac61b41f64 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Tue, 5 Sep 2023 21:44:42 +0200 Subject: [PATCH 26/84] feature: TRACEFOSS-2627 resiliency check --- charts/traceability-foss/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/traceability-foss/CHANGELOG.md b/charts/traceability-foss/CHANGELOG.md index d77cf0a9d2..10fbd7297c 100644 --- a/charts/traceability-foss/CHANGELOG.md +++ b/charts/traceability-foss/CHANGELOG.md @@ -6,7 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] ### Added -- Init pods on backend startup to check dependant deployment up status +- Init pods on backend startup to check dependant services readiness status ( irs, edc-controlplane ) ### Changed From 7291f03b256e7b0cae71639df0e0b07c80eb29a6 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Wed, 6 Sep 2023 21:56:25 +0200 Subject: [PATCH 27/84] feature: TRACEFOSS-2627 - test ct --wait --- .github/workflows/helm-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/helm-test.yaml b/.github/workflows/helm-test.yaml index 4a32703534..d718bde698 100644 --- a/.github/workflows/helm-test.yaml +++ b/.github/workflows/helm-test.yaml @@ -92,6 +92,6 @@ jobs: helm repo add postgresql https://charts.bitnami.com/bitnami helm repo add tractusx-connector https://eclipse-tractusx.github.io/tractusx-edc helm repo add runix https://helm.runix.net - ct install --charts charts/traceability-foss --helm-extra-set-args "--set backend.image.repository=${{ env.REGISTRY }}/${{ env.APP_NAME}} --set backend.image.tag=${{ env.TAG }} --set frontend.image.repository=${{ env.REGISTRY }}/traceability-foss --set frontend.image.tag=${{ env.TAG }}" + ct install --charts charts/traceability-foss --helm-extra-set-args "--set backend.image.repository=${{ env.REGISTRY }}/${{ env.APP_NAME}} --set backend.image.tag=${{ env.TAG }} --set frontend.image.repository=${{ env.REGISTRY }}/traceability-foss --set frontend.image.tag=${{ env.TAG }}" --wait if: steps.list-changed.outputs.changed == 'true' From 62f8360b3eeb521d77876f37945f23cb0e821d3d Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Wed, 6 Sep 2023 22:09:12 +0200 Subject: [PATCH 28/84] feature: TRACEFOSS-2627 - test ct --wait --- .github/workflows/helm-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/helm-test.yaml b/.github/workflows/helm-test.yaml index d718bde698..2da5e770ab 100644 --- a/.github/workflows/helm-test.yaml +++ b/.github/workflows/helm-test.yaml @@ -92,6 +92,6 @@ jobs: helm repo add postgresql https://charts.bitnami.com/bitnami helm repo add tractusx-connector https://eclipse-tractusx.github.io/tractusx-edc helm repo add runix https://helm.runix.net - ct install --charts charts/traceability-foss --helm-extra-set-args "--set backend.image.repository=${{ env.REGISTRY }}/${{ env.APP_NAME}} --set backend.image.tag=${{ env.TAG }} --set frontend.image.repository=${{ env.REGISTRY }}/traceability-foss --set frontend.image.tag=${{ env.TAG }}" --wait + ct install --charts charts/traceability-foss --helm-extra-set-args "--set backend.image.repository=${{ env.REGISTRY }}/${{ env.APP_NAME}} --set backend.image.tag=${{ env.TAG }} --set frontend.image.repository=${{ env.REGISTRY }}/traceability-foss --set frontend.image.tag=${{ env.TAG }}" --helm-extra-args "--timeout 600s" if: steps.list-changed.outputs.changed == 'true' From 55e115b95873494b9974d9ef5e7e05ba70cbf3d5 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Wed, 6 Sep 2023 23:58:37 +0200 Subject: [PATCH 29/84] feature: TRACEFOSS-2627 - test ct --wait --- .github/workflows/helm-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/helm-test.yaml b/.github/workflows/helm-test.yaml index 2da5e770ab..eb635822fc 100644 --- a/.github/workflows/helm-test.yaml +++ b/.github/workflows/helm-test.yaml @@ -92,6 +92,6 @@ jobs: helm repo add postgresql https://charts.bitnami.com/bitnami helm repo add tractusx-connector https://eclipse-tractusx.github.io/tractusx-edc helm repo add runix https://helm.runix.net - ct install --charts charts/traceability-foss --helm-extra-set-args "--set backend.image.repository=${{ env.REGISTRY }}/${{ env.APP_NAME}} --set backend.image.tag=${{ env.TAG }} --set frontend.image.repository=${{ env.REGISTRY }}/traceability-foss --set frontend.image.tag=${{ env.TAG }}" --helm-extra-args "--timeout 600s" + ct install --charts charts/traceability-foss --helm-extra-set-args "--set backend.image.repository=${{ env.REGISTRY }}/${{ env.APP_NAME}} --set backend.image.tag=${{ env.TAG }} --set frontend.image.repository=${{ env.REGISTRY }}/traceability-foss --set frontend.image.tag=${{ env.TAG }}" --helm-extra-args "--timeout 600s --wait" if: steps.list-changed.outputs.changed == 'true' From ac8e81f26bcad715faddc87f9ba9f7ca76acb779 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Thu, 7 Sep 2023 00:26:30 +0200 Subject: [PATCH 30/84] feature: TRACEFOSS-2627 test --- .github/workflows/helm-test.yaml | 2 +- .../charts/backend/templates/deployment.yaml | 2 ++ charts/traceability-foss/charts/backend/values.yaml | 1 + charts/traceability-foss/values.yaml | 1 + dev/README.md | 12 ++++++------ 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/helm-test.yaml b/.github/workflows/helm-test.yaml index eb635822fc..4a32703534 100644 --- a/.github/workflows/helm-test.yaml +++ b/.github/workflows/helm-test.yaml @@ -92,6 +92,6 @@ jobs: helm repo add postgresql https://charts.bitnami.com/bitnami helm repo add tractusx-connector https://eclipse-tractusx.github.io/tractusx-edc helm repo add runix https://helm.runix.net - ct install --charts charts/traceability-foss --helm-extra-set-args "--set backend.image.repository=${{ env.REGISTRY }}/${{ env.APP_NAME}} --set backend.image.tag=${{ env.TAG }} --set frontend.image.repository=${{ env.REGISTRY }}/traceability-foss --set frontend.image.tag=${{ env.TAG }}" --helm-extra-args "--timeout 600s --wait" + ct install --charts charts/traceability-foss --helm-extra-set-args "--set backend.image.repository=${{ env.REGISTRY }}/${{ env.APP_NAME}} --set backend.image.tag=${{ env.TAG }} --set frontend.image.repository=${{ env.REGISTRY }}/traceability-foss --set frontend.image.tag=${{ env.TAG }}" if: steps.list-changed.outputs.changed == 'true' diff --git a/charts/traceability-foss/charts/backend/templates/deployment.yaml b/charts/traceability-foss/charts/backend/templates/deployment.yaml index 656f526eba..90ad60e625 100644 --- a/charts/traceability-foss/charts/backend/templates/deployment.yaml +++ b/charts/traceability-foss/charts/backend/templates/deployment.yaml @@ -56,6 +56,7 @@ spec: serviceAccountName: {{ include "traceability-foss-backend.serviceAccountName" . }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} + {{- if not .Values.dependencies.enabled }} initContainers: - name: wait-for-edc-controlplane image: appropriate/curl:latest @@ -63,6 +64,7 @@ spec: - name: wait-for-irs image: appropriate/curl:latest command: [ 'sh', '-c', 'until curl -s http://{{ tpl (.Values.dependencies.irs | default "") . }}:8080/actuator/health/liveness; do echo waiting for other pod; sleep 2; done;' ] + {{- end }} containers: - name: {{ .Chart.Name }} securityContext: diff --git a/charts/traceability-foss/charts/backend/values.yaml b/charts/traceability-foss/charts/backend/values.yaml index 46128ea6a2..b2f5823ca6 100644 --- a/charts/traceability-foss/charts/backend/values.yaml +++ b/charts/traceability-foss/charts/backend/values.yaml @@ -172,5 +172,6 @@ config: allowedCorsOriginSecond: "https://replace.me" dependencies: + enabled: false irs: CHANGEME # edc: CHANGEME #-controlplane diff --git a/charts/traceability-foss/values.yaml b/charts/traceability-foss/values.yaml index 794914294e..f94ae6f9cb 100644 --- a/charts/traceability-foss/values.yaml +++ b/charts/traceability-foss/values.yaml @@ -307,6 +307,7 @@ backend: # required for init containers checking for dependant pod readiness before starting up backend dependencies: + enabled: false # enable dependency check init containers irs: "CHANGEME" # edc: "CHANGEME" # --aas3 +python transform-and-upload.py -f CX_Testdata_MessagingTest_v0.0.7.json -s https://tracex-submodel-server.dev.demo.catena-x.net -edc https://trace-x-edc.dev.demo.catena-x.net -a https://trace-x-registry.dev.demo.catena-x.net/semantics/registry/api/v3.0 -d https://trace-x-edc-dataplane.dev.demo.catena-x.net -p id-3.0-trace -k --aas3 --allowedBPNs BPNL00000003CML1 BPNL00000003CNKC ``` Sample invocation (TEST) ``` -python transform-and-upload.py -f CX_Testdata_MessagingTest_v0.0.8.json -s https://tracex-submodel-server-test.dev.demo.catena-x.net -edc https://trace-x-test-edc.dev.demo.catena-x.net -a https://trace-x-registry-test.dev.demo.catena-x.net/semantics/registry/api/v3.0 -d https://trace-x-test-edc-dataplane.dev.demo.catena-x.net -p id-3.0-trace -k --aas3 +python transform-and-upload.py -f CX_Testdata_MessagingTest_v0.0.7.json -s https://tracex-submodel-server-test.dev.demo.catena-x.net -edc https://trace-x-test-edc.dev.demo.catena-x.net -a https://trace-x-registry-test.dev.demo.catena-x.net/semantics/registry/api/v3.0 -d https://trace-x-test-edc-dataplane.dev.demo.catena-x.net -p id-3.0-trace -k --aas3 --allowedBPNs BPNL00000003CML1 BPNL00000003CNKC ``` Sample invocation (E2E A) ``` -python transform-and-upload.py -f CX_Testdata_MessagingTest_v0.0.8.json -s https://tracex-submodel-server-e2e-a.dev.demo.catena-x.net -edc https://trace-x-edc-e2e-a.dev.demo.catena-x.net -a https://trace-x-registry-e2e-a.dev.demo.catena-x.net/semantics/registry/api/v3.0 -d https://trace-x-edc-e2e-a-dataplane.dev.demo.catena-x.net -p id-3.0-trace -k --aas3 +python transform-and-upload.py -f CX_Testdata_MessagingTest_v0.0.7.json -s https://tracex-submodel-server-e2e-a.dev.demo.catena-x.net -edc https://trace-x-edc-e2e-a.dev.demo.catena-x.net -a https://trace-x-registry-e2e-a.dev.demo.catena-x.net/semantics/registry/api/v3.0 -d https://trace-x-edc-e2e-a-dataplane.dev.demo.catena-x.net -p id-3.0-trace -k --aas3 --allowedBPNs BPNL00000003CML1 BPNL00000003CNKC ``` Sample invocation (E2E B) ``` -python transform-and-upload.py -f CX_Testdata_MessagingTest_v0.0.8.json -s https://tracex-submodel-server-e2e-b.dev.demo.catena-x.net -edc https://trace-x-edc-e2e-b.dev.demo.catena-x.net -a https://trace-x-registry-e2e-b.dev.demo.catena-x.net/semantics/registry/api/v3.0 -d https://trace-x-edc-e2e-b-dataplane.dev.demo.catena-x.net -p id-3.0-trace -k --aas3 +python transform-and-upload.py -f CX_Testdata_MessagingTest_v0.0.7.json -s https://tracex-submodel-server-e2e-b.dev.demo.catena-x.net -edc https://trace-x-edc-e2e-b.dev.demo.catena-x.net -a https://trace-x-registry-e2e-b.dev.demo.catena-x.net/semantics/registry/api/v3.0 -d https://trace-x-edc-e2e-b-dataplane.dev.demo.catena-x.net -p id-3.0-trace -k --aas3 --allowedBPNs BPNL00000003CML1 BPNL00000003CNKC ``` Sample invocation (INT A) ``` -python transform-and-upload.py -f CX_Testdata_MessagingTest_v0.0.8.json -s https://tracex-submodel-server-int-a.int.demo.catena-x.net -edc https://trace-x-edc-int-a.int.demo.catena-x.net -a https://trace-x-registry-int-a.int.demo.catena-x.net/semantics/registry/api/v3.0 -d https://trace-x-edc-int-a-dataplane.int.demo.catena-x.net -p id-3.0-trace -k --aas3 +python transform-and-upload.py -f CX_Testdata_MessagingTest_v0.0.7.json -s https://tracex-submodel-server-int-a.int.demo.catena-x.net -edc https://trace-x-edc-int-a.int.demo.catena-x.net -a https://trace-x-registry-int-a.int.demo.catena-x.net/semantics/registry/api/v3.0 -d https://trace-x-edc-int-a-dataplane.int.demo.catena-x.net -p id-3.0-trace -k --aas3 --allowedBPNs BPNL00000003CML1 BPNL00000003CNKC BPNL00000003AZQP BPNL00000003CSGV ``` Sample invocation (INT B) ``` -python transform-and-upload.py -f CX_Testdata_MessagingTest_v0.0.8.json -s https://tracex-submodel-server-int-b.int.demo.catena-x.net -edc https://trace-x-edc-int-b.int.demo.catena-x.net -a https://trace-x-registry-int-b.int.demo.catena-x.net/semantics/registry/api/v3.0 -d https://trace-x-edc-int-b-dataplane.int.demo.catena-x.net -p id-3.0-trace -k --aas3 +python transform-and-upload.py -f CX_Testdata_MessagingTest_v0.0.7.json -s https://tracex-submodel-server-int-b.int.demo.catena-x.net -edc https://trace-x-edc-int-b.int.demo.catena-x.net -a https://trace-x-registry-int-b.int.demo.catena-x.net/semantics/registry/api/v3.0 -d https://trace-x-edc-int-b-dataplane.int.demo.catena-x.net -p id-3.0-trace -k --aas3 --allowedBPNs BPNL00000003CML1 BPNL00000003CNKC BPNL00000003AZQP BPNL00000003CSGV ``` where: From 492fbf077f11e2639521072cb669651a132f6e71 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Thu, 7 Sep 2023 00:45:30 +0200 Subject: [PATCH 31/84] feature: TRACEFOSS-2627 test --- .../traceability-foss/charts/backend/templates/deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/traceability-foss/charts/backend/templates/deployment.yaml b/charts/traceability-foss/charts/backend/templates/deployment.yaml index 90ad60e625..7170c3b973 100644 --- a/charts/traceability-foss/charts/backend/templates/deployment.yaml +++ b/charts/traceability-foss/charts/backend/templates/deployment.yaml @@ -56,7 +56,7 @@ spec: serviceAccountName: {{ include "traceability-foss-backend.serviceAccountName" . }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} - {{- if not .Values.dependencies.enabled }} + {{- if .Values.dependencies.enabled }} initContainers: - name: wait-for-edc-controlplane image: appropriate/curl:latest From 668dbb06a8dba680c5d1241cabc4377440ae6f6b Mon Sep 17 00:00:00 2001 From: Martin Maul Date: Tue, 12 Sep 2023 08:37:38 +0200 Subject: [PATCH 32/84] feature(UI):[TRACEFOSS-2339] activated sorting on all columns in parts table --- .../customer-parts.component.ts | 6 +-- .../other-parts.component.spec.ts | 2 +- .../supplier-parts.component.ts | 7 ++-- .../parts/presentation/parts.component.html | 4 +- .../parts/presentation/parts.component.ts | 37 ++++++++++++++----- 5 files changed, 37 insertions(+), 19 deletions(-) diff --git a/frontend/src/app/modules/page/other-parts/presentation/customer-parts/customer-parts.component.ts b/frontend/src/app/modules/page/other-parts/presentation/customer-parts/customer-parts.component.ts index a4005cebfd..c276b9f9e1 100644 --- a/frontend/src/app/modules/page/other-parts/presentation/customer-parts/customer-parts.component.ts +++ b/frontend/src/app/modules/page/other-parts/presentation/customer-parts/customer-parts.component.ts @@ -43,12 +43,12 @@ export class CustomerPartsComponent implements OnInit, OnDestroy { ]; public readonly sortableColumns: Record = { + semanticDataModel: true, name: true, manufacturer: true, - partNumber: true, + partId: true, semanticModelId: true, - productionDate: true, - semanticDataModel: true, + manufacturingDate: true, }; public readonly tableConfig: TableConfig = { 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 c03268385f..869b181f21 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 @@ -101,7 +101,7 @@ describe('Other Parts', () => { }); - describe('onTableConfigChange', () => { + describe('onAsBuiltTableConfigChange', () => { let formatPartSemanticToCamelCase: FormatPartSemanticDataModelToCamelCasePipe; beforeEach(() => { formatPartSemanticToCamelCase = new FormatPartSemanticDataModelToCamelCasePipe(); diff --git a/frontend/src/app/modules/page/other-parts/presentation/supplier-parts/supplier-parts.component.ts b/frontend/src/app/modules/page/other-parts/presentation/supplier-parts/supplier-parts.component.ts index 9d7450de19..03f5daf13d 100644 --- a/frontend/src/app/modules/page/other-parts/presentation/supplier-parts/supplier-parts.component.ts +++ b/frontend/src/app/modules/page/other-parts/presentation/supplier-parts/supplier-parts.component.ts @@ -44,12 +44,13 @@ export class SupplierPartsComponent implements OnInit, OnDestroy { ]; public readonly sortableColumns: Record = { + semanticDataModel: true, name: true, manufacturer: true, - partNumber: true, + partId: true, semanticModelId: true, - productionDate: true, - semanticDataModel: true, + manufacturingDate: true, + }; public readonly tableConfig: TableConfig = { diff --git a/frontend/src/app/modules/page/parts/presentation/parts.component.html b/frontend/src/app/modules/page/parts/presentation/parts.component.html index 838bf66988..b99b73b403 100644 --- a/frontend/src/app/modules/page/parts/presentation/parts.component.html +++ b/frontend/src/app/modules/page/parts/presentation/parts.component.html @@ -33,7 +33,7 @@ [deselectTrigger]="deselectPartTrigger$ | async" [addTrigger]="addPartTrigger$ | async" (selected)="onSelectItem($event)" - (configChanged)="onTableConfigChange($event)" + (configChanged)="onAsBuiltTableConfigChange($event)" (multiSelect)="currentSelectedItems$.next($event)" (clickSelectAction)="isAlertOpen$.next(true)" [tableHeader]="'page.asBuiltParts'" @@ -50,7 +50,7 @@ [deselectTrigger]="deselectPartTrigger$ | async" [addTrigger]="addPartTrigger$ | async" (selected)="onSelectItem($event)" - (configChanged)="onTableConfigChange($event)" + (configChanged)="onAsPlannedTableConfigChange($event)" (multiSelect)="currentSelectedItems$.next($event)" (clickSelectAction)="isAlertOpen$.next(true)" [tableHeader]="'page.asPlannedParts'" 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 00b3fc6404..ef4c43d246 100644 --- a/frontend/src/app/modules/page/parts/presentation/parts.component.ts +++ b/frontend/src/app/modules/page/parts/presentation/parts.component.ts @@ -75,24 +75,36 @@ export class PartsComponent implements OnInit, OnDestroy, AfterViewInit { public readonly sortableColumnsAsBuilt: Record = { id: true, - semanticDataModel: true, + idShort: true, name: true, manufacturer: true, - partNumber: true, + partId: true, + manufacturerPartId: true, + customerPartId: true, + classification: true, + nameAtCustomer: true, semanticModelId: true, - productionDate: true, - productionCountry: true, + semanticDataModel: true, + manufacturingDate: true, + manufacturingCountry: true, + }; public readonly sortableColumnsAsPlanned: Record = { id: true, - semanticDataModel: true, - name: true, + idShort: true, + nameAtManufacturer: true, manufacturer: true, - partNumber: true, + manufacturerPartId: true, + classification: true, + semanticDataModel: true, semanticModelId: true, - productionDate: true, - productionCountry: true, + validityPeriodFrom: true, + validityPeriodTo: true, + psFunction: true, + catenaXSiteId: true, + functionValidFrom: true, + functionValidUntil: true, }; public readonly titleId = this.staticIdService.generateId('PartsComponent.title'); @@ -143,8 +155,13 @@ export class PartsComponent implements OnInit, OnDestroy, AfterViewInit { this.partDetailsFacade.selectedPart = $event as unknown as Part; } - public onTableConfigChange({ page, pageSize, sorting }: TableEventConfig): void { + public onAsBuiltTableConfigChange({ page, pageSize, sorting }: TableEventConfig): void { + console.log(page, pageSize, sorting); this.partsFacade.setPartsAsBuilt(page, pageSize, sorting); + } + + public onAsPlannedTableConfigChange({ page, pageSize, sorting }: TableEventConfig): void { + console.log(page, pageSize, sorting); this.partsFacade.setPartsAsPlanned(page, pageSize, sorting); } } From 56dac938ab653f4cd58662fa73b8389c6c181c42 Mon Sep 17 00:00:00 2001 From: Martin Maul Date: Tue, 12 Sep 2023 15:25:28 +0200 Subject: [PATCH 33/84] feature(UI):[TRACEFOSS-2339] activated sorting on all columns in parts table --- .../other-parts/core/other-parts.facade.ts | 4 +- .../other-parts/core/other-parts.service.ts | 22 ++++--- .../customer-parts.component.ts | 46 ++++++++++++- .../supplier-parts.component.ts | 47 +++++++++++++- .../modules/page/parts/core/parts.facade.ts | 5 +- .../parts/presentation/parts.component.ts | 65 +++++++++++++++++-- .../shared/assembler/parts.assembler.ts | 57 +++++++++++----- .../modules/shared/service/parts.service.ts | 22 ++++--- 8 files changed, 222 insertions(+), 46 deletions(-) diff --git a/frontend/src/app/modules/page/other-parts/core/other-parts.facade.ts b/frontend/src/app/modules/page/other-parts/core/other-parts.facade.ts index acda21a2aa..12f68481b1 100644 --- a/frontend/src/app/modules/page/other-parts/core/other-parts.facade.ts +++ b/frontend/src/app/modules/page/other-parts/core/other-parts.facade.ts @@ -49,7 +49,7 @@ export class OtherPartsFacade { return this.otherPartsState.supplierParts$; } - public setCustomerParts(page = 0, pageSize = 50, sorting: TableHeaderSort = null): void { + public setCustomerParts(page = 0, pageSize = 50, sorting: TableHeaderSort[] = []): void { this.customerPartsSubscription?.unsubscribe(); this.customerPartsSubscription = this.otherPartsService.getCustomerParts(page, pageSize, sorting).subscribe({ next: data => (this.otherPartsState.customerParts = { data }), @@ -57,7 +57,7 @@ export class OtherPartsFacade { }); } - public setSupplierParts(page = 0, pageSize = 50, sorting: TableHeaderSort = null): void { + public setSupplierParts(page = 0, pageSize = 50, sorting: TableHeaderSort[] = []): void { this.supplierPartsSubscription?.unsubscribe(); this.supplierPartsSubscription = this.otherPartsService.getSupplierParts(page, pageSize, sorting).subscribe({ next: data => (this.otherPartsState.supplierParts = { data }), diff --git a/frontend/src/app/modules/page/other-parts/core/other-parts.service.ts b/frontend/src/app/modules/page/other-parts/core/other-parts.service.ts index 4013f027c8..20f0acbdf2 100644 --- a/frontend/src/app/modules/page/other-parts/core/other-parts.service.ts +++ b/frontend/src/app/modules/page/other-parts/core/other-parts.service.ts @@ -36,27 +36,33 @@ export class OtherPartsService { constructor(private readonly apiService: ApiService) {} - public getSupplierParts(page: number, pageSize: number, sorting: TableHeaderSort): Observable> { - const sort = PartsAssembler.mapSortToApiSort(sorting); - const params = new HttpParams() + public getSupplierParts(page: number, pageSize: number, sorting: TableHeaderSort[]): Observable> { + let sort = sorting.map(sortingItem => PartsAssembler.mapSortToApiSort(sortingItem)); + let params = new HttpParams() .set('page', page) .set('size', pageSize) - .set('sort', sort) .set('owner', 'SUPPLIER'); + sort.forEach(sortingItem => { + params = params.append('sort', sortingItem); + }) + return this.apiService .getBy(`${this.url}/assets/as-built`, params) .pipe(map(parts => PartsAssembler.assembleOtherParts(parts))); } - public getCustomerParts(page: number, pageSize: number, sorting: TableHeaderSort): Observable> { - const sort = PartsAssembler.mapSortToApiSort(sorting); - const params = new HttpParams() + public getCustomerParts(page: number, pageSize: number, sorting: TableHeaderSort[]): Observable> { + let sort = sorting.map(sortingItem => PartsAssembler.mapSortToApiSort(sortingItem)); + let params = new HttpParams() .set('page', page) .set('size', pageSize) - .set('sort', sort) .set('owner', 'CUSTOMER'); + sort.forEach(sortingItem => { + params = params.append('sort', sortingItem); + }) + return this.apiService .getBy(`${this.url}/assets/as-built`, params) .pipe(map(parts => PartsAssembler.assembleOtherParts(parts))); diff --git a/frontend/src/app/modules/page/other-parts/presentation/customer-parts/customer-parts.component.ts b/frontend/src/app/modules/page/other-parts/presentation/customer-parts/customer-parts.component.ts index c276b9f9e1..53da50a019 100644 --- a/frontend/src/app/modules/page/other-parts/presentation/customer-parts/customer-parts.component.ts +++ b/frontend/src/app/modules/page/other-parts/presentation/customer-parts/customer-parts.component.ts @@ -22,7 +22,12 @@ import { Component, OnDestroy, OnInit } from '@angular/core'; import { Pagination } from '@core/model/pagination.model'; import { OtherPartsFacade } from '@page/other-parts/core/other-parts.facade'; import { Part } from '@page/parts/model/parts.model'; -import { CreateHeaderFromColumns, TableConfig, TableEventConfig } from '@shared/components/table/table.model'; +import { + CreateHeaderFromColumns, + TableConfig, + TableEventConfig, + TableHeaderSort, +} from '@shared/components/table/table.model'; import { View } from '@shared/model/view.model'; import { PartDetailsFacade } from '@shared/modules/part-details/core/partDetails.facade'; import { StaticIdService } from '@shared/service/staticId.service'; @@ -61,12 +66,21 @@ export class CustomerPartsComponent implements OnInit, OnDestroy { public readonly customerTabLabelId = this.staticIdService.generateId('OtherParts.customerTabLabel'); + public tableCustomerSortList: TableHeaderSort[]; + + private ctrlKeyState = false; constructor( private readonly otherPartsFacade: OtherPartsFacade, private readonly partDetailsFacade: PartDetailsFacade, private readonly staticIdService: StaticIdService, ) { this.customerParts$ = this.otherPartsFacade.customerParts$; + this.tableCustomerSortList = []; + + window.addEventListener('keydown', (event) => { + this.ctrlKeyState = event.ctrlKey; + console.log("CTRL PRESSED"); + }); } public ngOnInit(): void { @@ -82,6 +96,34 @@ export class CustomerPartsComponent implements OnInit, OnDestroy { } public onTableConfigChange({ page, pageSize, sorting }: TableEventConfig): void { - this.otherPartsFacade.setCustomerParts(page, pageSize, sorting); + this.setTableSortingList(sorting); + this.otherPartsFacade.setCustomerParts(page, pageSize, this.tableCustomerSortList); } + + + private setTableSortingList(sorting: TableHeaderSort): void { + console.log(sorting); + if(!sorting && this.tableCustomerSortList) { + this.tableCustomerSortList = []; + return; + } + const [columnName, direction] = sorting; + const tableSortList = this.tableCustomerSortList; + + // Find the index of the existing entry with the same first item + const index = tableSortList.findIndex( + ([itemColumnName, direction]) => itemColumnName === columnName + ); + + if (index !== -1) { + // Replace the existing entry + tableSortList[index] = sorting; + } else { + // Add the new entry if it doesn't exist + tableSortList.push(sorting); + } + this.tableCustomerSortList = tableSortList; + + } + } diff --git a/frontend/src/app/modules/page/other-parts/presentation/supplier-parts/supplier-parts.component.ts b/frontend/src/app/modules/page/other-parts/presentation/supplier-parts/supplier-parts.component.ts index 03f5daf13d..6e230170d1 100644 --- a/frontend/src/app/modules/page/other-parts/presentation/supplier-parts/supplier-parts.component.ts +++ b/frontend/src/app/modules/page/other-parts/presentation/supplier-parts/supplier-parts.component.ts @@ -22,7 +22,12 @@ import { Component, OnDestroy, OnInit } from '@angular/core'; import { Pagination } from '@core/model/pagination.model'; import { OtherPartsFacade } from '@page/other-parts/core/other-parts.facade'; import { Part, SemanticDataModel } from '@page/parts/model/parts.model'; -import { CreateHeaderFromColumns, TableConfig, TableEventConfig } from '@shared/components/table/table.model'; +import { + CreateHeaderFromColumns, + TableConfig, + TableEventConfig, + TableHeaderSort, +} from '@shared/components/table/table.model'; import { View } from '@shared/model/view.model'; import { PartDetailsFacade } from '@shared/modules/part-details/core/partDetails.facade'; import { StaticIdService } from '@shared/service/staticId.service'; @@ -69,12 +74,22 @@ export class SupplierPartsComponent implements OnInit, OnDestroy { public readonly supplierTabLabelId = this.staticIdService.generateId('OtherParts.supplierTabLabel'); + public tableSupplierSortList: TableHeaderSort[]; + + private ctrlKeyState = false; + constructor( private readonly otherPartsFacade: OtherPartsFacade, private readonly partDetailsFacade: PartDetailsFacade, private readonly staticIdService: StaticIdService, ) { this.supplierParts$ = this.otherPartsFacade.supplierParts$; + this.tableSupplierSortList = []; + + window.addEventListener('keydown', (event) => { + this.ctrlKeyState = event.ctrlKey; + console.log("CTRL PRESSED"); + }); } public get currentSelectedItems(): Part[] { @@ -102,7 +117,8 @@ export class SupplierPartsComponent implements OnInit, OnDestroy { } public onTableConfigChange({ page, pageSize, sorting }: TableEventConfig): void { - this.otherPartsFacade.setSupplierParts(page, pageSize, sorting); + this.setTableSortingList(sorting); + this.otherPartsFacade.setSupplierParts(page, pageSize, this.tableSupplierSortList); } public onMultiSelect(event: unknown[]): void { @@ -128,4 +144,31 @@ export class SupplierPartsComponent implements OnInit, OnDestroy { this.otherPartsFacade.setActiveInvestigationForParts(this.currentSelectedItems); this.isInvestigationOpen$.next(false); } + + + private setTableSortingList(sorting: TableHeaderSort): void { + console.log(sorting); + if(!sorting && this.tableSupplierSortList) { + this.tableSupplierSortList = []; + return; + } + const [columnName, direction] = sorting; + const tableSortList = this.tableSupplierSortList; + + // Find the index of the existing entry with the same first item + const index = tableSortList.findIndex( + ([itemColumnName, direction]) => itemColumnName === columnName + ); + + if (index !== -1) { + // Replace the existing entry + tableSortList[index] = sorting; + } else { + // Add the new entry if it doesn't exist + tableSortList.push(sorting); + } + this.tableSupplierSortList = tableSortList; + + } + } diff --git a/frontend/src/app/modules/page/parts/core/parts.facade.ts b/frontend/src/app/modules/page/parts/core/parts.facade.ts index d39fd14136..10fcd83f21 100644 --- a/frontend/src/app/modules/page/parts/core/parts.facade.ts +++ b/frontend/src/app/modules/page/parts/core/parts.facade.ts @@ -44,15 +44,16 @@ export class PartsFacade { return this.partsState.partsAsPlanned$; } - public setPartsAsBuilt(page = 0, pageSize = 50, sorting: TableHeaderSort = null): void { + public setPartsAsBuilt(page = 0, pageSize = 50, sorting: TableHeaderSort[] = []): void { this.partsAsBuiltSubscription?.unsubscribe(); + // TODO: HERE I CAN MODIFY THE API TO SUPPORT MORE THAN ONE SORTCOLUMN this.partsAsBuiltSubscription = this.partsService.getPartsAsBuilt(page, pageSize, sorting).subscribe({ next: data => (this.partsState.partsAsBuilt = { data }), error: error => (this.partsState.partsAsBuilt = { error }), }); } - public setPartsAsPlanned(page = 0, pageSize = 50, sorting: TableHeaderSort = null): void { + public setPartsAsPlanned(page = 0, pageSize = 50, sorting: TableHeaderSort[] = []): void { this.partsAsPlannedSubscription?.unsubscribe(); this.partsAsPlannedSubscription = this.partsService.getPartsAsPlanned(page, pageSize, sorting).subscribe({ next: data => (this.partsState.partsAsPlanned = { data }), 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 ef4c43d246..faed1dde75 100644 --- a/frontend/src/app/modules/page/parts/presentation/parts.component.ts +++ b/frontend/src/app/modules/page/parts/presentation/parts.component.ts @@ -23,7 +23,12 @@ import { AfterViewInit, Component, OnDestroy, OnInit } from '@angular/core'; import { Pagination } from '@core/model/pagination.model'; import { PartsFacade } from '@page/parts/core/parts.facade'; import { Part } from '@page/parts/model/parts.model'; -import { CreateHeaderFromColumns, TableConfig, TableEventConfig } from '@shared/components/table/table.model'; +import { + CreateHeaderFromColumns, + TableConfig, + TableEventConfig, + TableHeaderSort, +} from '@shared/components/table/table.model'; import { View } from '@shared/model/view.model'; import { PartDetailsFacade } from '@shared/modules/part-details/core/partDetails.facade'; import { StaticIdService } from '@shared/service/staticId.service'; @@ -93,7 +98,7 @@ export class PartsComponent implements OnInit, OnDestroy, AfterViewInit { public readonly sortableColumnsAsPlanned: Record = { id: true, idShort: true, - nameAtManufacturer: true, + name: true, manufacturer: true, manufacturerPartId: true, classification: true, @@ -117,9 +122,14 @@ export class PartsComponent implements OnInit, OnDestroy, AfterViewInit { public readonly addPartTrigger$ = new Subject(); public readonly currentSelectedItems$ = new BehaviorSubject([]); + public tableAsBuiltSortList: TableHeaderSort[]; + public tableAsPlannedSortList: TableHeaderSort[]; + public tableConfigAsBuilt: TableConfig; public tableConfigAsPlanned: TableConfig; + private ctrlKeyState = false; + constructor( private readonly partsFacade: PartsFacade, private readonly partDetailsFacade: PartDetailsFacade, @@ -127,6 +137,13 @@ export class PartsComponent implements OnInit, OnDestroy, AfterViewInit { ) { this.partsAsBuilt$ = this.partsFacade.partsAsBuilt$; this.partsAsPlanned$ = this.partsFacade.partsAsPlanned$; + this.tableAsBuiltSortList = []; + this.tableAsPlannedSortList = []; + + window.addEventListener('keydown', (event) => { + this.ctrlKeyState = event.ctrlKey; + console.log("CTRL PRESSED"); + }); } public ngOnInit(): void { @@ -156,12 +173,48 @@ export class PartsComponent implements OnInit, OnDestroy, AfterViewInit { } public onAsBuiltTableConfigChange({ page, pageSize, sorting }: TableEventConfig): void { - console.log(page, pageSize, sorting); - this.partsFacade.setPartsAsBuilt(page, pageSize, sorting); + this.setTableSortingList(sorting,"asBuilt"); + this.partsFacade.setPartsAsBuilt(page, pageSize, this.tableAsBuiltSortList); } public onAsPlannedTableConfigChange({ page, pageSize, sorting }: TableEventConfig): void { - console.log(page, pageSize, sorting); - this.partsFacade.setPartsAsPlanned(page, pageSize, sorting); + this.setTableSortingList(sorting,"asPlanned"); + this.partsFacade.setPartsAsPlanned(page, pageSize, this.tableAsPlannedSortList); } + + private setTableSortingList(sorting: TableHeaderSort, partTable: "asBuilt" | "asPlanned"): void { + console.log(sorting); + if(!sorting && (this.tableAsBuiltSortList || this.tableAsPlannedSortList)) { + if(partTable === "asBuilt") { + this.tableAsBuiltSortList = []; + } else { + this.tableAsPlannedSortList= []; + } + return; + } + const [columnName, direction] = sorting; + const tableSortList = partTable === "asBuilt" ? this.tableAsBuiltSortList : this.tableAsPlannedSortList + + // Find the index of the existing entry with the same first item + const index = tableSortList.findIndex( + ([itemColumnName, direction]) => itemColumnName === columnName + ); + + if (index !== -1) { + // Replace the existing entry + tableSortList[index] = sorting; + } else { + // Add the new entry if it doesn't exist + tableSortList.push(sorting); + } + if(partTable === "asBuilt") { + this.tableAsBuiltSortList = tableSortList + console.log(...this.tableAsBuiltSortList); + } else { + this.tableAsPlannedSortList = tableSortList + console.log(...this.tableAsPlannedSortList); + } + + } + } diff --git a/frontend/src/app/modules/shared/assembler/parts.assembler.ts b/frontend/src/app/modules/shared/assembler/parts.assembler.ts index f6a0f37ce7..eb4d3ca5e9 100644 --- a/frontend/src/app/modules/shared/assembler/parts.assembler.ts +++ b/frontend/src/app/modules/shared/assembler/parts.assembler.ts @@ -159,14 +159,24 @@ export class PartsAssembler { return viewData; } - const { - manufacturer, - manufacturerPartId, - nameAtManufacturer, - van, - - } = viewData.data; - return { data: { manufacturer, manufacturerPartId, nameAtManufacturer, van } as Part }; + // exclude 'van' if is a partAsPlanned + if(viewData.data?.validityPeriodFrom === undefined) { + const { + manufacturer, + manufacturerPartId, + nameAtManufacturer, + van, + + } = viewData.data; + return { data: { manufacturer, manufacturerPartId, nameAtManufacturer, van } as Part }; + } else { + const { + manufacturer, + manufacturerPartId, + nameAtManufacturer, + } = viewData.data; + return { data: { manufacturer, manufacturerPartId, nameAtManufacturer } as Part }; + } }); } @@ -195,18 +205,33 @@ export class PartsAssembler { const localToApiMapping = new Map([ ['id', 'id'], - ['semanticDataModel', 'semanticDataModel'], - ['name', 'nameAtManufacturer'], - ['manufacturer', 'manufacturerName'], + ['idShort', 'idShort'], ['semanticModelId', 'manufacturerPartId'], - ['partNumber', 'customerPartId'], - ['productionCountry', 'manufacturingCountry'], - ['nameAtCustomer', 'nameAtCustomer'], - ['customerPartId', 'customerPartId'], + ['manufacturer', 'manufacturerName'], + ['manufacturerPartId', 'manufacturerPartId'], + ['nameAtManufacturer', 'nameAtManufacturer'], + ['businessPartner', 'businessPartner'], + ['name', 'nameAtManufacturer'], ['qualityType', 'qualityType'], - ['productionDate', 'manufacturingDate'], + ['van', 'van'], + ['semanticDataModel', 'semanticDataModel'], + ['classification', 'classification'], + ['partId', 'partId'], + ['customerPartId', 'customerPartId'], + ['nameAtCustomer', 'nameAtCustomer'], + ['manufacturingDate', 'manufacturingDate'], + ['manufacturingCountry', 'manufacturingCountry'], + ['validityPeriodFrom', 'validityPeriodFrom'], + ['validityPeriodTo', 'validityPeriodTo'], + ['catenaXSiteId', 'catenaXSiteId'], + ['psFunction', 'function'], + ['functionValidFrom', 'functionValidFrom'], + ['functionValidUntil', 'functionValidUntil'], + ]); + + return `${localToApiMapping.get(sorting[0]) || sorting},${sorting[1]}`; } } diff --git a/frontend/src/app/modules/shared/service/parts.service.ts b/frontend/src/app/modules/shared/service/parts.service.ts index 75380afda4..e08f524521 100644 --- a/frontend/src/app/modules/shared/service/parts.service.ts +++ b/frontend/src/app/modules/shared/service/parts.service.ts @@ -38,27 +38,33 @@ export class PartsService { constructor(private readonly apiService: ApiService) {} - public getPartsAsBuilt(page: number, pageSize: number, sorting: TableHeaderSort): Observable> { - const sort = PartsAssembler.mapSortToApiSort(sorting); - const params = new HttpParams() + public getPartsAsBuilt(page: number, pageSize: number, sorting: TableHeaderSort[]): Observable> { + let sort = sorting.map(sortingItem => PartsAssembler.mapSortToApiSort(sortingItem)); + let params = new HttpParams() .set('page', page) .set('size', pageSize) - .set('sort', sort) .set('owner', 'OWN'); + sort.forEach(sortingItem => { + params = params.append('sort', sortingItem); + }) + return this.apiService .getBy(`${this.url}/assets/as-built`, params) .pipe(map(parts => PartsAssembler.assembleParts(parts))); } - public getPartsAsPlanned(page: number, pageSize: number, sorting: TableHeaderSort): Observable> { - const sort = PartsAssembler.mapSortToApiSort(sorting); - const params = new HttpParams() + public getPartsAsPlanned(page: number, pageSize: number, sorting: TableHeaderSort[]): Observable> { + let sort = sorting.map(sortingItem => PartsAssembler.mapSortToApiSort(sortingItem)); + let params = new HttpParams() .set('page', page) .set('size', pageSize) - .set('sort', sort) .set('owner', 'OWN'); + sort.forEach(sortingItem => { + params= params.set('sort', sortingItem); + }) + return this.apiService .getBy(`${this.url}/assets/as-planned`, params) .pipe(map(parts => PartsAssembler.assembleParts(parts))); From 42334249126a8a1c10991baecf7e3f5c9375bff0 Mon Sep 17 00:00:00 2001 From: Martin Maul Date: Tue, 12 Sep 2023 17:01:21 +0200 Subject: [PATCH 34/84] feature(UI):[TRACEFOSS-2339] added multisort by holding ctrl key --- .../customer-parts.component.ts | 40 +++++++----- .../supplier-parts.component.ts | 40 +++++++----- .../parts/presentation/parts.component.ts | 63 ++++++++++++------- .../shared/assembler/parts.assembler.ts | 3 +- 4 files changed, 94 insertions(+), 52 deletions(-) diff --git a/frontend/src/app/modules/page/other-parts/presentation/customer-parts/customer-parts.component.ts b/frontend/src/app/modules/page/other-parts/presentation/customer-parts/customer-parts.component.ts index 53da50a019..5fafdc3d60 100644 --- a/frontend/src/app/modules/page/other-parts/presentation/customer-parts/customer-parts.component.ts +++ b/frontend/src/app/modules/page/other-parts/presentation/customer-parts/customer-parts.component.ts @@ -81,6 +81,10 @@ export class CustomerPartsComponent implements OnInit, OnDestroy { this.ctrlKeyState = event.ctrlKey; console.log("CTRL PRESSED"); }); + window.addEventListener('keyup', (event) => { + this.ctrlKeyState = event.ctrlKey; + console.log("CTRL NOT PRESSED ANYMORE"); + }); } public ngOnInit(): void { @@ -102,27 +106,33 @@ export class CustomerPartsComponent implements OnInit, OnDestroy { private setTableSortingList(sorting: TableHeaderSort): void { - console.log(sorting); if(!sorting && this.tableCustomerSortList) { this.tableCustomerSortList = []; return; } - const [columnName, direction] = sorting; - const tableSortList = this.tableCustomerSortList; - - // Find the index of the existing entry with the same first item - const index = tableSortList.findIndex( - ([itemColumnName, direction]) => itemColumnName === columnName - ); - - if (index !== -1) { - // Replace the existing entry - tableSortList[index] = sorting; + if(this.ctrlKeyState) { + const [columnName, direction] = sorting; + const tableSortList = this.tableCustomerSortList; + + // Find the index of the existing entry with the same first item + const index = tableSortList.findIndex( + ([itemColumnName, direction]) => itemColumnName === columnName + ); + + if (index !== -1) { + // Replace the existing entry + tableSortList[index] = sorting; + } else { + // Add the new entry if it doesn't exist + tableSortList.push(sorting); + } + this.tableCustomerSortList = tableSortList; } else { - // Add the new entry if it doesn't exist - tableSortList.push(sorting); + this.tableCustomerSortList = [sorting]; } - this.tableCustomerSortList = tableSortList; + console.log(...this.tableCustomerSortList); + + } diff --git a/frontend/src/app/modules/page/other-parts/presentation/supplier-parts/supplier-parts.component.ts b/frontend/src/app/modules/page/other-parts/presentation/supplier-parts/supplier-parts.component.ts index 6e230170d1..176812903a 100644 --- a/frontend/src/app/modules/page/other-parts/presentation/supplier-parts/supplier-parts.component.ts +++ b/frontend/src/app/modules/page/other-parts/presentation/supplier-parts/supplier-parts.component.ts @@ -90,6 +90,11 @@ export class SupplierPartsComponent implements OnInit, OnDestroy { this.ctrlKeyState = event.ctrlKey; console.log("CTRL PRESSED"); }); + window.addEventListener('keyup', (event) => { + this.ctrlKeyState = event.ctrlKey; + + console.log("CTRL NOT PRESSED ANYMORE"); + }); } public get currentSelectedItems(): Part[] { @@ -147,27 +152,34 @@ export class SupplierPartsComponent implements OnInit, OnDestroy { private setTableSortingList(sorting: TableHeaderSort): void { - console.log(sorting); if(!sorting && this.tableSupplierSortList) { + console.log("resetted sortingList") this.tableSupplierSortList = []; return; } - const [columnName, direction] = sorting; - const tableSortList = this.tableSupplierSortList; - // Find the index of the existing entry with the same first item - const index = tableSortList.findIndex( - ([itemColumnName, direction]) => itemColumnName === columnName - ); - - if (index !== -1) { - // Replace the existing entry - tableSortList[index] = sorting; + if(this.ctrlKeyState) { + const [columnName, direction] = sorting; + const tableSortList = this.tableSupplierSortList; + + // Find the index of the existing entry with the same first item + const index = tableSortList.findIndex( + ([itemColumnName, direction]) => itemColumnName === columnName + ); + + if (index !== -1) { + // Replace the existing entry + tableSortList[index] = sorting; + } else { + // Add the new entry if it doesn't exist + tableSortList.push(sorting); + } + this.tableSupplierSortList = tableSortList; } else { - // Add the new entry if it doesn't exist - tableSortList.push(sorting); + this.tableSupplierSortList = [sorting]; } - this.tableSupplierSortList = tableSortList; + console.log(...this.tableSupplierSortList); + } 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 faed1dde75..b92acd0555 100644 --- a/frontend/src/app/modules/page/parts/presentation/parts.component.ts +++ b/frontend/src/app/modules/page/parts/presentation/parts.component.ts @@ -144,6 +144,10 @@ export class PartsComponent implements OnInit, OnDestroy, AfterViewInit { this.ctrlKeyState = event.ctrlKey; console.log("CTRL PRESSED"); }); + window.addEventListener('keyup', (event) => { + this.ctrlKeyState = event.ctrlKey; + console.log("CTRL NOT PRESSED ANYMORE"); + }); } public ngOnInit(): void { @@ -173,6 +177,7 @@ export class PartsComponent implements OnInit, OnDestroy, AfterViewInit { } public onAsBuiltTableConfigChange({ page, pageSize, sorting }: TableEventConfig): void { + console.log(this.ctrlKeyState); this.setTableSortingList(sorting,"asBuilt"); this.partsFacade.setPartsAsBuilt(page, pageSize, this.tableAsBuiltSortList); } @@ -183,7 +188,8 @@ export class PartsComponent implements OnInit, OnDestroy, AfterViewInit { } private setTableSortingList(sorting: TableHeaderSort, partTable: "asBuilt" | "asPlanned"): void { - console.log(sorting); + console.log(this.ctrlKeyState); + // if a sorting Columnlist exists but a column gets resetted: if(!sorting && (this.tableAsBuiltSortList || this.tableAsPlannedSortList)) { if(partTable === "asBuilt") { this.tableAsBuiltSortList = []; @@ -192,29 +198,42 @@ export class PartsComponent implements OnInit, OnDestroy, AfterViewInit { } return; } - const [columnName, direction] = sorting; - const tableSortList = partTable === "asBuilt" ? this.tableAsBuiltSortList : this.tableAsPlannedSortList - - // Find the index of the existing entry with the same first item - const index = tableSortList.findIndex( - ([itemColumnName, direction]) => itemColumnName === columnName - ); - - if (index !== -1) { - // Replace the existing entry - tableSortList[index] = sorting; - } else { - // Add the new entry if it doesn't exist - tableSortList.push(sorting); + + // if CTRL is pressed at to sortList + if(this.ctrlKeyState) { + const [columnName, direction] = sorting; + const tableSortList = partTable === "asBuilt" ? this.tableAsBuiltSortList : this.tableAsPlannedSortList + + // Find the index of the existing entry with the same first item + const index = tableSortList.findIndex( + ([itemColumnName, direction]) => itemColumnName === columnName + ); + + if (index !== -1) { + // Replace the existing entry + tableSortList[index] = sorting; + } else { + // Add the new entry if it doesn't exist + tableSortList.push(sorting); + } + if(partTable === "asBuilt") { + this.tableAsBuiltSortList = tableSortList + console.log(...this.tableAsBuiltSortList); + } else { + this.tableAsPlannedSortList = tableSortList + console.log(...this.tableAsPlannedSortList); + } } - if(partTable === "asBuilt") { - this.tableAsBuiltSortList = tableSortList - console.log(...this.tableAsBuiltSortList); - } else { - this.tableAsPlannedSortList = tableSortList - console.log(...this.tableAsPlannedSortList); + // If CTRL is not pressed just add a list with one entry + else { + if(partTable === "asBuilt") { + this.tableAsBuiltSortList = [sorting]; + console.log(...this.tableAsBuiltSortList); + } else { + this.tableAsPlannedSortList = [sorting] + console.log(...this.tableAsPlannedSortList); + } } - } } diff --git a/frontend/src/app/modules/shared/assembler/parts.assembler.ts b/frontend/src/app/modules/shared/assembler/parts.assembler.ts index eb4d3ca5e9..5d7a265c67 100644 --- a/frontend/src/app/modules/shared/assembler/parts.assembler.ts +++ b/frontend/src/app/modules/shared/assembler/parts.assembler.ts @@ -206,9 +206,10 @@ export class PartsAssembler { const localToApiMapping = new Map([ ['id', 'id'], ['idShort', 'idShort'], - ['semanticModelId', 'manufacturerPartId'], + ['semanticModelId', 'semanticModelId'], ['manufacturer', 'manufacturerName'], ['manufacturerPartId', 'manufacturerPartId'], + ['partId', "partId"], ['nameAtManufacturer', 'nameAtManufacturer'], ['businessPartner', 'businessPartner'], ['name', 'nameAtManufacturer'], From 3fbb167ac0eedfd9463fd7d41444ae25774aeefa Mon Sep 17 00:00:00 2001 From: Martin Maul Date: Wed, 13 Sep 2023 11:39:31 +0200 Subject: [PATCH 35/84] feature(UI):[TRACEFOSS-2339] added multisort display for myParts --- .../page/parts/presentation/parts.component.html | 2 ++ .../shared/components/table/table.component.html | 13 ++++++++++++- .../shared/components/table/table.component.scss | 4 ++++ .../shared/components/table/table.component.ts | 2 ++ .../src/app/modules/shared/service/parts.service.ts | 2 +- 5 files changed, 21 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/modules/page/parts/presentation/parts.component.html b/frontend/src/app/modules/page/parts/presentation/parts.component.html index b99b73b403..060bffe56c 100644 --- a/frontend/src/app/modules/page/parts/presentation/parts.component.html +++ b/frontend/src/app/modules/page/parts/presentation/parts.component.html @@ -37,6 +37,7 @@ (multiSelect)="currentSelectedItems$.next($event)" (clickSelectAction)="isAlertOpen$.next(true)" [tableHeader]="'page.asBuiltParts'" + [multiSortList]="tableAsBuiltSortList" > @@ -54,6 +55,7 @@ (multiSelect)="currentSelectedItems$.next($event)" (clickSelectAction)="isAlertOpen$.next(true)" [tableHeader]="'page.asPlannedParts'" + [multiSortList]="tableAsPlannedSortList" > diff --git a/frontend/src/app/modules/shared/components/table/table.component.html b/frontend/src/app/modules/shared/components/table/table.component.html index 8ebe6db328..5de293a746 100644 --- a/frontend/src/app/modules/shared/components/table/table.component.html +++ b/frontend/src/app/modules/shared/components/table/table.component.html @@ -194,8 +194,19 @@

{{ 'table.noResultFound' | i18n }}

> {{ tableConfig?.header?.[column] | i18n }}{{ tableConfig?.header?.[column] | i18n }} + + + +
+ + {{ (i+1) + "." }}{{ item[1] === 'asc' ? '↑' : item[1] === 'desc' ? '↓' : '' }} +
+
+
+ + ) { this.totalItems = totalItems; @@ -164,6 +165,7 @@ export class TableComponent { } public updateSortingOfData({ active, direction }: Sort): void { + console.log(...this.multiSortList) this.selection.clear(); this.emitMultiSelect(); this.sorting = !direction ? null : ([active, direction] as TableHeaderSort); diff --git a/frontend/src/app/modules/shared/service/parts.service.ts b/frontend/src/app/modules/shared/service/parts.service.ts index e08f524521..c21eec3c8e 100644 --- a/frontend/src/app/modules/shared/service/parts.service.ts +++ b/frontend/src/app/modules/shared/service/parts.service.ts @@ -62,7 +62,7 @@ export class PartsService { .set('owner', 'OWN'); sort.forEach(sortingItem => { - params= params.set('sort', sortingItem); + params= params.append('sort', sortingItem); }) return this.apiService From 0900a2826be0308e5aa285dc890319b96b681e61 Mon Sep 17 00:00:00 2001 From: Martin Maul Date: Wed, 13 Sep 2023 15:50:43 +0200 Subject: [PATCH 36/84] feature(UI):[TRACEFOSS-2339] added tooltip to table headers --- .../customer-parts.component.html | 1 + .../customer-parts/customer-parts.component.ts | 7 ------- .../supplier-parts.component.html | 1 + .../supplier-parts/supplier-parts.component.ts | 7 ------- .../page/parts/presentation/parts.component.ts | 8 -------- .../modules/shared/assembler/parts.assembler.ts | 3 +-- .../components/table/table.component.html | 7 +++++++ .../components/table/table.component.scss | 17 +++++++++++++++++ .../shared/components/table/table.component.ts | 4 ++-- .../start-investigation.component.spec.ts | 1 - 10 files changed, 29 insertions(+), 27 deletions(-) diff --git a/frontend/src/app/modules/page/other-parts/presentation/customer-parts/customer-parts.component.html b/frontend/src/app/modules/page/other-parts/presentation/customer-parts/customer-parts.component.html index 6344700e2a..d493b15ea3 100644 --- a/frontend/src/app/modules/page/other-parts/presentation/customer-parts/customer-parts.component.html +++ b/frontend/src/app/modules/page/other-parts/presentation/customer-parts/customer-parts.component.html @@ -35,6 +35,7 @@ [labelId]="customContext.labelId" (selected)="onSelectItem($event)" (configChanged)="onTableConfigChange($event)" + [multiSortList]="tableCustomerSortList" > diff --git a/frontend/src/app/modules/page/other-parts/presentation/customer-parts/customer-parts.component.ts b/frontend/src/app/modules/page/other-parts/presentation/customer-parts/customer-parts.component.ts index 5fafdc3d60..673fa8256a 100644 --- a/frontend/src/app/modules/page/other-parts/presentation/customer-parts/customer-parts.component.ts +++ b/frontend/src/app/modules/page/other-parts/presentation/customer-parts/customer-parts.component.ts @@ -79,11 +79,9 @@ export class CustomerPartsComponent implements OnInit, OnDestroy { window.addEventListener('keydown', (event) => { this.ctrlKeyState = event.ctrlKey; - console.log("CTRL PRESSED"); }); window.addEventListener('keyup', (event) => { this.ctrlKeyState = event.ctrlKey; - console.log("CTRL NOT PRESSED ANYMORE"); }); } @@ -130,10 +128,5 @@ export class CustomerPartsComponent implements OnInit, OnDestroy { } else { this.tableCustomerSortList = [sorting]; } - console.log(...this.tableCustomerSortList); - - - } - } diff --git a/frontend/src/app/modules/page/other-parts/presentation/supplier-parts/supplier-parts.component.html b/frontend/src/app/modules/page/other-parts/presentation/supplier-parts/supplier-parts.component.html index dce9f593a9..c7a6d6b13d 100644 --- a/frontend/src/app/modules/page/other-parts/presentation/supplier-parts/supplier-parts.component.html +++ b/frontend/src/app/modules/page/other-parts/presentation/supplier-parts/supplier-parts.component.html @@ -41,6 +41,7 @@ (configChanged)="onTableConfigChange($event)" (multiSelect)="onMultiSelect($event)" (clickSelectAction)="isInvestigationOpen$.next(true)" + [multiSortList]="tableSupplierSortList" > diff --git a/frontend/src/app/modules/page/other-parts/presentation/supplier-parts/supplier-parts.component.ts b/frontend/src/app/modules/page/other-parts/presentation/supplier-parts/supplier-parts.component.ts index 176812903a..a53b17020c 100644 --- a/frontend/src/app/modules/page/other-parts/presentation/supplier-parts/supplier-parts.component.ts +++ b/frontend/src/app/modules/page/other-parts/presentation/supplier-parts/supplier-parts.component.ts @@ -88,12 +88,9 @@ export class SupplierPartsComponent implements OnInit, OnDestroy { window.addEventListener('keydown', (event) => { this.ctrlKeyState = event.ctrlKey; - console.log("CTRL PRESSED"); }); window.addEventListener('keyup', (event) => { this.ctrlKeyState = event.ctrlKey; - - console.log("CTRL NOT PRESSED ANYMORE"); }); } @@ -153,7 +150,6 @@ export class SupplierPartsComponent implements OnInit, OnDestroy { private setTableSortingList(sorting: TableHeaderSort): void { if(!sorting && this.tableSupplierSortList) { - console.log("resetted sortingList") this.tableSupplierSortList = []; return; } @@ -178,9 +174,6 @@ export class SupplierPartsComponent implements OnInit, OnDestroy { } else { this.tableSupplierSortList = [sorting]; } - console.log(...this.tableSupplierSortList); - - } } 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 b92acd0555..2f86a26da2 100644 --- a/frontend/src/app/modules/page/parts/presentation/parts.component.ts +++ b/frontend/src/app/modules/page/parts/presentation/parts.component.ts @@ -142,11 +142,9 @@ export class PartsComponent implements OnInit, OnDestroy, AfterViewInit { window.addEventListener('keydown', (event) => { this.ctrlKeyState = event.ctrlKey; - console.log("CTRL PRESSED"); }); window.addEventListener('keyup', (event) => { this.ctrlKeyState = event.ctrlKey; - console.log("CTRL NOT PRESSED ANYMORE"); }); } @@ -177,7 +175,6 @@ export class PartsComponent implements OnInit, OnDestroy, AfterViewInit { } public onAsBuiltTableConfigChange({ page, pageSize, sorting }: TableEventConfig): void { - console.log(this.ctrlKeyState); this.setTableSortingList(sorting,"asBuilt"); this.partsFacade.setPartsAsBuilt(page, pageSize, this.tableAsBuiltSortList); } @@ -188,7 +185,6 @@ export class PartsComponent implements OnInit, OnDestroy, AfterViewInit { } private setTableSortingList(sorting: TableHeaderSort, partTable: "asBuilt" | "asPlanned"): void { - console.log(this.ctrlKeyState); // if a sorting Columnlist exists but a column gets resetted: if(!sorting && (this.tableAsBuiltSortList || this.tableAsPlannedSortList)) { if(partTable === "asBuilt") { @@ -218,20 +214,16 @@ export class PartsComponent implements OnInit, OnDestroy, AfterViewInit { } if(partTable === "asBuilt") { this.tableAsBuiltSortList = tableSortList - console.log(...this.tableAsBuiltSortList); } else { this.tableAsPlannedSortList = tableSortList - console.log(...this.tableAsPlannedSortList); } } // If CTRL is not pressed just add a list with one entry else { if(partTable === "asBuilt") { this.tableAsBuiltSortList = [sorting]; - console.log(...this.tableAsBuiltSortList); } else { this.tableAsPlannedSortList = [sorting] - console.log(...this.tableAsPlannedSortList); } } } diff --git a/frontend/src/app/modules/shared/assembler/parts.assembler.ts b/frontend/src/app/modules/shared/assembler/parts.assembler.ts index 5d7a265c67..6d123517b1 100644 --- a/frontend/src/app/modules/shared/assembler/parts.assembler.ts +++ b/frontend/src/app/modules/shared/assembler/parts.assembler.ts @@ -209,7 +209,7 @@ export class PartsAssembler { ['semanticModelId', 'semanticModelId'], ['manufacturer', 'manufacturerName'], ['manufacturerPartId', 'manufacturerPartId'], - ['partId', "partId"], + ['partId', "manufacturerPartId"], ['nameAtManufacturer', 'nameAtManufacturer'], ['businessPartner', 'businessPartner'], ['name', 'nameAtManufacturer'], @@ -217,7 +217,6 @@ export class PartsAssembler { ['van', 'van'], ['semanticDataModel', 'semanticDataModel'], ['classification', 'classification'], - ['partId', 'partId'], ['customerPartId', 'customerPartId'], ['nameAtCustomer', 'nameAtCustomer'], ['manufacturingDate', 'manufacturingDate'], diff --git a/frontend/src/app/modules/shared/components/table/table.component.html b/frontend/src/app/modules/shared/components/table/table.component.html index 5de293a746..24eed23848 100644 --- a/frontend/src/app/modules/shared/components/table/table.component.html +++ b/frontend/src/app/modules/shared/components/table/table.component.html @@ -187,6 +187,13 @@

{{ 'table.noResultFound' | i18n }}

{ const part = { data: PartsAssembler.assemblePart(MOCK_part_1) }; const firstChild = PartsAssembler.assemblePart(MOCK_part_2); - console.log(firstChild) const renderStartInvestigation = async () => { const { fixture } = await renderComponent(StartInvestigationComponent, { From 95c0b2f4500fc544913ed220bcfb0dae3b65f7bf Mon Sep 17 00:00:00 2001 From: Martin Maul Date: Wed, 13 Sep 2023 16:00:46 +0200 Subject: [PATCH 37/84] feature(UI):[TRACEFOSS-2339] fix tests --- frontend/src/app/modules/page/parts/core/parts.facade.spec.ts | 2 +- frontend/src/app/modules/page/parts/core/parts.facade.ts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/frontend/src/app/modules/page/parts/core/parts.facade.spec.ts b/frontend/src/app/modules/page/parts/core/parts.facade.spec.ts index 15a4f45f28..fb2850d35c 100644 --- a/frontend/src/app/modules/page/parts/core/parts.facade.spec.ts +++ b/frontend/src/app/modules/page/parts/core/parts.facade.spec.ts @@ -54,7 +54,7 @@ describe('Parts facade', () => { partsFacade.setPartsAsBuilt(0, 10); await waitFor(() => expect(serviceSpy).toHaveBeenCalledTimes(1)); - await waitFor(() => expect(serviceSpy).toHaveBeenCalledWith(0, 10, null)); + await waitFor(() => expect(serviceSpy).toHaveBeenCalledWith(0, 10, [])); const parts = await firstValueFrom(partsState.partsAsBuilt$); await waitFor(() => diff --git a/frontend/src/app/modules/page/parts/core/parts.facade.ts b/frontend/src/app/modules/page/parts/core/parts.facade.ts index 10fcd83f21..fdceeaafdf 100644 --- a/frontend/src/app/modules/page/parts/core/parts.facade.ts +++ b/frontend/src/app/modules/page/parts/core/parts.facade.ts @@ -46,7 +46,6 @@ export class PartsFacade { public setPartsAsBuilt(page = 0, pageSize = 50, sorting: TableHeaderSort[] = []): void { this.partsAsBuiltSubscription?.unsubscribe(); - // TODO: HERE I CAN MODIFY THE API TO SUPPORT MORE THAN ONE SORTCOLUMN this.partsAsBuiltSubscription = this.partsService.getPartsAsBuilt(page, pageSize, sorting).subscribe({ next: data => (this.partsState.partsAsBuilt = { data }), error: error => (this.partsState.partsAsBuilt = { error }), From ef2e8573556bdebf9bc63e7a72fd54c393a5d385 Mon Sep 17 00:00:00 2001 From: Martin Maul Date: Thu, 14 Sep 2023 09:29:57 +0200 Subject: [PATCH 38/84] feature(UI):[TRACEFOSS-2339] fix code smells --- .../customer-parts/customer-parts.component.ts | 4 ++-- .../supplier-parts/supplier-parts.component.ts | 4 ++-- .../modules/page/parts/presentation/parts.component.ts | 8 +++----- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/frontend/src/app/modules/page/other-parts/presentation/customer-parts/customer-parts.component.ts b/frontend/src/app/modules/page/other-parts/presentation/customer-parts/customer-parts.component.ts index 673fa8256a..7ed507dc64 100644 --- a/frontend/src/app/modules/page/other-parts/presentation/customer-parts/customer-parts.component.ts +++ b/frontend/src/app/modules/page/other-parts/presentation/customer-parts/customer-parts.component.ts @@ -109,12 +109,12 @@ export class CustomerPartsComponent implements OnInit, OnDestroy { return; } if(this.ctrlKeyState) { - const [columnName, direction] = sorting; + const [columnName] = sorting; const tableSortList = this.tableCustomerSortList; // Find the index of the existing entry with the same first item const index = tableSortList.findIndex( - ([itemColumnName, direction]) => itemColumnName === columnName + ([itemColumnName]) => itemColumnName === columnName ); if (index !== -1) { diff --git a/frontend/src/app/modules/page/other-parts/presentation/supplier-parts/supplier-parts.component.ts b/frontend/src/app/modules/page/other-parts/presentation/supplier-parts/supplier-parts.component.ts index a53b17020c..99fcc5f0a8 100644 --- a/frontend/src/app/modules/page/other-parts/presentation/supplier-parts/supplier-parts.component.ts +++ b/frontend/src/app/modules/page/other-parts/presentation/supplier-parts/supplier-parts.component.ts @@ -155,12 +155,12 @@ export class SupplierPartsComponent implements OnInit, OnDestroy { } if(this.ctrlKeyState) { - const [columnName, direction] = sorting; + const [columnName] = sorting; const tableSortList = this.tableSupplierSortList; // Find the index of the existing entry with the same first item const index = tableSortList.findIndex( - ([itemColumnName, direction]) => itemColumnName === columnName + ([itemColumnName]) => itemColumnName === columnName ); if (index !== -1) { 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 2f86a26da2..491f4084b9 100644 --- a/frontend/src/app/modules/page/parts/presentation/parts.component.ts +++ b/frontend/src/app/modules/page/parts/presentation/parts.component.ts @@ -197,12 +197,12 @@ export class PartsComponent implements OnInit, OnDestroy, AfterViewInit { // if CTRL is pressed at to sortList if(this.ctrlKeyState) { - const [columnName, direction] = sorting; + const [columnName] = sorting; const tableSortList = partTable === "asBuilt" ? this.tableAsBuiltSortList : this.tableAsPlannedSortList // Find the index of the existing entry with the same first item const index = tableSortList.findIndex( - ([itemColumnName, direction]) => itemColumnName === columnName + ([itemColumnName]) => itemColumnName === columnName ); if (index !== -1) { @@ -219,13 +219,11 @@ export class PartsComponent implements OnInit, OnDestroy, AfterViewInit { } } // If CTRL is not pressed just add a list with one entry - else { - if(partTable === "asBuilt") { + else if(partTable === "asBuilt") { this.tableAsBuiltSortList = [sorting]; } else { this.tableAsPlannedSortList = [sorting] } - } } } From 16b8f89c7cb291a0de5a6445650b126dbee8b27d Mon Sep 17 00:00:00 2001 From: Martin Maul Date: Thu, 14 Sep 2023 10:17:32 +0200 Subject: [PATCH 39/84] feature(UI):[TRACEFOSS-2339] fix code smells --- .../page/parts/presentation/parts.component.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) 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 491f4084b9..3859a19e6d 100644 --- a/frontend/src/app/modules/page/parts/presentation/parts.component.ts +++ b/frontend/src/app/modules/page/parts/presentation/parts.component.ts @@ -187,11 +187,7 @@ export class PartsComponent implements OnInit, OnDestroy, AfterViewInit { private setTableSortingList(sorting: TableHeaderSort, partTable: "asBuilt" | "asPlanned"): void { // if a sorting Columnlist exists but a column gets resetted: if(!sorting && (this.tableAsBuiltSortList || this.tableAsPlannedSortList)) { - if(partTable === "asBuilt") { - this.tableAsBuiltSortList = []; - } else { - this.tableAsPlannedSortList= []; - } + this.resetTableSortingList(partTable); return; } @@ -226,4 +222,12 @@ export class PartsComponent implements OnInit, OnDestroy, AfterViewInit { } } + private resetTableSortingList(partTable: "asBuilt" | "asPlanned"): void { + if(partTable === "asBuilt") { + this.tableAsBuiltSortList = []; + } else { + this.tableAsPlannedSortList= []; + } + } + } From 77349109503eeb4061fa1f9ae417e1f992a9e027 Mon Sep 17 00:00:00 2001 From: Martin Maul Date: Thu, 14 Sep 2023 10:29:19 +0200 Subject: [PATCH 40/84] feature(UI):[TRACEFOSS-2339] fix code duplication --- .../core/other-parts.facade.spec.ts | 2 +- .../other-parts/core/other-parts.facade.ts | 5 +++-- .../other-parts/core/other-parts.service.ts | 20 +++---------------- 3 files changed, 7 insertions(+), 20 deletions(-) diff --git a/frontend/src/app/modules/page/other-parts/core/other-parts.facade.spec.ts b/frontend/src/app/modules/page/other-parts/core/other-parts.facade.spec.ts index 44544d61b8..0aacb80f64 100644 --- a/frontend/src/app/modules/page/other-parts/core/other-parts.facade.spec.ts +++ b/frontend/src/app/modules/page/other-parts/core/other-parts.facade.spec.ts @@ -40,7 +40,7 @@ describe('OtherPartsFacade', () => { } as PartsService; otherPartsServiceMock = { - getSupplierParts: (_page, _pageSize, _sorting) => + getOtherParts: (_page, _pageSize, _sorting, _owner) => of(mockAssets).pipe(map(parts => PartsAssembler.assembleParts(parts))), } as OtherPartsService; diff --git a/frontend/src/app/modules/page/other-parts/core/other-parts.facade.ts b/frontend/src/app/modules/page/other-parts/core/other-parts.facade.ts index 12f68481b1..1b39ef20dc 100644 --- a/frontend/src/app/modules/page/other-parts/core/other-parts.facade.ts +++ b/frontend/src/app/modules/page/other-parts/core/other-parts.facade.ts @@ -23,6 +23,7 @@ import { Injectable } from '@angular/core'; import { Pagination } from '@core/model/pagination.model'; import { OtherPartsService } from '@page/other-parts/core/other-parts.service'; import { OtherPartsState } from '@page/other-parts/core/other-parts.state'; +import { Owner } from '@page/parts/model/owner.enum'; import { Part } from '@page/parts/model/parts.model'; import { TableHeaderSort } from '@shared/components/table/table.model'; import { View } from '@shared/model/view.model'; @@ -51,7 +52,7 @@ export class OtherPartsFacade { public setCustomerParts(page = 0, pageSize = 50, sorting: TableHeaderSort[] = []): void { this.customerPartsSubscription?.unsubscribe(); - this.customerPartsSubscription = this.otherPartsService.getCustomerParts(page, pageSize, sorting).subscribe({ + this.customerPartsSubscription = this.otherPartsService.getOtherParts(page, pageSize, sorting, Owner.CUSTOMER).subscribe({ next: data => (this.otherPartsState.customerParts = { data }), error: error => (this.otherPartsState.customerParts = { error }), }); @@ -59,7 +60,7 @@ export class OtherPartsFacade { public setSupplierParts(page = 0, pageSize = 50, sorting: TableHeaderSort[] = []): void { this.supplierPartsSubscription?.unsubscribe(); - this.supplierPartsSubscription = this.otherPartsService.getSupplierParts(page, pageSize, sorting).subscribe({ + this.supplierPartsSubscription = this.otherPartsService.getOtherParts(page, pageSize, sorting, Owner.SUPPLIER).subscribe({ next: data => (this.otherPartsState.supplierParts = { data }), error: error => (this.otherPartsState.supplierParts = { error }), }); diff --git a/frontend/src/app/modules/page/other-parts/core/other-parts.service.ts b/frontend/src/app/modules/page/other-parts/core/other-parts.service.ts index 20f0acbdf2..0161c6d2e4 100644 --- a/frontend/src/app/modules/page/other-parts/core/other-parts.service.ts +++ b/frontend/src/app/modules/page/other-parts/core/other-parts.service.ts @@ -24,6 +24,7 @@ import { Injectable } from '@angular/core'; import { ApiService } from '@core/api/api.service'; import { Pagination } from '@core/model/pagination.model'; import { environment } from '@env'; +import { Owner } from '@page/parts/model/owner.enum'; import { Part, PartsResponse } from '@page/parts/model/parts.model'; import { PartsAssembler } from '@shared/assembler/parts.assembler'; import { TableHeaderSort } from '@shared/components/table/table.model'; @@ -36,28 +37,13 @@ export class OtherPartsService { constructor(private readonly apiService: ApiService) {} - public getSupplierParts(page: number, pageSize: number, sorting: TableHeaderSort[]): Observable> { - let sort = sorting.map(sortingItem => PartsAssembler.mapSortToApiSort(sortingItem)); - let params = new HttpParams() - .set('page', page) - .set('size', pageSize) - .set('owner', 'SUPPLIER'); - - sort.forEach(sortingItem => { - params = params.append('sort', sortingItem); - }) - - return this.apiService - .getBy(`${this.url}/assets/as-built`, params) - .pipe(map(parts => PartsAssembler.assembleOtherParts(parts))); - } - public getCustomerParts(page: number, pageSize: number, sorting: TableHeaderSort[]): Observable> { + public getOtherParts(page: number, pageSize: number, sorting: TableHeaderSort[], owner: Owner): Observable> { let sort = sorting.map(sortingItem => PartsAssembler.mapSortToApiSort(sortingItem)); let params = new HttpParams() .set('page', page) .set('size', pageSize) - .set('owner', 'CUSTOMER'); + .set('owner', owner); sort.forEach(sortingItem => { params = params.append('sort', sortingItem); From faf807e6f2aaeb8b7c2f7a6df33507189bfa0908 Mon Sep 17 00:00:00 2001 From: Martin Maul Date: Fri, 15 Sep 2023 11:58:28 +0200 Subject: [PATCH 41/84] feature(UI):[TRACEFOSS-2339] add tests --- .../parts/presentation/parts.component.spec.ts | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/modules/page/parts/presentation/parts.component.spec.ts b/frontend/src/app/modules/page/parts/presentation/parts.component.spec.ts index 51ccb42726..1b9750504d 100644 --- a/frontend/src/app/modules/page/parts/presentation/parts.component.spec.ts +++ b/frontend/src/app/modules/page/parts/presentation/parts.component.spec.ts @@ -19,13 +19,14 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ +import { By } from '@angular/platform-browser'; import { LayoutModule } from '@layout/layout.module'; import { SidenavComponent } from '@layout/sidenav/sidenav.component'; import { SidenavService } from '@layout/sidenav/sidenav.service'; import { OtherPartsModule } from '@page/other-parts/other-parts.module'; import { PartsComponent } from '@page/parts/presentation/parts.component'; import { SharedModule } from '@shared/shared.module'; -import { screen, waitFor } from '@testing-library/angular'; +import { fireEvent, screen, waitFor } from '@testing-library/angular'; import { renderComponent } from '@tests/test-render.utils'; import { PartsModule } from '../parts.module'; @@ -68,4 +69,17 @@ describe('Parts', () => { expect(selectedPartsInfo).toBeInTheDocument(); }); + + it('should sort after column id', async () => { + const {fixture, } = await renderParts(); + const partsComponent = fixture.debugElement.query(By.directive(PartsComponent)).componentInstance; + + let setTableListSpy = spyOn(partsComponent, "onAsBuiltTableConfigChange"); + + let idColumnHeader = await screen.findByText('table.column.id'); + fireEvent.click(idColumnHeader); + + expect(setTableListSpy).toHaveBeenCalled(); + expect(setTableListSpy).toHaveBeenCalledWith( Object({ page: 0, pageSize: 10, sorting: [ 'id', 'asc' ] })); + }); }); From 111fbd9332057b9414871d4dca3571912955ffc1 Mon Sep 17 00:00:00 2001 From: Martin Maul Date: Fri, 15 Sep 2023 15:43:23 +0200 Subject: [PATCH 42/84] feature(UI):[TRACEFOSS-2339] add tests --- .../presentation/parts.component.spec.ts | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/frontend/src/app/modules/page/parts/presentation/parts.component.spec.ts b/frontend/src/app/modules/page/parts/presentation/parts.component.spec.ts index 1b9750504d..bd06b42648 100644 --- a/frontend/src/app/modules/page/parts/presentation/parts.component.spec.ts +++ b/frontend/src/app/modules/page/parts/presentation/parts.component.spec.ts @@ -70,16 +70,20 @@ describe('Parts', () => { expect(selectedPartsInfo).toBeInTheDocument(); }); - it('should sort after column id', async () => { - const {fixture, } = await renderParts(); - const partsComponent = fixture.debugElement.query(By.directive(PartsComponent)).componentInstance; - - let setTableListSpy = spyOn(partsComponent, "onAsBuiltTableConfigChange"); + fit('should sort after column id', async () => { + const {fixture } = await renderParts(); + const partsComponent = await fixture.debugElement.query(By.directive(PartsComponent)).componentInstance; + //let onAsBuiltFunctionSpy = spyOn(partsComponent, "onAsBuiltTableConfigChange").and.callThrough(); + let setTableFunctionSpy = spyOn(partsComponent, "setTableSortingList").and.callThrough(); let idColumnHeader = await screen.findByText('table.column.id'); - fireEvent.click(idColumnHeader); + await waitFor(() => {fireEvent.click(idColumnHeader);}, {timeout: 3000}); + + + expect(setTableFunctionSpy).toHaveBeenCalledWith(['id', 'asc'], "asBuilt" ); + console.warn(partsComponent.tableAsBuiltSortList); - expect(setTableListSpy).toHaveBeenCalled(); - expect(setTableListSpy).toHaveBeenCalledWith( Object({ page: 0, pageSize: 10, sorting: [ 'id', 'asc' ] })); + //expect(onAsBuiltFunctionSpy).toHaveBeenCalledWith( Object({ page: 0, pageSize: 10, sorting: [ 'id', 'asc' ] })); + expect(partsComponent['tableAsBuiltSortList']).toEqual([["id", "asc"]]); }); }); From 2d96618f4c81379d0a06dbf030c5cf6710beb7bf Mon Sep 17 00:00:00 2001 From: Martin Maul Date: Fri, 15 Sep 2023 16:19:45 +0200 Subject: [PATCH 43/84] feature(UI):[TRACEFOSS-2339] add tests --- .../presentation/parts.component.spec.ts | 38 +++++++++++++++++-- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/frontend/src/app/modules/page/parts/presentation/parts.component.spec.ts b/frontend/src/app/modules/page/parts/presentation/parts.component.spec.ts index bd06b42648..dfc4282088 100644 --- a/frontend/src/app/modules/page/parts/presentation/parts.component.spec.ts +++ b/frontend/src/app/modules/page/parts/presentation/parts.component.spec.ts @@ -70,20 +70,50 @@ describe('Parts', () => { expect(selectedPartsInfo).toBeInTheDocument(); }); - fit('should sort after column id', async () => { + it('should sort asBuilt after column id', async () => { const {fixture } = await renderParts(); const partsComponent = await fixture.debugElement.query(By.directive(PartsComponent)).componentInstance; - //let onAsBuiltFunctionSpy = spyOn(partsComponent, "onAsBuiltTableConfigChange").and.callThrough(); let setTableFunctionSpy = spyOn(partsComponent, "setTableSortingList").and.callThrough(); let idColumnHeader = await screen.findByText('table.column.id'); await waitFor(() => {fireEvent.click(idColumnHeader);}, {timeout: 3000}); expect(setTableFunctionSpy).toHaveBeenCalledWith(['id', 'asc'], "asBuilt" ); - console.warn(partsComponent.tableAsBuiltSortList); - //expect(onAsBuiltFunctionSpy).toHaveBeenCalledWith( Object({ page: 0, pageSize: 10, sorting: [ 'id', 'asc' ] })); expect(partsComponent['tableAsBuiltSortList']).toEqual([["id", "asc"]]); }); + + fit('should multisort after column id', async () => { + const {fixture } = await renderParts(); + const partsComponent = await fixture.debugElement.query(By.directive(PartsComponent)).componentInstance; + + let setTableFunctionSpy = spyOn(partsComponent, "setTableSortingList").and.callThrough(); + let idColumnHeader = await screen.findByText('table.column.id'); + await waitFor(() => {fireEvent.click(idColumnHeader);}, {timeout: 3000}); + let idShortHeader = await screen.findByText('table.column.idShort') + + await waitFor(() => {fireEvent.keyDown(idShortHeader, { + ctrlKey: true, + charCode: 17 + })}) + expect(partsComponent['ctrlKeyState']).toBeTruthy(); + await waitFor(() => { + fireEvent.click(idShortHeader) + }); + + await waitFor(() => {fireEvent.keyUp(idShortHeader, { + ctrlKey: true, + charCode: 17 + })}) + + await waitFor(() => {fireEvent.click(idShortHeader)}); + + + expect(setTableFunctionSpy).toHaveBeenCalledWith(['id', 'asc'], "asBuilt" ); + expect(setTableFunctionSpy).toHaveBeenCalledWith(['idShort', 'asc'], "asBuilt" ); + console.warn(partsComponent.tableAsBuiltSortList); + expect(partsComponent['tableAsBuiltSortList']).toEqual([["id", "asc"], ["idShort", "desc"]]); + }); + }); From 8be064bede13b2ca60365c4eed8b69ad01a1c4d3 Mon Sep 17 00:00:00 2001 From: Martin Maul Date: Fri, 15 Sep 2023 16:28:13 +0200 Subject: [PATCH 44/84] feature(UI):[TRACEFOSS-2339] add tests --- .../modules/page/parts/presentation/parts.component.spec.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/app/modules/page/parts/presentation/parts.component.spec.ts b/frontend/src/app/modules/page/parts/presentation/parts.component.spec.ts index dfc4282088..f0f9375db4 100644 --- a/frontend/src/app/modules/page/parts/presentation/parts.component.spec.ts +++ b/frontend/src/app/modules/page/parts/presentation/parts.component.spec.ts @@ -71,7 +71,7 @@ describe('Parts', () => { }); it('should sort asBuilt after column id', async () => { - const {fixture } = await renderParts(); + const { fixture } = await renderParts(); const partsComponent = await fixture.debugElement.query(By.directive(PartsComponent)).componentInstance; let setTableFunctionSpy = spyOn(partsComponent, "setTableSortingList").and.callThrough(); @@ -84,8 +84,8 @@ describe('Parts', () => { expect(partsComponent['tableAsBuiltSortList']).toEqual([["id", "asc"]]); }); - fit('should multisort after column id', async () => { - const {fixture } = await renderParts(); + it('should multisort after column id', async () => { + const { fixture } = await renderParts(); const partsComponent = await fixture.debugElement.query(By.directive(PartsComponent)).componentInstance; let setTableFunctionSpy = spyOn(partsComponent, "setTableSortingList").and.callThrough(); From af95c8fc6e14d82b2d1374a6aa765e8f9f341a2a Mon Sep 17 00:00:00 2001 From: Martin Maul Date: Fri, 15 Sep 2023 16:33:28 +0200 Subject: [PATCH 45/84] feature(UI):[TRACEFOSS-2339] add tests --- .../presentation/parts.component.spec.ts | 31 ++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/modules/page/parts/presentation/parts.component.spec.ts b/frontend/src/app/modules/page/parts/presentation/parts.component.spec.ts index f0f9375db4..a85c3da013 100644 --- a/frontend/src/app/modules/page/parts/presentation/parts.component.spec.ts +++ b/frontend/src/app/modules/page/parts/presentation/parts.component.spec.ts @@ -84,7 +84,7 @@ describe('Parts', () => { expect(partsComponent['tableAsBuiltSortList']).toEqual([["id", "asc"]]); }); - it('should multisort after column id', async () => { + it('should multisort after column id and idShort', async () => { const { fixture } = await renderParts(); const partsComponent = await fixture.debugElement.query(By.directive(PartsComponent)).componentInstance; @@ -116,4 +116,33 @@ describe('Parts', () => { expect(partsComponent['tableAsBuiltSortList']).toEqual([["id", "asc"], ["idShort", "desc"]]); }); + it('should reset sorting after third click', async () => { + const { fixture } = await renderParts(); + const partsComponent = await fixture.debugElement.query(By.directive(PartsComponent)).componentInstance; + + let idColumnHeader = await screen.findByText('table.column.id'); + await waitFor(() => {fireEvent.click(idColumnHeader);}, {timeout: 3000}); + let idShortHeader = await screen.findByText('table.column.idShort') + + await waitFor(() => {fireEvent.keyDown(idShortHeader, { + ctrlKey: true, + charCode: 17 + })}) + + await waitFor(() => { + fireEvent.click(idShortHeader) + }); + + await waitFor(() => {fireEvent.keyUp(idShortHeader, { + ctrlKey: true, + charCode: 17 + })}) + + await waitFor(() => {fireEvent.click(idShortHeader)}); + + await waitFor(() => {fireEvent.click(idShortHeader)}); + + expect(partsComponent['tableAsBuiltSortList']).toEqual([]); + }); + }); From 2af03972e32e2c27f36c837ead3550d1067a9d35 Mon Sep 17 00:00:00 2001 From: Martin Maul Date: Fri, 15 Sep 2023 17:28:42 +0200 Subject: [PATCH 46/84] feature(UI):[TRACEFOSS-2339] add tests --- .../customer-parts.component.spec.ts | 72 +++++++++++++++++-- .../supplier-parts.component.spec.ts | 65 +++++++++++++++++ 2 files changed, 133 insertions(+), 4 deletions(-) diff --git a/frontend/src/app/modules/page/other-parts/presentation/customer-parts/customer-parts.component.spec.ts b/frontend/src/app/modules/page/other-parts/presentation/customer-parts/customer-parts.component.spec.ts index b6d1a4f6ea..c1ea18c7af 100644 --- a/frontend/src/app/modules/page/other-parts/presentation/customer-parts/customer-parts.component.spec.ts +++ b/frontend/src/app/modules/page/other-parts/presentation/customer-parts/customer-parts.component.spec.ts @@ -20,7 +20,7 @@ import { OtherPartsState } from '@page/other-parts/core/other-parts.state'; import { OtherPartsModule } from '@page/other-parts/other-parts.module'; import { PartsState } from '@page/parts/core/parts.state'; -import { screen, waitFor } from '@testing-library/angular'; +import { fireEvent, screen, waitFor } from '@testing-library/angular'; import { renderComponent } from '@tests/test-render.utils'; import { CustomerPartsComponent } from './customer-parts.component'; @@ -29,11 +29,11 @@ describe('CustomerPartsComponent', () => { let otherPartsState: OtherPartsState; beforeEach(() => (otherPartsState = new OtherPartsState())); - const renderCustomerParts = ({ roles = [] } = {}) => + const renderCustomerParts = () => renderComponent(CustomerPartsComponent, { imports: [OtherPartsModule], providers: [{ provide: OtherPartsState, useFactory: () => otherPartsState }, { provide: PartsState }], - roles, + roles: ['admin', 'wip'], }); it('should render part table', async () => { @@ -45,9 +45,73 @@ describe('CustomerPartsComponent', () => { it('should render table and display correct amount of rows', async () => { await renderCustomerParts(); - const tableElement = await waitFor(() => screen.getByTestId('table-component--test-id')); expect(tableElement).toBeInTheDocument(); expect(tableElement.children[1].childElementCount).toEqual(5); }); + + it('sort customer parts after name column', async () => { + const {fixture} = await renderCustomerParts(); + const customerPartsComponent = fixture.componentInstance; + + let nameHeader = await screen.findByText('table.column.name'); + fireEvent.click(nameHeader); + + expect(customerPartsComponent['tableCustomerSortList']).toEqual([["name", "asc"]]); + + }); + + it('should multisort after column name and semanticModelId', async () => { + const {fixture} = await renderCustomerParts(); + const customerPartsComponent = fixture.componentInstance; + + let nameHeader = await screen.findByText('table.column.name'); + fireEvent.click(nameHeader); + let semanticModelIdHeader = await screen.findByText('table.column.semanticModelId') + + await waitFor(() => {fireEvent.keyDown(semanticModelIdHeader, { + ctrlKey: true, + charCode: 17 + })}) + expect(customerPartsComponent['ctrlKeyState']).toBeTruthy(); + await waitFor(() => { + fireEvent.click(semanticModelIdHeader) + }); + + await waitFor(() => {fireEvent.keyUp(semanticModelIdHeader, { + ctrlKey: true, + charCode: 17 + })}) + + await waitFor(() => {fireEvent.click(semanticModelIdHeader)}); + expect(customerPartsComponent['tableCustomerSortList']).toEqual([["name", "asc"], ["semanticModelId", "desc"]]); + }); + + it('should reset sorting on third click', async () => { + const {fixture} = await renderCustomerParts(); + const customerPartsComponent = fixture.componentInstance; + + let nameHeader = await screen.findByText('table.column.name'); + fireEvent.click(nameHeader); + let semanticModelIdHeader = await screen.findByText('table.column.semanticModelId') + + await waitFor(() => {fireEvent.keyDown(semanticModelIdHeader, { + ctrlKey: true, + charCode: 17 + })}) + expect(customerPartsComponent['ctrlKeyState']).toBeTruthy(); + await waitFor(() => { + fireEvent.click(semanticModelIdHeader) + }); + + await waitFor(() => {fireEvent.keyUp(semanticModelIdHeader, { + ctrlKey: true, + charCode: 17 + })}) + + await waitFor(() => {fireEvent.click(semanticModelIdHeader)}); + await waitFor(() => {fireEvent.click(semanticModelIdHeader)}); + expect(customerPartsComponent['tableCustomerSortList']).toEqual([]); + }); + }); diff --git a/frontend/src/app/modules/page/other-parts/presentation/supplier-parts/supplier-parts.component.spec.ts b/frontend/src/app/modules/page/other-parts/presentation/supplier-parts/supplier-parts.component.spec.ts index 3c4f2b2e33..1ffe34e72f 100644 --- a/frontend/src/app/modules/page/other-parts/presentation/supplier-parts/supplier-parts.component.spec.ts +++ b/frontend/src/app/modules/page/other-parts/presentation/supplier-parts/supplier-parts.component.spec.ts @@ -103,4 +103,69 @@ describe('SupplierPartsComponent', () => { fixture.componentInstance.clearSelected(); expect(fixture.componentInstance.currentSelectedItems).toEqual([]); }) + + it('sort supplier parts after name column', async () => { + const {fixture} = await renderSupplierParts({ roles: ['admin'] }); + const supplierPartsComponent = fixture.componentInstance; + + let nameHeader = await screen.findByText('table.column.name'); + fireEvent.click(nameHeader); + + expect(supplierPartsComponent['tableSupplierSortList']).toEqual([["name", "asc"]]); + + }); + + it('should multisort after column name and semanticModelId', async () => { + const {fixture} = await renderSupplierParts({ roles: ['admin'] }); + const supplierPartsComponent = fixture.componentInstance; + + let nameHeader = await screen.findByText('table.column.name'); + fireEvent.click(nameHeader); + let semanticModelIdHeader = await screen.findByText('table.column.semanticModelId') + + await waitFor(() => {fireEvent.keyDown(semanticModelIdHeader, { + ctrlKey: true, + charCode: 17 + })}) + expect(supplierPartsComponent['ctrlKeyState']).toBeTruthy(); + await waitFor(() => { + fireEvent.click(semanticModelIdHeader) + }); + + await waitFor(() => {fireEvent.keyUp(semanticModelIdHeader, { + ctrlKey: true, + charCode: 17 + })}) + + await waitFor(() => {fireEvent.click(semanticModelIdHeader)}); + expect(supplierPartsComponent['tableSupplierSortList']).toEqual([["name", "asc"], ["semanticModelId", "desc"]]); + }); + + it('should reset sorting on third click', async () => { + const {fixture} = await renderSupplierParts({ roles: ['admin'] }); + const supplierPartsComponent = fixture.componentInstance; + + let nameHeader = await screen.findByText('table.column.name'); + fireEvent.click(nameHeader); + let semanticModelIdHeader = await screen.findByText('table.column.semanticModelId') + + await waitFor(() => {fireEvent.keyDown(semanticModelIdHeader, { + ctrlKey: true, + charCode: 17 + })}) + expect(supplierPartsComponent['ctrlKeyState']).toBeTruthy(); + await waitFor(() => { + fireEvent.click(semanticModelIdHeader) + }); + + await waitFor(() => {fireEvent.keyUp(semanticModelIdHeader, { + ctrlKey: true, + charCode: 17 + })}) + + await waitFor(() => {fireEvent.click(semanticModelIdHeader)}); + await waitFor(() => {fireEvent.click(semanticModelIdHeader)}); + expect(supplierPartsComponent['tableSupplierSortList']).toEqual([]); + }); + }); From d0e5018c9fb892d155ed42f6dee8cef23663a119 Mon Sep 17 00:00:00 2001 From: Martin Maul Date: Fri, 15 Sep 2023 17:55:53 +0200 Subject: [PATCH 47/84] feature(UI):[TRACEFOSS-2339] add changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 94a5be5c18..4b7a999cdd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - NEW API DELETE /api/registry - NEW API GET /api/shelldescriptors - cascading sorting functionality by allowing multiple sort query parameters on APIs +- cascading sorting functionality for Parts and OtherParts tables in FE ### Changed - API BREAKING CHANGE: /api/assets changed to /api/assets/as-built From b2715a30cd36cd179918f7c1147a25c78d3efaab Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Mon, 18 Sep 2023 11:37:19 +0200 Subject: [PATCH 48/84] chore: TRACEFOSS-2537 fix --- .../edc/properties/EdcProperties.java | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/properties/EdcProperties.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/properties/EdcProperties.java index b29649d88c..aeaf1fa69c 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/properties/EdcProperties.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/properties/EdcProperties.java @@ -24,11 +24,15 @@ import lombok.AllArgsConstructor; import lombok.Getter; import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.context.properties.ConfigurationProperties; + +import java.util.Map; +import java.util.Set; import org.springframework.stereotype.Component; @AllArgsConstructor @Getter -@Component +@ConfigurationProperties("edc") public class EdcProperties { @NotBlank @@ -39,6 +43,18 @@ public class EdcProperties { @Value("${edc.contractdefinitions}") private String contractDefinitionsPath; + @NotBlank + @Value("${edc.negotiation}") + private String negotiationPath; + + @NotBlank + @Value("${edc.transfer}") + private String transferPath; + + @NotBlank + @Value("${edc.catalog.path}") + private String catalogPath; + @NotBlank @Value("${edc.policydefinitions}") private String policyDefinitionsPath; From af62197cbe4dfe8e8c1fb8412e7e0330039333da Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Mon, 18 Sep 2023 11:47:50 +0200 Subject: [PATCH 49/84] chore: TRACEFOSS-2537 fix --- .../infrastructure/edc/properties/EdcProperties.java | 8 -------- 1 file changed, 8 deletions(-) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/properties/EdcProperties.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/properties/EdcProperties.java index aeaf1fa69c..bf4f44be54 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/properties/EdcProperties.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/properties/EdcProperties.java @@ -43,18 +43,10 @@ public class EdcProperties { @Value("${edc.contractdefinitions}") private String contractDefinitionsPath; - @NotBlank - @Value("${edc.negotiation}") - private String negotiationPath; - @NotBlank @Value("${edc.transfer}") private String transferPath; - @NotBlank - @Value("${edc.catalog.path}") - private String catalogPath; - @NotBlank @Value("${edc.policydefinitions}") private String policyDefinitionsPath; From 503324d36df24f0440844b88497d4ddbf1bb434d Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Mon, 18 Sep 2023 11:56:21 +0200 Subject: [PATCH 50/84] chore: TRACEFOSS-2537 fix --- .../infrastructure/edc/properties/EdcProperties.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/properties/EdcProperties.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/properties/EdcProperties.java index bf4f44be54..d4e93383db 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/properties/EdcProperties.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/properties/EdcProperties.java @@ -43,10 +43,6 @@ public class EdcProperties { @Value("${edc.contractdefinitions}") private String contractDefinitionsPath; - @NotBlank - @Value("${edc.transfer}") - private String transferPath; - @NotBlank @Value("${edc.policydefinitions}") private String policyDefinitionsPath; From 5845a49286a49bc861cce8ef0c8ce4ec5efb9c69 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Mon, 18 Sep 2023 12:00:05 +0200 Subject: [PATCH 51/84] chore: TRACEFOSS-2537 fix --- .../infrastructure/edc/properties/EdcProperties.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/properties/EdcProperties.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/properties/EdcProperties.java index d4e93383db..feec852618 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/properties/EdcProperties.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/properties/EdcProperties.java @@ -26,10 +26,6 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.context.properties.ConfigurationProperties; -import java.util.Map; -import java.util.Set; -import org.springframework.stereotype.Component; - @AllArgsConstructor @Getter @ConfigurationProperties("edc") From 732e05b696c1fea2a675b2c3a64d7f170e64e9bc Mon Sep 17 00:00:00 2001 From: Maximilian Wesener Date: Mon, 18 Sep 2023 13:38:59 +0200 Subject: [PATCH 52/84] chore: TRACEFOSS-XXX Updated deps. --- CHANGELOG.md | 1 + pom.xml | 20 ++++++++------------ tx-backend/pom.xml | 8 +++++--- 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d3b9436a1..5fe8a3fe56 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - NEW API GET /api/assets/as-planned/distinctFilterValues - NEW API GET /api/assets/as-built/distinctFilterValues - Added Batch 2.0.0 support +- Updated some patch version for used dependencies. ### Changed - API BREAKING CHANGE: /api/assets changed to /api/assets/as-built diff --git a/pom.xml b/pom.xml index a4d10b1948..93bfeec7ae 100644 --- a/pom.xml +++ b/pom.xml @@ -38,8 +38,9 @@ SPDX-License-Identifier: Apache-2.0 - 3.1.2 - 6.0.11 + 3.1.3 + 6.0.12 + 6.1.3 17 ${java.version} ${java.version} @@ -86,18 +87,19 @@ SPDX-License-Identifier: Apache-2.0 0.9.3 1.1.0 1.17.6 - 5.3.0 + 5.3.2 - 2.0.4 + 2.2.0 3.24.2 1.2 1.18.28 2.38.0 7.12.1 2.2 - 2.15.1 + 2.15.2 5.9.3 3.0.0 + 1.2.1-SNAPSHOT jacoco reuseReports @@ -124,16 +126,10 @@ SPDX-License-Identifier: Apache-2.0 pom import - - - org.yaml - snakeyaml - ${org-snakeyaml.version} - - + org.projectlombok lombok diff --git a/tx-backend/pom.xml b/tx-backend/pom.xml index fb2d87c29e..d0da208e5f 100644 --- a/tx-backend/pom.xml +++ b/tx-backend/pom.xml @@ -54,7 +54,7 @@ SPDX-License-Identifier: Apache-2.0 org.eclipse.tractusx.irs irs-registry-client - 1.2.1-SNAPSHOT + ${irs-client-lib.version} @@ -77,6 +77,7 @@ SPDX-License-Identifier: Apache-2.0 org.springframework.boot spring-boot-starter-data-jpa + commons-fileupload @@ -142,7 +143,7 @@ SPDX-License-Identifier: Apache-2.0 org.springframework.security spring-security-config - 6.0.5 + ${spring-security-config.version} org.springframework.boot @@ -324,8 +325,9 @@ SPDX-License-Identifier: Apache-2.0 + - + net.minidev json-smart 2.4.10 From c49e4213c2be0385a167903b71c89b9065da55bd Mon Sep 17 00:00:00 2001 From: Maximilian Wesener Date: Mon, 18 Sep 2023 13:48:58 +0200 Subject: [PATCH 53/84] chore: TRACEFOSS-XXX Updated deps. --- DEPENDENCIES_BACKEND | 106 +++++++++++++++++++++---------------------- pom.xml | 2 +- 2 files changed, 54 insertions(+), 54 deletions(-) diff --git a/DEPENDENCIES_BACKEND b/DEPENDENCIES_BACKEND index 8cd174ad38..5f45edb236 100644 --- a/DEPENDENCIES_BACKEND +++ b/DEPENDENCIES_BACKEND @@ -1,5 +1,5 @@ -maven/mavencentral/ch.qos.logback/logback-classic/1.4.8, EPL-1.0 OR LGPL-2.1-only, approved, #3435 -maven/mavencentral/ch.qos.logback/logback-core/1.4.8, EPL-1.0 OR LGPL-2.1-only, approved, #3373 +maven/mavencentral/ch.qos.logback/logback-classic/1.4.11, EPL-1.0 OR LGPL-2.1-only, approved, #3435 +maven/mavencentral/ch.qos.logback/logback-core/1.4.11, EPL-1.0 OR LGPL-2.1-only, approved, #3373 maven/mavencentral/com.apicatalog/titanium-json-ld/1.3.2, Apache-2.0, approved, #8912 maven/mavencentral/com.auth0/java-jwt/4.4.0, MIT, approved, #8459 maven/mavencentral/com.fasterxml.jackson.core/jackson-annotations/2.15.2, Apache-2.0, approved, #7947 @@ -9,7 +9,7 @@ maven/mavencentral/com.fasterxml.jackson.core/jackson-databind/2.14.2, Apache-2. maven/mavencentral/com.fasterxml.jackson.core/jackson-databind/2.15.2, Apache-2.0, approved, #7934 maven/mavencentral/com.fasterxml.jackson.dataformat/jackson-dataformat-toml/2.14.0, Apache-2.0 AND BSD-3-Clause AND MIT AND Apache-2.0, approved, #7943 maven/mavencentral/com.fasterxml.jackson.dataformat/jackson-dataformat-toml/2.15.2, Apache-2.0, approved, #9160 -maven/mavencentral/com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/2.14.0, Apache-2.0, approved, #5933 +maven/mavencentral/com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/2.15.1, Apache-2.0, approved, #8802 maven/mavencentral/com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/2.15.2, Apache-2.0, approved, #8802 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 @@ -32,7 +32,6 @@ 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.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 maven/mavencentral/io.github.openfeign/feign-core/12.3, Apache-2.0, approved, clearlydefined @@ -60,12 +59,12 @@ maven/mavencentral/io.github.resilience4j/resilience4j-spring/2.0.2, Apache-2.0, maven/mavencentral/io.github.resilience4j/resilience4j-spring/2.1.0, Apache-2.0, approved, #10169 maven/mavencentral/io.github.resilience4j/resilience4j-timelimiter/2.0.2, Apache-2.0, approved, clearlydefined maven/mavencentral/io.github.resilience4j/resilience4j-timelimiter/2.1.0, Apache-2.0, approved, #10166 -maven/mavencentral/io.micrometer/micrometer-commons/1.11.2, Apache-2.0 AND (Apache-2.0 AND MIT), approved, #9243 -maven/mavencentral/io.micrometer/micrometer-core/1.11.2, Apache-2.0 AND (Apache-2.0 AND MIT), approved, #9238 -maven/mavencentral/io.micrometer/micrometer-observation/1.11.2, Apache-2.0, approved, #9242 -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 +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.swagger.core.v3/swagger-annotations-jakarta/2.2.15, Apache-2.0, approved, #5947 +maven/mavencentral/io.swagger.core.v3/swagger-core-jakarta/2.2.15, Apache-2.0, approved, #5929 +maven/mavencentral/io.swagger.core.v3/swagger-models-jakarta/2.2.15, Apache-2.0, approved, #5919 maven/mavencentral/io.swagger/swagger-annotations/1.6.10, Apache-2.0, approved, #3792 maven/mavencentral/io.swagger/swagger-annotations/1.6.11, Apache-2.0, approved, #3792 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 @@ -90,11 +89,11 @@ maven/mavencentral/org.apache.commons/commons-lang3/3.12.0, Apache-2.0, approved maven/mavencentral/org.apache.commons/commons-text/1.10.0, Apache-2.0, approved, clearlydefined 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.tomcat.embed/tomcat-embed-core/10.1.11, 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.11, Apache-2.0, approved, #6997 -maven/mavencentral/org.apache.tomcat.embed/tomcat-embed-websocket/10.1.11, Apache-2.0, approved, #7920 -maven/mavencentral/org.aspectj/aspectjweaver/1.9.19, EPL-1.0, approved, tools.aspectj -maven/mavencentral/org.attoparser/attoparser/2.0.6.RELEASE, Apache-2.0, approved, CQ18900 +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.aspectj/aspectjweaver/1.9.20, EPL-1.0, approved, tools.aspectj +maven/mavencentral/org.attoparser/attoparser/2.0.7.RELEASE, Apache-2.0, approved, CQ18900 maven/mavencentral/org.bouncycastle/bcpkix-jdk15on/1.69, MIT, approved, clearlydefined maven/mavencentral/org.bouncycastle/bcprov-jdk15on/1.69, MIT, approved, clearlydefined maven/mavencentral/org.bouncycastle/bcutil-jdk15on/1.69, MIT, approved, clearlydefined @@ -145,7 +144,7 @@ maven/mavencentral/org.eclipse.tractusx.traceability/tx-backend/0.0.1-SNAPSHOT, 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/jakarta.json/2.0.1, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jsonp -maven/mavencentral/org.hibernate.orm/hibernate-core/6.2.6.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.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.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 @@ -165,58 +164,59 @@ maven/mavencentral/org.projectlombok/lombok/1.18.28, MIT AND LicenseRef-Public-D 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 -maven/mavencentral/org.springdoc/springdoc-openapi-starter-common/2.0.4, Apache-2.0, approved, #5920 -maven/mavencentral/org.springdoc/springdoc-openapi-starter-webmvc-api/2.0.4, Apache-2.0, approved, #5950 -maven/mavencentral/org.springdoc/springdoc-openapi-starter-webmvc-ui/2.0.4, Apache-2.0, approved, #5923 -maven/mavencentral/org.springframework.boot/spring-boot-actuator-autoconfigure/3.1.2, Apache-2.0, approved, #9348 -maven/mavencentral/org.springframework.boot/spring-boot-actuator/3.1.2, Apache-2.0, approved, #9342 -maven/mavencentral/org.springframework.boot/spring-boot-autoconfigure/3.1.2, Apache-2.0, approved, #9341 -maven/mavencentral/org.springframework.boot/spring-boot-starter-actuator/3.1.2, Apache-2.0, approved, #9344 -maven/mavencentral/org.springframework.boot/spring-boot-starter-aop/3.1.2, Apache-2.0, approved, #9338 -maven/mavencentral/org.springframework.boot/spring-boot-starter-data-jpa/3.1.2, Apache-2.0, approved, #9733 -maven/mavencentral/org.springframework.boot/spring-boot-starter-jdbc/3.1.2, Apache-2.0, approved, #9737 -maven/mavencentral/org.springframework.boot/spring-boot-starter-json/3.1.2, Apache-2.0, approved, #9336 -maven/mavencentral/org.springframework.boot/spring-boot-starter-logging/3.1.2, Apache-2.0, approved, #9343 -maven/mavencentral/org.springframework.boot/spring-boot-starter-oauth2-client/3.1.2, Apache-2.0, approved, #8806 -maven/mavencentral/org.springframework.boot/spring-boot-starter-oauth2-resource-server/3.1.2, Apache-2.0, approved, #8804 -maven/mavencentral/org.springframework.boot/spring-boot-starter-security/3.1.2, Apache-2.0, approved, #9337 -maven/mavencentral/org.springframework.boot/spring-boot-starter-thymeleaf/3.1.2, Apache-2.0, approved, #10092 -maven/mavencentral/org.springframework.boot/spring-boot-starter-tomcat/3.1.2, Apache-2.0, approved, #9351 -maven/mavencentral/org.springframework.boot/spring-boot-starter-validation/3.1.2, Apache-2.0, approved, #9335 -maven/mavencentral/org.springframework.boot/spring-boot-starter-web/3.1.2, Apache-2.0, approved, #9347 -maven/mavencentral/org.springframework.boot/spring-boot-starter/3.1.2, Apache-2.0, approved, #9349 -maven/mavencentral/org.springframework.boot/spring-boot/3.1.2, Apache-2.0, approved, #9352 +maven/mavencentral/org.springdoc/springdoc-openapi-starter-common/2.2.0, Apache-2.0, approved, clearlydefined +maven/mavencentral/org.springdoc/springdoc-openapi-starter-webmvc-api/2.2.0, Apache-2.0, approved, clearlydefined +maven/mavencentral/org.springdoc/springdoc-openapi-starter-webmvc-ui/2.2.0, Apache-2.0, approved, clearlydefined +maven/mavencentral/org.springframework.boot/spring-boot-actuator-autoconfigure/3.1.3, Apache-2.0, approved, #9348 +maven/mavencentral/org.springframework.boot/spring-boot-actuator/3.1.3, Apache-2.0, approved, #9342 +maven/mavencentral/org.springframework.boot/spring-boot-autoconfigure/3.1.3, Apache-2.0, approved, #9341 +maven/mavencentral/org.springframework.boot/spring-boot-starter-actuator/3.1.3, Apache-2.0, approved, #9344 +maven/mavencentral/org.springframework.boot/spring-boot-starter-aop/3.1.3, Apache-2.0, approved, #9338 +maven/mavencentral/org.springframework.boot/spring-boot-starter-data-jpa/3.1.3, Apache-2.0, approved, #9733 +maven/mavencentral/org.springframework.boot/spring-boot-starter-jdbc/3.1.3, Apache-2.0, approved, #9737 +maven/mavencentral/org.springframework.boot/spring-boot-starter-json/3.1.3, Apache-2.0, approved, #9336 +maven/mavencentral/org.springframework.boot/spring-boot-starter-logging/3.1.3, Apache-2.0, approved, #9343 +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-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/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 maven/mavencentral/org.springframework.cloud/spring-cloud-openfeign-core/4.0.3, Apache-2.0, approved, #7305 maven/mavencentral/org.springframework.cloud/spring-cloud-starter-openfeign/4.0.3, Apache-2.0, approved, #7302 maven/mavencentral/org.springframework.cloud/spring-cloud-starter/4.0.3, Apache-2.0, approved, #7299 -maven/mavencentral/org.springframework.data/spring-data-commons/3.1.2, Apache-2.0, approved, #8805 -maven/mavencentral/org.springframework.data/spring-data-jpa/3.1.2, Apache-2.0, approved, #9120 -maven/mavencentral/org.springframework.security/spring-security-config/6.0.5, Apache-2.0, approved, #7338 -maven/mavencentral/org.springframework.security/spring-security-core/6.1.2, Apache-2.0, approved, #9801 -maven/mavencentral/org.springframework.security/spring-security-crypto/6.1.2, Apache-2.0 AND ISC, approved, #9735 -maven/mavencentral/org.springframework.security/spring-security-oauth2-client/6.1.2, Apache-2.0, approved, #9740 -maven/mavencentral/org.springframework.security/spring-security-oauth2-core/6.1.2, Apache-2.0, approved, #9741 -maven/mavencentral/org.springframework.security/spring-security-oauth2-jose/6.1.2, Apache-2.0, approved, #9345 -maven/mavencentral/org.springframework.security/spring-security-oauth2-resource-server/6.1.2, Apache-2.0, approved, #8798 +maven/mavencentral/org.springframework.data/spring-data-commons/3.1.3, Apache-2.0, approved, #8805 +maven/mavencentral/org.springframework.data/spring-data-jpa/3.1.3, Apache-2.0, approved, #9120 +maven/mavencentral/org.springframework.security/spring-security-config/6.1.3, Apache-2.0, approved, #9736 +maven/mavencentral/org.springframework.security/spring-security-core/6.1.3, Apache-2.0, approved, #9801 +maven/mavencentral/org.springframework.security/spring-security-crypto/6.1.3, Apache-2.0 AND ISC, approved, #9735 +maven/mavencentral/org.springframework.security/spring-security-oauth2-client/6.1.3, Apache-2.0, approved, #9740 +maven/mavencentral/org.springframework.security/spring-security-oauth2-core/6.1.3, Apache-2.0, approved, #9741 +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-web/6.1.2, Apache-2.0, approved, #9800 +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 maven/mavencentral/org.springframework/spring-beans/6.0.11, Apache-2.0, approved, #5937 maven/mavencentral/org.springframework/spring-context/6.0.11, Apache-2.0, approved, #5936 -maven/mavencentral/org.springframework/spring-core/6.0.11, Apache-2.0 AND BSD-3-Clause, approved, #5948 +maven/mavencentral/org.springframework/spring-core/6.0.12, Apache-2.0 AND BSD-3-Clause, approved, #5948 maven/mavencentral/org.springframework/spring-expression/6.0.11, Apache-2.0, approved, #3284 +maven/mavencentral/org.springframework/spring-expression/6.0.12, Apache-2.0, approved, #3284 maven/mavencentral/org.springframework/spring-jcl/6.0.11, Apache-2.0, approved, #3283 +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-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.thymeleaf/thymeleaf-spring6/3.1.1.RELEASE, Apache-2.0, approved, clearlydefined -maven/mavencentral/org.thymeleaf/thymeleaf/3.1.1.RELEASE, Apache-2.0, approved, CQ23960 +maven/mavencentral/org.thymeleaf/thymeleaf-spring6/3.1.2.RELEASE, , restricted, clearlydefined +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.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 +maven/mavencentral/org.webjars/swagger-ui/5.2.0, Apache-2.0, approved, #10221 +maven/mavencentral/org.yaml/snakeyaml/1.33, Apache-2.0, approved, clearlydefined diff --git a/pom.xml b/pom.xml index 93bfeec7ae..ff594682ec 100644 --- a/pom.xml +++ b/pom.xml @@ -89,7 +89,7 @@ SPDX-License-Identifier: Apache-2.0 1.17.6 5.3.2 - 2.2.0 + 2.0.4 3.24.2 1.2 1.18.28 From a75777a1a22d3e0216e0a8cc40b09e70fe851f5c Mon Sep 17 00:00:00 2001 From: Maximilian Wesener Date: Mon, 18 Sep 2023 14:23:00 +0200 Subject: [PATCH 54/84] chore: TRACEFOSS-XXX Updated deps. --- DEPENDENCIES_BACKEND | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/DEPENDENCIES_BACKEND b/DEPENDENCIES_BACKEND index 5f45edb236..90e24bdce5 100644 --- a/DEPENDENCIES_BACKEND +++ b/DEPENDENCIES_BACKEND @@ -9,7 +9,7 @@ maven/mavencentral/com.fasterxml.jackson.core/jackson-databind/2.14.2, Apache-2. maven/mavencentral/com.fasterxml.jackson.core/jackson-databind/2.15.2, Apache-2.0, approved, #7934 maven/mavencentral/com.fasterxml.jackson.dataformat/jackson-dataformat-toml/2.14.0, Apache-2.0 AND BSD-3-Clause AND MIT AND Apache-2.0, approved, #7943 maven/mavencentral/com.fasterxml.jackson.dataformat/jackson-dataformat-toml/2.15.2, Apache-2.0, approved, #9160 -maven/mavencentral/com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/2.15.1, Apache-2.0, approved, #8802 +maven/mavencentral/com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/2.14.0, Apache-2.0, approved, #5933 maven/mavencentral/com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/2.15.2, Apache-2.0, approved, #8802 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 @@ -32,6 +32,7 @@ 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.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 maven/mavencentral/io.github.openfeign/feign-core/12.3, Apache-2.0, approved, clearlydefined @@ -62,9 +63,9 @@ 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.swagger.core.v3/swagger-annotations-jakarta/2.2.15, Apache-2.0, approved, #5947 -maven/mavencentral/io.swagger.core.v3/swagger-core-jakarta/2.2.15, Apache-2.0, approved, #5929 -maven/mavencentral/io.swagger.core.v3/swagger-models-jakarta/2.2.15, Apache-2.0, approved, #5919 +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 maven/mavencentral/io.swagger/swagger-annotations/1.6.10, Apache-2.0, approved, #3792 maven/mavencentral/io.swagger/swagger-annotations/1.6.11, Apache-2.0, approved, #3792 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 @@ -77,9 +78,9 @@ 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, clearlydefined 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/net.javacrumbs.shedlock/shedlock-core/5.7.0, , restricted, clearlydefined -maven/mavencentral/net.javacrumbs.shedlock/shedlock-provider-jdbc-template/5.7.0, , restricted, clearlydefined -maven/mavencentral/net.javacrumbs.shedlock/shedlock-spring/5.7.0, , restricted, clearlydefined +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.9, Apache-2.0, approved, #7515 maven/mavencentral/net.minidev/json-smart/2.4.10, 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 @@ -164,9 +165,9 @@ maven/mavencentral/org.projectlombok/lombok/1.18.28, MIT AND LicenseRef-Public-D 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 -maven/mavencentral/org.springdoc/springdoc-openapi-starter-common/2.2.0, Apache-2.0, approved, clearlydefined -maven/mavencentral/org.springdoc/springdoc-openapi-starter-webmvc-api/2.2.0, Apache-2.0, approved, clearlydefined -maven/mavencentral/org.springdoc/springdoc-openapi-starter-webmvc-ui/2.2.0, Apache-2.0, approved, clearlydefined +maven/mavencentral/org.springdoc/springdoc-openapi-starter-common/2.0.4, Apache-2.0, approved, #5920 +maven/mavencentral/org.springdoc/springdoc-openapi-starter-webmvc-api/2.0.4, Apache-2.0, approved, #5950 +maven/mavencentral/org.springdoc/springdoc-openapi-starter-webmvc-ui/2.0.4, Apache-2.0, approved, #5923 maven/mavencentral/org.springframework.boot/spring-boot-actuator-autoconfigure/3.1.3, Apache-2.0, approved, #9348 maven/mavencentral/org.springframework.boot/spring-boot-actuator/3.1.3, Apache-2.0, approved, #9342 maven/mavencentral/org.springframework.boot/spring-boot-autoconfigure/3.1.3, Apache-2.0, approved, #9341 @@ -215,8 +216,9 @@ maven/mavencentral/org.springframework/spring-orm/6.0.11, Apache-2.0, approved, 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.thymeleaf/thymeleaf-spring6/3.1.2.RELEASE, , restricted, clearlydefined +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/5.2.0, Apache-2.0, approved, #10221 +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.yaml/snakeyaml/1.33, Apache-2.0, approved, clearlydefined From 74860dcde3cc6723607d841836dac5af32cc78db Mon Sep 17 00:00:00 2001 From: Martin Maul Date: Mon, 18 Sep 2023 14:58:23 +0200 Subject: [PATCH 55/84] feature(UI):[TRACEFOSS-2339] added mainAspectTypeModel to part model --- .../alerts/core/alert-detail.facade.spec.ts | 3 ++- .../core/investigation-detail.facade.spec.ts | 5 ++-- .../core/other-parts.facade.spec.ts | 18 ++++++++----- .../other-parts/core/other-parts.facade.ts | 2 +- .../other-parts/core/other-parts.service.ts | 3 ++- .../other-parts.component.spec.ts | 19 +++++++------- .../supplier-parts.component.spec.ts | 9 ++++--- .../page/parts/core/parts.facade.spec.ts | 11 ++++---- ...Model.model.ts => MainAspectType.model.ts} | 5 +++- .../modules/page/parts/model/parts.model.ts | 3 +++ .../presentation/parts.component.spec.ts | 6 ++--- .../parts/presentation/parts.component.ts | 17 ++++++------ .../shared/assembler/parts.assembler.spec.ts | 15 ++++++++--- .../shared/assembler/parts.assembler.ts | 26 +++++++++++-------- .../components/table/table.component.html | 2 +- .../components/table/table.component.scss | 2 +- .../part-detail.component.spec.ts | 3 ++- .../start-investigation.component.spec.ts | 5 ++-- .../relations/core/relations.facade.spec.ts | 5 ++-- ...antic-data-model-to-camelcase.pipe.spec.ts | 3 ++- ...antic-data-model-to-camelcase.pipe.spec.ts | 3 ++- ...antic-data-model-to-camelcase.pipe.spec.ts | 3 ++- .../modules/shared/service/parts.service.ts | 13 +++++----- 23 files changed, 108 insertions(+), 73 deletions(-) rename frontend/src/app/modules/page/parts/model/{semanticModel.model.ts => MainAspectType.model.ts} (91%) diff --git a/frontend/src/app/modules/page/alerts/core/alert-detail.facade.spec.ts b/frontend/src/app/modules/page/alerts/core/alert-detail.facade.spec.ts index 974c92957f..3b6bc65ef0 100644 --- a/frontend/src/app/modules/page/alerts/core/alert-detail.facade.spec.ts +++ b/frontend/src/app/modules/page/alerts/core/alert-detail.facade.spec.ts @@ -22,6 +22,7 @@ import { HttpClientTestingModule } from '@angular/common/http/testing'; import { TestBed } from '@angular/core/testing'; import { AlertDetailFacade } from '@page/alerts/core/alert-detail.facade'; import { AlertDetailState } from '@page/alerts/core/alert-detail.state'; +import { MainAspectTypeModel } from '@page/parts/model/MainAspectType.model'; import { Part } from '@page/parts/model/parts.model'; import { PartsAssembler } from '@shared/assembler/parts.assembler'; import { FormatPartlistSemanticDataModelToCamelCasePipe } from '@shared/pipes/format-partlist-semantic-data-model-to-camelcase.pipe'; @@ -74,7 +75,7 @@ describe('AlertDetailFacade', () => { beforeEach(function() { - part = PartsAssembler.assemblePart(MOCK_part_1); + part = PartsAssembler.assemblePart(MOCK_part_1, MainAspectTypeModel.AS_BUILT); this.spy = spyOn(partService, 'sortParts').and.callFake(() => [ part ]); }); diff --git a/frontend/src/app/modules/page/investigations/core/investigation-detail.facade.spec.ts b/frontend/src/app/modules/page/investigations/core/investigation-detail.facade.spec.ts index 8d48b7168c..050f64ee5e 100644 --- a/frontend/src/app/modules/page/investigations/core/investigation-detail.facade.spec.ts +++ b/frontend/src/app/modules/page/investigations/core/investigation-detail.facade.spec.ts @@ -21,12 +21,13 @@ import { HttpClientTestingModule } from '@angular/common/http/testing'; import { TestBed } from '@angular/core/testing'; import { InvestigationDetailFacade } from '@page/investigations/core/investigation-detail.facade'; import { InvestigationDetailState } from '@page/investigations/core/investigation-detail.state'; +import { MainAspectTypeModel } from '@page/parts/model/MainAspectType.model'; import { Part } from '@page/parts/model/parts.model'; import { PartsAssembler } from '@shared/assembler/parts.assembler'; import { FormatPartlistSemanticDataModelToCamelCasePipe } from '@shared/pipes/format-partlist-semantic-data-model-to-camelcase.pipe'; import { PartsService } from '@shared/service/parts.service'; import { KeycloakService } from 'keycloak-angular'; -import { MOCK_part_1 } from '../../../../mocks/services/parts-mock/partsAsPlanned/partsAsPlanned.test.model'; +import { MOCK_part_1 } from '../../../../mocks/services/parts-mock/partsAsBuilt/partsAsBuilt.test.model'; describe('InvestigationDetailFacade', () => { let investigationDetailFacade: InvestigationDetailFacade; @@ -73,7 +74,7 @@ describe('InvestigationDetailFacade', () => { beforeEach(function() { - part = PartsAssembler.assemblePart(MOCK_part_1); + part = PartsAssembler.assemblePart(MOCK_part_1, MainAspectTypeModel.AS_BUILT); this.spy = spyOn(partService, 'sortParts').and.callFake(() => [ part ]); }); diff --git a/frontend/src/app/modules/page/other-parts/core/other-parts.facade.spec.ts b/frontend/src/app/modules/page/other-parts/core/other-parts.facade.spec.ts index 0aacb80f64..022d41f084 100644 --- a/frontend/src/app/modules/page/other-parts/core/other-parts.facade.spec.ts +++ b/frontend/src/app/modules/page/other-parts/core/other-parts.facade.spec.ts @@ -20,28 +20,32 @@ import { OtherPartsFacade } from '@page/other-parts/core/other-parts.facade'; import { OtherPartsService } from '@page/other-parts/core/other-parts.service'; import { OtherPartsState } from '@page/other-parts/core/other-parts.state'; +import { MainAspectTypeModel } from '@page/parts/model/MainAspectType.model'; import { PartsAssembler } from '@shared/assembler/parts.assembler'; import { PartsService } from '@shared/service/parts.service'; import { waitFor } from '@testing-library/angular'; import { BehaviorSubject, firstValueFrom, of } from 'rxjs'; import { map } from 'rxjs/operators'; -import { mockAssetList, mockAssets } from '../../../../mocks/services/parts-mock/partsAsPlanned/partsAsPlanned.test.model'; +import { + mockAssetList, + mockAssets, +} from '../../../../mocks/services/parts-mock/partsAsPlanned/partsAsPlanned.test.model'; describe('OtherPartsFacade', () => { let otherPartsFacade: OtherPartsFacade, otherPartsState: OtherPartsState, partsServiceMok: PartsService, otherPartsServiceMock: OtherPartsService; beforeEach(() => { partsServiceMok = { - getPart: id => new BehaviorSubject(mockAssetList[id]).pipe(map(part => PartsAssembler.assemblePart(part))), + getPart: id => new BehaviorSubject(mockAssetList[id]).pipe(map(part => PartsAssembler.assemblePart(part, MainAspectTypeModel.AS_BUILT))), getPartsAsBuilt: (_page, _pageSize, _sorting) => - of(mockAssets).pipe(map(parts => PartsAssembler.assembleParts(parts))), + of(mockAssets).pipe(map(parts => PartsAssembler.assembleParts(parts, MainAspectTypeModel.AS_BUILT))), getPartsAsPlanned: (_page, _pageSize, _sorting) => - of(mockAssets).pipe(map(parts => PartsAssembler.assembleParts(parts))), + of(mockAssets).pipe(map(parts => PartsAssembler.assembleParts(parts, MainAspectTypeModel.AS_PLANNED))), } as PartsService; otherPartsServiceMock = { getOtherParts: (_page, _pageSize, _sorting, _owner) => - of(mockAssets).pipe(map(parts => PartsAssembler.assembleParts(parts))), + of(mockAssets).pipe(map(parts => PartsAssembler.assembleParts(parts, MainAspectTypeModel.AS_BUILT))), } as OtherPartsService; otherPartsState = new OtherPartsState(); @@ -51,7 +55,7 @@ describe('OtherPartsFacade', () => { describe('setActiveInvestigationForParts', () => { it('should set parts if request is successful', async () => { - const otherParts = PartsAssembler.assembleOtherParts(mockAssets); + const otherParts = PartsAssembler.assembleOtherParts(mockAssets, MainAspectTypeModel.AS_BUILT); otherPartsState.supplierParts = { data: otherParts}; otherPartsFacade.setActiveInvestigationForParts(otherParts.content); @@ -72,7 +76,7 @@ describe('OtherPartsFacade', () => { it('should not set parts if no data in state', async () => { - const otherParts = PartsAssembler.assembleOtherParts(mockAssets); + const otherParts = PartsAssembler.assembleOtherParts(mockAssets, MainAspectTypeModel.AS_BUILT); otherPartsFacade.setActiveInvestigationForParts(otherParts.content); const parts = await firstValueFrom(otherPartsState.supplierParts$); diff --git a/frontend/src/app/modules/page/other-parts/core/other-parts.facade.ts b/frontend/src/app/modules/page/other-parts/core/other-parts.facade.ts index 1b39ef20dc..3f55e962d2 100644 --- a/frontend/src/app/modules/page/other-parts/core/other-parts.facade.ts +++ b/frontend/src/app/modules/page/other-parts/core/other-parts.facade.ts @@ -49,7 +49,7 @@ export class OtherPartsFacade { public get supplierParts$(): Observable>> { return this.otherPartsState.supplierParts$; } - +// TODO: remove OtherPartsService and integrate in PartService public setCustomerParts(page = 0, pageSize = 50, sorting: TableHeaderSort[] = []): void { this.customerPartsSubscription?.unsubscribe(); this.customerPartsSubscription = this.otherPartsService.getOtherParts(page, pageSize, sorting, Owner.CUSTOMER).subscribe({ diff --git a/frontend/src/app/modules/page/other-parts/core/other-parts.service.ts b/frontend/src/app/modules/page/other-parts/core/other-parts.service.ts index 0161c6d2e4..15c39dd2df 100644 --- a/frontend/src/app/modules/page/other-parts/core/other-parts.service.ts +++ b/frontend/src/app/modules/page/other-parts/core/other-parts.service.ts @@ -24,6 +24,7 @@ import { Injectable } from '@angular/core'; import { ApiService } from '@core/api/api.service'; import { Pagination } from '@core/model/pagination.model'; import { environment } from '@env'; +import { MainAspectTypeModel } from '@page/parts/model/MainAspectType.model'; import { Owner } from '@page/parts/model/owner.enum'; import { Part, PartsResponse } from '@page/parts/model/parts.model'; import { PartsAssembler } from '@shared/assembler/parts.assembler'; @@ -51,6 +52,6 @@ export class OtherPartsService { return this.apiService .getBy(`${this.url}/assets/as-built`, params) - .pipe(map(parts => PartsAssembler.assembleOtherParts(parts))); + .pipe(map(parts => PartsAssembler.assembleOtherParts(parts, MainAspectTypeModel.AS_BUILT))); } } 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 869b181f21..12c19c21e6 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 @@ -21,6 +21,7 @@ import { OtherPartsState } from '@page/other-parts/core/other-parts.state'; import { PartsState } from '@page/parts/core/parts.state'; +import { MainAspectTypeModel } from '@page/parts/model/MainAspectType.model'; import { PartsAssembler } from '@shared/assembler/parts.assembler'; import { FormatPartSemanticDataModelToCamelCasePipe } from '@shared/pipes/format-part-semantic-data-model-to-camelcase.pipe'; import { fireEvent, screen, waitFor } from '@testing-library/angular'; @@ -118,10 +119,10 @@ describe('Other Parts', () => { expect(supplierParts).toEqual({ data: { content: [ - formatPartSemanticToCamelCase.transform(PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_6)), - formatPartSemanticToCamelCase.transform(PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_7)), - formatPartSemanticToCamelCase.transform(PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_8)), - formatPartSemanticToCamelCase.transform(PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_9)), + formatPartSemanticToCamelCase.transform(PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_6, MainAspectTypeModel.AS_BUILT)), + formatPartSemanticToCamelCase.transform(PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_7, MainAspectTypeModel.AS_BUILT)), + formatPartSemanticToCamelCase.transform(PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_8, MainAspectTypeModel.AS_BUILT)), + formatPartSemanticToCamelCase.transform(PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_9, MainAspectTypeModel.AS_BUILT)), ], page: 0, pageCount: 1, @@ -147,11 +148,11 @@ describe('Other Parts', () => { expect(customerParts).toEqual({ data: { content: [ - formatPartSemanticToCamelCase.transform(PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_1)), - formatPartSemanticToCamelCase.transform(PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_2)), - formatPartSemanticToCamelCase.transform(PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_3)), - formatPartSemanticToCamelCase.transform(PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_4)), - formatPartSemanticToCamelCase.transform(PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_5)), + formatPartSemanticToCamelCase.transform(PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_1, MainAspectTypeModel.AS_BUILT)), + formatPartSemanticToCamelCase.transform(PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_2, MainAspectTypeModel.AS_BUILT)), + formatPartSemanticToCamelCase.transform(PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_3, MainAspectTypeModel.AS_BUILT)), + formatPartSemanticToCamelCase.transform(PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_4, MainAspectTypeModel.AS_BUILT)), + formatPartSemanticToCamelCase.transform(PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_5, MainAspectTypeModel.AS_BUILT)), ], page: 0, pageCount: 1, diff --git a/frontend/src/app/modules/page/other-parts/presentation/supplier-parts/supplier-parts.component.spec.ts b/frontend/src/app/modules/page/other-parts/presentation/supplier-parts/supplier-parts.component.spec.ts index 1ffe34e72f..4d75afa0e2 100644 --- a/frontend/src/app/modules/page/other-parts/presentation/supplier-parts/supplier-parts.component.spec.ts +++ b/frontend/src/app/modules/page/other-parts/presentation/supplier-parts/supplier-parts.component.spec.ts @@ -21,6 +21,7 @@ import { OtherPartsState } from '@page/other-parts/core/other-parts.state'; import { OtherPartsModule } from '@page/other-parts/other-parts.module'; import { PartsState } from '@page/parts/core/parts.state'; +import { MainAspectTypeModel } from '@page/parts/model/MainAspectType.model'; import { PartsAssembler } from '@shared/assembler/parts.assembler'; import { fireEvent, screen, waitFor } from '@testing-library/angular'; import { getTableCheckbox, renderComponent } from '@tests/test-render.utils'; @@ -56,7 +57,7 @@ describe('SupplierPartsComponent', () => { it('should add item to current list and then remove', async () => { const { fixture } = await renderSupplierParts({ roles: ['user'] }); - const expectedPart = PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_6); + const expectedPart = PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_6, MainAspectTypeModel.AS_BUILT); // first click to check checkbox fireEvent.click(await getTableCheckbox(screen, 0)); @@ -76,7 +77,7 @@ describe('SupplierPartsComponent', () => { it('test addItemToSelection method', async () => { const { fixture } = await renderSupplierParts(); - const expectedPart = PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_6); + const expectedPart = PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_6, MainAspectTypeModel.AS_BUILT); fixture.componentInstance.addItemToSelection(expectedPart); expect(fixture.componentInstance.currentSelectedItems).toEqual([expectedPart]); @@ -85,7 +86,7 @@ describe('SupplierPartsComponent', () => { it('test removeItemFromSelection method', async () => { const { fixture } = await renderSupplierParts(); - const expectedPart = PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_6); + const expectedPart = PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_6, MainAspectTypeModel.AS_BUILT); fixture.componentInstance.currentSelectedItems = [expectedPart]; @@ -96,7 +97,7 @@ describe('SupplierPartsComponent', () => { it('test clearSelected method', async () => { const { fixture } = await renderSupplierParts(); - const expectedPart = PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_6); + const expectedPart = PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_6, MainAspectTypeModel.AS_BUILT); fixture.componentInstance.currentSelectedItems = [expectedPart]; diff --git a/frontend/src/app/modules/page/parts/core/parts.facade.spec.ts b/frontend/src/app/modules/page/parts/core/parts.facade.spec.ts index fb2850d35c..357f793711 100644 --- a/frontend/src/app/modules/page/parts/core/parts.facade.spec.ts +++ b/frontend/src/app/modules/page/parts/core/parts.facade.spec.ts @@ -22,6 +22,7 @@ import { Pagination } from '@core/model/pagination.model'; import { PartsFacade } from '@page/parts/core/parts.facade'; import { PartsState } from '@page/parts/core/parts.state'; +import { MainAspectTypeModel } from '@page/parts/model/MainAspectType.model'; import { Part } from '@page/parts/model/parts.model'; import { PartsAssembler } from '@shared/assembler/parts.assembler'; import { PartsService } from '@shared/service/parts.service'; @@ -35,11 +36,11 @@ describe('Parts facade', () => { beforeEach(() => { partsServiceMok = { - getPart: id => new BehaviorSubject(mockAssetList[id]).pipe(map(part => PartsAssembler.assemblePart(part))), + getPart: id => new BehaviorSubject(mockAssetList[id]).pipe(map(part => PartsAssembler.assemblePart(part, MainAspectTypeModel.AS_BUILT))), getPartsAsBuilt: (_page, _pageSize, _sorting) => - of(mockAssets).pipe(map(parts => PartsAssembler.assembleParts(parts))), + of(mockAssets).pipe(map(parts => PartsAssembler.assembleParts(parts, MainAspectTypeModel.AS_BUILT))), getPartsAsPlanned: (_page, _pageSize, _sorting) => - of(mockAssets).pipe(map(parts => PartsAssembler.assembleParts(parts))), + of(mockAssets).pipe(map(parts => PartsAssembler.assembleParts(parts, MainAspectTypeModel.AS_PLANNED))), } as PartsService; partsState = new PartsState(); @@ -49,7 +50,7 @@ describe('Parts facade', () => { describe('setParts', () => { it('should set parts if request is successful', async () => { const serviceSpy = spyOn(partsServiceMok, 'getPartsAsBuilt').and.returnValue( - of>(PartsAssembler.assembleParts(mockAssets)), + of>(PartsAssembler.assembleParts(mockAssets, MainAspectTypeModel.AS_BUILT)), ); partsFacade.setPartsAsBuilt(0, 10); @@ -61,7 +62,7 @@ describe('Parts facade', () => { expect(parts).toEqual({ error: undefined, loader: undefined, - data: PartsAssembler.assembleParts(mockAssets), + data: PartsAssembler.assembleParts(mockAssets, MainAspectTypeModel.AS_BUILT), }), ); }); diff --git a/frontend/src/app/modules/page/parts/model/semanticModel.model.ts b/frontend/src/app/modules/page/parts/model/MainAspectType.model.ts similarity index 91% rename from frontend/src/app/modules/page/parts/model/semanticModel.model.ts rename to frontend/src/app/modules/page/parts/model/MainAspectType.model.ts index 97ec4e5919..441f7edab6 100644 --- a/frontend/src/app/modules/page/parts/model/semanticModel.model.ts +++ b/frontend/src/app/modules/page/parts/model/MainAspectType.model.ts @@ -16,7 +16,10 @@ * * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ - +export enum MainAspectTypeModel { + AS_BUILT = "as_built", + AS_PLANNED = "as_planned" +} diff --git a/frontend/src/app/modules/page/parts/model/parts.model.ts b/frontend/src/app/modules/page/parts/model/parts.model.ts index 8e64280895..c6c8e19548 100644 --- a/frontend/src/app/modules/page/parts/model/parts.model.ts +++ b/frontend/src/app/modules/page/parts/model/parts.model.ts @@ -22,6 +22,7 @@ import type { PaginationResponse } from '@core/model/pagination.model'; import { SemanticModel } from '@page/parts/model/aspectModels.model'; import { DetailAspectModel } from '@page/parts/model/detailAspectModel.model'; +import { MainAspectTypeModel } from '@page/parts/model/MainAspectType.model'; import { Owner } from '@page/parts/model/owner.enum'; export interface Part { @@ -44,6 +45,8 @@ export interface Part { semanticDataModel: SemanticDataModel; classification: string; + mainAspectType: MainAspectTypeModel; + // aspectmodel props are temporarely hardcoded here because Tables and Views only accept root level prop array // as built partId?: string; diff --git a/frontend/src/app/modules/page/parts/presentation/parts.component.spec.ts b/frontend/src/app/modules/page/parts/presentation/parts.component.spec.ts index a85c3da013..f8846bbc47 100644 --- a/frontend/src/app/modules/page/parts/presentation/parts.component.spec.ts +++ b/frontend/src/app/modules/page/parts/presentation/parts.component.spec.ts @@ -79,7 +79,7 @@ describe('Parts', () => { await waitFor(() => {fireEvent.click(idColumnHeader);}, {timeout: 3000}); - expect(setTableFunctionSpy).toHaveBeenCalledWith(['id', 'asc'], "asBuilt" ); + expect(setTableFunctionSpy).toHaveBeenCalledWith(['id', 'asc'], "as_built" ); expect(partsComponent['tableAsBuiltSortList']).toEqual([["id", "asc"]]); }); @@ -110,8 +110,8 @@ describe('Parts', () => { await waitFor(() => {fireEvent.click(idShortHeader)}); - expect(setTableFunctionSpy).toHaveBeenCalledWith(['id', 'asc'], "asBuilt" ); - expect(setTableFunctionSpy).toHaveBeenCalledWith(['idShort', 'asc'], "asBuilt" ); + expect(setTableFunctionSpy).toHaveBeenCalledWith(['id', 'asc'], "as_built" ); + expect(setTableFunctionSpy).toHaveBeenCalledWith(['idShort', 'asc'], "as_built" ); console.warn(partsComponent.tableAsBuiltSortList); expect(partsComponent['tableAsBuiltSortList']).toEqual([["id", "asc"], ["idShort", "desc"]]); }); 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 3859a19e6d..536fe403c0 100644 --- a/frontend/src/app/modules/page/parts/presentation/parts.component.ts +++ b/frontend/src/app/modules/page/parts/presentation/parts.component.ts @@ -22,6 +22,7 @@ import { AfterViewInit, Component, OnDestroy, OnInit } from '@angular/core'; import { Pagination } from '@core/model/pagination.model'; import { PartsFacade } from '@page/parts/core/parts.facade'; +import { MainAspectTypeModel } from '@page/parts/model/MainAspectType.model'; import { Part } from '@page/parts/model/parts.model'; import { CreateHeaderFromColumns, @@ -175,16 +176,16 @@ export class PartsComponent implements OnInit, OnDestroy, AfterViewInit { } public onAsBuiltTableConfigChange({ page, pageSize, sorting }: TableEventConfig): void { - this.setTableSortingList(sorting,"asBuilt"); + this.setTableSortingList(sorting,MainAspectTypeModel.AS_BUILT); this.partsFacade.setPartsAsBuilt(page, pageSize, this.tableAsBuiltSortList); } public onAsPlannedTableConfigChange({ page, pageSize, sorting }: TableEventConfig): void { - this.setTableSortingList(sorting,"asPlanned"); + this.setTableSortingList(sorting,MainAspectTypeModel.AS_PLANNED); this.partsFacade.setPartsAsPlanned(page, pageSize, this.tableAsPlannedSortList); } - private setTableSortingList(sorting: TableHeaderSort, partTable: "asBuilt" | "asPlanned"): void { + private setTableSortingList(sorting: TableHeaderSort, partTable: MainAspectTypeModel): void { // if a sorting Columnlist exists but a column gets resetted: if(!sorting && (this.tableAsBuiltSortList || this.tableAsPlannedSortList)) { this.resetTableSortingList(partTable); @@ -194,7 +195,7 @@ export class PartsComponent implements OnInit, OnDestroy, AfterViewInit { // if CTRL is pressed at to sortList if(this.ctrlKeyState) { const [columnName] = sorting; - const tableSortList = partTable === "asBuilt" ? this.tableAsBuiltSortList : this.tableAsPlannedSortList + const tableSortList = partTable === MainAspectTypeModel.AS_BUILT ? this.tableAsBuiltSortList : this.tableAsPlannedSortList // Find the index of the existing entry with the same first item const index = tableSortList.findIndex( @@ -208,22 +209,22 @@ export class PartsComponent implements OnInit, OnDestroy, AfterViewInit { // Add the new entry if it doesn't exist tableSortList.push(sorting); } - if(partTable === "asBuilt") { + if(partTable === MainAspectTypeModel.AS_BUILT) { this.tableAsBuiltSortList = tableSortList } else { this.tableAsPlannedSortList = tableSortList } } // If CTRL is not pressed just add a list with one entry - else if(partTable === "asBuilt") { + else if(partTable === MainAspectTypeModel.AS_BUILT) { this.tableAsBuiltSortList = [sorting]; } else { this.tableAsPlannedSortList = [sorting] } } - private resetTableSortingList(partTable: "asBuilt" | "asPlanned"): void { - if(partTable === "asBuilt") { + private resetTableSortingList(partTable: MainAspectTypeModel): void { + if(partTable === MainAspectTypeModel.AS_BUILT) { this.tableAsBuiltSortList = []; } else { this.tableAsPlannedSortList= []; diff --git a/frontend/src/app/modules/shared/assembler/parts.assembler.spec.ts b/frontend/src/app/modules/shared/assembler/parts.assembler.spec.ts index 6157fff167..843f7b7446 100644 --- a/frontend/src/app/modules/shared/assembler/parts.assembler.spec.ts +++ b/frontend/src/app/modules/shared/assembler/parts.assembler.spec.ts @@ -22,6 +22,7 @@ import { Pagination } from '@core/model/pagination.model'; import { AsBuiltAspectModel } from '@page/parts/model/aspectModels.model'; import { DetailAspectType } from '@page/parts/model/detailAspectModel.model'; +import { MainAspectTypeModel } from '@page/parts/model/MainAspectType.model'; import { Part, QualityType, SemanticDataModel } from '@page/parts/model/parts.model'; import { PartsAssembler } from '@shared/assembler/parts.assembler'; import { of } from 'rxjs'; @@ -38,8 +39,8 @@ describe('PartsAssembler', () => { describe('assembleParts', () => { it('should return null if array is empty or undefined', () => { const emptyPage = { content: [], page: 0, pageCount: 0, pageSize: 0, totalItems: 0 }; - expect(PartsAssembler.assembleParts(null)).toEqual(emptyPage); - expect(PartsAssembler.assembleParts(page([]))).toEqual(emptyPage); + expect(PartsAssembler.assembleParts(null, MainAspectTypeModel.AS_BUILT)).toEqual(emptyPage); + expect(PartsAssembler.assembleParts(page([]), MainAspectTypeModel.AS_BUILT)).toEqual(emptyPage); }); it('should format the object correctly', () => { @@ -81,6 +82,8 @@ describe('PartsAssembler', () => { } ]; + const mainAspectType = 'as_built'; + testData.push({ id, idShort, @@ -100,6 +103,7 @@ describe('PartsAssembler', () => { classification, semanticModel, detailAspectModels, + mainAspectType }); const partId = (detailAspectModels[0].data as AsBuiltAspectModel)?.partId; @@ -129,6 +133,8 @@ describe('PartsAssembler', () => { semanticModel: semanticModel, + mainAspectType: mainAspectType, + partId: partId, // is partInstance, BatchId, jisNumber customerPartId: customerPartId, nameAtCustomer: nameAtCustomer, @@ -137,7 +143,7 @@ describe('PartsAssembler', () => { }); - expect(JSON.stringify(PartsAssembler.assembleParts(page(testData)).content)).toEqual(JSON.stringify(expected)); + expect(JSON.stringify(PartsAssembler.assembleParts(page(testData), MainAspectTypeModel.AS_BUILT).content)).toEqual(JSON.stringify(expected)); }); }); @@ -167,9 +173,10 @@ describe('PartsAssembler', () => { const manufacturerPartId = 'manufacturerPartId'; const nameAtManufacturer = 'nameAtManufacturer'; const van = 'van'; + const mainAspectType = MainAspectTypeModel.AS_BUILT it('should clean up data for manufacturer view', done => { - const data = { manufacturer, manufacturerPartId, nameAtManufacturer, test: '', van } as unknown as Part; + const data = { manufacturer, manufacturerPartId, nameAtManufacturer, test: '', van, mainAspectType } as unknown as Part; of({ data }) .pipe(PartsAssembler.mapPartForManufacturerView()) .subscribe(result => { diff --git a/frontend/src/app/modules/shared/assembler/parts.assembler.ts b/frontend/src/app/modules/shared/assembler/parts.assembler.ts index 6d123517b1..600765d4b2 100644 --- a/frontend/src/app/modules/shared/assembler/parts.assembler.ts +++ b/frontend/src/app/modules/shared/assembler/parts.assembler.ts @@ -27,6 +27,7 @@ import { PartSiteInformationAsPlanned, SemanticModel, } from '@page/parts/model/aspectModels.model'; +import { MainAspectTypeModel } from '@page/parts/model/MainAspectType.model'; import { Part, PartResponse, QualityType } from '@page/parts/model/parts.model'; import { TableHeaderSort } from '@shared/components/table/table.model'; import { View } from '@shared/model/view.model'; @@ -44,7 +45,7 @@ export class PartsAssembler { return proplist; } - public static assemblePart(partResponse: PartResponse): Part { + public static assemblePart(partResponse: PartResponse, mainAspectType: MainAspectTypeModel): Part { if (!partResponse) { return null; } @@ -84,6 +85,9 @@ export class PartsAssembler { semanticDataModel: partResponse.semanticDataModel, classification: partResponse.classification, semanticModel: createdSemanticModel, + + mainAspectType: mainAspectType, + // as built partId: partId, // is partInstance, BatchId, jisNumber customerPartId: customerPartId, @@ -100,27 +104,28 @@ export class PartsAssembler { functionValidFrom: functionValidFrom, functionValidUntil: functionValidUntil, } + return mappedPart; } - public static assembleOtherPart(partResponse: PartResponse): Part { + public static assembleOtherPart(partResponse: PartResponse, mainAspectType: MainAspectTypeModel): Part { if (!partResponse) { return null; } - return { ...PartsAssembler.assemblePart(partResponse), qualityType: partResponse.qualityType }; + return { ...PartsAssembler.assemblePart(partResponse, mainAspectType), qualityType: partResponse.qualityType }; } - public static assembleParts(parts: PaginationResponse): Pagination { - return PaginationAssembler.assemblePagination(PartsAssembler.assemblePart, parts); + public static assembleParts(parts: PaginationResponse, mainAspectType: MainAspectTypeModel): Pagination { + return PaginationAssembler.assemblePagination(PartsAssembler.assemblePart, parts, mainAspectType); } - public static assemblePartList(parts: PartResponse[]): Part[] { + public static assemblePartList(parts: PartResponse[], mainAspectType: MainAspectTypeModel): Part[] { const partCopy = [...parts]; - return partCopy.map(part => PartsAssembler.assemblePart(part)); + return partCopy.map(part => PartsAssembler.assemblePart(part, mainAspectType)); } - public static assembleOtherParts(parts: PaginationResponse): Pagination { - return PaginationAssembler.assemblePagination(PartsAssembler.assembleOtherPart, parts); + public static assembleOtherParts(parts: PaginationResponse, mainAspectType: MainAspectTypeModel): Pagination { + return PaginationAssembler.assemblePagination(PartsAssembler.assembleOtherPart, parts, mainAspectType); } public static filterPartForView(viewData: View): View { @@ -160,13 +165,12 @@ export class PartsAssembler { } // exclude 'van' if is a partAsPlanned - if(viewData.data?.validityPeriodFrom === undefined) { + if(viewData.data?.mainAspectType === MainAspectTypeModel.AS_BUILT) { const { manufacturer, manufacturerPartId, nameAtManufacturer, van, - } = viewData.data; return { data: { manufacturer, manufacturerPartId, nameAtManufacturer, van } as Part }; } else { diff --git a/frontend/src/app/modules/shared/components/table/table.component.html b/frontend/src/app/modules/shared/components/table/table.component.html index 24eed23848..5e076db71d 100644 --- a/frontend/src/app/modules/shared/components/table/table.component.html +++ b/frontend/src/app/modules/shared/components/table/table.component.html @@ -190,7 +190,7 @@

{{ 'table.noResultFound' | i18n }}

matTooltip="First click: sort in ascending order ↑ Second click: sort in descending order ↓ Third click: reset sorting" - matTooltipClass="myTooltip" + matTooltipClass="table--header--tooltip" matTooltipPosition="above" [class.mdc-tooltip--multiline]="true" [matTooltipShowDelay]="1000" diff --git a/frontend/src/app/modules/shared/components/table/table.component.scss b/frontend/src/app/modules/shared/components/table/table.component.scss index 8bc8196d4d..2a416bf49d 100644 --- a/frontend/src/app/modules/shared/components/table/table.component.scss +++ b/frontend/src/app/modules/shared/components/table/table.component.scss @@ -185,7 +185,7 @@ tr.error { margin-left: 5px; } -.myTooltip { +.table--header--tooltip { .mdc-tooltip__surface { background-color: rgb(48,48,48); @apply font-medium; diff --git a/frontend/src/app/modules/shared/modules/part-details/presentation/part-detail.component.spec.ts b/frontend/src/app/modules/shared/modules/part-details/presentation/part-detail.component.spec.ts index dcb8e52d96..3fb0140350 100644 --- a/frontend/src/app/modules/shared/modules/part-details/presentation/part-detail.component.spec.ts +++ b/frontend/src/app/modules/shared/modules/part-details/presentation/part-detail.component.spec.ts @@ -23,6 +23,7 @@ import { LayoutModule } from '@layout/layout.module'; import { SidenavComponent } from '@layout/sidenav/sidenav.component'; import { SidenavService } from '@layout/sidenav/sidenav.service'; import { PartsState } from '@page/parts/core/parts.state'; +import { MainAspectTypeModel } from '@page/parts/model/MainAspectType.model'; import { PartsAssembler } from '@shared/assembler/parts.assembler'; import { PartDetailsFacade } from '@shared/modules/part-details/core/partDetails.facade'; import { PartDetailsState } from '@shared/modules/part-details/core/partDetails.state'; @@ -35,7 +36,7 @@ import { PartDetailComponent } from './part-detail.component'; let PartsStateMock: PartsState; let PartDetailsStateMock: PartDetailsState; -const part = PartsAssembler.assemblePart(MOCK_part_1); +const part = PartsAssembler.assemblePart(MOCK_part_1, MainAspectTypeModel.AS_BUILT); describe('PartDetailComponent', () => { beforeEach(() => { diff --git a/frontend/src/app/modules/shared/modules/part-details/presentation/start-investigation/start-investigation.component.spec.ts b/frontend/src/app/modules/shared/modules/part-details/presentation/start-investigation/start-investigation.component.spec.ts index 5c222203df..68a8264fd1 100644 --- a/frontend/src/app/modules/shared/modules/part-details/presentation/start-investigation/start-investigation.component.spec.ts +++ b/frontend/src/app/modules/shared/modules/part-details/presentation/start-investigation/start-investigation.component.spec.ts @@ -21,6 +21,7 @@ import { LayoutModule } from '@layout/layout.module'; import { OtherPartsModule } from '@page/other-parts/other-parts.module'; +import { MainAspectTypeModel } from '@page/parts/model/MainAspectType.model'; import { PartsModule } from '@page/parts/parts.module'; import { PartsAssembler } from '@shared/assembler/parts.assembler'; import { PartDetailsModule } from '@shared/modules/part-details/partDetails.module'; @@ -32,8 +33,8 @@ import { MOCK_part_1, MOCK_part_2 } from '../../../../../../mocks/services/parts import { StartInvestigationComponent } from './start-investigation.component'; describe('StartInvestigationComponent', () => { - const part = { data: PartsAssembler.assemblePart(MOCK_part_1) }; - const firstChild = PartsAssembler.assemblePart(MOCK_part_2); + const part = { data: PartsAssembler.assemblePart(MOCK_part_1, MainAspectTypeModel.AS_BUILT) }; + const firstChild = PartsAssembler.assemblePart(MOCK_part_2, MainAspectTypeModel.AS_BUILT); const renderStartInvestigation = async () => { const { fixture } = await renderComponent(StartInvestigationComponent, { diff --git a/frontend/src/app/modules/shared/modules/relations/core/relations.facade.spec.ts b/frontend/src/app/modules/shared/modules/relations/core/relations.facade.spec.ts index 9a7440e36b..a488a7e5ae 100644 --- a/frontend/src/app/modules/shared/modules/relations/core/relations.facade.spec.ts +++ b/frontend/src/app/modules/shared/modules/relations/core/relations.facade.spec.ts @@ -19,6 +19,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ +import { MainAspectTypeModel } from '@page/parts/model/MainAspectType.model'; import { PartsAssembler } from '@shared/assembler/parts.assembler'; import { RelationComponentState } from '@shared/modules/relations/core/component.state'; import { LoadedElementsFacade } from '@shared/modules/relations/core/loaded-elements.facade'; @@ -44,9 +45,9 @@ describe('Relations facade', () => { beforeEach(() => { const partsServiceMok = { - getPart: id => of(mockAssetList[id]).pipe(map(part => PartsAssembler.assemblePart(part))), + getPart: id => of(mockAssetList[id]).pipe(map(part => PartsAssembler.assemblePart(part, MainAspectTypeModel.AS_BUILT))), getPartDetailOfIds: assetIds => - of(assetIds.map(id => mockAssetList[id])).pipe(map(parts => PartsAssembler.assemblePartList(parts))), + of(assetIds.map(id => mockAssetList[id])).pipe(map(parts => PartsAssembler.assemblePartList(parts, MainAspectTypeModel.AS_BUILT))), } as PartsService; loadedElementsFacade = new LoadedElementsFacade(new LoadedElementsState()); diff --git a/frontend/src/app/modules/shared/pipes/format-pagination-semantic-data-model-to-camelcase.pipe.spec.ts b/frontend/src/app/modules/shared/pipes/format-pagination-semantic-data-model-to-camelcase.pipe.spec.ts index 0acf4d509a..7151d64c76 100644 --- a/frontend/src/app/modules/shared/pipes/format-pagination-semantic-data-model-to-camelcase.pipe.spec.ts +++ b/frontend/src/app/modules/shared/pipes/format-pagination-semantic-data-model-to-camelcase.pipe.spec.ts @@ -19,6 +19,7 @@ import { TestBed } from '@angular/core/testing'; import { Pagination } from '@core/model/pagination.model'; +import { MainAspectTypeModel } from '@page/parts/model/MainAspectType.model'; import { SemanticDataModel } from '@page/parts/model/parts.model'; import { PartsAssembler } from '@shared/assembler/parts.assembler'; import { FormatPaginationSemanticDataModelToCamelCasePipe } from '@shared/pipes/format-pagination-semantic-data-model-to-camelcase.pipe'; @@ -53,7 +54,7 @@ describe('FormatPaginationSemanticDataModelToCamelCasePipe', () => { it(`should transform semanticDataModel from ${object.option} to ${object.expected}`, function() { - let partList = [PartsAssembler.assemblePart(MOCK_part_1), PartsAssembler.assemblePart(MOCK_part_2)]; + let partList = [PartsAssembler.assemblePart(MOCK_part_1, MainAspectTypeModel.AS_BUILT), PartsAssembler.assemblePart(MOCK_part_2, MainAspectTypeModel.AS_BUILT)]; let paginationData: Pagination = { page: 0, diff --git a/frontend/src/app/modules/shared/pipes/format-part-semantic-data-model-to-camelcase.pipe.spec.ts b/frontend/src/app/modules/shared/pipes/format-part-semantic-data-model-to-camelcase.pipe.spec.ts index abcd5cb5bf..a6e99dc9db 100644 --- a/frontend/src/app/modules/shared/pipes/format-part-semantic-data-model-to-camelcase.pipe.spec.ts +++ b/frontend/src/app/modules/shared/pipes/format-part-semantic-data-model-to-camelcase.pipe.spec.ts @@ -18,6 +18,7 @@ ********************************************************************************/ import { TestBed } from '@angular/core/testing'; +import { MainAspectTypeModel } from '@page/parts/model/MainAspectType.model'; import { SemanticDataModel } from '@page/parts/model/parts.model'; import { PartsAssembler } from '@shared/assembler/parts.assembler'; import { FormatPartSemanticDataModelToCamelCasePipe } from '@shared/pipes/format-part-semantic-data-model-to-camelcase.pipe'; @@ -51,7 +52,7 @@ describe('FormatPartSemanticDataModelToCamelCasePipe', () => { ].forEach(object => { it(`should transform semanticDataModel from ${object.option} to ${object.expected}`, function() { - let partData = PartsAssembler.assemblePart(MOCK_part_1); + let partData = PartsAssembler.assemblePart(MOCK_part_1, MainAspectTypeModel.AS_BUILT); partData.semanticDataModel = object.option; expect(partData.semanticDataModel).toEqual(object.option) diff --git a/frontend/src/app/modules/shared/pipes/format-partlist-semantic-data-model-to-camelcase.pipe.spec.ts b/frontend/src/app/modules/shared/pipes/format-partlist-semantic-data-model-to-camelcase.pipe.spec.ts index 36e57d34f7..41eade4154 100644 --- a/frontend/src/app/modules/shared/pipes/format-partlist-semantic-data-model-to-camelcase.pipe.spec.ts +++ b/frontend/src/app/modules/shared/pipes/format-partlist-semantic-data-model-to-camelcase.pipe.spec.ts @@ -18,6 +18,7 @@ ********************************************************************************/ import { TestBed } from '@angular/core/testing'; +import { MainAspectTypeModel } from '@page/parts/model/MainAspectType.model'; import { SemanticDataModel } from '@page/parts/model/parts.model'; import { PartsAssembler } from '@shared/assembler/parts.assembler'; import { FormatPartlistSemanticDataModelToCamelCasePipe } from '@shared/pipes/format-partlist-semantic-data-model-to-camelcase.pipe'; @@ -51,7 +52,7 @@ describe('FormatPartlistSemanticDataModelToCamelCasePipe', () => { ].forEach(object => { it(`should transform semanticDataModel from ${object.option} to ${object.expected}`, function() { - let partList = [PartsAssembler.assemblePart(MOCK_part_1), PartsAssembler.assemblePart(MOCK_part_2)]; + let partList = [PartsAssembler.assemblePart(MOCK_part_1, MainAspectTypeModel.AS_BUILT), PartsAssembler.assemblePart(MOCK_part_2, MainAspectTypeModel.AS_BUILT)]; partList.forEach(part => { part.semanticDataModel = object.option diff --git a/frontend/src/app/modules/shared/service/parts.service.ts b/frontend/src/app/modules/shared/service/parts.service.ts index c21eec3c8e..9ffb5be9e7 100644 --- a/frontend/src/app/modules/shared/service/parts.service.ts +++ b/frontend/src/app/modules/shared/service/parts.service.ts @@ -24,6 +24,7 @@ import { Injectable } from '@angular/core'; import { ApiService } from '@core/api/api.service'; import { Pagination } from '@core/model/pagination.model'; import { environment } from '@env'; +import { MainAspectTypeModel } from '@page/parts/model/MainAspectType.model'; import { Part, PartResponse, PartsResponse } from '@page/parts/model/parts.model'; import { PartsAssembler } from '@shared/assembler/parts.assembler'; import { TableHeaderSort } from '@shared/components/table/table.model'; @@ -51,7 +52,7 @@ export class PartsService { return this.apiService .getBy(`${this.url}/assets/as-built`, params) - .pipe(map(parts => PartsAssembler.assembleParts(parts))); + .pipe(map(parts => PartsAssembler.assembleParts(parts, MainAspectTypeModel.AS_BUILT))); } public getPartsAsPlanned(page: number, pageSize: number, sorting: TableHeaderSort[]): Observable> { @@ -67,16 +68,16 @@ export class PartsService { return this.apiService .getBy(`${this.url}/assets/as-planned`, params) - .pipe(map(parts => PartsAssembler.assembleParts(parts))); + .pipe(map(parts => PartsAssembler.assembleParts(parts, MainAspectTypeModel.AS_PLANNED))); } public getPart(id: string): Observable { let resultsAsBuilt = this.apiService.get(`${ this.url }/assets/as-built/${ id }`) - .pipe(map(part => PartsAssembler.assemblePart(part))); + .pipe(map(part => PartsAssembler.assemblePart(part, MainAspectTypeModel.AS_BUILT))); let resultsAsPlanned = this.apiService.get(`${ this.url }/assets/as-planned/${ id }`) - .pipe(map(part => PartsAssembler.assemblePart(part))); + .pipe(map(part => PartsAssembler.assemblePart(part, MainAspectTypeModel.AS_PLANNED))); return resultsAsBuilt || resultsAsPlanned; @@ -87,11 +88,11 @@ export class PartsService { let resultsAsBuilt = this.apiService .post(`${this.url}/assets/as-built/detail-information`, { assetIds }) - .pipe(map(parts => PartsAssembler.assemblePartList(parts))); + .pipe(map(parts => PartsAssembler.assemblePartList(parts, MainAspectTypeModel.AS_BUILT))); let resultsAsPlanned = this.apiService .post(`${this.url}/assets/as-planned/detail-information`, { assetIds }) - .pipe(map(parts => PartsAssembler.assemblePartList(parts))); + .pipe(map(parts => PartsAssembler.assemblePartList(parts, MainAspectTypeModel.AS_PLANNED))); if(resultsAsBuilt) { return resultsAsBuilt; From e97e702f3f630c7c40f703b53d51e46932ae5e0e Mon Sep 17 00:00:00 2001 From: Maximilian Wesener Date: Mon, 18 Sep 2023 14:59:15 +0200 Subject: [PATCH 56/84] chore: TRACEFOSS-XXX added todos --- .github/workflows/kics.yml | 1 + .github/workflows/trivy.yml | 1 + .../application/alert/request/StartQualityAlertRequest.java | 1 + .../base/request/CloseQualityNotificationRequest.java | 2 +- .../base/request/QualityNotificationSeverityRequest.java | 2 +- .../base/request/QualityNotificationStatusRequest.java | 2 +- .../base/request/StartQualityNotificationRequest.java | 2 +- .../base/request/UpdateQualityNotificationRequest.java | 2 +- .../base/request/UpdateQualityNotificationStatusRequest.java | 2 +- 9 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/kics.yml b/.github/workflows/kics.yml index 387bb56b34..64bb1abe4a 100644 --- a/.github/workflows/kics.yml +++ b/.github/workflows/kics.yml @@ -55,6 +55,7 @@ jobs: # - docker-compose.yml - used only on local env # - in cypress dir docker related files used only on local env exclude_paths: "docker-compose.yml,cypress/docker-compose.yml,cypress/Dockerfile" + exclude_severities: "info,low" # Fail on HIGH severity results fail_on: high # Disable secrets detection - we use GitGuardian diff --git a/.github/workflows/trivy.yml b/.github/workflows/trivy.yml index 7be53d57a8..617b4e6afc 100644 --- a/.github/workflows/trivy.yml +++ b/.github/workflows/trivy.yml @@ -191,3 +191,4 @@ jobs: uses: github/codeql-action/upload-sarif@v2 with: sarif_file: "trivy-results2.sarif" + 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 index c212b94590..243908186b 100644 --- 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 @@ -32,6 +32,7 @@ import java.time.Instant; import java.util.List; +// TODO move to tx-models @Data @Builder @NoArgsConstructor diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/CloseQualityNotificationRequest.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/CloseQualityNotificationRequest.java index 6fbcd20074..f325607e0e 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/CloseQualityNotificationRequest.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/CloseQualityNotificationRequest.java @@ -26,7 +26,7 @@ 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-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/QualityNotificationSeverityRequest.java index a4679d3333..ebb8c79179 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/QualityNotificationSeverityRequest.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/QualityNotificationSeverityRequest.java @@ -28,7 +28,7 @@ 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"), diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/QualityNotificationStatusRequest.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/QualityNotificationStatusRequest.java index bc31d096ee..a04d28ca7b 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/QualityNotificationStatusRequest.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/QualityNotificationStatusRequest.java @@ -20,7 +20,7 @@ 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; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/StartQualityNotificationRequest.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/StartQualityNotificationRequest.java index 7c7cc479bf..c9a4515fc5 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/StartQualityNotificationRequest.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/StartQualityNotificationRequest.java @@ -32,7 +32,7 @@ import java.time.Instant; import java.util.List; - +// TODO move to tx-models @Data @Builder @NoArgsConstructor diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/UpdateQualityNotificationRequest.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/UpdateQualityNotificationRequest.java index dfe0b24d83..db705e1dbc 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/UpdateQualityNotificationRequest.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/UpdateQualityNotificationRequest.java @@ -24,7 +24,7 @@ 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-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/UpdateQualityNotificationStatusRequest.java index ab7f9940fc..d4facdbcaa 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/UpdateQualityNotificationStatusRequest.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/UpdateQualityNotificationStatusRequest.java @@ -26,7 +26,7 @@ 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, From c66fc8f170e6f17fb4d2f72c52ba570dc80891c8 Mon Sep 17 00:00:00 2001 From: Maximilian Wesener Date: Mon, 18 Sep 2023 15:01:28 +0200 Subject: [PATCH 57/84] chore: TRACEFOSS-XXX added todos --- pom.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pom.xml b/pom.xml index ff594682ec..4b608949c3 100644 --- a/pom.xml +++ b/pom.xml @@ -126,6 +126,12 @@ SPDX-License-Identifier: Apache-2.0 pom import
+ + + org.yaml + snakeyaml + ${org-snakeyaml.version} +
From 1c959a86db8eefaa97e65025bcaaf57e984d317c Mon Sep 17 00:00:00 2001 From: ds-mwesener Date: Mon, 18 Sep 2023 13:03:34 +0000 Subject: [PATCH 58/84] Update Dependencies Backend Action --- DEPENDENCIES_BACKEND | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPENDENCIES_BACKEND b/DEPENDENCIES_BACKEND index 90e24bdce5..cf2805c6a1 100644 --- a/DEPENDENCIES_BACKEND +++ b/DEPENDENCIES_BACKEND @@ -221,4 +221,4 @@ maven/mavencentral/org.thymeleaf/thymeleaf/3.1.2.RELEASE, Apache-2.0, approved, 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.yaml/snakeyaml/1.33, Apache-2.0, approved, clearlydefined +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 From 88c41f6c83b1ea2ca3f0ffaa5255143043dfa94a Mon Sep 17 00:00:00 2001 From: Maximilian Wesener Date: Mon, 18 Sep 2023 15:50:19 +0200 Subject: [PATCH 59/84] chore: TRACEFOSS-XXX updated kics rules --- .github/workflows/kics.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/kics.yml b/.github/workflows/kics.yml index 64bb1abe4a..503a70fd72 100644 --- a/.github/workflows/kics.yml +++ b/.github/workflows/kics.yml @@ -100,7 +100,7 @@ jobs: with: # Scanning directory . path: "./tx-backend" - exclude_queries: 9f88c88d-824d-4d9a-b985-e22977046042,8c8261c2-19a9-4ef7-ad37-b8bc7bdd4d85,181bd815-767e-4e95-a24d-bb3c87328e19,00b78adf-b83f-419c-8ed8-c6018441dd3a + exclude_queries: a8e859da-4a43-4e7f-94b8-25d6e3bf8e90,d172a060-8569-4412-8045-3560ebd477e8,2e9b6612-8f69-42e0-a5b8-ed17739c2f3a,d172a060-8569-4412-8045-3560ebd477e8,9f88c88d-824d-4d9a-b985-e22977046042,8c8261c2-19a9-4ef7-ad37-b8bc7bdd4d85,181bd815-767e-4e95-a24d-bb3c87328e19,00b78adf-b83f-419c-8ed8-c6018441dd3a enable_comments: true # Fail on HIGH severity results fail_on: high From 10f666830898826cdadfb047a9e4443f36329fb4 Mon Sep 17 00:00:00 2001 From: Martin Maul Date: Mon, 18 Sep 2023 15:51:11 +0200 Subject: [PATCH 60/84] feature(UI):[TRACEFOSS-2339] rename mainAspectType enum --- .../alerts/core/alert-detail.facade.spec.ts | 4 ++-- .../core/investigation-detail.facade.spec.ts | 4 ++-- .../core/other-parts.facade.spec.ts | 14 ++++++------- .../other-parts/core/other-parts.service.ts | 4 ++-- .../other-parts.component.spec.ts | 20 +++++++++---------- .../supplier-parts.component.spec.ts | 10 +++++----- .../page/parts/core/parts.facade.spec.ts | 12 +++++------ ...ctType.model.ts => mainAspectType.enum.ts} | 2 +- .../modules/page/parts/model/parts.model.ts | 4 ++-- .../parts/presentation/parts.component.ts | 18 ++++++++--------- .../shared/assembler/parts.assembler.spec.ts | 10 +++++----- .../shared/assembler/parts.assembler.ts | 14 ++++++------- .../part-detail.component.spec.ts | 4 ++-- .../start-investigation.component.spec.ts | 6 +++--- .../relations/core/relations.facade.spec.ts | 6 +++--- ...antic-data-model-to-camelcase.pipe.spec.ts | 4 ++-- ...antic-data-model-to-camelcase.pipe.spec.ts | 4 ++-- ...antic-data-model-to-camelcase.pipe.spec.ts | 4 ++-- .../modules/shared/service/parts.service.ts | 14 ++++++------- 19 files changed, 79 insertions(+), 79 deletions(-) rename frontend/src/app/modules/page/parts/model/{MainAspectType.model.ts => mainAspectType.enum.ts} (96%) diff --git a/frontend/src/app/modules/page/alerts/core/alert-detail.facade.spec.ts b/frontend/src/app/modules/page/alerts/core/alert-detail.facade.spec.ts index 3b6bc65ef0..026ff6669c 100644 --- a/frontend/src/app/modules/page/alerts/core/alert-detail.facade.spec.ts +++ b/frontend/src/app/modules/page/alerts/core/alert-detail.facade.spec.ts @@ -22,7 +22,7 @@ import { HttpClientTestingModule } from '@angular/common/http/testing'; import { TestBed } from '@angular/core/testing'; import { AlertDetailFacade } from '@page/alerts/core/alert-detail.facade'; import { AlertDetailState } from '@page/alerts/core/alert-detail.state'; -import { MainAspectTypeModel } from '@page/parts/model/MainAspectType.model'; +import { MainAspectType } from '@page/parts/model/mainAspectType.enum'; import { Part } from '@page/parts/model/parts.model'; import { PartsAssembler } from '@shared/assembler/parts.assembler'; import { FormatPartlistSemanticDataModelToCamelCasePipe } from '@shared/pipes/format-partlist-semantic-data-model-to-camelcase.pipe'; @@ -75,7 +75,7 @@ describe('AlertDetailFacade', () => { beforeEach(function() { - part = PartsAssembler.assemblePart(MOCK_part_1, MainAspectTypeModel.AS_BUILT); + part = PartsAssembler.assemblePart(MOCK_part_1, MainAspectType.AS_BUILT); this.spy = spyOn(partService, 'sortParts').and.callFake(() => [ part ]); }); diff --git a/frontend/src/app/modules/page/investigations/core/investigation-detail.facade.spec.ts b/frontend/src/app/modules/page/investigations/core/investigation-detail.facade.spec.ts index 050f64ee5e..3e0a63cfe6 100644 --- a/frontend/src/app/modules/page/investigations/core/investigation-detail.facade.spec.ts +++ b/frontend/src/app/modules/page/investigations/core/investigation-detail.facade.spec.ts @@ -21,7 +21,7 @@ import { HttpClientTestingModule } from '@angular/common/http/testing'; import { TestBed } from '@angular/core/testing'; import { InvestigationDetailFacade } from '@page/investigations/core/investigation-detail.facade'; import { InvestigationDetailState } from '@page/investigations/core/investigation-detail.state'; -import { MainAspectTypeModel } from '@page/parts/model/MainAspectType.model'; +import { MainAspectType } from '@page/parts/model/mainAspectType.enum'; import { Part } from '@page/parts/model/parts.model'; import { PartsAssembler } from '@shared/assembler/parts.assembler'; import { FormatPartlistSemanticDataModelToCamelCasePipe } from '@shared/pipes/format-partlist-semantic-data-model-to-camelcase.pipe'; @@ -74,7 +74,7 @@ describe('InvestigationDetailFacade', () => { beforeEach(function() { - part = PartsAssembler.assemblePart(MOCK_part_1, MainAspectTypeModel.AS_BUILT); + part = PartsAssembler.assemblePart(MOCK_part_1, MainAspectType.AS_BUILT); this.spy = spyOn(partService, 'sortParts').and.callFake(() => [ part ]); }); diff --git a/frontend/src/app/modules/page/other-parts/core/other-parts.facade.spec.ts b/frontend/src/app/modules/page/other-parts/core/other-parts.facade.spec.ts index 022d41f084..21af986891 100644 --- a/frontend/src/app/modules/page/other-parts/core/other-parts.facade.spec.ts +++ b/frontend/src/app/modules/page/other-parts/core/other-parts.facade.spec.ts @@ -20,7 +20,7 @@ import { OtherPartsFacade } from '@page/other-parts/core/other-parts.facade'; import { OtherPartsService } from '@page/other-parts/core/other-parts.service'; import { OtherPartsState } from '@page/other-parts/core/other-parts.state'; -import { MainAspectTypeModel } from '@page/parts/model/MainAspectType.model'; +import { MainAspectType } from '@page/parts/model/mainAspectType.enum'; import { PartsAssembler } from '@shared/assembler/parts.assembler'; import { PartsService } from '@shared/service/parts.service'; import { waitFor } from '@testing-library/angular'; @@ -36,16 +36,16 @@ describe('OtherPartsFacade', () => { beforeEach(() => { partsServiceMok = { - getPart: id => new BehaviorSubject(mockAssetList[id]).pipe(map(part => PartsAssembler.assemblePart(part, MainAspectTypeModel.AS_BUILT))), + getPart: id => new BehaviorSubject(mockAssetList[id]).pipe(map(part => PartsAssembler.assemblePart(part, MainAspectType.AS_BUILT))), getPartsAsBuilt: (_page, _pageSize, _sorting) => - of(mockAssets).pipe(map(parts => PartsAssembler.assembleParts(parts, MainAspectTypeModel.AS_BUILT))), + of(mockAssets).pipe(map(parts => PartsAssembler.assembleParts(parts, MainAspectType.AS_BUILT))), getPartsAsPlanned: (_page, _pageSize, _sorting) => - of(mockAssets).pipe(map(parts => PartsAssembler.assembleParts(parts, MainAspectTypeModel.AS_PLANNED))), + of(mockAssets).pipe(map(parts => PartsAssembler.assembleParts(parts, MainAspectType.AS_PLANNED))), } as PartsService; otherPartsServiceMock = { getOtherParts: (_page, _pageSize, _sorting, _owner) => - of(mockAssets).pipe(map(parts => PartsAssembler.assembleParts(parts, MainAspectTypeModel.AS_BUILT))), + of(mockAssets).pipe(map(parts => PartsAssembler.assembleParts(parts, MainAspectType.AS_BUILT))), } as OtherPartsService; otherPartsState = new OtherPartsState(); @@ -55,7 +55,7 @@ describe('OtherPartsFacade', () => { describe('setActiveInvestigationForParts', () => { it('should set parts if request is successful', async () => { - const otherParts = PartsAssembler.assembleOtherParts(mockAssets, MainAspectTypeModel.AS_BUILT); + const otherParts = PartsAssembler.assembleOtherParts(mockAssets, MainAspectType.AS_BUILT); otherPartsState.supplierParts = { data: otherParts}; otherPartsFacade.setActiveInvestigationForParts(otherParts.content); @@ -76,7 +76,7 @@ describe('OtherPartsFacade', () => { it('should not set parts if no data in state', async () => { - const otherParts = PartsAssembler.assembleOtherParts(mockAssets, MainAspectTypeModel.AS_BUILT); + const otherParts = PartsAssembler.assembleOtherParts(mockAssets, MainAspectType.AS_BUILT); otherPartsFacade.setActiveInvestigationForParts(otherParts.content); const parts = await firstValueFrom(otherPartsState.supplierParts$); diff --git a/frontend/src/app/modules/page/other-parts/core/other-parts.service.ts b/frontend/src/app/modules/page/other-parts/core/other-parts.service.ts index 15c39dd2df..b78ce4284c 100644 --- a/frontend/src/app/modules/page/other-parts/core/other-parts.service.ts +++ b/frontend/src/app/modules/page/other-parts/core/other-parts.service.ts @@ -24,7 +24,7 @@ import { Injectable } from '@angular/core'; import { ApiService } from '@core/api/api.service'; import { Pagination } from '@core/model/pagination.model'; import { environment } from '@env'; -import { MainAspectTypeModel } from '@page/parts/model/MainAspectType.model'; +import { MainAspectType } from '@page/parts/model/mainAspectType.enum'; import { Owner } from '@page/parts/model/owner.enum'; import { Part, PartsResponse } from '@page/parts/model/parts.model'; import { PartsAssembler } from '@shared/assembler/parts.assembler'; @@ -52,6 +52,6 @@ export class OtherPartsService { return this.apiService .getBy(`${this.url}/assets/as-built`, params) - .pipe(map(parts => PartsAssembler.assembleOtherParts(parts, MainAspectTypeModel.AS_BUILT))); + .pipe(map(parts => PartsAssembler.assembleOtherParts(parts, MainAspectType.AS_BUILT))); } } 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 12c19c21e6..92e966ed72 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 @@ -21,7 +21,7 @@ import { OtherPartsState } from '@page/other-parts/core/other-parts.state'; import { PartsState } from '@page/parts/core/parts.state'; -import { MainAspectTypeModel } from '@page/parts/model/MainAspectType.model'; +import { MainAspectType } from '@page/parts/model/mainAspectType.enum'; import { PartsAssembler } from '@shared/assembler/parts.assembler'; import { FormatPartSemanticDataModelToCamelCasePipe } from '@shared/pipes/format-part-semantic-data-model-to-camelcase.pipe'; import { fireEvent, screen, waitFor } from '@testing-library/angular'; @@ -119,10 +119,10 @@ describe('Other Parts', () => { expect(supplierParts).toEqual({ data: { content: [ - formatPartSemanticToCamelCase.transform(PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_6, MainAspectTypeModel.AS_BUILT)), - formatPartSemanticToCamelCase.transform(PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_7, MainAspectTypeModel.AS_BUILT)), - formatPartSemanticToCamelCase.transform(PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_8, MainAspectTypeModel.AS_BUILT)), - formatPartSemanticToCamelCase.transform(PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_9, MainAspectTypeModel.AS_BUILT)), + formatPartSemanticToCamelCase.transform(PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_6, MainAspectType.AS_BUILT)), + formatPartSemanticToCamelCase.transform(PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_7, MainAspectType.AS_BUILT)), + formatPartSemanticToCamelCase.transform(PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_8, MainAspectType.AS_BUILT)), + formatPartSemanticToCamelCase.transform(PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_9, MainAspectType.AS_BUILT)), ], page: 0, pageCount: 1, @@ -148,11 +148,11 @@ describe('Other Parts', () => { expect(customerParts).toEqual({ data: { content: [ - formatPartSemanticToCamelCase.transform(PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_1, MainAspectTypeModel.AS_BUILT)), - formatPartSemanticToCamelCase.transform(PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_2, MainAspectTypeModel.AS_BUILT)), - formatPartSemanticToCamelCase.transform(PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_3, MainAspectTypeModel.AS_BUILT)), - formatPartSemanticToCamelCase.transform(PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_4, MainAspectTypeModel.AS_BUILT)), - formatPartSemanticToCamelCase.transform(PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_5, MainAspectTypeModel.AS_BUILT)), + formatPartSemanticToCamelCase.transform(PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_1, MainAspectType.AS_BUILT)), + formatPartSemanticToCamelCase.transform(PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_2, MainAspectType.AS_BUILT)), + formatPartSemanticToCamelCase.transform(PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_3, MainAspectType.AS_BUILT)), + formatPartSemanticToCamelCase.transform(PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_4, MainAspectType.AS_BUILT)), + formatPartSemanticToCamelCase.transform(PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_5, MainAspectType.AS_BUILT)), ], page: 0, pageCount: 1, diff --git a/frontend/src/app/modules/page/other-parts/presentation/supplier-parts/supplier-parts.component.spec.ts b/frontend/src/app/modules/page/other-parts/presentation/supplier-parts/supplier-parts.component.spec.ts index 4d75afa0e2..81552e9845 100644 --- a/frontend/src/app/modules/page/other-parts/presentation/supplier-parts/supplier-parts.component.spec.ts +++ b/frontend/src/app/modules/page/other-parts/presentation/supplier-parts/supplier-parts.component.spec.ts @@ -21,7 +21,7 @@ import { OtherPartsState } from '@page/other-parts/core/other-parts.state'; import { OtherPartsModule } from '@page/other-parts/other-parts.module'; import { PartsState } from '@page/parts/core/parts.state'; -import { MainAspectTypeModel } from '@page/parts/model/MainAspectType.model'; +import { MainAspectType } from '@page/parts/model/mainAspectType.enum'; import { PartsAssembler } from '@shared/assembler/parts.assembler'; import { fireEvent, screen, waitFor } from '@testing-library/angular'; import { getTableCheckbox, renderComponent } from '@tests/test-render.utils'; @@ -57,7 +57,7 @@ describe('SupplierPartsComponent', () => { it('should add item to current list and then remove', async () => { const { fixture } = await renderSupplierParts({ roles: ['user'] }); - const expectedPart = PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_6, MainAspectTypeModel.AS_BUILT); + const expectedPart = PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_6, MainAspectType.AS_BUILT); // first click to check checkbox fireEvent.click(await getTableCheckbox(screen, 0)); @@ -77,7 +77,7 @@ describe('SupplierPartsComponent', () => { it('test addItemToSelection method', async () => { const { fixture } = await renderSupplierParts(); - const expectedPart = PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_6, MainAspectTypeModel.AS_BUILT); + const expectedPart = PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_6, MainAspectType.AS_BUILT); fixture.componentInstance.addItemToSelection(expectedPart); expect(fixture.componentInstance.currentSelectedItems).toEqual([expectedPart]); @@ -86,7 +86,7 @@ describe('SupplierPartsComponent', () => { it('test removeItemFromSelection method', async () => { const { fixture } = await renderSupplierParts(); - const expectedPart = PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_6, MainAspectTypeModel.AS_BUILT); + const expectedPart = PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_6, MainAspectType.AS_BUILT); fixture.componentInstance.currentSelectedItems = [expectedPart]; @@ -97,7 +97,7 @@ describe('SupplierPartsComponent', () => { it('test clearSelected method', async () => { const { fixture } = await renderSupplierParts(); - const expectedPart = PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_6, MainAspectTypeModel.AS_BUILT); + const expectedPart = PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_6, MainAspectType.AS_BUILT); fixture.componentInstance.currentSelectedItems = [expectedPart]; diff --git a/frontend/src/app/modules/page/parts/core/parts.facade.spec.ts b/frontend/src/app/modules/page/parts/core/parts.facade.spec.ts index 357f793711..e4bbf24f66 100644 --- a/frontend/src/app/modules/page/parts/core/parts.facade.spec.ts +++ b/frontend/src/app/modules/page/parts/core/parts.facade.spec.ts @@ -22,7 +22,7 @@ import { Pagination } from '@core/model/pagination.model'; import { PartsFacade } from '@page/parts/core/parts.facade'; import { PartsState } from '@page/parts/core/parts.state'; -import { MainAspectTypeModel } from '@page/parts/model/MainAspectType.model'; +import { MainAspectType } from '@page/parts/model/mainAspectType.enum'; import { Part } from '@page/parts/model/parts.model'; import { PartsAssembler } from '@shared/assembler/parts.assembler'; import { PartsService } from '@shared/service/parts.service'; @@ -36,11 +36,11 @@ describe('Parts facade', () => { beforeEach(() => { partsServiceMok = { - getPart: id => new BehaviorSubject(mockAssetList[id]).pipe(map(part => PartsAssembler.assemblePart(part, MainAspectTypeModel.AS_BUILT))), + getPart: id => new BehaviorSubject(mockAssetList[id]).pipe(map(part => PartsAssembler.assemblePart(part, MainAspectType.AS_BUILT))), getPartsAsBuilt: (_page, _pageSize, _sorting) => - of(mockAssets).pipe(map(parts => PartsAssembler.assembleParts(parts, MainAspectTypeModel.AS_BUILT))), + of(mockAssets).pipe(map(parts => PartsAssembler.assembleParts(parts, MainAspectType.AS_BUILT))), getPartsAsPlanned: (_page, _pageSize, _sorting) => - of(mockAssets).pipe(map(parts => PartsAssembler.assembleParts(parts, MainAspectTypeModel.AS_PLANNED))), + of(mockAssets).pipe(map(parts => PartsAssembler.assembleParts(parts, MainAspectType.AS_PLANNED))), } as PartsService; partsState = new PartsState(); @@ -50,7 +50,7 @@ describe('Parts facade', () => { describe('setParts', () => { it('should set parts if request is successful', async () => { const serviceSpy = spyOn(partsServiceMok, 'getPartsAsBuilt').and.returnValue( - of>(PartsAssembler.assembleParts(mockAssets, MainAspectTypeModel.AS_BUILT)), + of>(PartsAssembler.assembleParts(mockAssets, MainAspectType.AS_BUILT)), ); partsFacade.setPartsAsBuilt(0, 10); @@ -62,7 +62,7 @@ describe('Parts facade', () => { expect(parts).toEqual({ error: undefined, loader: undefined, - data: PartsAssembler.assembleParts(mockAssets, MainAspectTypeModel.AS_BUILT), + data: PartsAssembler.assembleParts(mockAssets, MainAspectType.AS_BUILT), }), ); }); diff --git a/frontend/src/app/modules/page/parts/model/MainAspectType.model.ts b/frontend/src/app/modules/page/parts/model/mainAspectType.enum.ts similarity index 96% rename from frontend/src/app/modules/page/parts/model/MainAspectType.model.ts rename to frontend/src/app/modules/page/parts/model/mainAspectType.enum.ts index 441f7edab6..953879eee4 100644 --- a/frontend/src/app/modules/page/parts/model/MainAspectType.model.ts +++ b/frontend/src/app/modules/page/parts/model/mainAspectType.enum.ts @@ -16,7 +16,7 @@ * * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -export enum MainAspectTypeModel { +export enum MainAspectType { AS_BUILT = "as_built", AS_PLANNED = "as_planned" } diff --git a/frontend/src/app/modules/page/parts/model/parts.model.ts b/frontend/src/app/modules/page/parts/model/parts.model.ts index c6c8e19548..9d3cf51224 100644 --- a/frontend/src/app/modules/page/parts/model/parts.model.ts +++ b/frontend/src/app/modules/page/parts/model/parts.model.ts @@ -22,7 +22,7 @@ import type { PaginationResponse } from '@core/model/pagination.model'; import { SemanticModel } from '@page/parts/model/aspectModels.model'; import { DetailAspectModel } from '@page/parts/model/detailAspectModel.model'; -import { MainAspectTypeModel } from '@page/parts/model/MainAspectType.model'; +import { MainAspectType } from '@page/parts/model/mainAspectType.enum'; import { Owner } from '@page/parts/model/owner.enum'; export interface Part { @@ -45,7 +45,7 @@ export interface Part { semanticDataModel: SemanticDataModel; classification: string; - mainAspectType: MainAspectTypeModel; + mainAspectType: MainAspectType; // aspectmodel props are temporarely hardcoded here because Tables and Views only accept root level prop array // as built 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 536fe403c0..56b433d27f 100644 --- a/frontend/src/app/modules/page/parts/presentation/parts.component.ts +++ b/frontend/src/app/modules/page/parts/presentation/parts.component.ts @@ -22,7 +22,7 @@ import { AfterViewInit, Component, OnDestroy, OnInit } from '@angular/core'; import { Pagination } from '@core/model/pagination.model'; import { PartsFacade } from '@page/parts/core/parts.facade'; -import { MainAspectTypeModel } from '@page/parts/model/MainAspectType.model'; +import { MainAspectType } from '@page/parts/model/mainAspectType.enum'; import { Part } from '@page/parts/model/parts.model'; import { CreateHeaderFromColumns, @@ -176,16 +176,16 @@ export class PartsComponent implements OnInit, OnDestroy, AfterViewInit { } public onAsBuiltTableConfigChange({ page, pageSize, sorting }: TableEventConfig): void { - this.setTableSortingList(sorting,MainAspectTypeModel.AS_BUILT); + this.setTableSortingList(sorting,MainAspectType.AS_BUILT); this.partsFacade.setPartsAsBuilt(page, pageSize, this.tableAsBuiltSortList); } public onAsPlannedTableConfigChange({ page, pageSize, sorting }: TableEventConfig): void { - this.setTableSortingList(sorting,MainAspectTypeModel.AS_PLANNED); + this.setTableSortingList(sorting,MainAspectType.AS_PLANNED); this.partsFacade.setPartsAsPlanned(page, pageSize, this.tableAsPlannedSortList); } - private setTableSortingList(sorting: TableHeaderSort, partTable: MainAspectTypeModel): void { + private setTableSortingList(sorting: TableHeaderSort, partTable: MainAspectType): void { // if a sorting Columnlist exists but a column gets resetted: if(!sorting && (this.tableAsBuiltSortList || this.tableAsPlannedSortList)) { this.resetTableSortingList(partTable); @@ -195,7 +195,7 @@ export class PartsComponent implements OnInit, OnDestroy, AfterViewInit { // if CTRL is pressed at to sortList if(this.ctrlKeyState) { const [columnName] = sorting; - const tableSortList = partTable === MainAspectTypeModel.AS_BUILT ? this.tableAsBuiltSortList : this.tableAsPlannedSortList + const tableSortList = partTable === MainAspectType.AS_BUILT ? this.tableAsBuiltSortList : this.tableAsPlannedSortList // Find the index of the existing entry with the same first item const index = tableSortList.findIndex( @@ -209,22 +209,22 @@ export class PartsComponent implements OnInit, OnDestroy, AfterViewInit { // Add the new entry if it doesn't exist tableSortList.push(sorting); } - if(partTable === MainAspectTypeModel.AS_BUILT) { + if(partTable === MainAspectType.AS_BUILT) { this.tableAsBuiltSortList = tableSortList } else { this.tableAsPlannedSortList = tableSortList } } // If CTRL is not pressed just add a list with one entry - else if(partTable === MainAspectTypeModel.AS_BUILT) { + else if(partTable === MainAspectType.AS_BUILT) { this.tableAsBuiltSortList = [sorting]; } else { this.tableAsPlannedSortList = [sorting] } } - private resetTableSortingList(partTable: MainAspectTypeModel): void { - if(partTable === MainAspectTypeModel.AS_BUILT) { + private resetTableSortingList(partTable: MainAspectType): void { + if(partTable === MainAspectType.AS_BUILT) { this.tableAsBuiltSortList = []; } else { this.tableAsPlannedSortList= []; diff --git a/frontend/src/app/modules/shared/assembler/parts.assembler.spec.ts b/frontend/src/app/modules/shared/assembler/parts.assembler.spec.ts index 843f7b7446..fe3b7c5a6f 100644 --- a/frontend/src/app/modules/shared/assembler/parts.assembler.spec.ts +++ b/frontend/src/app/modules/shared/assembler/parts.assembler.spec.ts @@ -22,7 +22,7 @@ import { Pagination } from '@core/model/pagination.model'; import { AsBuiltAspectModel } from '@page/parts/model/aspectModels.model'; import { DetailAspectType } from '@page/parts/model/detailAspectModel.model'; -import { MainAspectTypeModel } from '@page/parts/model/MainAspectType.model'; +import { MainAspectType } from '@page/parts/model/mainAspectType.enum'; import { Part, QualityType, SemanticDataModel } from '@page/parts/model/parts.model'; import { PartsAssembler } from '@shared/assembler/parts.assembler'; import { of } from 'rxjs'; @@ -39,8 +39,8 @@ describe('PartsAssembler', () => { describe('assembleParts', () => { it('should return null if array is empty or undefined', () => { const emptyPage = { content: [], page: 0, pageCount: 0, pageSize: 0, totalItems: 0 }; - expect(PartsAssembler.assembleParts(null, MainAspectTypeModel.AS_BUILT)).toEqual(emptyPage); - expect(PartsAssembler.assembleParts(page([]), MainAspectTypeModel.AS_BUILT)).toEqual(emptyPage); + expect(PartsAssembler.assembleParts(null, MainAspectType.AS_BUILT)).toEqual(emptyPage); + expect(PartsAssembler.assembleParts(page([]), MainAspectType.AS_BUILT)).toEqual(emptyPage); }); it('should format the object correctly', () => { @@ -143,7 +143,7 @@ describe('PartsAssembler', () => { }); - expect(JSON.stringify(PartsAssembler.assembleParts(page(testData), MainAspectTypeModel.AS_BUILT).content)).toEqual(JSON.stringify(expected)); + expect(JSON.stringify(PartsAssembler.assembleParts(page(testData), MainAspectType.AS_BUILT).content)).toEqual(JSON.stringify(expected)); }); }); @@ -173,7 +173,7 @@ describe('PartsAssembler', () => { const manufacturerPartId = 'manufacturerPartId'; const nameAtManufacturer = 'nameAtManufacturer'; const van = 'van'; - const mainAspectType = MainAspectTypeModel.AS_BUILT + const mainAspectType = MainAspectType.AS_BUILT it('should clean up data for manufacturer view', done => { const data = { manufacturer, manufacturerPartId, nameAtManufacturer, test: '', van, mainAspectType } as unknown as Part; diff --git a/frontend/src/app/modules/shared/assembler/parts.assembler.ts b/frontend/src/app/modules/shared/assembler/parts.assembler.ts index 600765d4b2..e415487edf 100644 --- a/frontend/src/app/modules/shared/assembler/parts.assembler.ts +++ b/frontend/src/app/modules/shared/assembler/parts.assembler.ts @@ -27,7 +27,7 @@ import { PartSiteInformationAsPlanned, SemanticModel, } from '@page/parts/model/aspectModels.model'; -import { MainAspectTypeModel } from '@page/parts/model/MainAspectType.model'; +import { MainAspectType } from '@page/parts/model/mainAspectType.enum'; import { Part, PartResponse, QualityType } from '@page/parts/model/parts.model'; import { TableHeaderSort } from '@shared/components/table/table.model'; import { View } from '@shared/model/view.model'; @@ -45,7 +45,7 @@ export class PartsAssembler { return proplist; } - public static assemblePart(partResponse: PartResponse, mainAspectType: MainAspectTypeModel): Part { + public static assemblePart(partResponse: PartResponse, mainAspectType: MainAspectType): Part { if (!partResponse) { return null; } @@ -107,7 +107,7 @@ export class PartsAssembler { return mappedPart; } - public static assembleOtherPart(partResponse: PartResponse, mainAspectType: MainAspectTypeModel): Part { + public static assembleOtherPart(partResponse: PartResponse, mainAspectType: MainAspectType): Part { if (!partResponse) { return null; } @@ -115,16 +115,16 @@ export class PartsAssembler { return { ...PartsAssembler.assemblePart(partResponse, mainAspectType), qualityType: partResponse.qualityType }; } - public static assembleParts(parts: PaginationResponse, mainAspectType: MainAspectTypeModel): Pagination { + public static assembleParts(parts: PaginationResponse, mainAspectType: MainAspectType): Pagination { return PaginationAssembler.assemblePagination(PartsAssembler.assemblePart, parts, mainAspectType); } - public static assemblePartList(parts: PartResponse[], mainAspectType: MainAspectTypeModel): Part[] { + public static assemblePartList(parts: PartResponse[], mainAspectType: MainAspectType): Part[] { const partCopy = [...parts]; return partCopy.map(part => PartsAssembler.assemblePart(part, mainAspectType)); } - public static assembleOtherParts(parts: PaginationResponse, mainAspectType: MainAspectTypeModel): Pagination { + public static assembleOtherParts(parts: PaginationResponse, mainAspectType: MainAspectType): Pagination { return PaginationAssembler.assemblePagination(PartsAssembler.assembleOtherPart, parts, mainAspectType); } @@ -165,7 +165,7 @@ export class PartsAssembler { } // exclude 'van' if is a partAsPlanned - if(viewData.data?.mainAspectType === MainAspectTypeModel.AS_BUILT) { + if(viewData.data?.mainAspectType === MainAspectType.AS_BUILT) { const { manufacturer, manufacturerPartId, diff --git a/frontend/src/app/modules/shared/modules/part-details/presentation/part-detail.component.spec.ts b/frontend/src/app/modules/shared/modules/part-details/presentation/part-detail.component.spec.ts index 3fb0140350..ed8c2dfe93 100644 --- a/frontend/src/app/modules/shared/modules/part-details/presentation/part-detail.component.spec.ts +++ b/frontend/src/app/modules/shared/modules/part-details/presentation/part-detail.component.spec.ts @@ -23,7 +23,7 @@ import { LayoutModule } from '@layout/layout.module'; import { SidenavComponent } from '@layout/sidenav/sidenav.component'; import { SidenavService } from '@layout/sidenav/sidenav.service'; import { PartsState } from '@page/parts/core/parts.state'; -import { MainAspectTypeModel } from '@page/parts/model/MainAspectType.model'; +import { MainAspectType } from '@page/parts/model/mainAspectType.enum'; import { PartsAssembler } from '@shared/assembler/parts.assembler'; import { PartDetailsFacade } from '@shared/modules/part-details/core/partDetails.facade'; import { PartDetailsState } from '@shared/modules/part-details/core/partDetails.state'; @@ -36,7 +36,7 @@ import { PartDetailComponent } from './part-detail.component'; let PartsStateMock: PartsState; let PartDetailsStateMock: PartDetailsState; -const part = PartsAssembler.assemblePart(MOCK_part_1, MainAspectTypeModel.AS_BUILT); +const part = PartsAssembler.assemblePart(MOCK_part_1, MainAspectType.AS_BUILT); describe('PartDetailComponent', () => { beforeEach(() => { diff --git a/frontend/src/app/modules/shared/modules/part-details/presentation/start-investigation/start-investigation.component.spec.ts b/frontend/src/app/modules/shared/modules/part-details/presentation/start-investigation/start-investigation.component.spec.ts index 68a8264fd1..4c1a24d3f1 100644 --- a/frontend/src/app/modules/shared/modules/part-details/presentation/start-investigation/start-investigation.component.spec.ts +++ b/frontend/src/app/modules/shared/modules/part-details/presentation/start-investigation/start-investigation.component.spec.ts @@ -21,7 +21,7 @@ import { LayoutModule } from '@layout/layout.module'; import { OtherPartsModule } from '@page/other-parts/other-parts.module'; -import { MainAspectTypeModel } from '@page/parts/model/MainAspectType.model'; +import { MainAspectType } from '@page/parts/model/mainAspectType.enum'; import { PartsModule } from '@page/parts/parts.module'; import { PartsAssembler } from '@shared/assembler/parts.assembler'; import { PartDetailsModule } from '@shared/modules/part-details/partDetails.module'; @@ -33,8 +33,8 @@ import { MOCK_part_1, MOCK_part_2 } from '../../../../../../mocks/services/parts import { StartInvestigationComponent } from './start-investigation.component'; describe('StartInvestigationComponent', () => { - const part = { data: PartsAssembler.assemblePart(MOCK_part_1, MainAspectTypeModel.AS_BUILT) }; - const firstChild = PartsAssembler.assemblePart(MOCK_part_2, MainAspectTypeModel.AS_BUILT); + const part = { data: PartsAssembler.assemblePart(MOCK_part_1, MainAspectType.AS_BUILT) }; + const firstChild = PartsAssembler.assemblePart(MOCK_part_2, MainAspectType.AS_BUILT); const renderStartInvestigation = async () => { const { fixture } = await renderComponent(StartInvestigationComponent, { diff --git a/frontend/src/app/modules/shared/modules/relations/core/relations.facade.spec.ts b/frontend/src/app/modules/shared/modules/relations/core/relations.facade.spec.ts index a488a7e5ae..a36478d3de 100644 --- a/frontend/src/app/modules/shared/modules/relations/core/relations.facade.spec.ts +++ b/frontend/src/app/modules/shared/modules/relations/core/relations.facade.spec.ts @@ -19,7 +19,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { MainAspectTypeModel } from '@page/parts/model/MainAspectType.model'; +import { MainAspectType } from '@page/parts/model/mainAspectType.enum'; import { PartsAssembler } from '@shared/assembler/parts.assembler'; import { RelationComponentState } from '@shared/modules/relations/core/component.state'; import { LoadedElementsFacade } from '@shared/modules/relations/core/loaded-elements.facade'; @@ -45,9 +45,9 @@ describe('Relations facade', () => { beforeEach(() => { const partsServiceMok = { - getPart: id => of(mockAssetList[id]).pipe(map(part => PartsAssembler.assemblePart(part, MainAspectTypeModel.AS_BUILT))), + getPart: id => of(mockAssetList[id]).pipe(map(part => PartsAssembler.assemblePart(part, MainAspectType.AS_BUILT))), getPartDetailOfIds: assetIds => - of(assetIds.map(id => mockAssetList[id])).pipe(map(parts => PartsAssembler.assemblePartList(parts, MainAspectTypeModel.AS_BUILT))), + of(assetIds.map(id => mockAssetList[id])).pipe(map(parts => PartsAssembler.assemblePartList(parts, MainAspectType.AS_BUILT))), } as PartsService; loadedElementsFacade = new LoadedElementsFacade(new LoadedElementsState()); diff --git a/frontend/src/app/modules/shared/pipes/format-pagination-semantic-data-model-to-camelcase.pipe.spec.ts b/frontend/src/app/modules/shared/pipes/format-pagination-semantic-data-model-to-camelcase.pipe.spec.ts index 7151d64c76..2749a55a17 100644 --- a/frontend/src/app/modules/shared/pipes/format-pagination-semantic-data-model-to-camelcase.pipe.spec.ts +++ b/frontend/src/app/modules/shared/pipes/format-pagination-semantic-data-model-to-camelcase.pipe.spec.ts @@ -19,7 +19,7 @@ import { TestBed } from '@angular/core/testing'; import { Pagination } from '@core/model/pagination.model'; -import { MainAspectTypeModel } from '@page/parts/model/MainAspectType.model'; +import { MainAspectType } from '@page/parts/model/mainAspectType.enum'; import { SemanticDataModel } from '@page/parts/model/parts.model'; import { PartsAssembler } from '@shared/assembler/parts.assembler'; import { FormatPaginationSemanticDataModelToCamelCasePipe } from '@shared/pipes/format-pagination-semantic-data-model-to-camelcase.pipe'; @@ -54,7 +54,7 @@ describe('FormatPaginationSemanticDataModelToCamelCasePipe', () => { it(`should transform semanticDataModel from ${object.option} to ${object.expected}`, function() { - let partList = [PartsAssembler.assemblePart(MOCK_part_1, MainAspectTypeModel.AS_BUILT), PartsAssembler.assemblePart(MOCK_part_2, MainAspectTypeModel.AS_BUILT)]; + let partList = [PartsAssembler.assemblePart(MOCK_part_1, MainAspectType.AS_BUILT), PartsAssembler.assemblePart(MOCK_part_2, MainAspectType.AS_BUILT)]; let paginationData: Pagination = { page: 0, diff --git a/frontend/src/app/modules/shared/pipes/format-part-semantic-data-model-to-camelcase.pipe.spec.ts b/frontend/src/app/modules/shared/pipes/format-part-semantic-data-model-to-camelcase.pipe.spec.ts index a6e99dc9db..5d2a5ca8fd 100644 --- a/frontend/src/app/modules/shared/pipes/format-part-semantic-data-model-to-camelcase.pipe.spec.ts +++ b/frontend/src/app/modules/shared/pipes/format-part-semantic-data-model-to-camelcase.pipe.spec.ts @@ -18,7 +18,7 @@ ********************************************************************************/ import { TestBed } from '@angular/core/testing'; -import { MainAspectTypeModel } from '@page/parts/model/MainAspectType.model'; +import { MainAspectType } from '@page/parts/model/mainAspectType.enum'; import { SemanticDataModel } from '@page/parts/model/parts.model'; import { PartsAssembler } from '@shared/assembler/parts.assembler'; import { FormatPartSemanticDataModelToCamelCasePipe } from '@shared/pipes/format-part-semantic-data-model-to-camelcase.pipe'; @@ -52,7 +52,7 @@ describe('FormatPartSemanticDataModelToCamelCasePipe', () => { ].forEach(object => { it(`should transform semanticDataModel from ${object.option} to ${object.expected}`, function() { - let partData = PartsAssembler.assemblePart(MOCK_part_1, MainAspectTypeModel.AS_BUILT); + let partData = PartsAssembler.assemblePart(MOCK_part_1, MainAspectType.AS_BUILT); partData.semanticDataModel = object.option; expect(partData.semanticDataModel).toEqual(object.option) diff --git a/frontend/src/app/modules/shared/pipes/format-partlist-semantic-data-model-to-camelcase.pipe.spec.ts b/frontend/src/app/modules/shared/pipes/format-partlist-semantic-data-model-to-camelcase.pipe.spec.ts index 41eade4154..3cbb69f3af 100644 --- a/frontend/src/app/modules/shared/pipes/format-partlist-semantic-data-model-to-camelcase.pipe.spec.ts +++ b/frontend/src/app/modules/shared/pipes/format-partlist-semantic-data-model-to-camelcase.pipe.spec.ts @@ -18,7 +18,7 @@ ********************************************************************************/ import { TestBed } from '@angular/core/testing'; -import { MainAspectTypeModel } from '@page/parts/model/MainAspectType.model'; +import { MainAspectType } from '@page/parts/model/mainAspectType.enum'; import { SemanticDataModel } from '@page/parts/model/parts.model'; import { PartsAssembler } from '@shared/assembler/parts.assembler'; import { FormatPartlistSemanticDataModelToCamelCasePipe } from '@shared/pipes/format-partlist-semantic-data-model-to-camelcase.pipe'; @@ -52,7 +52,7 @@ describe('FormatPartlistSemanticDataModelToCamelCasePipe', () => { ].forEach(object => { it(`should transform semanticDataModel from ${object.option} to ${object.expected}`, function() { - let partList = [PartsAssembler.assemblePart(MOCK_part_1, MainAspectTypeModel.AS_BUILT), PartsAssembler.assemblePart(MOCK_part_2, MainAspectTypeModel.AS_BUILT)]; + let partList = [PartsAssembler.assemblePart(MOCK_part_1, MainAspectType.AS_BUILT), PartsAssembler.assemblePart(MOCK_part_2, MainAspectType.AS_BUILT)]; partList.forEach(part => { part.semanticDataModel = object.option diff --git a/frontend/src/app/modules/shared/service/parts.service.ts b/frontend/src/app/modules/shared/service/parts.service.ts index 9ffb5be9e7..f0f984060d 100644 --- a/frontend/src/app/modules/shared/service/parts.service.ts +++ b/frontend/src/app/modules/shared/service/parts.service.ts @@ -24,7 +24,7 @@ import { Injectable } from '@angular/core'; import { ApiService } from '@core/api/api.service'; import { Pagination } from '@core/model/pagination.model'; import { environment } from '@env'; -import { MainAspectTypeModel } from '@page/parts/model/MainAspectType.model'; +import { MainAspectType } from '@page/parts/model/mainAspectType.enum'; import { Part, PartResponse, PartsResponse } from '@page/parts/model/parts.model'; import { PartsAssembler } from '@shared/assembler/parts.assembler'; import { TableHeaderSort } from '@shared/components/table/table.model'; @@ -52,7 +52,7 @@ export class PartsService { return this.apiService .getBy(`${this.url}/assets/as-built`, params) - .pipe(map(parts => PartsAssembler.assembleParts(parts, MainAspectTypeModel.AS_BUILT))); + .pipe(map(parts => PartsAssembler.assembleParts(parts, MainAspectType.AS_BUILT))); } public getPartsAsPlanned(page: number, pageSize: number, sorting: TableHeaderSort[]): Observable> { @@ -68,16 +68,16 @@ export class PartsService { return this.apiService .getBy(`${this.url}/assets/as-planned`, params) - .pipe(map(parts => PartsAssembler.assembleParts(parts, MainAspectTypeModel.AS_PLANNED))); + .pipe(map(parts => PartsAssembler.assembleParts(parts, MainAspectType.AS_PLANNED))); } public getPart(id: string): Observable { let resultsAsBuilt = this.apiService.get(`${ this.url }/assets/as-built/${ id }`) - .pipe(map(part => PartsAssembler.assemblePart(part, MainAspectTypeModel.AS_BUILT))); + .pipe(map(part => PartsAssembler.assemblePart(part, MainAspectType.AS_BUILT))); let resultsAsPlanned = this.apiService.get(`${ this.url }/assets/as-planned/${ id }`) - .pipe(map(part => PartsAssembler.assemblePart(part, MainAspectTypeModel.AS_PLANNED))); + .pipe(map(part => PartsAssembler.assemblePart(part, MainAspectType.AS_PLANNED))); return resultsAsBuilt || resultsAsPlanned; @@ -88,11 +88,11 @@ export class PartsService { let resultsAsBuilt = this.apiService .post(`${this.url}/assets/as-built/detail-information`, { assetIds }) - .pipe(map(parts => PartsAssembler.assemblePartList(parts, MainAspectTypeModel.AS_BUILT))); + .pipe(map(parts => PartsAssembler.assemblePartList(parts, MainAspectType.AS_BUILT))); let resultsAsPlanned = this.apiService .post(`${this.url}/assets/as-planned/detail-information`, { assetIds }) - .pipe(map(parts => PartsAssembler.assemblePartList(parts, MainAspectTypeModel.AS_PLANNED))); + .pipe(map(parts => PartsAssembler.assemblePartList(parts, MainAspectType.AS_PLANNED))); if(resultsAsBuilt) { return resultsAsBuilt; From 7e129bed29f096a1d96b04b4b92d3fd80e8fc931 Mon Sep 17 00:00:00 2001 From: Maximilian Wesener Date: Mon, 18 Sep 2023 15:57:21 +0200 Subject: [PATCH 61/84] chore: TRACEFOSS-XXX updated kics rules --- .github/workflows/kics.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/kics.yml b/.github/workflows/kics.yml index 503a70fd72..a1f7a0dbfc 100644 --- a/.github/workflows/kics.yml +++ b/.github/workflows/kics.yml @@ -100,7 +100,7 @@ jobs: with: # Scanning directory . path: "./tx-backend" - exclude_queries: a8e859da-4a43-4e7f-94b8-25d6e3bf8e90,d172a060-8569-4412-8045-3560ebd477e8,2e9b6612-8f69-42e0-a5b8-ed17739c2f3a,d172a060-8569-4412-8045-3560ebd477e8,9f88c88d-824d-4d9a-b985-e22977046042,8c8261c2-19a9-4ef7-ad37-b8bc7bdd4d85,181bd815-767e-4e95-a24d-bb3c87328e19,00b78adf-b83f-419c-8ed8-c6018441dd3a + exclude_queries: 2ea04bef-c769-409e-9179-ee3a50b5c0ac,6998389e-66b2-473d-8d05-c8d71ac4d04d,a8e859da-4a43-4e7f-94b8-25d6e3bf8e90,d172a060-8569-4412-8045-3560ebd477e8,2e9b6612-8f69-42e0-a5b8-ed17739c2f3a,d172a060-8569-4412-8045-3560ebd477e8,9f88c88d-824d-4d9a-b985-e22977046042,8c8261c2-19a9-4ef7-ad37-b8bc7bdd4d85,181bd815-767e-4e95-a24d-bb3c87328e19,00b78adf-b83f-419c-8ed8-c6018441dd3a enable_comments: true # Fail on HIGH severity results fail_on: high From cbe7c1833d1422a81a7908d5b64fac2cd7b32897 Mon Sep 17 00:00:00 2001 From: Maximilian Wesener Date: Mon, 18 Sep 2023 16:04:22 +0200 Subject: [PATCH 62/84] chore: TRACEFOSS-XXX release --- CHANGELOG.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa1ad04926..a62d1831b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] ### Added +## [7.0.0] +### Added + - OAuth2 client credentials rest template interceptor - Configuration for left and right policies to use registry client library - Add support for JustInSequence aspect model @@ -58,6 +61,25 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Upgraded snakeyaml from 2.0 to 2.2 - Upgraded docker/login-action from 2 to 3 - Upgraded cypress-io/github-action 6.0.0 to 6.5.0 +- +### Known knowns + +- Backend [TRACEFOSS-1458]: AdminView: No validation of BPN for BPN EDC URL mapping +- Backend [TRACEFOSS-589]: Backend API access without login returns incorrect HTTP status code (500 instead of 401) +- Backend [TRACEFOSS-2148]: Endpoints for parts and notifications returns unsorted list +--- +- Frontend [TRACEFOSS-2149]: Sorting on empty table causes unhandled error view +--- +- Security [TRACEFOSS-829]: CVE Strict-Transport-Security header - The HSTS Warning and Error may allow attackers to bypass HSTS +- Security [TRACEFOSS-830]: CVE one stack trace disclosure (Java) in the target web server's HTTP response +- Security [TRACEFOSS-919]: Authorization Bypass Through User-Controlled SQL Primary Key CWE ID 566 +- Security [TRACEFOSS-984]: Improper Output Neutralization for Logs CWE ID 117 +- Security [TRACEFOSS-1313]: Using components with known vulnerabilities +- Security [TRACEFOSS-1314]: Open Redirect - host header injection +- Security [TRACEFOSS-1315]: No additional authentication component (MFA) during login process +--- +- Environment [TRACEFOSS-2164]: HTTP Requests for syncing the submodel server inoperable~~ + ### Removed From 4715af0172af72005e8287e50f6a4e46a6842009 Mon Sep 17 00:00:00 2001 From: Maximilian Wesener Date: Mon, 18 Sep 2023 16:05:14 +0200 Subject: [PATCH 63/84] chore: TRACEFOSS-XXX release --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a62d1831b1..ef096da958 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] ### Added -## [7.0.0] +## [7.0.0 - 18.09.2023] ### Added - OAuth2 client credentials rest template interceptor From e8f71d5337d82fa7776324415db14a81e082718d Mon Sep 17 00:00:00 2001 From: ds-mwesener Date: Mon, 18 Sep 2023 14:06:33 +0000 Subject: [PATCH 64/84] chore(release): Prepare release for Helm version 1.3.12 --- charts/traceability-foss/Chart.yaml | 2 +- .../charts/backend/Chart.yaml | 3 +- .../charts/frontend/Chart.yaml | 2 +- frontend/package.json | 44 +++++++++---------- 4 files changed, 25 insertions(+), 26 deletions(-) diff --git a/charts/traceability-foss/Chart.yaml b/charts/traceability-foss/Chart.yaml index 3f6e90c250..bc53cd55ab 100644 --- a/charts/traceability-foss/Chart.yaml +++ b/charts/traceability-foss/Chart.yaml @@ -24,7 +24,7 @@ sources: - https://github.com/eclipse-tractusx/traceability-foss type: application version: 1.3.12 -appVersion: "6.0.0" +appVersion: "7.0.0" dependencies: - name: frontend repository: "file://charts/frontend" diff --git a/charts/traceability-foss/charts/backend/Chart.yaml b/charts/traceability-foss/charts/backend/Chart.yaml index 97978a8ca7..d77ff5f54c 100644 --- a/charts/traceability-foss/charts/backend/Chart.yaml +++ b/charts/traceability-foss/charts/backend/Chart.yaml @@ -21,7 +21,7 @@ name: backend description: A Helm chart for Traceability backend application type: application version: 1.3.12 -appVersion: "6.0.0" +appVersion: "7.0.0" dependencies: - name: postgresql repository: https://charts.bitnami.com/bitnami @@ -39,4 +39,3 @@ dependencies: repository: https://eclipse-tractusx.github.io/item-relationship-service version: 1.1.2 condition: irs-edc-consumer.enabled - diff --git a/charts/traceability-foss/charts/frontend/Chart.yaml b/charts/traceability-foss/charts/frontend/Chart.yaml index cc122b9aae..6b39064203 100644 --- a/charts/traceability-foss/charts/frontend/Chart.yaml +++ b/charts/traceability-foss/charts/frontend/Chart.yaml @@ -21,4 +21,4 @@ name: frontend description: A Helm chart for Traceability frontend application type: application version: 1.3.12 -appVersion: "6.0.0" +appVersion: "7.0.0" diff --git a/frontend/package.json b/frontend/package.json index 55de70506e..899fb20320 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,29 +1,29 @@ { - "name" : "trace-x", - "version" : "6.0.0", - "scripts" : { - "analyze" : "ng build --configuration=production --stats-json && webpack-bundle-analyzer dist/stats.json", - "build:prod" : "ng build --configuration=debugProd --base-href /{baseHrefPlaceholder}/ --deploy-url /{baseHrefPlaceholder}/", - "build:prodDebug" : "ng build --configuration=debugProd --base-href /{baseHrefPlaceholder}/ --deploy-url /{baseHrefPlaceholder}/", - "format" : "prettier --write \"src/**/*.{js,ts,json,md,css,scss,html}\"", - "lint" : "eslint --color --fix -c .eslintrc.js --ext .ts ./src/app", - "ng" : "ng", - "ng-cdk" : "ng update --force @angular/cdk", - "ng-cli" : "ng update --force @angular/cli", - "ng-core" : "ng update --force @angular/core", - "ng-material" : "ng update --force @angular/material", - "prepare" : "cd .. && husky install frontend/.husky", - "start" : "ng serve", - "start:auth" : "ng serve --configuration=dev,auth", + "name": "trace-x", + "version": "7.0.0", + "scripts": { + "analyze": "ng build --configuration=production --stats-json && webpack-bundle-analyzer dist/stats.json", + "build:prod": "ng build --configuration=debugProd --base-href /{baseHrefPlaceholder}/ --deploy-url /{baseHrefPlaceholder}/", + "build:prodDebug": "ng build --configuration=debugProd --base-href /{baseHrefPlaceholder}/ --deploy-url /{baseHrefPlaceholder}/", + "format": "prettier --write \"src/**/*.{js,ts,json,md,css,scss,html}\"", + "lint": "eslint --color --fix -c .eslintrc.js --ext .ts ./src/app", + "ng": "ng", + "ng-cdk": "ng update --force @angular/cdk", + "ng-cli": "ng update --force @angular/cli", + "ng-core": "ng update --force @angular/core", + "ng-material": "ng update --force @angular/material", + "prepare": "cd .. && husky install frontend/.husky", + "start": "ng serve", + "start:auth": "ng serve --configuration=dev,auth", "start:auth:dev": "ng serve --configuration=dev,authDev", "start:auth:test": "ng serve --configuration=dev,authTest", "start:auth:e2ea": "ng serve --configuration=dev,authE2eA", - "start:auth:mock" : "ng serve --configuration=authMock", - "start:auth:local" : "ng serve --configuration=authLocal", - "start:auth:localBe" : "ng serve --configuration=localBackend", - "start:noAuth:localBe" : "ng serve --configuration=localBackendNoAuth", - "env:mock" : "docker-compose up", - "test" : "ng test", + "start:auth:mock": "ng serve --configuration=authMock", + "start:auth:local": "ng serve --configuration=authLocal", + "start:auth:localBe": "ng serve --configuration=localBackend", + "start:noAuth:localBe": "ng serve --configuration=localBackendNoAuth", + "env:mock": "docker-compose up", + "test": "ng test", "test:ci": "ng test --no-watch --no-progress --browsers=ChromeHeadless", "add-license-header": "node ./scripts/add-license-header.js --src=src", "dependencies:download-tool": "mkdir -p ./scripts/download && curl -L --output ./scripts/download/org.eclipse.dash.licenses-0.0.1-SNAPSHOT.jar 'https://repo.eclipse.org/service/local/artifact/maven/redirect?r=dash-licenses&g=org.eclipse.dash&a=org.eclipse.dash.licenses&v=0.0.1-SNAPSHOT'", From c039d61c1c8513c85425ff8e3e5b7e2cf64f9cd8 Mon Sep 17 00:00:00 2001 From: ds-mwesener Date: Mon, 18 Sep 2023 14:15:04 +0000 Subject: [PATCH 65/84] chore(release): Prepare release for Helm version 1.3.12 --- charts/traceability-foss/Chart.yaml | 2 +- .../charts/backend/Chart.yaml | 3 +- .../charts/frontend/Chart.yaml | 2 +- frontend/package.json | 44 +++++++++---------- 4 files changed, 25 insertions(+), 26 deletions(-) diff --git a/charts/traceability-foss/Chart.yaml b/charts/traceability-foss/Chart.yaml index 3f6e90c250..bc53cd55ab 100644 --- a/charts/traceability-foss/Chart.yaml +++ b/charts/traceability-foss/Chart.yaml @@ -24,7 +24,7 @@ sources: - https://github.com/eclipse-tractusx/traceability-foss type: application version: 1.3.12 -appVersion: "6.0.0" +appVersion: "7.0.0" dependencies: - name: frontend repository: "file://charts/frontend" diff --git a/charts/traceability-foss/charts/backend/Chart.yaml b/charts/traceability-foss/charts/backend/Chart.yaml index 97978a8ca7..d77ff5f54c 100644 --- a/charts/traceability-foss/charts/backend/Chart.yaml +++ b/charts/traceability-foss/charts/backend/Chart.yaml @@ -21,7 +21,7 @@ name: backend description: A Helm chart for Traceability backend application type: application version: 1.3.12 -appVersion: "6.0.0" +appVersion: "7.0.0" dependencies: - name: postgresql repository: https://charts.bitnami.com/bitnami @@ -39,4 +39,3 @@ dependencies: repository: https://eclipse-tractusx.github.io/item-relationship-service version: 1.1.2 condition: irs-edc-consumer.enabled - diff --git a/charts/traceability-foss/charts/frontend/Chart.yaml b/charts/traceability-foss/charts/frontend/Chart.yaml index cc122b9aae..6b39064203 100644 --- a/charts/traceability-foss/charts/frontend/Chart.yaml +++ b/charts/traceability-foss/charts/frontend/Chart.yaml @@ -21,4 +21,4 @@ name: frontend description: A Helm chart for Traceability frontend application type: application version: 1.3.12 -appVersion: "6.0.0" +appVersion: "7.0.0" diff --git a/frontend/package.json b/frontend/package.json index 55de70506e..899fb20320 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,29 +1,29 @@ { - "name" : "trace-x", - "version" : "6.0.0", - "scripts" : { - "analyze" : "ng build --configuration=production --stats-json && webpack-bundle-analyzer dist/stats.json", - "build:prod" : "ng build --configuration=debugProd --base-href /{baseHrefPlaceholder}/ --deploy-url /{baseHrefPlaceholder}/", - "build:prodDebug" : "ng build --configuration=debugProd --base-href /{baseHrefPlaceholder}/ --deploy-url /{baseHrefPlaceholder}/", - "format" : "prettier --write \"src/**/*.{js,ts,json,md,css,scss,html}\"", - "lint" : "eslint --color --fix -c .eslintrc.js --ext .ts ./src/app", - "ng" : "ng", - "ng-cdk" : "ng update --force @angular/cdk", - "ng-cli" : "ng update --force @angular/cli", - "ng-core" : "ng update --force @angular/core", - "ng-material" : "ng update --force @angular/material", - "prepare" : "cd .. && husky install frontend/.husky", - "start" : "ng serve", - "start:auth" : "ng serve --configuration=dev,auth", + "name": "trace-x", + "version": "7.0.0", + "scripts": { + "analyze": "ng build --configuration=production --stats-json && webpack-bundle-analyzer dist/stats.json", + "build:prod": "ng build --configuration=debugProd --base-href /{baseHrefPlaceholder}/ --deploy-url /{baseHrefPlaceholder}/", + "build:prodDebug": "ng build --configuration=debugProd --base-href /{baseHrefPlaceholder}/ --deploy-url /{baseHrefPlaceholder}/", + "format": "prettier --write \"src/**/*.{js,ts,json,md,css,scss,html}\"", + "lint": "eslint --color --fix -c .eslintrc.js --ext .ts ./src/app", + "ng": "ng", + "ng-cdk": "ng update --force @angular/cdk", + "ng-cli": "ng update --force @angular/cli", + "ng-core": "ng update --force @angular/core", + "ng-material": "ng update --force @angular/material", + "prepare": "cd .. && husky install frontend/.husky", + "start": "ng serve", + "start:auth": "ng serve --configuration=dev,auth", "start:auth:dev": "ng serve --configuration=dev,authDev", "start:auth:test": "ng serve --configuration=dev,authTest", "start:auth:e2ea": "ng serve --configuration=dev,authE2eA", - "start:auth:mock" : "ng serve --configuration=authMock", - "start:auth:local" : "ng serve --configuration=authLocal", - "start:auth:localBe" : "ng serve --configuration=localBackend", - "start:noAuth:localBe" : "ng serve --configuration=localBackendNoAuth", - "env:mock" : "docker-compose up", - "test" : "ng test", + "start:auth:mock": "ng serve --configuration=authMock", + "start:auth:local": "ng serve --configuration=authLocal", + "start:auth:localBe": "ng serve --configuration=localBackend", + "start:noAuth:localBe": "ng serve --configuration=localBackendNoAuth", + "env:mock": "docker-compose up", + "test": "ng test", "test:ci": "ng test --no-watch --no-progress --browsers=ChromeHeadless", "add-license-header": "node ./scripts/add-license-header.js --src=src", "dependencies:download-tool": "mkdir -p ./scripts/download && curl -L --output ./scripts/download/org.eclipse.dash.licenses-0.0.1-SNAPSHOT.jar 'https://repo.eclipse.org/service/local/artifact/maven/redirect?r=dash-licenses&g=org.eclipse.dash&a=org.eclipse.dash.licenses&v=0.0.1-SNAPSHOT'", From 2cf279e4fc7bd97e3d0dc87809a272966eb9eea7 Mon Sep 17 00:00:00 2001 From: Maximilian Wesener Date: Mon, 18 Sep 2023 16:20:14 +0200 Subject: [PATCH 66/84] chore: TRACEFOSS-XXX release --- docs/RELEASE.md | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/docs/RELEASE.md b/docs/RELEASE.md index c533a59b6f..bd4d3f81b6 100644 --- a/docs/RELEASE.md +++ b/docs/RELEASE.md @@ -12,13 +12,10 @@ Please update the [CHANGELOG.md](https://github.com/eclipse-tractusx/traceabilit ## Release helm charts Hint: You need to stricly follow this guide to make sure the helm chart releaser will be able to detect a new helm chart version! -1) Create a GIT Tag with the release version of the application. -2) A Release Action ( Release Trace-X ) will bump the helm versions and create a Pull request that needs to be merged. -3) Check if the Action ran successfully and the following properties in the Chart.yamls and package.json were updated with the corresponding new versions from your created tag and the latest version entry from the [charts/CHANGELOG.md](https://github.com/catenax-ng/tx-traceability-foss/blob/main/charts/traceability-foss/CHANGELOG.md) file: - - *version* & *appVersion* property from - - [backend Chart.yaml file](https://github.com/eclipse-tractusx/traceability-foss/blob/main/charts/traceability-foss/charts/backend/Chart.yaml) and from - - [frontend Chart.yaml file](https://github.com/eclipse-tractusx/traceability-foss/blob/main/charts/traceability-foss/charts/frontend/Chart.yaml). - - [Umbrella Helm Chart.yaml file](https://github.com/eclipse-tractusx/traceability-foss/blob/main/charts/traceability-foss/Chart.yaml). - - [frontend package.json file](https://github.com/eclipse-tractusx/traceability-foss/blob/main/frontend/package.json) -3) Proceed with merging into the main branch and check the [Release Charts workflow](https://github.com/eclipse-tractusx/traceability-foss/actions/workflows/helm-chart-release.yaml) - - It should trigger automatically, if not invoke the workflow manually for the *main* branch. The workflow will compare previously stored helm charts version and if it detects new version, it will release it in GitHub and will create an appropriate git tag. +1) Create a new Release in catena: https://github.com/catenax-ng/tx-traceability-foss/releases/new with the release version of the application. +2) Before accepting the Pull Request which will be created based on Step 1) please make sure to create a Pull Request from catena to eclipse and merge it. +3) Then create a new Release in tractusx: https://github.com/eclipse-tractusx/traceability-foss/releases/new with the release version of the application. +4) A Release Action ( Release Trace-X ) will bump the helm versions and create a Pull request that needs to be merged for catena and tractusx. +5) Please accept the PRs on both repositories. +6) Invoke the [Release Charts workflow](https://github.com/eclipse-tractusx/traceability-foss/actions/workflows/helm-chart-release.yaml) on main branch +7) Invoke the [Release Charts workflow](https://github.com/catenax-ng/tx-traceability-foss/actions/workflows/helm-chart-release.yaml) on main branch From df5a0194fc9152bac8444cf1b94a85b912d92037 Mon Sep 17 00:00:00 2001 From: Maximilian Wesener Date: Mon, 18 Sep 2023 16:52:59 +0200 Subject: [PATCH 67/84] chore: TRACEFOSS-XXX removing some edc logic. --- .../common/config/FeignGlobalConfig.java | 1 - .../JsonLdConfigurationTraceX.java | 3 - .../jsontransformer/EdcTransformerTraceX.java | 192 ------------------ ...onObjectFromCatalogRequestTransformer.java | 61 ------ ...omContractOfferDescriptionTransformer.java | 59 ------ ...FromNegotiationInitiateDtoTransformer.java | 77 ------- ...FromTransferProcessRequestTransformer.java | 93 --------- ...bjectToNegotiationResponseTransformer.java | 79 ------- ...onObjectToNegotiationStateTransformer.java | 53 ----- .../negotiation/ContractOfferDescription.java | 48 ----- .../negotiation/NegotiationRequest.java | 65 ------ .../negotiation/NegotiationResponse.java | 52 ----- .../negotiation/NegotiationState.java | 37 ---- .../edc/blackbox/negotiation/Response.java | 39 ---- 14 files changed, 859 deletions(-) delete mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/jsontransformer/EdcTransformerTraceX.java delete mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/jsontransformer/JsonObjectFromCatalogRequestTransformer.java delete mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/jsontransformer/JsonObjectFromContractOfferDescriptionTransformer.java delete mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/jsontransformer/JsonObjectFromNegotiationInitiateDtoTransformer.java delete mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/jsontransformer/JsonObjectFromTransferProcessRequestTransformer.java delete mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/jsontransformer/JsonObjectToNegotiationResponseTransformer.java delete mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/jsontransformer/JsonObjectToNegotiationStateTransformer.java delete mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/negotiation/ContractOfferDescription.java delete mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/negotiation/NegotiationRequest.java delete mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/negotiation/NegotiationResponse.java delete mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/negotiation/NegotiationState.java delete mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/negotiation/Response.java diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/FeignGlobalConfig.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/FeignGlobalConfig.java index e49a583b50..0866a3168f 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/FeignGlobalConfig.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/FeignGlobalConfig.java @@ -30,7 +30,6 @@ @Configuration @EnableFeignClients(basePackages = { "org.eclipse.tractusx.traceability.assets.infrastructure.base.irs", - "org.eclipse.tractusx.traceability.shelldescriptor.infrastructure.repository.rest.registry", "org.eclipse.tractusx.traceability.discovery.infrastructure.repository", }) public class FeignGlobalConfig { diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/configuration/JsonLdConfigurationTraceX.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/configuration/JsonLdConfigurationTraceX.java index 68f241749d..02a7bb53f5 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/configuration/JsonLdConfigurationTraceX.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/configuration/JsonLdConfigurationTraceX.java @@ -46,9 +46,6 @@ public class JsonLdConfigurationTraceX { public static final String NAMESPACE_DSPACE = "https://w3id.org/dspace/v0.8/"; public static final String NAMESPACE_DCAT = "https://www.w3.org/ns/dcat/"; public static final String NAMESPACE_EDC = "https://w3id.org/edc/v0.0.1/ns/"; - public static final String NAMESPACE_EDC_CID = NAMESPACE_EDC + "cid"; - public static final String NAMESPACE_EDC_PARTICIPANT_ID = NAMESPACE_EDC + "participantId"; - public static final String NAMESPACE_EDC_ID = NAMESPACE_EDC + "id"; public static final String NAMESPACE_TRACTUSX = "https://w3id.org/tractusx/v0.0.1/ns/"; public static final String NAMESPACE_DCT = "https://purl.org/dc/terms/"; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/jsontransformer/EdcTransformerTraceX.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/jsontransformer/EdcTransformerTraceX.java deleted file mode 100644 index f492b15c7f..0000000000 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/jsontransformer/EdcTransformerTraceX.java +++ /dev/null @@ -1,192 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2021,2022,2023 - * 2022: ZF Friedrichshafen AG - * 2022: ISTOS GmbH - * 2022,2023: Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - * 2022,2023: BOSCH AG - * Copyright (c) 2021,2022,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.infrastructure.edc.blackbox.jsontransformer; - -import com.apicatalog.jsonld.document.JsonDocument; -import com.fasterxml.jackson.databind.ObjectMapper; -import jakarta.json.Json; -import jakarta.json.JsonBuilderFactory; -import jakarta.json.JsonObject; -import jakarta.json.JsonReader; -import org.eclipse.edc.catalog.spi.Catalog; -import org.eclipse.edc.catalog.spi.CatalogRequest; -import org.eclipse.edc.connector.core.transform.TransformerContextImpl; -import org.eclipse.edc.connector.core.transform.TypeTransformerRegistryImpl; -import org.eclipse.edc.jsonld.TitaniumJsonLd; -import org.eclipse.edc.jsonld.transformer.from.JsonObjectFromAssetTransformer; -import org.eclipse.edc.jsonld.transformer.from.JsonObjectFromCatalogTransformer; -import org.eclipse.edc.jsonld.transformer.from.JsonObjectFromCriterionTransformer; -import org.eclipse.edc.jsonld.transformer.from.JsonObjectFromDataServiceTransformer; -import org.eclipse.edc.jsonld.transformer.from.JsonObjectFromDatasetTransformer; -import org.eclipse.edc.jsonld.transformer.from.JsonObjectFromDistributionTransformer; -import org.eclipse.edc.jsonld.transformer.from.JsonObjectFromPolicyTransformer; -import org.eclipse.edc.jsonld.transformer.from.JsonObjectFromQuerySpecTransformer; -import org.eclipse.edc.jsonld.transformer.to.JsonObjectToActionTransformer; -import org.eclipse.edc.jsonld.transformer.to.JsonObjectToAssetTransformer; -import org.eclipse.edc.jsonld.transformer.to.JsonObjectToCatalogTransformer; -import org.eclipse.edc.jsonld.transformer.to.JsonObjectToConstraintTransformer; -import org.eclipse.edc.jsonld.transformer.to.JsonObjectToCriterionTransformer; -import org.eclipse.edc.jsonld.transformer.to.JsonObjectToDataServiceTransformer; -import org.eclipse.edc.jsonld.transformer.to.JsonObjectToDatasetTransformer; -import org.eclipse.edc.jsonld.transformer.to.JsonObjectToDistributionTransformer; -import org.eclipse.edc.jsonld.transformer.to.JsonObjectToDutyTransformer; -import org.eclipse.edc.jsonld.transformer.to.JsonObjectToOperatorTransformer; -import org.eclipse.edc.jsonld.transformer.to.JsonObjectToPermissionTransformer; -import org.eclipse.edc.jsonld.transformer.to.JsonObjectToPolicyTransformer; -import org.eclipse.edc.jsonld.transformer.to.JsonObjectToProhibitionTransformer; -import org.eclipse.edc.jsonld.transformer.to.JsonObjectToQuerySpecTransformer; -import org.eclipse.edc.jsonld.transformer.to.JsonValueToGenericTypeTransformer; -import org.eclipse.edc.protocol.dsp.transferprocess.transformer.type.from.JsonObjectFromDataAddressTransformer; -import org.eclipse.edc.spi.result.Result; -import org.eclipse.edc.transform.spi.TypeTransformerRegistry; -import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.negotiation.ContractOfferDescription; -import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.negotiation.NegotiationRequest; -import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.negotiation.NegotiationResponse; -import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.negotiation.NegotiationState; -import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.transferprocess.TransferProcessRequest; -import org.springframework.stereotype.Component; - -import java.io.ByteArrayInputStream; -import java.nio.charset.Charset; -import java.util.Map; - -/** - * Transformer to convert between EDC models and JSON-LD. - */ -@Component -@SuppressWarnings("PMD.ExcessiveImports") -public class EdcTransformerTraceX { - private final JsonObjectToCatalogTransformer jsonObjectToCatalogTransformer; - private final JsonObjectFromNegotiationInitiateDtoTransformer jsonObjectFromNegotiationInitiateDtoTransformer; - private final JsonObjectFromTransferProcessRequestTransformer jsonObjectFromTransferProcessRequestTransformer; - private final JsonObjectFromContractOfferDescriptionTransformer jsonObjectFromContractOfferDescriptionTransformer; - private final JsonObjectFromCatalogRequestTransformer jsonObjectFromCatalogRequestTransformer; - private final TitaniumJsonLd titaniumJsonLdTraceX; - private final TransformerContextImpl transformerContext; - private final JsonObjectToNegotiationResponseTransformer jsonObjectToNegotiationResponseTransformer; - private final JsonObjectToNegotiationStateTransformer jsonObjectToNegotiationStateTransformer; - - public EdcTransformerTraceX(final ObjectMapper objectMapper, final TitaniumJsonLd titaniumJsonLdTraceX) { - this.titaniumJsonLdTraceX = titaniumJsonLdTraceX; - final JsonBuilderFactory jsonBuilderFactory = Json.createBuilderFactory(Map.of()); - - jsonObjectFromNegotiationInitiateDtoTransformer = new JsonObjectFromNegotiationInitiateDtoTransformer( - jsonBuilderFactory); - jsonObjectToCatalogTransformer = new JsonObjectToCatalogTransformer(); - jsonObjectFromTransferProcessRequestTransformer = new JsonObjectFromTransferProcessRequestTransformer( - jsonBuilderFactory); - jsonObjectFromContractOfferDescriptionTransformer = new JsonObjectFromContractOfferDescriptionTransformer( - jsonBuilderFactory); - jsonObjectFromCatalogRequestTransformer = new JsonObjectFromCatalogRequestTransformer(jsonBuilderFactory); - jsonObjectToNegotiationResponseTransformer = new JsonObjectToNegotiationResponseTransformer(); - jsonObjectToNegotiationStateTransformer = new JsonObjectToNegotiationStateTransformer(); - - final TypeTransformerRegistry typeTransformerRegistry = new TypeTransformerRegistryImpl(); - transformerContext = new TransformerContextImpl(typeTransformerRegistry); - - // JSON to Object - typeTransformerRegistry.register(jsonObjectToCatalogTransformer); - typeTransformerRegistry.register(new JsonValueToGenericTypeTransformer(objectMapper)); - typeTransformerRegistry.register(new JsonObjectToDataServiceTransformer()); - typeTransformerRegistry.register(new JsonObjectToConstraintTransformer()); - typeTransformerRegistry.register(new JsonObjectToDatasetTransformer()); - typeTransformerRegistry.register(new JsonObjectToPolicyTransformer()); - typeTransformerRegistry.register(new JsonObjectToPermissionTransformer()); - typeTransformerRegistry.register(new JsonObjectToActionTransformer()); - typeTransformerRegistry.register(new JsonObjectToDistributionTransformer()); - typeTransformerRegistry.register(new JsonObjectToProhibitionTransformer()); - typeTransformerRegistry.register(new JsonObjectToDutyTransformer()); - typeTransformerRegistry.register(new JsonObjectToAssetTransformer()); - typeTransformerRegistry.register(new JsonObjectToQuerySpecTransformer()); - typeTransformerRegistry.register(new JsonObjectToCriterionTransformer()); - typeTransformerRegistry.register(jsonObjectToNegotiationResponseTransformer); - // JSON from Object - typeTransformerRegistry.register(jsonObjectFromNegotiationInitiateDtoTransformer); - typeTransformerRegistry.register(jsonObjectFromCatalogRequestTransformer); - typeTransformerRegistry.register(jsonObjectFromTransferProcessRequestTransformer); - typeTransformerRegistry.register(jsonObjectFromContractOfferDescriptionTransformer); - typeTransformerRegistry.register(new JsonObjectFromQuerySpecTransformer(jsonBuilderFactory)); - typeTransformerRegistry.register(new JsonObjectFromCatalogTransformer(jsonBuilderFactory, objectMapper)); - typeTransformerRegistry.register(new JsonObjectFromDatasetTransformer(jsonBuilderFactory, objectMapper)); - typeTransformerRegistry.register(new JsonObjectFromPolicyTransformer(jsonBuilderFactory)); - typeTransformerRegistry.register(new JsonObjectFromDistributionTransformer(jsonBuilderFactory)); - typeTransformerRegistry.register(new JsonObjectFromDataServiceTransformer(jsonBuilderFactory)); - typeTransformerRegistry.register(new JsonObjectFromAssetTransformer(jsonBuilderFactory, objectMapper)); - typeTransformerRegistry.register(new JsonObjectFromCriterionTransformer(jsonBuilderFactory, objectMapper)); - typeTransformerRegistry.register(new JsonObjectFromDataAddressTransformer(jsonBuilderFactory)); - typeTransformerRegistry.register(new JsonObjectToOperatorTransformer()); - } - - public Catalog transformCatalog(final String jsonString, final Charset charset) { - final Result expand; - try (JsonReader reader = Json.createReader(new ByteArrayInputStream(jsonString.getBytes(charset)))) { - - expand = titaniumJsonLdTraceX.expand( - JsonDocument.of(reader.read()).getJsonContent().orElseThrow().asJsonObject()); - } - return jsonObjectToCatalogTransformer.transform(expand.getContent(), transformerContext); - } - - public NegotiationResponse transformJsonToNegotiationResponse(final String jsonString, final Charset charset) { - final Result expand; - try (JsonReader reader = Json.createReader(new ByteArrayInputStream(jsonString.getBytes(charset)))) { - expand = titaniumJsonLdTraceX.expand( - JsonDocument.of(reader.read()).getJsonContent().orElseThrow().asJsonObject()); - } - return jsonObjectToNegotiationResponseTransformer.transform(expand.getContent(), transformerContext); - } - - public NegotiationState transformJsonToNegotiationState(final String jsonString, final Charset charset) { - final Result expand; - try (JsonReader reader = Json.createReader(new ByteArrayInputStream(jsonString.getBytes(charset)))) { - expand = titaniumJsonLdTraceX.expand( - JsonDocument.of(reader.read()).getJsonContent().orElseThrow().asJsonObject()); - } - return jsonObjectToNegotiationStateTransformer.transform(expand.getContent(), transformerContext); - } - - public JsonObject transformNegotiationRequestToJson(final NegotiationRequest negotiationRequest) { - final JsonObject transform = jsonObjectFromNegotiationInitiateDtoTransformer.transform(negotiationRequest, - transformerContext); - return titaniumJsonLdTraceX.compact(transform).asOptional().orElseThrow(); - } - - public JsonObject transformTransferProcessRequestToJson(final TransferProcessRequest transferProcessRequest) { - final JsonObject transform = jsonObjectFromTransferProcessRequestTransformer.transform(transferProcessRequest, - transformerContext); - return titaniumJsonLdTraceX.compact(transform).asOptional().orElseThrow(); - } - - public JsonObject transformContractOfferDescriptionToJson(final ContractOfferDescription contractOfferDescription) { - - final JsonObject transform = jsonObjectFromContractOfferDescriptionTransformer.transform( - contractOfferDescription, transformerContext); - return titaniumJsonLdTraceX.compact(transform).asOptional().orElseThrow(); - } - - public JsonObject transformCatalogRequestToJson(final CatalogRequest catalogRequest) { - final JsonObject transform = jsonObjectFromCatalogRequestTransformer.transform(catalogRequest, - transformerContext); - return titaniumJsonLdTraceX.compact(transform).asOptional().orElseThrow(); - } -} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/jsontransformer/JsonObjectFromCatalogRequestTransformer.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/jsontransformer/JsonObjectFromCatalogRequestTransformer.java deleted file mode 100644 index 811b3f2eba..0000000000 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/jsontransformer/JsonObjectFromCatalogRequestTransformer.java +++ /dev/null @@ -1,61 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2021,2022,2023 - * 2022: ZF Friedrichshafen AG - * 2022: ISTOS GmbH - * 2022,2023: Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - * 2022,2023: BOSCH AG - * Copyright (c) 2021,2022,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.infrastructure.edc.blackbox.jsontransformer; - -import jakarta.json.JsonBuilderFactory; -import jakarta.json.JsonObject; -import jakarta.json.JsonObjectBuilder; -import org.eclipse.edc.catalog.spi.CatalogRequest; -import org.eclipse.edc.jsonld.spi.JsonLdKeywords; -import org.eclipse.edc.jsonld.spi.transformer.AbstractJsonLdTransformer; -import org.eclipse.edc.transform.spi.TransformerContext; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -import java.util.Optional; - -/** - * Transformer to convert CatalogRequest to JSON-LD. - */ -public class JsonObjectFromCatalogRequestTransformer extends AbstractJsonLdTransformer { - private final JsonBuilderFactory jsonFactory; - - public JsonObjectFromCatalogRequestTransformer(final JsonBuilderFactory jsonFactory) { - super(CatalogRequest.class, JsonObject.class); - this.jsonFactory = jsonFactory; - } - - @Override - public @Nullable JsonObject transform(@NotNull final CatalogRequest dto, - @NotNull final TransformerContext context) { - final JsonObjectBuilder builder = this.jsonFactory.createObjectBuilder(); - builder.add(JsonLdKeywords.TYPE, CatalogRequest.EDC_CATALOG_REQUEST_TYPE) - .add(CatalogRequest.EDC_CATALOG_REQUEST_PROVIDER_URL, dto.getProviderUrl()) - .add(CatalogRequest.EDC_CATALOG_REQUEST_PROTOCOL, dto.getProtocol()); - Optional.ofNullable(dto.getQuerySpec()) - .ifPresent(s -> builder.add(CatalogRequest.EDC_CATALOG_REQUEST_QUERY_SPEC, - context.transform(dto.getQuerySpec(), JsonObject.class))); - - return builder.build(); - } -} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/jsontransformer/JsonObjectFromContractOfferDescriptionTransformer.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/jsontransformer/JsonObjectFromContractOfferDescriptionTransformer.java deleted file mode 100644 index d1dcfbbef4..0000000000 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/jsontransformer/JsonObjectFromContractOfferDescriptionTransformer.java +++ /dev/null @@ -1,59 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2021,2022,2023 - * 2022: ZF Friedrichshafen AG - * 2022: ISTOS GmbH - * 2022,2023: Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - * 2022,2023: BOSCH AG - * Copyright (c) 2021,2022,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.infrastructure.edc.blackbox.jsontransformer; - -import jakarta.json.JsonBuilderFactory; -import jakarta.json.JsonObject; -import jakarta.json.JsonObjectBuilder; -import org.eclipse.edc.jsonld.spi.JsonLdKeywords; -import org.eclipse.edc.jsonld.spi.transformer.AbstractJsonLdTransformer; -import org.eclipse.edc.transform.spi.TransformerContext; -import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.negotiation.ContractOfferDescription; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -/** - * Transformer to convert ContractOfferDescription to JSON-LD. - */ -public class JsonObjectFromContractOfferDescriptionTransformer - extends AbstractJsonLdTransformer { - private final JsonBuilderFactory jsonFactory; - - public JsonObjectFromContractOfferDescriptionTransformer(final JsonBuilderFactory jsonFactory) { - super(ContractOfferDescription.class, JsonObject.class); - this.jsonFactory = jsonFactory; - } - - @Override - public @Nullable JsonObject transform(@NotNull final ContractOfferDescription dto, - final @NotNull TransformerContext context) { - final JsonObjectBuilder builder = this.jsonFactory.createObjectBuilder(); - builder.add(JsonLdKeywords.TYPE, ContractOfferDescription.CONTRACT_OFFER_TYPE) - .add(ContractOfferDescription.CONTRACT_OFFER_OFFER_ID, dto.getOfferId()) - .add(ContractOfferDescription.CONTRACT_OFFER_ASSET_ID, dto.getAssetId()) - .add("validity", dto.getValidity()) - .add(ContractOfferDescription.CONTRACT_OFFER_POLICY, context.transform(dto.getPolicy(), JsonObject.class)); - - return builder.build(); - } -} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/jsontransformer/JsonObjectFromNegotiationInitiateDtoTransformer.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/jsontransformer/JsonObjectFromNegotiationInitiateDtoTransformer.java deleted file mode 100644 index 301aa8fac4..0000000000 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/jsontransformer/JsonObjectFromNegotiationInitiateDtoTransformer.java +++ /dev/null @@ -1,77 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2021,2022,2023 - * 2022: ZF Friedrichshafen AG - * 2022: ISTOS GmbH - * 2022,2023: Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - * 2022,2023: BOSCH AG - * Copyright (c) 2021,2022,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.infrastructure.edc.blackbox.jsontransformer; - -import jakarta.json.JsonArrayBuilder; -import jakarta.json.JsonBuilderFactory; -import jakarta.json.JsonObject; -import jakarta.json.JsonObjectBuilder; -import org.eclipse.edc.jsonld.spi.transformer.AbstractJsonLdTransformer; -import org.eclipse.edc.spi.types.domain.callback.CallbackAddress; -import org.eclipse.edc.transform.spi.TransformerContext; -import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.negotiation.NegotiationRequest; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -import java.util.List; -import java.util.Objects; -import java.util.Optional; - -/** - * Transformer to convert NegotiationRequest to JSON-LD. - */ -public class JsonObjectFromNegotiationInitiateDtoTransformer - extends AbstractJsonLdTransformer { - private final JsonBuilderFactory jsonFactory; - - public JsonObjectFromNegotiationInitiateDtoTransformer(final JsonBuilderFactory jsonFactory) { - super(NegotiationRequest.class, JsonObject.class); - this.jsonFactory = jsonFactory; - } - - @Override - public @Nullable JsonObject transform(@NotNull final NegotiationRequest dto, - @NotNull final TransformerContext context) { - final JsonObjectBuilder builder = this.jsonFactory.createObjectBuilder(); - builder.add(NegotiationRequest.NEGOTIATION_CONNECTOR_ADDRESS, dto.getConnectorAddress()) - .add(NegotiationRequest.NEGOTIATION_CONNECTOR_ID, dto.getConnectorId()) - .add(NegotiationRequest.NEGOTIATION_OFFER, context.transform(dto.getOffer(), JsonObject.class)) - .add(NegotiationRequest.NEGOTIATION_PROTOCOL, dto.getProtocol()); - Optional.ofNullable(dto.getProviderId()) - .ifPresent(s -> builder.add(NegotiationRequest.NEGOTIATION_PROVIDER_ID, dto.getProviderId())); - Optional.ofNullable(dto.getCallbackAddresses()) - .ifPresent(s -> builder.add(NegotiationRequest.NEGOTIATION_CALLBACK_ADDRESSES, - asArray(dto.getCallbackAddresses(), context))); - Optional.ofNullable(dto.getConsumerId()) - .ifPresent(s -> builder.add(NegotiationRequest.NEGOTIATION_CONSUMER_ID, dto.getConsumerId())); - return builder.build(); - } - - private JsonArrayBuilder asArray(final List callbackAddresses, final TransformerContext context) { - final JsonArrayBuilder builder = Objects.requireNonNull(this.jsonFactory.createArrayBuilder()); - callbackAddresses.stream() - .map(callbackAddress -> context.transform(callbackAddress, JsonObject.class)) - .forEach(builder::add); - return builder; - } -} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/jsontransformer/JsonObjectFromTransferProcessRequestTransformer.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/jsontransformer/JsonObjectFromTransferProcessRequestTransformer.java deleted file mode 100644 index 693e37bb89..0000000000 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/jsontransformer/JsonObjectFromTransferProcessRequestTransformer.java +++ /dev/null @@ -1,93 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2021,2022,2023 - * 2022: ZF Friedrichshafen AG - * 2022: ISTOS GmbH - * 2022,2023: Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - * 2022,2023: BOSCH AG - * Copyright (c) 2021,2022,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.infrastructure.edc.blackbox.jsontransformer; - -import jakarta.json.JsonArrayBuilder; -import jakarta.json.JsonBuilderFactory; -import jakarta.json.JsonObject; -import jakarta.json.JsonObjectBuilder; -import org.eclipse.edc.jsonld.spi.transformer.AbstractJsonLdTransformer; -import org.eclipse.edc.spi.types.domain.callback.CallbackAddress; -import org.eclipse.edc.transform.spi.TransformerContext; -import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.transferprocess.TransferProcessRequest; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -import java.util.List; -import java.util.Objects; -import java.util.Optional; - -import static org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.configuration.JsonLdConfigurationTraceX.NAMESPACE_EDC; - -/** - * Transformer to convert TransferProcessRequest to JSON-LD. - */ -public class JsonObjectFromTransferProcessRequestTransformer - extends AbstractJsonLdTransformer { - private final JsonBuilderFactory jsonFactory; - - public JsonObjectFromTransferProcessRequestTransformer(final JsonBuilderFactory jsonFactory) { - super(TransferProcessRequest.class, JsonObject.class); - this.jsonFactory = jsonFactory; - } - - @Override - public @Nullable JsonObject transform(@NotNull final TransferProcessRequest dto, @NotNull final TransformerContext context) { - final JsonObjectBuilder builder = this.jsonFactory.createObjectBuilder(); - builder.add(TransferProcessRequest.EDC_TRANSFER_REQUEST_DTO_ASSET_ID, dto.getAssetId()) - .add(TransferProcessRequest.EDC_TRANSFER_REQUEST_DTO_CONNECTOR_ADDRESS, dto.getConnectorAddress()) - .add(TransferProcessRequest.EDC_TRANSFER_REQUEST_DTO_CONTRACT_ID, dto.getContractId()) - .add(TransferProcessRequest.EDC_TRANSFER_REQUEST_DTO_DATA_DESTINATION, - context.transform(dto.getDataDestination(), JsonObject.class)) - .add(TransferProcessRequest.EDC_TRANSFER_REQUEST_DTO_PROTOCOL, dto.getProtocol()) - .add(TransferProcessRequest.EDC_TRANSFER_REQUEST_DTO_MANAGED_RESOURCES, dto.isManagedResources()); - - Optional.ofNullable(dto.getConnectorId()) - .ifPresent(s -> builder.add(TransferProcessRequest.EDC_TRANSFER_REQUEST_DTO_CONNECTOR_ID, - dto.getConnectorId())); - Optional.ofNullable(dto.getCallbackAddresses()) - .ifPresent(s -> builder.add(TransferProcessRequest.EDC_TRANSFER_REQUEST_DTO_CALLBACK_ADDRESSES, - asArray(dto.getCallbackAddresses(), context))); - - if (dto.getProperties() != null && !dto.getProperties().isEmpty()) { - final JsonObjectBuilder objectBuilder = jsonFactory.createObjectBuilder(); - dto.getProperties().forEach((s, s1) -> objectBuilder.add(NAMESPACE_EDC + s, s1)); - builder.add(TransferProcessRequest.EDC_TRANSFER_REQUEST_DTO_PROPERTIES, objectBuilder); - } - - if (dto.getPrivateProperties() != null && !dto.getPrivateProperties().isEmpty()) { - final JsonObjectBuilder objectBuilder = jsonFactory.createObjectBuilder(); - dto.getPrivateProperties().forEach((s, s1) -> objectBuilder.add(NAMESPACE_EDC + s, s1)); - builder.add(TransferProcessRequest.EDC_TRANSFER_REQUEST_DTO_PRIVATE_PROPERTIES, objectBuilder); - } - return builder.build(); - } - - private JsonArrayBuilder asArray(final List callbackAddresses, final TransformerContext context) { - final JsonArrayBuilder arrayBuilder = Objects.requireNonNull(this.jsonFactory.createArrayBuilder()); - callbackAddresses.stream() - .map(callbackAddress -> context.transform(callbackAddress, JsonObject.class)) - .forEach(arrayBuilder::add); - return arrayBuilder; - } -} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/jsontransformer/JsonObjectToNegotiationResponseTransformer.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/jsontransformer/JsonObjectToNegotiationResponseTransformer.java deleted file mode 100644 index e63bf6b528..0000000000 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/jsontransformer/JsonObjectToNegotiationResponseTransformer.java +++ /dev/null @@ -1,79 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2021,2022,2023 - * 2022: ZF Friedrichshafen AG - * 2022: ISTOS GmbH - * 2022,2023: Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - * 2022,2023: BOSCH AG - * Copyright (c) 2021,2022,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.infrastructure.edc.blackbox.jsontransformer; - -import jakarta.json.JsonObject; -import org.eclipse.edc.jsonld.spi.transformer.AbstractJsonLdTransformer; -import org.eclipse.edc.transform.spi.TransformerContext; -import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.negotiation.NegotiationResponse; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -/** - * Transformer to convert JSON-LD to NegotiationResponse. - */ -public class JsonObjectToNegotiationResponseTransformer - extends AbstractJsonLdTransformer { - - public static final String CONTRACT_NEGOTIATION_AGREEMENT_ID = "https://w3id.org/edc/v0.0.1/ns/contractAgreementId"; - public static final String CONTRACT_NEGOTIATION_COUNTERPARTY_ADDR = "https://w3id.org/edc/v0.0.1/ns/counterPartyAddress"; - public static final String CONTRACT_NEGOTIATION_ERRORDETAIL = "https://w3id.org/edc/v0.0.1/ns/errorDetail"; - public static final String CONTRACT_NEGOTIATION_PROTOCOL = "https://w3id.org/edc/v0.0.1/ns/protocol"; - public static final String CONTRACT_NEGOTIATION_STATE = "https://w3id.org/edc/v0.0.1/ns/state"; - public static final String CONTRACT_NEGOTIATION_NEG_TYPE = "https://w3id.org/edc/v0.0.1/ns/type"; - public static final String CONTRACT_NEGOTIATION_CALLBACK_ADDR = "https://w3id.org/edc/v0.0.1/ns/callbackAddresses"; - public static final String CONTRACT_NEGOTIATION_ID = "@id"; - - public JsonObjectToNegotiationResponseTransformer() { - super(JsonObject.class, NegotiationResponse.class); - } - - @Override - public @Nullable NegotiationResponse transform(@NotNull final JsonObject jsonObject, - @NotNull final TransformerContext transformerContext) { - final NegotiationResponse.NegotiationResponseBuilder builder = NegotiationResponse.builder(); - jsonObject.forEach((key, value) -> { - switch (key) { - case CONTRACT_NEGOTIATION_ID -> builder.responseId(this.transformString(value, transformerContext)); - case CONTRACT_NEGOTIATION_NEG_TYPE -> builder.type(this.transformString(value, transformerContext)); - case CONTRACT_NEGOTIATION_PROTOCOL -> builder.protocol(this.transformString(value, transformerContext)); - - case CONTRACT_NEGOTIATION_STATE -> builder.state(this.transformString(value, transformerContext)); - - case CONTRACT_NEGOTIATION_COUNTERPARTY_ADDR -> - builder.counterPartyAddress(this.transformString(value, transformerContext)); - - case CONTRACT_NEGOTIATION_AGREEMENT_ID -> - builder.contractAgreementId(this.transformString(value, transformerContext)); - case CONTRACT_NEGOTIATION_CALLBACK_ADDR -> - builder.callbackAddresses(this.transformArray(value, String.class, transformerContext)); - case CONTRACT_NEGOTIATION_ERRORDETAIL -> - builder.errorDetail(this.transformString(value, transformerContext)); - default -> { - // Do nothing in case no key matches - } - } - }); - return builder.build(); - } -} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/jsontransformer/JsonObjectToNegotiationStateTransformer.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/jsontransformer/JsonObjectToNegotiationStateTransformer.java deleted file mode 100644 index cbbc2b8162..0000000000 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/jsontransformer/JsonObjectToNegotiationStateTransformer.java +++ /dev/null @@ -1,53 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2021,2022,2023 - * 2022: ZF Friedrichshafen AG - * 2022: ISTOS GmbH - * 2022,2023: Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - * 2022,2023: BOSCH AG - * Copyright (c) 2021,2022,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.infrastructure.edc.blackbox.jsontransformer; - -import jakarta.json.JsonObject; -import org.eclipse.edc.jsonld.spi.transformer.AbstractJsonLdTransformer; -import org.eclipse.edc.transform.spi.TransformerContext; -import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.negotiation.NegotiationState; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -/** - * Transformer to convert JSON-LD to NegotiationState. - */ -public class JsonObjectToNegotiationStateTransformer extends AbstractJsonLdTransformer { - public static final String CONTRACT_NEGOTIATION_STATE = "https://w3id.org/edc/v0.0.1/ns/state"; - - protected JsonObjectToNegotiationStateTransformer() { - super(JsonObject.class, NegotiationState.class); - } - - @Override - public @Nullable NegotiationState transform(@NotNull final JsonObject jsonObject, - @NotNull final TransformerContext transformerContext) { - final NegotiationState.NegotiationStateBuilder builder = NegotiationState.builder(); - jsonObject.forEach((key, value) -> { - if (CONTRACT_NEGOTIATION_STATE.equals(key)) { - builder.state(this.transformString(value, transformerContext)); - } - }); - return builder.build(); - } -} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/negotiation/ContractOfferDescription.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/negotiation/ContractOfferDescription.java deleted file mode 100644 index b25d3e7f04..0000000000 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/negotiation/ContractOfferDescription.java +++ /dev/null @@ -1,48 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2021,2022,2023 - * 2022: ZF Friedrichshafen AG - * 2022: ISTOS GmbH - * 2022,2023: Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - * 2022,2023: BOSCH AG - * Copyright (c) 2021,2022,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.infrastructure.edc.blackbox.negotiation; - -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.NotNull; -import jakarta.validation.constraints.Positive; -import lombok.Builder; -import lombok.Value; -import lombok.extern.jackson.Jacksonized; -import org.eclipse.edc.policy.model.Policy; - -/** - * EDC Contract Offer Description. - */ -@Value -@Builder(toBuilder = true) -@Jacksonized -public class ContractOfferDescription { - public static final String CONTRACT_OFFER_TYPE = "https://w3id.org/edc/v0.0.1/ns/ContractOfferDescription"; - public static final String CONTRACT_OFFER_OFFER_ID = "https://w3id.org/edc/v0.0.1/ns/offerId"; - public static final String CONTRACT_OFFER_ASSET_ID = "https://w3id.org/edc/v0.0.1/ns/assetId"; - public static final String CONTRACT_OFFER_POLICY = "https://w3id.org/edc/v0.0.1/ns/policy"; - @NotBlank(message = "offerId is mandatory") String offerId; - @NotBlank(message = "assetId is mandatory") String assetId; - @NotNull(message = "policy cannot be null") Policy policy; - @Positive(message = "validity must be positive") long validity; -} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/negotiation/NegotiationRequest.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/negotiation/NegotiationRequest.java deleted file mode 100644 index c761498129..0000000000 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/negotiation/NegotiationRequest.java +++ /dev/null @@ -1,65 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2021,2022,2023 - * 2022: ZF Friedrichshafen AG - * 2022: ISTOS GmbH - * 2022,2023: Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - * 2022,2023: BOSCH AG - * Copyright (c) 2021,2022,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.infrastructure.edc.blackbox.negotiation; - -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.NotNull; -import lombok.Builder; -import lombok.Value; -import lombok.extern.jackson.Jacksonized; -import org.eclipse.edc.spi.types.domain.callback.CallbackAddress; - -import java.util.ArrayList; -import java.util.List; - -/** - * EDC negotiation request. - */ -@Value -@Builder(toBuilder = true) -@Jacksonized -public class NegotiationRequest { - public static final String NEGOTIATION_CONNECTOR_ADDRESS = "https://w3id.org/edc/v0.0.1/ns/connectorAddress"; - public static final String NEGOTIATION_PROTOCOL = "https://w3id.org/edc/v0.0.1/ns/protocol"; - public static final String NEGOTIATION_CONNECTOR_ID = "https://w3id.org/edc/v0.0.1/ns/connectorId"; - public static final String NEGOTIATION_PROVIDER_ID = "https://w3id.org/edc/v0.0.1/ns/providerId"; - public static final String NEGOTIATION_CONSUMER_ID = "https://w3id.org/edc/v0.0.1/ns/consumerId"; - public static final String NEGOTIATION_OFFER = "https://w3id.org/edc/v0.0.1/ns/offer"; - public static final String NEGOTIATION_CALLBACK_ADDRESSES = "https://w3id.org/edc/v0.0.1/ns/callbackAddresses"; - public static final String NEGOTIATION_OFFER_ID = "https://w3id.org/edc/v0.0.1/ns/offerId"; - public static final String NEGOTIATION_ASSET_ID = "https://w3id.org/edc/v0.0.1/ns/assetId"; - public static final String NEGOTIATION_POLICY = "https://w3id.org/edc/v0.0.1/ns/policy"; - - @NotBlank(message = "connectorAddress is mandatory") - String connectorAddress; - @NotBlank(message = "protocol is mandatory") - String protocol; - @NotBlank(message = "connectorId is mandatory") - String connectorId; - @NotNull(message = "offer cannot be null") - ContractOfferDescription offer; - String providerId; - String consumerId; - List callbackAddresses = new ArrayList<>(); -} - diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/negotiation/NegotiationResponse.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/negotiation/NegotiationResponse.java deleted file mode 100644 index b083c72904..0000000000 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/negotiation/NegotiationResponse.java +++ /dev/null @@ -1,52 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2021,2022,2023 - * 2022: ZF Friedrichshafen AG - * 2022: ISTOS GmbH - * 2022,2023: Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - * 2022,2023: BOSCH AG - * Copyright (c) 2021,2022,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.infrastructure.edc.blackbox.negotiation; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.Builder; -import lombok.ToString; -import lombok.Value; -import lombok.extern.jackson.Jacksonized; - -import java.util.List; - -/** - * EDC negotiation response. - */ -@ToString -@Value -@Builder(toBuilder = true) -@Jacksonized -public class NegotiationResponse { - - @JsonProperty("id") - String responseId; - String contractAgreementId; - String counterPartyAddress; - String errorDetail; - String protocol; - String state; - String type; - List callbackAddresses; - -} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/negotiation/NegotiationState.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/negotiation/NegotiationState.java deleted file mode 100644 index d26fcc9c47..0000000000 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/negotiation/NegotiationState.java +++ /dev/null @@ -1,37 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2021,2022,2023 - * 2022: ZF Friedrichshafen AG - * 2022: ISTOS GmbH - * 2022,2023: Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - * 2022,2023: BOSCH AG - * Copyright (c) 2021,2022,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.infrastructure.edc.blackbox.negotiation; - -import lombok.Builder; -import lombok.Value; -import lombok.extern.jackson.Jacksonized; - -/** - * EDC negotiation state response. - */ -@Value -@Builder(toBuilder = true) -@Jacksonized -public class NegotiationState { - String state; -} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/negotiation/Response.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/negotiation/Response.java deleted file mode 100644 index 695009a159..0000000000 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/negotiation/Response.java +++ /dev/null @@ -1,39 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2021,2022,2023 - * 2022: ZF Friedrichshafen AG - * 2022: ISTOS GmbH - * 2022,2023: Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - * 2022,2023: BOSCH AG - * Copyright (c) 2021,2022,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.infrastructure.edc.blackbox.negotiation; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.Builder; -import lombok.Value; -import lombok.extern.jackson.Jacksonized; - -/** - * Contains an EDC contract negotiation ID. - */ -@Value -@Builder(toBuilder = true) -@Jacksonized -public class Response { - @JsonProperty("@id") - String responseId; -} From 3a21da615d240995a5f1180e909643edcf478013 Mon Sep 17 00:00:00 2001 From: Maximilian Wesener Date: Mon, 18 Sep 2023 16:59:32 +0200 Subject: [PATCH 68/84] chore: TRACEFOSS-XXX refactored some edc logics --- .../config/ApplicationStartupConfig.java | 8 +++---- .../config}/EdcRestTemplateConfiguration.java | 4 ++-- .../common/config/ErrorHandlingConfig.java | 2 +- ...entCredentialsRestTemplateInterceptor.java | 2 +- .../properties/EdcProperties.java | 2 +- .../domain/service/DiscoveryServiceImpl.java | 2 +- .../FeignDiscoveryRepositoryImpl.java | 3 +-- .../edc/blackbox/InvestigationsEDCFacade.java | 2 +- .../EdcNotificationContractController.java | 8 +++---- .../CreateNotificationContractException.java | 2 +- .../CreateNotificationContractRequest.java | 2 +- .../CreateNotificationContractResponse.java | 2 +- .../contract}/model/NotificationMethod.java | 2 +- .../contract}/model/NotificationType.java | 2 +- .../EdcNotificationContractService.java | 22 ++++++++--------- .../asset/model/CreateEdcAssetException.java | 2 +- .../contract}/asset/model/EdcAsset.java | 2 +- .../asset/model/EdcAssetProperties.java | 2 +- .../contract}/asset/model/EdcContext.java | 2 +- .../model/EdcCreateDataAssetRequest.java | 2 +- .../contract}/asset/model/EdcDataAddress.java | 2 +- .../asset/model/EdcDataAddressProperties.java | 2 +- .../contract}/asset/model/OdrlContext.java | 2 +- .../service/EdcNotitifcationAssetService.java | 12 +++++----- .../CreateEdcContractDefinitionException.java | 2 +- .../contract}/contract/model/EDRAuthCode.java | 2 +- .../model/EdcContractDefinitionCriteria.java | 2 +- .../EdcCreateContractDefinitionRequest.java | 4 ++-- .../contract}/contract/model/EdcOperator.java | 2 +- .../service/EdcContractDefinitionService.java | 17 +++++++------ .../CreateEdcPolicyDefinitionException.java | 2 +- .../EdcCreatePolicyDefinitionRequest.java | 4 ++-- .../contract}/policy/model/EdcPolicy.java | 2 +- .../policy/model/EdcPolicyPermission.java | 2 +- .../model/EdcPolicyPermissionConstraint.java | 2 +- ...cPolicyPermissionConstraintExpression.java | 4 ++-- .../service/EdcPolicyDefinitionService.java | 24 +++++++++---------- .../config/ApplicationStartupConfigTest.java | 4 +--- .../config/ErrorHandlingConfigTest.java | 2 +- .../service/DiscoveryServiceImplTest.java | 2 +- .../FeignDiscoveryRepositoryImplTest.java | 4 +--- .../blackbox/InvestigationsEDCFacadeTest.java | 2 +- ...redentialsRestTemplateInterceptorTest.java | 1 + .../EdcNotificationContractServiceTest.java | 15 ++++++------ .../EdcContractDefinitionCriteriaTest.java | 2 +- 45 files changed, 95 insertions(+), 99 deletions(-) rename tx-backend/src/main/java/org/eclipse/tractusx/traceability/{infrastructure/edc/notificationcontract/configuration => common/config}/EdcRestTemplateConfiguration.java (96%) rename tx-backend/src/main/java/org/eclipse/tractusx/traceability/{infrastructure/edc/notificationcontract/configuration => common/config}/OAuthClientCredentialsRestTemplateInterceptor.java (97%) rename tx-backend/src/main/java/org/eclipse/tractusx/traceability/{infrastructure/edc => common}/properties/EdcProperties.java (96%) rename tx-backend/src/main/java/org/eclipse/tractusx/traceability/{infrastructure/edc/notificationcontract/controller => qualitynotification/application/contract}/EdcNotificationContractController.java (91%) rename tx-backend/src/main/java/org/eclipse/tractusx/traceability/{infrastructure/edc/notificationcontract/controller => qualitynotification/application/contract}/model/CreateNotificationContractException.java (92%) rename tx-backend/src/main/java/org/eclipse/tractusx/traceability/{infrastructure/edc/notificationcontract/controller => qualitynotification/application/contract}/model/CreateNotificationContractRequest.java (93%) rename tx-backend/src/main/java/org/eclipse/tractusx/traceability/{infrastructure/edc/notificationcontract/controller => qualitynotification/application/contract}/model/CreateNotificationContractResponse.java (93%) rename tx-backend/src/main/java/org/eclipse/tractusx/traceability/{infrastructure/edc/notificationcontract/controller => qualitynotification/application/contract}/model/NotificationMethod.java (92%) rename tx-backend/src/main/java/org/eclipse/tractusx/traceability/{infrastructure/edc/notificationcontract/controller => qualitynotification/application/contract}/model/NotificationType.java (92%) rename tx-backend/src/main/java/org/eclipse/tractusx/traceability/{infrastructure/edc/notificationcontract/service => qualitynotification/domain/contract}/EdcNotificationContractService.java (73%) rename tx-backend/src/main/java/org/eclipse/tractusx/traceability/{infrastructure/edc/notificationcontract/service => qualitynotification/domain/contract}/asset/model/CreateEdcAssetException.java (92%) rename tx-backend/src/main/java/org/eclipse/tractusx/traceability/{infrastructure/edc/notificationcontract/service => qualitynotification/domain/contract}/asset/model/EdcAsset.java (93%) rename tx-backend/src/main/java/org/eclipse/tractusx/traceability/{infrastructure/edc/notificationcontract/service => qualitynotification/domain/contract}/asset/model/EdcAssetProperties.java (93%) rename tx-backend/src/main/java/org/eclipse/tractusx/traceability/{infrastructure/edc/notificationcontract/service => qualitynotification/domain/contract}/asset/model/EdcContext.java (90%) rename tx-backend/src/main/java/org/eclipse/tractusx/traceability/{infrastructure/edc/notificationcontract/service => qualitynotification/domain/contract}/asset/model/EdcCreateDataAssetRequest.java (93%) rename tx-backend/src/main/java/org/eclipse/tractusx/traceability/{infrastructure/edc/notificationcontract/service => qualitynotification/domain/contract}/asset/model/EdcDataAddress.java (93%) rename tx-backend/src/main/java/org/eclipse/tractusx/traceability/{infrastructure/edc/notificationcontract/service => qualitynotification/domain/contract}/asset/model/EdcDataAddressProperties.java (94%) rename tx-backend/src/main/java/org/eclipse/tractusx/traceability/{infrastructure/edc/notificationcontract/service => qualitynotification/domain/contract}/asset/model/OdrlContext.java (90%) rename tx-backend/src/main/java/org/eclipse/tractusx/traceability/{infrastructure/edc/notificationcontract/service => qualitynotification/domain/contract}/asset/service/EdcNotitifcationAssetService.java (90%) rename tx-backend/src/main/java/org/eclipse/tractusx/traceability/{infrastructure/edc/notificationcontract/service => qualitynotification/domain/contract}/contract/model/CreateEdcContractDefinitionException.java (92%) rename tx-backend/src/main/java/org/eclipse/tractusx/traceability/{infrastructure/edc/notificationcontract/service => qualitynotification/domain/contract}/contract/model/EDRAuthCode.java (91%) rename tx-backend/src/main/java/org/eclipse/tractusx/traceability/{infrastructure/edc/notificationcontract/service => qualitynotification/domain/contract}/contract/model/EdcContractDefinitionCriteria.java (93%) rename tx-backend/src/main/java/org/eclipse/tractusx/traceability/{infrastructure/edc/notificationcontract/service => qualitynotification/domain/contract}/contract/model/EdcCreateContractDefinitionRequest.java (88%) rename tx-backend/src/main/java/org/eclipse/tractusx/traceability/{infrastructure/edc/notificationcontract/service => qualitynotification/domain/contract}/contract/model/EdcOperator.java (90%) rename tx-backend/src/main/java/org/eclipse/tractusx/traceability/{infrastructure/edc/notificationcontract/service => qualitynotification/domain/contract}/contract/service/EdcContractDefinitionService.java (81%) rename tx-backend/src/main/java/org/eclipse/tractusx/traceability/{infrastructure/edc/notificationcontract/service => qualitynotification/domain/contract}/policy/model/CreateEdcPolicyDefinitionException.java (92%) rename tx-backend/src/main/java/org/eclipse/tractusx/traceability/{infrastructure/edc/notificationcontract/service => qualitynotification/domain/contract}/policy/model/EdcCreatePolicyDefinitionRequest.java (86%) rename tx-backend/src/main/java/org/eclipse/tractusx/traceability/{infrastructure/edc/notificationcontract/service => qualitynotification/domain/contract}/policy/model/EdcPolicy.java (92%) rename tx-backend/src/main/java/org/eclipse/tractusx/traceability/{infrastructure/edc/notificationcontract/service => qualitynotification/domain/contract}/policy/model/EdcPolicyPermission.java (92%) rename tx-backend/src/main/java/org/eclipse/tractusx/traceability/{infrastructure/edc/notificationcontract/service => qualitynotification/domain/contract}/policy/model/EdcPolicyPermissionConstraint.java (92%) rename tx-backend/src/main/java/org/eclipse/tractusx/traceability/{infrastructure/edc/notificationcontract/service => qualitynotification/domain/contract}/policy/model/EdcPolicyPermissionConstraintExpression.java (86%) rename tx-backend/src/main/java/org/eclipse/tractusx/traceability/{infrastructure/edc/notificationcontract/service => qualitynotification/domain/contract}/policy/service/EdcPolicyDefinitionService.java (80%) rename tx-backend/src/test/java/org/eclipse/tractusx/traceability/{infrastructure/edc/notificationcontract/service => qualitynotification/domain/contract}/contract/model/EdcContractDefinitionCriteriaTest.java (95%) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ApplicationStartupConfig.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ApplicationStartupConfig.java index bd88b93622..c04012b1ce 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ApplicationStartupConfig.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ApplicationStartupConfig.java @@ -29,10 +29,10 @@ import java.util.List; import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors;import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.controller.model.CreateNotificationContractRequest; -import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.controller.model.NotificationMethod; -import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.controller.model.NotificationType; -import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.EdcNotificationContractService; +import java.util.concurrent.Executors;import org.eclipse.tractusx.traceability.qualitynotification.application.contract.model.CreateNotificationContractRequest; +import org.eclipse.tractusx.traceability.qualitynotification.application.contract.model.NotificationMethod; +import org.eclipse.tractusx.traceability.qualitynotification.application.contract.model.NotificationType; +import org.eclipse.tractusx.traceability.qualitynotification.domain.contract.EdcNotificationContractService; import static org.eclipse.tractusx.traceability.common.config.ApplicationProfiles.NOT_INTEGRATION_TESTS; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/configuration/EdcRestTemplateConfiguration.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/EdcRestTemplateConfiguration.java similarity index 96% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/configuration/EdcRestTemplateConfiguration.java rename to tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/EdcRestTemplateConfiguration.java index f698ed91e2..33d9ee2e53 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/configuration/EdcRestTemplateConfiguration.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/EdcRestTemplateConfiguration.java @@ -18,11 +18,11 @@ * * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.configuration; +package org.eclipse.tractusx.traceability.common.config; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.eclipse.tractusx.traceability.infrastructure.edc.properties.EdcProperties; +import org.eclipse.tractusx.traceability.common.properties.EdcProperties; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.web.client.RestTemplateBuilder; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ErrorHandlingConfig.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ErrorHandlingConfig.java index ec91a3c1cb..aa07b6cb09 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ErrorHandlingConfig.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ErrorHandlingConfig.java @@ -34,7 +34,7 @@ import org.eclipse.tractusx.traceability.common.request.InvalidSortException; import org.eclipse.tractusx.traceability.common.response.ErrorResponse; import org.eclipse.tractusx.traceability.common.security.TechnicalUserAuthorizationException; -import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.controller.model.CreateNotificationContractException; +import org.eclipse.tractusx.traceability.qualitynotification.application.contract.model.CreateNotificationContractException; import org.eclipse.tractusx.traceability.qualitynotification.application.validation.UpdateQualityNotificationValidationException; import org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.AlertNotFoundException; import org.eclipse.tractusx.traceability.qualitynotification.domain.investigation.model.exception.InvestigationIllegalUpdate; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/configuration/OAuthClientCredentialsRestTemplateInterceptor.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/OAuthClientCredentialsRestTemplateInterceptor.java similarity index 97% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/configuration/OAuthClientCredentialsRestTemplateInterceptor.java rename to tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/OAuthClientCredentialsRestTemplateInterceptor.java index a3846c8248..7d0603d8c6 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/configuration/OAuthClientCredentialsRestTemplateInterceptor.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/OAuthClientCredentialsRestTemplateInterceptor.java @@ -17,7 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.configuration; +package org.eclipse.tractusx.traceability.common.config; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/properties/EdcProperties.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/properties/EdcProperties.java similarity index 96% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/properties/EdcProperties.java rename to tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/properties/EdcProperties.java index feec852618..e722c9248d 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/properties/EdcProperties.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/properties/EdcProperties.java @@ -18,7 +18,7 @@ * * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.infrastructure.edc.properties; +package org.eclipse.tractusx.traceability.common.properties; import jakarta.validation.constraints.NotBlank; import lombok.AllArgsConstructor; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/discovery/domain/service/DiscoveryServiceImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/discovery/domain/service/DiscoveryServiceImpl.java index f5eb1b127b..b4c9a73d54 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/discovery/domain/service/DiscoveryServiceImpl.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/discovery/domain/service/DiscoveryServiceImpl.java @@ -24,7 +24,7 @@ import org.eclipse.tractusx.traceability.bpn.mapping.domain.ports.BpnEdcMappingRepository; import org.eclipse.tractusx.traceability.discovery.domain.model.Discovery; import org.eclipse.tractusx.traceability.discovery.domain.repository.DiscoveryRepository; -import org.eclipse.tractusx.traceability.infrastructure.edc.properties.EdcProperties; +import org.eclipse.tractusx.traceability.common.properties.EdcProperties; import org.jetbrains.annotations.NotNull; import org.springframework.stereotype.Component; 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 5877bd137f..4cb72726e2 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 @@ -26,13 +26,12 @@ import org.eclipse.tractusx.irs.registryclient.discovery.EdcDiscoveryResult; import org.eclipse.tractusx.traceability.discovery.domain.model.Discovery; import org.eclipse.tractusx.traceability.discovery.domain.repository.DiscoveryRepository; -import org.eclipse.tractusx.traceability.infrastructure.edc.properties.EdcProperties; +import org.eclipse.tractusx.traceability.common.properties.EdcProperties; import org.springframework.stereotype.Component; import java.util.ArrayList; import java.util.Collections; import java.util.List; -import java.util.Objects; import java.util.Optional; import static org.eclipse.tractusx.traceability.discovery.domain.model.Discovery.toDiscovery; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/InvestigationsEDCFacade.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/InvestigationsEDCFacade.java index 4aee5dee9e..30f3fee196 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/InvestigationsEDCFacade.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/InvestigationsEDCFacade.java @@ -40,7 +40,7 @@ import org.eclipse.tractusx.irs.edc.client.policy.PolicyCheckerService; import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.model.EDCNotification; import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.model.EDCNotificationFactory; -import org.eclipse.tractusx.traceability.infrastructure.edc.properties.EdcProperties; +import org.eclipse.tractusx.traceability.common.properties.EdcProperties; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationMessage; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationType; import org.springframework.stereotype.Component; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/controller/EdcNotificationContractController.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/contract/EdcNotificationContractController.java similarity index 91% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/controller/EdcNotificationContractController.java rename to tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/contract/EdcNotificationContractController.java index 0d25acbe79..5fc28c806f 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/controller/EdcNotificationContractController.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/contract/EdcNotificationContractController.java @@ -18,7 +18,7 @@ * * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.controller; +package org.eclipse.tractusx.traceability.qualitynotification.application.contract; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.media.Content; @@ -29,9 +29,9 @@ import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.validation.Valid; import org.eclipse.tractusx.traceability.common.response.ErrorResponse; -import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.controller.model.CreateNotificationContractRequest; -import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.controller.model.CreateNotificationContractResponse; -import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.EdcNotificationContractService; +import org.eclipse.tractusx.traceability.qualitynotification.application.contract.model.CreateNotificationContractRequest; +import org.eclipse.tractusx.traceability.qualitynotification.application.contract.model.CreateNotificationContractResponse; +import org.eclipse.tractusx.traceability.qualitynotification.domain.contract.EdcNotificationContractService; import org.springframework.http.HttpStatus; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/controller/model/CreateNotificationContractException.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/contract/model/CreateNotificationContractException.java similarity index 92% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/controller/model/CreateNotificationContractException.java rename to tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/contract/model/CreateNotificationContractException.java index e1a550798e..487c2c4ec7 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/controller/model/CreateNotificationContractException.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/contract/model/CreateNotificationContractException.java @@ -18,7 +18,7 @@ * * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.controller.model; +package org.eclipse.tractusx.traceability.qualitynotification.application.contract.model; public class CreateNotificationContractException extends RuntimeException { diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/controller/model/CreateNotificationContractRequest.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/contract/model/CreateNotificationContractRequest.java similarity index 93% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/controller/model/CreateNotificationContractRequest.java rename to tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/contract/model/CreateNotificationContractRequest.java index 681b94db79..d46b42c842 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/controller/model/CreateNotificationContractRequest.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/contract/model/CreateNotificationContractRequest.java @@ -18,7 +18,7 @@ * * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.controller.model; +package org.eclipse.tractusx.traceability.qualitynotification.application.contract.model; import jakarta.validation.constraints.NotNull; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/controller/model/CreateNotificationContractResponse.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/contract/model/CreateNotificationContractResponse.java similarity index 93% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/controller/model/CreateNotificationContractResponse.java rename to tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/contract/model/CreateNotificationContractResponse.java index ac8362239d..05d3698030 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/controller/model/CreateNotificationContractResponse.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/contract/model/CreateNotificationContractResponse.java @@ -18,7 +18,7 @@ * * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.controller.model; +package org.eclipse.tractusx.traceability.qualitynotification.application.contract.model; import io.swagger.annotations.ApiModelProperty; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/controller/model/NotificationMethod.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/contract/model/NotificationMethod.java similarity index 92% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/controller/model/NotificationMethod.java rename to tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/contract/model/NotificationMethod.java index 4a714db3bf..b55ce45a48 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/controller/model/NotificationMethod.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/contract/model/NotificationMethod.java @@ -18,7 +18,7 @@ * * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.controller.model; +package org.eclipse.tractusx.traceability.qualitynotification.application.contract.model; public enum NotificationMethod { RECEIVE("receive"), diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/controller/model/NotificationType.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/contract/model/NotificationType.java similarity index 92% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/controller/model/NotificationType.java rename to tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/contract/model/NotificationType.java index e8c6c5efe0..0767fda7c4 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/controller/model/NotificationType.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/contract/model/NotificationType.java @@ -18,7 +18,7 @@ * * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.controller.model; +package org.eclipse.tractusx.traceability.qualitynotification.application.contract.model; public enum NotificationType { QUALITY_INVESTIGATION("qualityinvestigation"), diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/EdcNotificationContractService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/EdcNotificationContractService.java similarity index 73% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/EdcNotificationContractService.java rename to tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/EdcNotificationContractService.java index d16a8d0f66..4dcc2d5785 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/EdcNotificationContractService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/EdcNotificationContractService.java @@ -18,21 +18,21 @@ * * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service; +package org.eclipse.tractusx.traceability.qualitynotification.domain.contract; import com.fasterxml.jackson.core.JsonProcessingException; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.controller.model.CreateNotificationContractException; -import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.controller.model.CreateNotificationContractRequest; -import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.controller.model.CreateNotificationContractResponse; -import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.controller.model.NotificationMethod; -import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.asset.model.CreateEdcAssetException; -import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.asset.service.EdcNotitifcationAssetService; -import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.contract.model.CreateEdcContractDefinitionException; -import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.contract.service.EdcContractDefinitionService; -import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.policy.model.CreateEdcPolicyDefinitionException; -import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.policy.service.EdcPolicyDefinitionService; +import org.eclipse.tractusx.traceability.qualitynotification.application.contract.model.CreateNotificationContractException; +import org.eclipse.tractusx.traceability.qualitynotification.application.contract.model.CreateNotificationContractRequest; +import org.eclipse.tractusx.traceability.qualitynotification.application.contract.model.CreateNotificationContractResponse; +import org.eclipse.tractusx.traceability.qualitynotification.application.contract.model.NotificationMethod; +import org.eclipse.tractusx.traceability.qualitynotification.domain.contract.asset.model.CreateEdcAssetException; +import org.eclipse.tractusx.traceability.qualitynotification.domain.contract.asset.service.EdcNotitifcationAssetService; +import org.eclipse.tractusx.traceability.qualitynotification.domain.contract.contract.model.CreateEdcContractDefinitionException; +import org.eclipse.tractusx.traceability.qualitynotification.domain.contract.contract.service.EdcContractDefinitionService; +import org.eclipse.tractusx.traceability.qualitynotification.domain.contract.policy.model.CreateEdcPolicyDefinitionException; +import org.eclipse.tractusx.traceability.qualitynotification.domain.contract.policy.service.EdcPolicyDefinitionService; import org.springframework.stereotype.Component; @Slf4j diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/asset/model/CreateEdcAssetException.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/asset/model/CreateEdcAssetException.java similarity index 92% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/asset/model/CreateEdcAssetException.java rename to tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/asset/model/CreateEdcAssetException.java index c6a0862a15..2c5798f597 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/asset/model/CreateEdcAssetException.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/asset/model/CreateEdcAssetException.java @@ -18,7 +18,7 @@ * * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.asset.model; +package org.eclipse.tractusx.traceability.qualitynotification.domain.contract.asset.model; public class CreateEdcAssetException extends RuntimeException { diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/asset/model/EdcAsset.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/asset/model/EdcAsset.java similarity index 93% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/asset/model/EdcAsset.java rename to tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/asset/model/EdcAsset.java index e2c67ba8cf..c16baffc04 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/asset/model/EdcAsset.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/asset/model/EdcAsset.java @@ -18,7 +18,7 @@ * * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.asset.model; +package org.eclipse.tractusx.traceability.qualitynotification.domain.contract.asset.model; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Builder; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/asset/model/EdcAssetProperties.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/asset/model/EdcAssetProperties.java similarity index 93% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/asset/model/EdcAssetProperties.java rename to tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/asset/model/EdcAssetProperties.java index 8f1220a8f5..ab30fb5f7c 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/asset/model/EdcAssetProperties.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/asset/model/EdcAssetProperties.java @@ -18,7 +18,7 @@ * * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.asset.model; +package org.eclipse.tractusx.traceability.qualitynotification.domain.contract.asset.model; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/asset/model/EdcContext.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/asset/model/EdcContext.java similarity index 90% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/asset/model/EdcContext.java rename to tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/asset/model/EdcContext.java index c1ad6c88b5..7aeb830c25 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/asset/model/EdcContext.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/asset/model/EdcContext.java @@ -17,7 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.asset.model; +package org.eclipse.tractusx.traceability.qualitynotification.domain.contract.asset.model; public record EdcContext(String edc) { } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/asset/model/EdcCreateDataAssetRequest.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/asset/model/EdcCreateDataAssetRequest.java similarity index 93% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/asset/model/EdcCreateDataAssetRequest.java rename to tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/asset/model/EdcCreateDataAssetRequest.java index 20ae0dff9e..9f6b8278df 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/asset/model/EdcCreateDataAssetRequest.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/asset/model/EdcCreateDataAssetRequest.java @@ -18,7 +18,7 @@ * * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.asset.model; +package org.eclipse.tractusx.traceability.qualitynotification.domain.contract.asset.model; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Builder; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/asset/model/EdcDataAddress.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/asset/model/EdcDataAddress.java similarity index 93% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/asset/model/EdcDataAddress.java rename to tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/asset/model/EdcDataAddress.java index 24ec80189e..ac0778f091 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/asset/model/EdcDataAddress.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/asset/model/EdcDataAddress.java @@ -18,7 +18,7 @@ * * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.asset.model; +package org.eclipse.tractusx.traceability.qualitynotification.domain.contract.asset.model; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Builder; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/asset/model/EdcDataAddressProperties.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/asset/model/EdcDataAddressProperties.java similarity index 94% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/asset/model/EdcDataAddressProperties.java rename to tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/asset/model/EdcDataAddressProperties.java index ced5aea1af..2b99a12119 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/asset/model/EdcDataAddressProperties.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/asset/model/EdcDataAddressProperties.java @@ -18,7 +18,7 @@ * * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.asset.model; +package org.eclipse.tractusx.traceability.qualitynotification.domain.contract.asset.model; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/asset/model/OdrlContext.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/asset/model/OdrlContext.java similarity index 90% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/asset/model/OdrlContext.java rename to tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/asset/model/OdrlContext.java index de04c63cd2..1cfc97e3c9 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/asset/model/OdrlContext.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/asset/model/OdrlContext.java @@ -17,7 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.asset.model; +package org.eclipse.tractusx.traceability.qualitynotification.domain.contract.asset.model; public record OdrlContext(String odrl) { } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/asset/service/EdcNotitifcationAssetService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/asset/service/EdcNotitifcationAssetService.java similarity index 90% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/asset/service/EdcNotitifcationAssetService.java rename to tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/asset/service/EdcNotitifcationAssetService.java index c3c8c1653a..67ffc1a02b 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/asset/service/EdcNotitifcationAssetService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/asset/service/EdcNotitifcationAssetService.java @@ -18,15 +18,15 @@ * * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.asset.service; +package org.eclipse.tractusx.traceability.qualitynotification.domain.contract.asset.service; import com.fasterxml.jackson.core.JsonProcessingException; import lombok.extern.slf4j.Slf4j; import org.eclipse.tractusx.traceability.common.properties.TraceabilityProperties; -import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.controller.model.NotificationMethod; -import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.controller.model.NotificationType; -import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.asset.model.*; -import org.eclipse.tractusx.traceability.infrastructure.edc.properties.EdcProperties; +import org.eclipse.tractusx.traceability.qualitynotification.application.contract.model.NotificationMethod; +import org.eclipse.tractusx.traceability.qualitynotification.application.contract.model.NotificationType; +import org.eclipse.tractusx.traceability.qualitynotification.domain.contract.asset.model.*; +import org.eclipse.tractusx.traceability.common.properties.EdcProperties; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.http.HttpStatusCode; @@ -39,7 +39,7 @@ import java.util.UUID; import static org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.configuration.JsonLdConfigurationTraceX.NAMESPACE_EDC; -import static org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.configuration.EdcRestTemplateConfiguration.EDC_REST_TEMPLATE; +import static org.eclipse.tractusx.traceability.common.config.EdcRestTemplateConfiguration.EDC_REST_TEMPLATE; @Slf4j @Component diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/contract/model/CreateEdcContractDefinitionException.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/contract/model/CreateEdcContractDefinitionException.java similarity index 92% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/contract/model/CreateEdcContractDefinitionException.java rename to tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/contract/model/CreateEdcContractDefinitionException.java index 06173b3402..771df34654 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/contract/model/CreateEdcContractDefinitionException.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/contract/model/CreateEdcContractDefinitionException.java @@ -18,7 +18,7 @@ * * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.contract.model; +package org.eclipse.tractusx.traceability.qualitynotification.domain.contract.contract.model; public class CreateEdcContractDefinitionException extends RuntimeException { diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/contract/model/EDRAuthCode.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/contract/model/EDRAuthCode.java similarity index 91% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/contract/model/EDRAuthCode.java rename to tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/contract/model/EDRAuthCode.java index 2e56044f44..66f838a356 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/contract/model/EDRAuthCode.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/contract/model/EDRAuthCode.java @@ -17,7 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.contract.model; +package org.eclipse.tractusx.traceability.qualitynotification.domain.contract.contract.model; import lombok.Builder; import lombok.Data; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/contract/model/EdcContractDefinitionCriteria.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/contract/model/EdcContractDefinitionCriteria.java similarity index 93% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/contract/model/EdcContractDefinitionCriteria.java rename to tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/contract/model/EdcContractDefinitionCriteria.java index ef939d8d22..89d99a23da 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/contract/model/EdcContractDefinitionCriteria.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/contract/model/EdcContractDefinitionCriteria.java @@ -18,7 +18,7 @@ * * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.contract.model; +package org.eclipse.tractusx.traceability.qualitynotification.domain.contract.contract.model; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Builder; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/contract/model/EdcCreateContractDefinitionRequest.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/contract/model/EdcCreateContractDefinitionRequest.java similarity index 88% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/contract/model/EdcCreateContractDefinitionRequest.java rename to tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/contract/model/EdcCreateContractDefinitionRequest.java index 98309556a8..2a79625590 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/contract/model/EdcCreateContractDefinitionRequest.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/contract/model/EdcCreateContractDefinitionRequest.java @@ -18,12 +18,12 @@ * * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.contract.model; +package org.eclipse.tractusx.traceability.qualitynotification.domain.contract.contract.model; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Builder; import lombok.ToString; -import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.asset.model.EdcContext; +import org.eclipse.tractusx.traceability.qualitynotification.domain.contract.asset.model.EdcContext; @ToString @Builder diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/contract/model/EdcOperator.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/contract/model/EdcOperator.java similarity index 90% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/contract/model/EdcOperator.java rename to tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/contract/model/EdcOperator.java index 785be05248..29de177e9c 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/contract/model/EdcOperator.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/contract/model/EdcOperator.java @@ -17,7 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.contract.model; +package org.eclipse.tractusx.traceability.qualitynotification.domain.contract.contract.model; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/contract/service/EdcContractDefinitionService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/contract/service/EdcContractDefinitionService.java similarity index 81% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/contract/service/EdcContractDefinitionService.java rename to tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/contract/service/EdcContractDefinitionService.java index b905f5ad2e..50cca9e788 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/contract/service/EdcContractDefinitionService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/contract/service/EdcContractDefinitionService.java @@ -18,18 +18,17 @@ * * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.contract.service; +package org.eclipse.tractusx.traceability.qualitynotification.domain.contract.contract.service; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import lombok.extern.slf4j.Slf4j; -import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.asset.model.CreateEdcAssetException; -import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.asset.model.EdcContext; -import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.contract.model.CreateEdcContractDefinitionException; -import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.contract.model.EdcContractDefinitionCriteria; -import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.contract.model.EdcCreateContractDefinitionRequest; -import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.contract.model.EdcOperator; -import org.eclipse.tractusx.traceability.infrastructure.edc.properties.EdcProperties; +import org.eclipse.tractusx.traceability.qualitynotification.domain.contract.asset.model.CreateEdcAssetException; +import org.eclipse.tractusx.traceability.qualitynotification.domain.contract.asset.model.EdcContext; +import org.eclipse.tractusx.traceability.qualitynotification.domain.contract.contract.model.CreateEdcContractDefinitionException; +import org.eclipse.tractusx.traceability.qualitynotification.domain.contract.contract.model.EdcContractDefinitionCriteria; +import org.eclipse.tractusx.traceability.qualitynotification.domain.contract.contract.model.EdcCreateContractDefinitionRequest; +import org.eclipse.tractusx.traceability.common.properties.EdcProperties; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.http.HttpStatusCode; @@ -39,7 +38,7 @@ import org.springframework.web.client.RestTemplate; import static org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.configuration.JsonLdConfigurationTraceX.NAMESPACE_EDC; -import static org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.configuration.EdcRestTemplateConfiguration.EDC_REST_TEMPLATE; +import static org.eclipse.tractusx.traceability.common.config.EdcRestTemplateConfiguration.EDC_REST_TEMPLATE; @Slf4j @Component diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/policy/model/CreateEdcPolicyDefinitionException.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/policy/model/CreateEdcPolicyDefinitionException.java similarity index 92% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/policy/model/CreateEdcPolicyDefinitionException.java rename to tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/policy/model/CreateEdcPolicyDefinitionException.java index 0438e9507a..30b16c995a 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/policy/model/CreateEdcPolicyDefinitionException.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/policy/model/CreateEdcPolicyDefinitionException.java @@ -18,7 +18,7 @@ * * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.policy.model; +package org.eclipse.tractusx.traceability.qualitynotification.domain.contract.policy.model; public class CreateEdcPolicyDefinitionException extends RuntimeException { diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/policy/model/EdcCreatePolicyDefinitionRequest.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/policy/model/EdcCreatePolicyDefinitionRequest.java similarity index 86% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/policy/model/EdcCreatePolicyDefinitionRequest.java rename to tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/policy/model/EdcCreatePolicyDefinitionRequest.java index a94bfc8ff7..3fcb51a2a9 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/policy/model/EdcCreatePolicyDefinitionRequest.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/policy/model/EdcCreatePolicyDefinitionRequest.java @@ -18,12 +18,12 @@ * * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.policy.model; +package org.eclipse.tractusx.traceability.qualitynotification.domain.contract.policy.model; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Builder; import lombok.ToString; -import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.asset.model.OdrlContext; +import org.eclipse.tractusx.traceability.qualitynotification.domain.contract.asset.model.OdrlContext; @ToString @Builder diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/policy/model/EdcPolicy.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/policy/model/EdcPolicy.java similarity index 92% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/policy/model/EdcPolicy.java rename to tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/policy/model/EdcPolicy.java index a62c4b61bf..44c19248e7 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/policy/model/EdcPolicy.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/policy/model/EdcPolicy.java @@ -18,7 +18,7 @@ * * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.policy.model; +package org.eclipse.tractusx.traceability.qualitynotification.domain.contract.policy.model; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Builder; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/policy/model/EdcPolicyPermission.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/policy/model/EdcPolicyPermission.java similarity index 92% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/policy/model/EdcPolicyPermission.java rename to tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/policy/model/EdcPolicyPermission.java index 8cbd7fb0b9..d25bfdefa1 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/policy/model/EdcPolicyPermission.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/policy/model/EdcPolicyPermission.java @@ -18,7 +18,7 @@ * * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.policy.model; +package org.eclipse.tractusx.traceability.qualitynotification.domain.contract.policy.model; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Builder; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/policy/model/EdcPolicyPermissionConstraint.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/policy/model/EdcPolicyPermissionConstraint.java similarity index 92% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/policy/model/EdcPolicyPermissionConstraint.java rename to tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/policy/model/EdcPolicyPermissionConstraint.java index ec23696807..9a810d2360 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/policy/model/EdcPolicyPermissionConstraint.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/policy/model/EdcPolicyPermissionConstraint.java @@ -17,7 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.policy.model; +package org.eclipse.tractusx.traceability.qualitynotification.domain.contract.policy.model; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Builder; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/policy/model/EdcPolicyPermissionConstraintExpression.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/policy/model/EdcPolicyPermissionConstraintExpression.java similarity index 86% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/policy/model/EdcPolicyPermissionConstraintExpression.java rename to tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/policy/model/EdcPolicyPermissionConstraintExpression.java index d6ae9b25a9..bb89441b33 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/policy/model/EdcPolicyPermissionConstraintExpression.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/policy/model/EdcPolicyPermissionConstraintExpression.java @@ -17,13 +17,13 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.policy.model; +package org.eclipse.tractusx.traceability.qualitynotification.domain.contract.policy.model; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Builder; import lombok.Getter; import lombok.ToString; -import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.contract.model.EdcOperator; +import org.eclipse.tractusx.traceability.qualitynotification.domain.contract.contract.model.EdcOperator; @ToString @Getter diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/policy/service/EdcPolicyDefinitionService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/policy/service/EdcPolicyDefinitionService.java similarity index 80% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/policy/service/EdcPolicyDefinitionService.java rename to tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/policy/service/EdcPolicyDefinitionService.java index f2bbb67b61..e2e162ca35 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/policy/service/EdcPolicyDefinitionService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/policy/service/EdcPolicyDefinitionService.java @@ -18,21 +18,21 @@ * * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.policy.service; +package org.eclipse.tractusx.traceability.qualitynotification.domain.contract.policy.service; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import lombok.extern.slf4j.Slf4j; -import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.asset.model.CreateEdcAssetException; -import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.asset.model.OdrlContext; -import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.contract.model.EdcOperator; -import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.policy.model.CreateEdcPolicyDefinitionException; -import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.policy.model.EdcCreatePolicyDefinitionRequest; -import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.policy.model.EdcPolicy; -import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.policy.model.EdcPolicyPermission; -import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.policy.model.EdcPolicyPermissionConstraint; -import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.policy.model.EdcPolicyPermissionConstraintExpression; -import org.eclipse.tractusx.traceability.infrastructure.edc.properties.EdcProperties; +import org.eclipse.tractusx.traceability.qualitynotification.domain.contract.asset.model.CreateEdcAssetException; +import org.eclipse.tractusx.traceability.qualitynotification.domain.contract.asset.model.OdrlContext; +import org.eclipse.tractusx.traceability.qualitynotification.domain.contract.contract.model.EdcOperator; +import org.eclipse.tractusx.traceability.qualitynotification.domain.contract.policy.model.CreateEdcPolicyDefinitionException; +import org.eclipse.tractusx.traceability.qualitynotification.domain.contract.policy.model.EdcCreatePolicyDefinitionRequest; +import org.eclipse.tractusx.traceability.qualitynotification.domain.contract.policy.model.EdcPolicy; +import org.eclipse.tractusx.traceability.qualitynotification.domain.contract.policy.model.EdcPolicyPermission; +import org.eclipse.tractusx.traceability.qualitynotification.domain.contract.policy.model.EdcPolicyPermissionConstraint; +import org.eclipse.tractusx.traceability.qualitynotification.domain.contract.policy.model.EdcPolicyPermissionConstraintExpression; +import org.eclipse.tractusx.traceability.common.properties.EdcProperties; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.http.HttpStatusCode; @@ -46,7 +46,7 @@ import java.util.UUID; import static org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.configuration.JsonLdConfigurationTraceX.NAMESPACE_ODRL; -import static org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.configuration.EdcRestTemplateConfiguration.EDC_REST_TEMPLATE; +import static org.eclipse.tractusx.traceability.common.config.EdcRestTemplateConfiguration.EDC_REST_TEMPLATE; @Slf4j @Component diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/common/config/ApplicationStartupConfigTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/common/config/ApplicationStartupConfigTest.java index 3f07466e45..7e7a1d3f4e 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/common/config/ApplicationStartupConfigTest.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/common/config/ApplicationStartupConfigTest.java @@ -20,8 +20,7 @@ package org.eclipse.tractusx.traceability.common.config; import org.eclipse.tractusx.traceability.assets.domain.base.IrsRepository; -import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.EdcNotificationContractService; -import org.junit.jupiter.api.BeforeEach; +import org.eclipse.tractusx.traceability.qualitynotification.domain.contract.EdcNotificationContractService; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; @@ -31,7 +30,6 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; -import static io.restassured.RestAssured.when; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.doThrow; import static org.mockito.Mockito.times; diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/common/config/ErrorHandlingConfigTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/common/config/ErrorHandlingConfigTest.java index 8089042311..16c5a64300 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/common/config/ErrorHandlingConfigTest.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/common/config/ErrorHandlingConfigTest.java @@ -29,7 +29,7 @@ import org.eclipse.tractusx.traceability.bpn.mapping.domain.model.BpnEdcMappingNotFoundException; import org.eclipse.tractusx.traceability.common.response.ErrorResponse; import org.eclipse.tractusx.traceability.common.security.TechnicalUserAuthorizationException; -import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.controller.model.CreateNotificationContractException; +import org.eclipse.tractusx.traceability.qualitynotification.application.contract.model.CreateNotificationContractException; import org.eclipse.tractusx.traceability.qualitynotification.application.validation.UpdateQualityNotificationValidationException; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationId; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationStatus; diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/discovery/domain/service/DiscoveryServiceImplTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/discovery/domain/service/DiscoveryServiceImplTest.java index f5e89d65f5..589bb2f186 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/discovery/domain/service/DiscoveryServiceImplTest.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/discovery/domain/service/DiscoveryServiceImplTest.java @@ -22,7 +22,7 @@ import org.eclipse.tractusx.traceability.bpn.mapping.domain.ports.BpnEdcMappingRepository; import org.eclipse.tractusx.traceability.discovery.domain.model.Discovery; import org.eclipse.tractusx.traceability.discovery.domain.repository.DiscoveryRepository; -import org.eclipse.tractusx.traceability.infrastructure.edc.properties.EdcProperties; +import org.eclipse.tractusx.traceability.common.properties.EdcProperties; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/discovery/infrastructure/repository/FeignDiscoveryRepositoryImplTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/discovery/infrastructure/repository/FeignDiscoveryRepositoryImplTest.java index 2397904570..0f9fec57c4 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/discovery/infrastructure/repository/FeignDiscoveryRepositoryImplTest.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/discovery/infrastructure/repository/FeignDiscoveryRepositoryImplTest.java @@ -23,8 +23,7 @@ import org.eclipse.tractusx.irs.registryclient.discovery.DiscoveryResponse; import org.eclipse.tractusx.irs.registryclient.discovery.EdcDiscoveryResult; import org.eclipse.tractusx.traceability.discovery.domain.model.Discovery; -import org.eclipse.tractusx.traceability.discovery.infrastructure.model.ConnectorDiscoveryMappingResponse; -import org.eclipse.tractusx.traceability.infrastructure.edc.properties.EdcProperties; +import org.eclipse.tractusx.traceability.common.properties.EdcProperties; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -32,7 +31,6 @@ import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; -import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.Optional; diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/InvestigationsEDCFacadeTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/InvestigationsEDCFacadeTest.java index 32f465c01a..c4f641c5b4 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/InvestigationsEDCFacadeTest.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/InvestigationsEDCFacadeTest.java @@ -27,7 +27,7 @@ import org.eclipse.tractusx.irs.edc.client.model.CatalogItem; import org.eclipse.tractusx.irs.edc.client.model.NegotiationResponse; import org.eclipse.tractusx.irs.edc.client.policy.PolicyCheckerService; -import org.eclipse.tractusx.traceability.infrastructure.edc.properties.EdcProperties; +import org.eclipse.tractusx.traceability.common.properties.EdcProperties; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationMessage; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationStatus; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationType; diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/configuration/OAuthClientCredentialsRestTemplateInterceptorTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/configuration/OAuthClientCredentialsRestTemplateInterceptorTest.java index 7831c4ec01..38ed134307 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/configuration/OAuthClientCredentialsRestTemplateInterceptorTest.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/configuration/OAuthClientCredentialsRestTemplateInterceptorTest.java @@ -18,6 +18,7 @@ ********************************************************************************/ package org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.configuration; +import org.eclipse.tractusx.traceability.common.config.OAuthClientCredentialsRestTemplateInterceptor; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/EdcNotificationContractServiceTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/EdcNotificationContractServiceTest.java index 239591e506..9757121f83 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/EdcNotificationContractServiceTest.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/EdcNotificationContractServiceTest.java @@ -22,13 +22,14 @@ package org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service; import com.fasterxml.jackson.core.JsonProcessingException; -import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.controller.model.CreateNotificationContractRequest; -import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.controller.model.CreateNotificationContractResponse; -import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.controller.model.NotificationMethod; -import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.controller.model.NotificationType; -import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.asset.service.EdcNotitifcationAssetService; -import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.contract.service.EdcContractDefinitionService; -import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.policy.service.EdcPolicyDefinitionService; +import org.eclipse.tractusx.traceability.qualitynotification.application.contract.model.CreateNotificationContractRequest; +import org.eclipse.tractusx.traceability.qualitynotification.application.contract.model.CreateNotificationContractResponse; +import org.eclipse.tractusx.traceability.qualitynotification.application.contract.model.NotificationMethod; +import org.eclipse.tractusx.traceability.qualitynotification.application.contract.model.NotificationType; +import org.eclipse.tractusx.traceability.qualitynotification.domain.contract.EdcNotificationContractService; +import org.eclipse.tractusx.traceability.qualitynotification.domain.contract.asset.service.EdcNotitifcationAssetService; +import org.eclipse.tractusx.traceability.qualitynotification.domain.contract.contract.service.EdcContractDefinitionService; +import org.eclipse.tractusx.traceability.qualitynotification.domain.contract.policy.service.EdcPolicyDefinitionService; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/contract/model/EdcContractDefinitionCriteriaTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/contract/model/EdcContractDefinitionCriteriaTest.java similarity index 95% rename from tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/contract/model/EdcContractDefinitionCriteriaTest.java rename to tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/contract/model/EdcContractDefinitionCriteriaTest.java index 86c2c3e5a6..fa7ea0a9b6 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/contract/model/EdcContractDefinitionCriteriaTest.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/contract/model/EdcContractDefinitionCriteriaTest.java @@ -19,7 +19,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.contract.model; +package org.eclipse.tractusx.traceability.qualitynotification.domain.contract.contract.model; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; From 860ba72aafe1d3112b672cf39f73bb65ee0effa5 Mon Sep 17 00:00:00 2001 From: Maximilian Wesener Date: Mon, 18 Sep 2023 17:01:21 +0200 Subject: [PATCH 69/84] chore: TRACEFOSS-XXX refactored some edc logics --- .../config}/JsonLdConfigurationTraceX.java | 2 +- .../infrastructure/edc/blackbox/InvestigationsEDCFacade.java | 2 +- .../contract/asset/service/EdcNotitifcationAssetService.java | 2 +- .../contract/contract/service/EdcContractDefinitionService.java | 2 +- .../contract/policy/service/EdcPolicyDefinitionService.java | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) rename tx-backend/src/main/java/org/eclipse/tractusx/traceability/{infrastructure/edc/blackbox/configuration => common/config}/JsonLdConfigurationTraceX.java (97%) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/configuration/JsonLdConfigurationTraceX.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/JsonLdConfigurationTraceX.java similarity index 97% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/configuration/JsonLdConfigurationTraceX.java rename to tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/JsonLdConfigurationTraceX.java index 02a7bb53f5..84dbfcda62 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/configuration/JsonLdConfigurationTraceX.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/JsonLdConfigurationTraceX.java @@ -20,7 +20,7 @@ * * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.configuration; +package org.eclipse.tractusx.traceability.common.config; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/InvestigationsEDCFacade.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/InvestigationsEDCFacade.java index 30f3fee196..5d1ad1473f 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/InvestigationsEDCFacade.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/InvestigationsEDCFacade.java @@ -48,7 +48,7 @@ import java.util.List; import java.util.Optional; -import static org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.configuration.JsonLdConfigurationTraceX.NAMESPACE_EDC; +import static org.eclipse.tractusx.traceability.common.config.JsonLdConfigurationTraceX.NAMESPACE_EDC; import static org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.transferprocess.TransferProcessRequest.DEFAULT_PROTOCOL; @Slf4j diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/asset/service/EdcNotitifcationAssetService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/asset/service/EdcNotitifcationAssetService.java index 67ffc1a02b..1f5d83f19d 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/asset/service/EdcNotitifcationAssetService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/asset/service/EdcNotitifcationAssetService.java @@ -38,7 +38,7 @@ import java.util.UUID; -import static org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.configuration.JsonLdConfigurationTraceX.NAMESPACE_EDC; +import static org.eclipse.tractusx.traceability.common.config.JsonLdConfigurationTraceX.NAMESPACE_EDC; import static org.eclipse.tractusx.traceability.common.config.EdcRestTemplateConfiguration.EDC_REST_TEMPLATE; @Slf4j diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/contract/service/EdcContractDefinitionService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/contract/service/EdcContractDefinitionService.java index 50cca9e788..9e6d715401 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/contract/service/EdcContractDefinitionService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/contract/service/EdcContractDefinitionService.java @@ -37,7 +37,7 @@ import org.springframework.web.client.RestClientException; import org.springframework.web.client.RestTemplate; -import static org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.configuration.JsonLdConfigurationTraceX.NAMESPACE_EDC; +import static org.eclipse.tractusx.traceability.common.config.JsonLdConfigurationTraceX.NAMESPACE_EDC; import static org.eclipse.tractusx.traceability.common.config.EdcRestTemplateConfiguration.EDC_REST_TEMPLATE; @Slf4j diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/policy/service/EdcPolicyDefinitionService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/policy/service/EdcPolicyDefinitionService.java index e2e162ca35..f73c068f29 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/policy/service/EdcPolicyDefinitionService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/policy/service/EdcPolicyDefinitionService.java @@ -45,7 +45,7 @@ import java.util.List; import java.util.UUID; -import static org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.configuration.JsonLdConfigurationTraceX.NAMESPACE_ODRL; +import static org.eclipse.tractusx.traceability.common.config.JsonLdConfigurationTraceX.NAMESPACE_ODRL; import static org.eclipse.tractusx.traceability.common.config.EdcRestTemplateConfiguration.EDC_REST_TEMPLATE; @Slf4j From 5e7750a7cd8ef6554be1238ffda49173e92ddcfb Mon Sep 17 00:00:00 2001 From: Maximilian Wesener Date: Tue, 19 Sep 2023 07:03:09 +0200 Subject: [PATCH 70/84] chore: TRACEFOSS-XXX reformat / rearrage code --- .../common/config/ApplicationStartupConfig.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ApplicationStartupConfig.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ApplicationStartupConfig.java index c04012b1ce..ec58218dc0 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ApplicationStartupConfig.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ApplicationStartupConfig.java @@ -22,6 +22,10 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.eclipse.tractusx.traceability.assets.domain.base.IrsRepository; +import org.eclipse.tractusx.traceability.qualitynotification.application.contract.model.CreateNotificationContractRequest; +import org.eclipse.tractusx.traceability.qualitynotification.application.contract.model.NotificationMethod; +import org.eclipse.tractusx.traceability.qualitynotification.application.contract.model.NotificationType; +import org.eclipse.tractusx.traceability.qualitynotification.domain.contract.EdcNotificationContractService; import org.springframework.boot.context.event.ApplicationReadyEvent; import org.springframework.context.annotation.Profile; import org.springframework.context.event.EventListener; @@ -29,10 +33,7 @@ import java.util.List; import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors;import org.eclipse.tractusx.traceability.qualitynotification.application.contract.model.CreateNotificationContractRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.contract.model.NotificationMethod; -import org.eclipse.tractusx.traceability.qualitynotification.application.contract.model.NotificationType; -import org.eclipse.tractusx.traceability.qualitynotification.domain.contract.EdcNotificationContractService; +import java.util.concurrent.Executors; import static org.eclipse.tractusx.traceability.common.config.ApplicationProfiles.NOT_INTEGRATION_TESTS; @@ -65,6 +66,7 @@ public void registerIrsPolicy() { executor.shutdown(); } + @EventListener(ApplicationReadyEvent.class) public void createNotificationContracts() { ExecutorService executor = Executors.newSingleThreadExecutor(); From f6f0e1b4ad832fb1d89d59232e056ae148ea6ed3 Mon Sep 17 00:00:00 2001 From: Maximilian Wesener Date: Tue, 19 Sep 2023 07:26:53 +0200 Subject: [PATCH 71/84] chore: TRACEFOSS-XXX remove flyway bpn mappings --- .../resources/db/migration/V34__cleanup-bpn-mappings.sql | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 tx-backend/src/main/resources/db/migration/V34__cleanup-bpn-mappings.sql diff --git a/tx-backend/src/main/resources/db/migration/V34__cleanup-bpn-mappings.sql b/tx-backend/src/main/resources/db/migration/V34__cleanup-bpn-mappings.sql new file mode 100644 index 0000000000..a7b3825ef8 --- /dev/null +++ b/tx-backend/src/main/resources/db/migration/V34__cleanup-bpn-mappings.sql @@ -0,0 +1,5 @@ +DELETE FROM public.bpn_edc_mappings +WHERE bpn = 'BPNL00000003CML1'; + +DELETE FROM public.bpn_edc_mappings +WHERE bpn = 'BPNL00000003CNKC'; From bf2103105b1758646288af170e519c1b016663fa Mon Sep 17 00:00:00 2001 From: Maximilian Wesener Date: Tue, 19 Sep 2023 07:50:37 +0200 Subject: [PATCH 72/84] chore: TRACEFOSS-XXX remove policy classes related to edc. --- .../base/mapper/AssetBaseResponseMapper.java | 1 - .../repository/jpa/bpn/BpnEntity.java | 2 +- .../edc/blackbox/InvestigationsEDCFacade.java | 3 +- .../edc/blackbox/policy/Action.java | 85 ------- .../edc/blackbox/policy/Duty.java | 122 ---------- .../edc/blackbox/policy/Identifiable.java | 37 --- .../edc/blackbox/policy/Permission.java | 91 ------- .../edc/blackbox/policy/Policy.java | 222 ------------------ .../edc/blackbox/policy/PolicyType.java | 59 ----- .../edc/blackbox/policy/Prohibition.java | 60 ----- .../edc/blackbox/policy/Rule.java | 107 --------- .../TransferProcessDataDestination.java | 40 ---- .../TransferProcessRequest.java | 67 ------ .../edc/blackbox/policy/ActionTest.java | 46 ---- .../edc/blackbox/policy/DutyTest.java | 105 --------- .../edc/blackbox/policy/IdentifiableTest.java | 47 ---- .../edc/blackbox/policy/PermissionTest.java | 84 ------- .../edc/blackbox/policy/PolicyTest.java | 39 --- .../edc/blackbox/policy/PolicyTypeTest.java | 83 ------- .../edc/blackbox/policy/ProhibitionTest.java | 45 ---- 20 files changed, 3 insertions(+), 1342 deletions(-) delete mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/Action.java delete mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/Duty.java delete mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/Identifiable.java delete mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/Permission.java delete mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/Policy.java delete mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/PolicyType.java delete mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/Prohibition.java delete mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/Rule.java delete mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/transferprocess/TransferProcessDataDestination.java delete mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/transferprocess/TransferProcessRequest.java delete mode 100644 tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/ActionTest.java delete mode 100644 tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/DutyTest.java delete mode 100644 tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/IdentifiableTest.java delete mode 100644 tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/PermissionTest.java delete mode 100644 tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/PolicyTest.java delete mode 100644 tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/PolicyTypeTest.java delete mode 100644 tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/ProhibitionTest.java 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 de2ef9480e..09245bf4fc 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 @@ -49,7 +49,6 @@ import static org.apache.commons.collections4.ListUtils.emptyIfNull; -// TODO missing in concept: @AllArgsConstructor @Slf4j @Data diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/repository/jpa/bpn/BpnEntity.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/repository/jpa/bpn/BpnEntity.java index 924a070c40..1ccf2181d7 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/repository/jpa/bpn/BpnEntity.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/repository/jpa/bpn/BpnEntity.java @@ -24,7 +24,7 @@ import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.Table; - +// TODO merge this entity into the bpn edc mapping @Entity @Table(name = "bpn_storage") public class BpnEntity { diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/InvestigationsEDCFacade.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/InvestigationsEDCFacade.java index 5d1ad1473f..b52b480f88 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/InvestigationsEDCFacade.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/InvestigationsEDCFacade.java @@ -49,13 +49,14 @@ import java.util.Optional; import static org.eclipse.tractusx.traceability.common.config.JsonLdConfigurationTraceX.NAMESPACE_EDC; -import static org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.transferprocess.TransferProcessRequest.DEFAULT_PROTOCOL; @Slf4j @Component @RequiredArgsConstructor public class InvestigationsEDCFacade { + public static final String DEFAULT_PROTOCOL = "dataspace-protocol-http"; + private static final MediaType JSON = MediaType.get("application/json"); private final HttpCallService httpCallService; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/Action.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/Action.java deleted file mode 100644 index 23c2db7741..0000000000 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/Action.java +++ /dev/null @@ -1,85 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2022, 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - * Copyright (c) 2022, 2023 ZF Friedrichshafen AG - * Copyright (c) 2022, 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.infrastructure.edc.blackbox.policy; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; - -import java.util.Objects; - -@JsonDeserialize(builder = Action.Builder.class) -public class Action { - String type; - String includedIn; - Constraint constraint; - - private Action() { - } - - public String getIncludedIn() { - return includedIn; - } - - public Constraint getConstraint() { - return constraint; - } - - public String getType() { - return type; - } - - @JsonPOJOBuilder(withPrefix = "") - public static class Builder { - private final Action action; - - private Builder() { - action = new Action(); - } - - @JsonCreator - public static Builder newInstance() { - return new Builder(); - } - - public Builder type(String type) { - action.type = type; - return this; - } - - public Builder includedIn(String includedIn) { - action.includedIn = includedIn; - return this; - } - - public Builder constraint(Constraint constraint) { - action.constraint = constraint; - return this; - } - - public Action build() { - Objects.requireNonNull(action.type, "type"); - return action; - } - } - -} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/Duty.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/Duty.java deleted file mode 100644 index 2a9361e2c2..0000000000 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/Duty.java +++ /dev/null @@ -1,122 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2022, 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - * Copyright (c) 2022, 2023 ZF Friedrichshafen AG - * Copyright (c) 2022, 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.infrastructure.edc.blackbox.policy; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import org.jetbrains.annotations.Nullable; - -import static java.util.stream.Collectors.joining; - -/** - * An obligation that must be performed if all its constraints are satisfied. - * TODO: Do we need to support deserializing the parent permission setting? - */ -@JsonDeserialize(builder = Duty.Builder.class) -@JsonTypeName("dataspaceconnector:duty") -public class Duty extends Rule { - - private Permission parentPermission; - - @Nullable - private Duty consequence; - - public Duty getConsequence() { - return consequence; - } - - /** - * If this duty is part of a permission, returns the parent permission; otherwise returns null. - */ - @Nullable - public Permission getParentPermission() { - return parentPermission; - } - - void setParentPermission(Permission permission) { - parentPermission = permission; - } - - @Override - public R accept(Visitor visitor) { - return visitor.visitDuty(this); - } - - @Override - public String toString() { - return "Duty constraint: [" + getConstraints().stream().map(Object::toString).collect(joining(",")) + "]"; - } - - /** - * Returns a copy of this duty with the specified target. - * - * @param target the target. - * @return a copy with the specified target. - */ - public Duty withTarget(String target) { - return Builder.newInstance() - .uid(this.uid) - .assigner(this.assigner) - .assignee(this.assignee) - .action(this.action) - .constraints(this.constraints) - .parentPermission(this.parentPermission) - .consequence(this.consequence == null ? null : this.consequence.withTarget(target)) - .target(target) - .build(); - } - - @JsonPOJOBuilder(withPrefix = "") - public static class Builder extends Rule.Builder { - - private Builder() { - rule = new Duty(); - } - - @JsonCreator - public static Builder newInstance() { - return new Builder(); - } - - public Builder uid(String uid) { - rule.uid = uid; - return this; - } - - public Builder parentPermission(Permission parentPermission) { - rule.parentPermission = parentPermission; - return this; - } - - public Builder consequence(Duty consequence) { - rule.consequence = consequence; - return this; - } - - public Duty build() { - return rule; - } - } - -} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/Identifiable.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/Identifiable.java deleted file mode 100644 index 63f3d3239d..0000000000 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/Identifiable.java +++ /dev/null @@ -1,37 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2022, 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - * Copyright (c) 2022, 2023 ZF Friedrichshafen AG - * Copyright (c) 2022, 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.infrastructure.edc.blackbox.policy; - -/** - * A uniquely identifiable type. - */ -public abstract class Identifiable { - protected String uid; - - /** - * Returns the id. - */ - public String getUid() { - return uid; - } -} - diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/Permission.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/Permission.java deleted file mode 100644 index 814f25af06..0000000000 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/Permission.java +++ /dev/null @@ -1,91 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2022, 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - * Copyright (c) 2022, 2023 ZF Friedrichshafen AG - * Copyright (c) 2022, 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.infrastructure.edc.blackbox.policy; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; - -import java.util.ArrayList; -import java.util.List; - -import static java.util.stream.Collectors.joining; - -/** - * Allows an action if its constraints are satisfied. - */ -@JsonDeserialize(builder = Permission.Builder.class) -@JsonTypeName("dataspaceconnector:permission") -public class Permission extends Rule { - private final List duties = new ArrayList<>(); - - public List getDuties() { - return duties; - } - - @Override - public R accept(Visitor visitor) { - return visitor.visitPermission(this); - } - - @Override - public String toString() { - return "Permission constraints: [" + getConstraints().stream().map(Object::toString).collect(joining(",")) + "]"; - } - - @JsonPOJOBuilder(withPrefix = "") - public static class Builder extends Rule.Builder { - - private Builder() { - rule = new Permission(); - } - - @JsonCreator - public static Builder newInstance() { - return new Builder(); - } - - public Builder duty(Duty duty) { - duty.setParentPermission(rule); - rule.duties.add(duty); - return this; - } - - public Builder uid(String uid) { - rule.uid = uid; - return this; - } - - public Builder duties(List duties) { - for (var duty : duties) { - duty.setParentPermission(rule); - } - rule.duties.addAll(duties); - return this; - } - - public Permission build() { - return rule; - } - } -} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/Policy.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/Policy.java deleted file mode 100644 index 4522163423..0000000000 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/Policy.java +++ /dev/null @@ -1,222 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2022, 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - * Copyright (c) 2022, 2023 ZF Friedrichshafen AG - * Copyright (c) 2022, 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.infrastructure.edc.blackbox.policy; - -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import lombok.Getter; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** - * A collection of permissions, prohibitions, and obligations. Subtypes are defined by - * {@link PolicyType}. - * This is a value object. In order to have it identifiable and individually addressable, consider the use of PolicyDefinition. - */ -@JsonDeserialize(builder = Policy.Builder.class) -@Getter -public class Policy { - - private final List permissions = new ArrayList<>(); - private final List prohibitions = new ArrayList<>(); - private final List obligations = new ArrayList<>(); - private final Map extensibleProperties = new HashMap<>(); - private String inheritsFrom; - private String assigner; - private String assignee; - private String target; - @JsonProperty("@type") - private PolicyType type = PolicyType.SET; - - @JsonIgnore - public boolean hasTracePolicy() { - if (permissions.isEmpty()) { - return false; - } - - List atomicConstraints = permissions.stream() - .map(Rule::getConstraints) - .flatMap(Collection::stream) - .filter(AtomicConstraint.class::isInstance) - .map(AtomicConstraint.class::cast) - .toList(); - - if (atomicConstraints.isEmpty()) { - return false; - } - - return atomicConstraints.stream().anyMatch(this::hasTraceConstraints); - } - - @JsonIgnore - public boolean hasTraceConstraints(AtomicConstraint atomicConstraint) { - if (atomicConstraint == null) { - return false; - } - - Expression leftExpression = atomicConstraint.getLeftExpression(); - Expression rightExpression = atomicConstraint.getRightExpression(); - - if (leftExpression == null || rightExpression == null) { - return false; - } - - if (!(leftExpression instanceof LiteralExpression) || !(rightExpression instanceof LiteralExpression)) { - return false; - } - - LiteralExpression leftLiteralExpression = (LiteralExpression) atomicConstraint.getLeftExpression(); - LiteralExpression rightLiteralExpression = (LiteralExpression) atomicConstraint.getRightExpression(); - - return matchesValue(leftLiteralExpression, "PURPOSE") && matchesValue(rightLiteralExpression, "ID 3.0 Trace"); - } - - @JsonIgnore - private static boolean matchesValue(LiteralExpression literalExpression, String anObject) { - if (literalExpression.getValue() instanceof String literalExpressionValue) { - return literalExpressionValue.equals(anObject); - } - return false; - } - - public R accept(Visitor visitor) { - return visitor.visitPolicy(this); - } - - @Override - public int hashCode() { - return Objects.hash(permissions, prohibitions, obligations, extensibleProperties, inheritsFrom, assigner, assignee, target, type); - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Policy policy = (Policy) o; - return permissions.equals(policy.permissions) && prohibitions.equals(policy.prohibitions) && obligations.equals(policy.obligations) && extensibleProperties.equals(policy.extensibleProperties) && - Objects.equals(inheritsFrom, policy.inheritsFrom) && Objects.equals(assigner, policy.assigner) && Objects.equals(assignee, policy.assignee) && Objects.equals(target, policy.target) && type == policy.type; - } - - public interface Visitor { - R visitPolicy(Policy policy); - } - - @JsonPOJOBuilder(withPrefix = "") - public static class Builder { - private final Policy policy; - - private Builder() { - policy = new Policy(); - } - - public static Builder newInstance() { - return new Builder(); - } - - public Builder prohibition(Prohibition prohibition) { - policy.prohibitions.add(prohibition); - return this; - } - - public Builder prohibitions(List prohibitions) { - policy.prohibitions.addAll(prohibitions); - return this; - } - - public Builder permission(Permission permission) { - policy.permissions.add(permission); - return this; - } - - public Builder permissions(List permissions) { - policy.permissions.addAll(permissions); - return this; - } - - public Builder duty(Duty duty) { - policy.obligations.add(duty); - return this; - } - - @JsonProperty("obligations") - public Builder duties(List duties) { - policy.obligations.addAll(duties); - return this; - } - - public Builder duty(String inheritsFrom) { - policy.inheritsFrom = inheritsFrom; - return this; - } - - public Builder assigner(String assigner) { - policy.assigner = assigner; - return this; - } - - public Builder assignee(String assignee) { - policy.assignee = assignee; - return this; - } - - public Builder target(String target) { - policy.target = target; - return this; - } - - public Builder inheritsFrom(String inheritsFrom) { - policy.inheritsFrom = inheritsFrom; - return this; - } - - @JsonProperty("@type") - public Builder type(PolicyType type) { - policy.type = type; - return this; - } - - public Builder extensibleProperty(String key, Object value) { - policy.extensibleProperties.put(key, value); - return this; - } - - public Builder extensibleProperties(Map properties) { - policy.extensibleProperties.putAll(properties); - return this; - } - - public Policy build() { - return policy; - } - } -} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/PolicyType.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/PolicyType.java deleted file mode 100644 index 8522ff83a3..0000000000 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/PolicyType.java +++ /dev/null @@ -1,59 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2022, 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - * Copyright (c) 2022, 2023 ZF Friedrichshafen AG - * Copyright (c) 2022, 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.infrastructure.edc.blackbox.policy; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonFormat; -import com.fasterxml.jackson.annotation.JsonProperty; - -import java.util.Map; - -/** - * The types of {@link Policy}. - */ -@JsonFormat(shape = JsonFormat.Shape.OBJECT) -public enum PolicyType { - SET("set"), OFFER("offer"), CONTRACT("contract"); - - @JsonProperty("@policytype") - private String type; - - PolicyType(@JsonProperty("@policytype") String type) { - this.type = type; - } - - @JsonCreator - public static PolicyType fromObject(Map object) { - if (SET.type.equals(object.get("@policytype"))) { - return SET; - } else if (OFFER.type.equals(object.get("@policytype"))) { - return OFFER; - } else if (CONTRACT.type.equals(object.get("@policytype"))) { - return CONTRACT; - } - throw new IllegalArgumentException("Invalid policy type"); - } - - public String getType() { - return type; - } -} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/Prohibition.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/Prohibition.java deleted file mode 100644 index ef2c06ec17..0000000000 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/Prohibition.java +++ /dev/null @@ -1,60 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2022, 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - * Copyright (c) 2022, 2023 ZF Friedrichshafen AG - * Copyright (c) 2022, 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.infrastructure.edc.blackbox.policy; - -import static java.util.stream.Collectors.joining; - -/** - * Disallows an action if its constraints are satisfied. - */ -public class Prohibition extends Rule { - - @Override - public R accept(Visitor visitor) { - return visitor.visitProhibition(this); - } - - @Override - public String toString() { - return "Prohibition constraints: [" + getConstraints().stream().map(Object::toString).collect(joining(",")) + "]"; - } - - public static class Builder extends Rule.Builder { - - private Builder() { - rule = new Prohibition(); - } - - public static Builder newInstance() { - return new Builder(); - } - - public Builder uid(String uid) { - rule.uid = uid; - return this; - } - - public Prohibition build() { - return rule; - } - } -} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/Rule.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/Rule.java deleted file mode 100644 index bca362eb94..0000000000 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/Rule.java +++ /dev/null @@ -1,107 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2022, 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - * Copyright (c) 2022, 2023 ZF Friedrichshafen AG - * Copyright (c) 2022, 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.infrastructure.edc.blackbox.policy; - -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -import java.util.ArrayList; -import java.util.List; - -/** - * A permission, prohibition, or duty contained in a {@link Policy}. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "edctype") -public abstract class Rule extends Identifiable { - - protected String target; - protected Action action; - protected String assignee; - protected String assigner; - protected List constraints = new ArrayList<>(); - - public String getTarget() { - return target; - } - - public Action getAction() { - return action; - } - - public List getConstraints() { - return constraints; - } - - public String getAssigner() { - return assigner; - } - - public String getAssignee() { - return assignee; - } - - public abstract R accept(Visitor visitor); - - public interface Visitor { - R visitPermission(Permission policy); - - R visitProhibition(Prohibition policy); - - R visitDuty(Duty policy); - } - - @SuppressWarnings("unchecked") - protected abstract static class Builder> { - protected T rule; - - public B target(String target) { - rule.target = target; - return (B) this; - } - - public B assigner(String assigner) { - rule.assigner = assigner; - return (B) this; - } - - public B assignee(String assignee) { - rule.assignee = assignee; - return (B) this; - } - - public B action(Action action) { - rule.action = action; - return (B) this; - } - - public B constraint(Constraint constraint) { - rule.constraints.add(constraint); - return (B) this; - } - - public B constraints(List constraints) { - rule.constraints.addAll(constraints); - return (B) this; - } - - } - -} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/transferprocess/TransferProcessDataDestination.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/transferprocess/TransferProcessDataDestination.java deleted file mode 100644 index d7b13965a1..0000000000 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/transferprocess/TransferProcessDataDestination.java +++ /dev/null @@ -1,40 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2021,2022,2023 - * 2022: ZF Friedrichshafen AG - * 2022: ISTOS GmbH - * 2022,2023: Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - * 2022,2023: BOSCH AG - * Copyright (c) 2021,2022,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.infrastructure.edc.blackbox.transferprocess; - -import lombok.Builder; -import lombok.Value; -import lombok.extern.jackson.Jacksonized; - -/** - * Contains the data destination type for a transfer process. - */ -@Value -@Builder(toBuilder = true) -@Jacksonized -public class TransferProcessDataDestination { - - public static final String DEFAULT_TYPE = "HttpProxy"; - String type; - -} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/transferprocess/TransferProcessRequest.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/transferprocess/TransferProcessRequest.java deleted file mode 100644 index d909a9a89a..0000000000 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/transferprocess/TransferProcessRequest.java +++ /dev/null @@ -1,67 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2021,2022,2023 - * 2022: ZF Friedrichshafen AG - * 2022: ISTOS GmbH - * 2022,2023: Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - * 2022,2023: BOSCH AG - * Copyright (c) 2021,2022,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.infrastructure.edc.blackbox.transferprocess; - -import lombok.Builder; -import lombok.Value; -import lombok.extern.jackson.Jacksonized; -import org.eclipse.edc.spi.types.domain.DataAddress; -import org.eclipse.edc.spi.types.domain.callback.CallbackAddress; - -import java.util.List; -import java.util.Map; - -/** - * EDC transfer process request. - */ -@Value -@Builder(toBuilder = true) -@Jacksonized -public class TransferProcessRequest { - - public static final String EDC_TRANSFER_REQUEST_DTO_ASSET_ID = "https://w3id.org/edc/v0.0.1/ns/assetId"; - public static final String EDC_TRANSFER_REQUEST_DTO_CONNECTOR_ADDRESS = "https://w3id.org/edc/v0.0.1/ns/connectorAddress"; - public static final String EDC_TRANSFER_REQUEST_DTO_CONNECTOR_ID = "https://w3id.org/edc/v0.0.1/ns/connectorId"; - public static final String EDC_TRANSFER_REQUEST_DTO_CONTRACT_ID = "https://w3id.org/edc/v0.0.1/ns/contractId"; - public static final String EDC_TRANSFER_REQUEST_DTO_DATA_DESTINATION = "https://w3id.org/edc/v0.0.1/ns/dataDestination"; - public static final String EDC_TRANSFER_REQUEST_DTO_PROTOCOL = "https://w3id.org/edc/v0.0.1/ns/protocol"; - public static final String EDC_TRANSFER_REQUEST_DTO_MANAGED_RESOURCES = "https://w3id.org/edc/v0.0.1/ns/managedResources"; - public static final String EDC_TRANSFER_REQUEST_DTO_CALLBACK_ADDRESSES = "https://w3id.org/edc/v0.0.1/ns/callbackAddresses"; - public static final String EDC_TRANSFER_REQUEST_DTO_PROPERTIES = "https://w3id.org/edc/v0.0.1/ns/properties"; - public static final String EDC_TRANSFER_REQUEST_DTO_PRIVATE_PROPERTIES = "https://w3id.org/edc/v0.0.1/ns/privateProperties"; - - public static final String DEFAULT_PROTOCOL = "dataspace-protocol-http"; - public static final boolean DEFAULT_MANAGED_RESOURCES = false; - - String assetId; - String connectorAddress; - String connectorId; - String contractId; - DataAddress dataDestination; - String protocol; - boolean managedResources; - List callbackAddresses; - Map properties; - Map privateProperties; - -} diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/ActionTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/ActionTest.java deleted file mode 100644 index 0996abc011..0000000000 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/ActionTest.java +++ /dev/null @@ -1,46 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2022, 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - * Copyright (c) 2022, 2023 ZF Friedrichshafen AG - * Copyright (c) 2022, 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.infrastructure.edc.blackbox.policy; - -import org.junit.jupiter.api.Test; - -import static org.assertj.core.api.Assertions.assertThat; - -class ActionTest { - - @Test - void givenAction_whenBuilder_thenConstructCorrectly() { - // given - final Constraint constraint = AndConstraint.Builder.newInstance().constraint; - final Action action = Action.Builder.newInstance() - .type("type") - .includedIn("in") - .constraint(constraint) - .build(); - - // then - assertThat(action.getType()).isEqualTo("type"); - assertThat(action.getIncludedIn()).isEqualTo("in"); - assertThat(action.getConstraint()).isEqualTo(constraint); - } - -} diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/DutyTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/DutyTest.java deleted file mode 100644 index 3489bb9ae3..0000000000 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/DutyTest.java +++ /dev/null @@ -1,105 +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.infrastructure.edc.blackbox.policy; - -import org.junit.jupiter.api.Test; - -import static org.assertj.core.api.Assertions.assertThat; - -class DutyTest { - - @Test - void givenDutyBuilder_whenBuildDuty_thenConstructProperObject() { - // given - final Permission permission = Permission.Builder - .newInstance().build(); - final Duty duty = Duty.Builder.newInstance().build(); - - // when - final Duty result = Duty.Builder.newInstance() - .parentPermission(permission) - .consequence(duty) - .build(); - - // then - assertThat(result.getParentPermission()).isEqualTo(permission); - assertThat(result.getConsequence()).isEqualTo(duty); - } - - @Test - void setParentPermission() { - // given - final Permission permission = Permission.Builder - .newInstance().build(); - final Duty duty = Duty.Builder.newInstance().build(); - - final Duty result = Duty.Builder.newInstance() - .parentPermission(permission) - .consequence(duty) - .build(); - - // when - result.setParentPermission(null); - - // then - assertThat(result.getParentPermission()).isNull(); - } - - @Test - void toStringMethod() { - // given - final Permission permission = Permission.Builder - .newInstance().build(); - final Duty duty = Duty.Builder.newInstance().build(); - - final Duty result = Duty.Builder.newInstance() - .parentPermission(permission) - .consequence(duty) - .build(); - - // when - final String string = result.toString(); - - // then - assertThat(string).isEqualTo("Duty constraint: []"); - } - - @Test - void withTarget() { - // given - final String target = "target"; - final Permission permission = Permission.Builder - .newInstance().build(); - final Duty duty = Duty.Builder.newInstance().build(); - - final Duty duty1 = Duty.Builder.newInstance() - .parentPermission(permission) - .consequence(duty) - .build(); - - // when - final Duty result = duty1.withTarget(target); - - // then - assertThat(result.getTarget()).isEqualTo(target); - assertThat(result.getConsequence().getTarget()).isEqualTo(target); - } - -} diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/IdentifiableTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/IdentifiableTest.java deleted file mode 100644 index 2e06871f38..0000000000 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/IdentifiableTest.java +++ /dev/null @@ -1,47 +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.infrastructure.edc.blackbox.policy; - -import org.junit.jupiter.api.Test; - -import static org.assertj.core.api.Assertions.assertThat; - -class IdentifiableTest { - - @Test - void givenClass_hasIdentifiableField() { - // given - final TestClass test = new TestClass(); - - // then - assertThat(test) - .hasFieldOrProperty("uid") - .extracting(TestClass::getUid) - .isEqualTo("uid_value"); - - } - - private static class TestClass extends Identifiable { - - TestClass() { - this.uid = "uid_value"; - } - } -} diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/PermissionTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/PermissionTest.java deleted file mode 100644 index 27bc4bc947..0000000000 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/PermissionTest.java +++ /dev/null @@ -1,84 +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.infrastructure.edc.blackbox.policy; - -import org.junit.jupiter.api.Test; - -import java.util.List; - -import static org.assertj.core.api.Assertions.assertThat; - -class PermissionTest { - - @Test - void builder() { - // given - final Duty duty1 = Duty.Builder.newInstance().build(); - - // when - final Permission result = Permission.Builder - .newInstance() - .duty(duty1) - .uid("uid") - .build(); - - // then - assertThat(result.getDuties()).hasSize(1); - } - - @Test - void builderDuty() { - // given - final Permission permission = Permission.Builder - .newInstance().build(); - final Duty duty1 = Duty.Builder.newInstance().build(); - - final Duty duty2 = Duty.Builder.newInstance() - .parentPermission(permission) - .consequence(duty1) - .build(); - - // when - final Permission result = Permission.Builder - .newInstance() - .duties(List.of(duty1, duty2)) - .uid("uid") - .build(); - - // then - assertThat(result.getDuties()).hasSize(2); - } - - @Test - void toStringMethod() { - // given - final Permission permission = Permission.Builder - .newInstance() - .uid("uid") - .build(); - - // when - final String result = permission.toString(); - - // then - assertThat(result).isEqualTo("Permission constraints: []"); - } - -} diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/PolicyTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/PolicyTest.java deleted file mode 100644 index 8b924e750b..0000000000 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/PolicyTest.java +++ /dev/null @@ -1,39 +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.infrastructure.edc.blackbox.policy; - -import org.junit.jupiter.api.Test; - -import static org.assertj.core.api.Assertions.assertThat; - -class PolicyTest { - - @Test - void givenPolicyWithNoPermissions_whenHasTracePolicy_thenReturnFalse() { - // given - final Policy policy = Policy.Builder.newInstance().build(); - - // when - final Boolean result = policy.hasTracePolicy(); - - //then - assertThat(result).isFalse(); - } -} diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/PolicyTypeTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/PolicyTypeTest.java deleted file mode 100644 index dd540259e7..0000000000 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/PolicyTypeTest.java +++ /dev/null @@ -1,83 +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.infrastructure.edc.blackbox.policy; - - -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 java.util.Map; -import java.util.stream.Stream; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.policy.PolicyType.CONTRACT; -import static org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.policy.PolicyType.OFFER; -import static org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.policy.PolicyType.SET; -import static org.junit.Assert.assertThrows; - -class PolicyTypeTest { - - @ParameterizedTest - @MethodSource("provideValues") - void getType(PolicyType input, String expectedOutput) { - // when - final String result = input.getType(); - - // then - assertThat(result).isEqualTo(expectedOutput); - } - - @ParameterizedTest - @MethodSource("provideObjects") - void fromObject(Map input, PolicyType expectedOutput) { - // when - final PolicyType result = PolicyType.fromObject(input); - - // then - assertThat(result).isEqualTo(expectedOutput); - } - - @Test - void givenWrongPolicyObject_whenFromObject_thenThrowIllegalArgumentException() { - // given - Map object =Map.of("@policytype", "unknown"); - - // when/then - assertThrows(IllegalArgumentException.class, () -> PolicyType.fromObject(object)); - } - - private static Stream provideValues() { - return Stream.of( - Arguments.of(SET, "set"), - Arguments.of(OFFER, "offer"), - Arguments.of(CONTRACT, "contract") - ); - } - - private static Stream provideObjects() { - return Stream.of( - Arguments.of(Map.of("@policytype", "set"),SET), - Arguments.of(Map.of("@policytype", "offer"),OFFER), - Arguments.of(Map.of("@policytype", "contract"),CONTRACT) - ); - } -} diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/ProhibitionTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/ProhibitionTest.java deleted file mode 100644 index 94923ade08..0000000000 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/ProhibitionTest.java +++ /dev/null @@ -1,45 +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.infrastructure.edc.blackbox.policy; - -import org.junit.jupiter.api.Test; - -import static org.assertj.core.api.Assertions.assertThat; - -class ProhibitionTest { - - @Test - void givenProhibition_whenToString_thenProperString() { - // given - final Prohibition prohibition = Prohibition.Builder.newInstance() - .constraint( - OrConstraint.Builder - .newInstance() - .build() - ) - .build(); - - // when - final String result = prohibition.toString(); - - // then - assertThat(result).isEqualTo("Prohibition constraints: [Or constraint: []]"); - } -} From e050d1c77fdd99e797930d17e87668b5a91e77fa Mon Sep 17 00:00:00 2001 From: Maximilian Wesener Date: Tue, 19 Sep 2023 08:04:11 +0200 Subject: [PATCH 73/84] chore: TRACEFOSS-XXX testing removing subtype from objectmapper --- .../infrastructure/edc/blackbox/HttpCallService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/HttpCallService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/HttpCallService.java index b281ca6032..26ff67227b 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/HttpCallService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/HttpCallService.java @@ -46,7 +46,7 @@ public class HttpCallService { public HttpCallService(OkHttpClient httpClient, ObjectMapper objectMapper) { this.httpClient = withIncreasedTimeout(httpClient); - objectMapper.registerSubtypes(AtomicConstraint.class, LiteralExpression.class); + // objectMapper.registerSubtypes(AtomicConstraint.class, LiteralExpression.class); } private static OkHttpClient withIncreasedTimeout(OkHttpClient httpClient) { From b4c39203ad5c6b8b33f97fd0a4eb83df4bd9e8d2 Mon Sep 17 00:00:00 2001 From: Maximilian Wesener Date: Tue, 19 Sep 2023 08:21:02 +0200 Subject: [PATCH 74/84] chore: TRACEFOSS-XXX testing removing subtype from objectmapper --- .../edc/blackbox/HttpCallService.java | 32 +------ .../edc/blackbox/InvestigationsEDCFacade.java | 4 +- .../edc/blackbox/policy/AndConstraint.java | 72 --------------- .../edc/blackbox/policy/AtomicConstraint.java | 92 ------------------- .../edc/blackbox/policy/Constraint.java | 47 ---------- .../edc/blackbox/policy/Expression.java | 40 -------- .../blackbox/policy/LiteralExpression.java | 72 --------------- .../policy/MultiplicityConstraint.java | 60 ------------ .../edc/blackbox/policy/Operator.java | 56 ----------- .../edc/blackbox/policy/OrConstraint.java | 75 --------------- .../edc/blackbox/policy/XoneConstraint.java | 77 ---------------- .../blackbox/InvestigationsEDCFacadeTest.java | 2 - .../blackbox/policy/AndConstraintTest.java | 56 ----------- .../edc/blackbox/policy/OrConstraintTest.java | 56 ----------- 14 files changed, 4 insertions(+), 737 deletions(-) delete mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/AndConstraint.java delete mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/AtomicConstraint.java delete mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/Constraint.java delete mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/Expression.java delete mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/LiteralExpression.java delete mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/MultiplicityConstraint.java delete mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/Operator.java delete mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/OrConstraint.java delete mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/XoneConstraint.java delete mode 100644 tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/AndConstraintTest.java delete mode 100644 tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/OrConstraintTest.java diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/HttpCallService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/HttpCallService.java index 26ff67227b..a8332e1b58 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/HttpCallService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/HttpCallService.java @@ -21,23 +21,17 @@ package org.eclipse.tractusx.traceability.infrastructure.edc.blackbox; import com.fasterxml.jackson.databind.ObjectMapper; -import jakarta.ws.rs.core.MultivaluedMap; import lombok.extern.slf4j.Slf4j; -import okhttp3.HttpUrl; import okhttp3.OkHttpClient; import okhttp3.Request; -import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.policy.AtomicConstraint; -import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.policy.LiteralExpression; import org.springframework.stereotype.Component; import java.io.IOException; -import java.util.List; -import java.util.Map; -import java.util.Objects; import java.util.concurrent.TimeUnit; import static java.lang.String.format; +// TODO - refactor this class to use feignClient with a common httpClient @Slf4j @Component public class HttpCallService { @@ -46,7 +40,6 @@ public class HttpCallService { public HttpCallService(OkHttpClient httpClient, ObjectMapper objectMapper) { this.httpClient = withIncreasedTimeout(httpClient); - // objectMapper.registerSubtypes(AtomicConstraint.class, LiteralExpression.class); } private static OkHttpClient withIncreasedTimeout(OkHttpClient httpClient) { @@ -68,27 +61,4 @@ public void sendRequest(Request request) throws IOException { throw e; } } - - - public HttpUrl getUrl(String connectorUrl, String subUrl, MultivaluedMap parameters) { - var url = connectorUrl; - - if (subUrl != null && !subUrl.isEmpty()) { - url = url + "/" + subUrl; - } - - HttpUrl.Builder httpBuilder = Objects.requireNonNull(HttpUrl.parse(url)).newBuilder(); - - if (parameters == null) { - return httpBuilder.build(); - } - - for (Map.Entry> param : parameters.entrySet()) { - for (String value : param.getValue()) { - httpBuilder = httpBuilder.addQueryParameter(param.getKey(), value); - } - } - - return httpBuilder.build(); - } } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/InvestigationsEDCFacade.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/InvestigationsEDCFacade.java index b52b480f88..ee2ff9b5b8 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/InvestigationsEDCFacade.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/InvestigationsEDCFacade.java @@ -46,6 +46,7 @@ import org.springframework.stereotype.Component; import java.util.List; +import java.util.Objects; import java.util.Optional; import static org.eclipse.tractusx.traceability.common.config.JsonLdConfigurationTraceX.NAMESPACE_EDC; @@ -141,7 +142,8 @@ private Request buildNotificationRequestNew( EDCNotification edcNotification = EDCNotificationFactory.createEdcNotification(senderEdcUrl, notification); objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); String body = objectMapper.writeValueAsString(edcNotification); - HttpUrl url = httpCallService.getUrl(dataReference.getEndpoint(), null, null); + + HttpUrl url = Objects.requireNonNull(HttpUrl.parse(dataReference.getEndpoint())).newBuilder().build(); log.info(":::: Send notification Data body :{}, dataReferenceEndpoint :{}", body, dataReference.getEndpoint()); return new Request.Builder() .url(url) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/AndConstraint.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/AndConstraint.java deleted file mode 100644 index 763ec79cc5..0000000000 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/AndConstraint.java +++ /dev/null @@ -1,72 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2022, 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - * Copyright (c) 2022, 2023 ZF Friedrichshafen AG - * Copyright (c) 2022, 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.infrastructure.edc.blackbox.policy; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; - -import java.util.List; - -import static java.util.stream.Collectors.joining; - -/** - * A collection of child constraints where all must be satisfied for the constraint to be satisfied. - */ -@JsonDeserialize(builder = AndConstraint.Builder.class) -public class AndConstraint extends MultiplicityConstraint { - - private AndConstraint() { - } - - @Override - public R accept(Visitor visitor) { - return visitor.visitAndConstraint(this); - } - - @Override - public AndConstraint create(List constraints) { - return Builder.newInstance().constraints(constraints).build(); - } - - @Override - public String toString() { - return "And constraint: [" + constraints.stream().map(Object::toString).collect(joining(",")) + "]"; - } - - @JsonPOJOBuilder(withPrefix = "") - public static class Builder extends MultiplicityConstraint.Builder { - - private Builder() { - constraint = new AndConstraint(); - } - - @JsonCreator - public static Builder newInstance() { - return new Builder(); - } - - public AndConstraint build() { - return constraint; - } - } -} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/AtomicConstraint.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/AtomicConstraint.java deleted file mode 100644 index d839241a42..0000000000 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/AtomicConstraint.java +++ /dev/null @@ -1,92 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2022, 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - * Copyright (c) 2022, 2023 ZF Friedrichshafen AG - * Copyright (c) 2022, 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.infrastructure.edc.blackbox.policy; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; - -/** - * A leaf constraint containing a left expression, right expression, and operator triple that can be evaluated. - */ -@JsonDeserialize(builder = AtomicConstraint.Builder.class) -public class AtomicConstraint extends Constraint { - private Expression leftExpression; - private Expression rightExpression; - private Operator operator = Operator.EQ; - - public Expression getLeftExpression() { - return leftExpression; - } - - public Expression getRightExpression() { - return rightExpression; - } - - public Operator getOperator() { - return operator; - } - - @Override - public R accept(Visitor visitor) { - return visitor.visitAtomicConstraint(this); - } - - @Override - public String toString() { - return "Constraint " + leftExpression + " " + operator.toString() + " " + rightExpression; - } - - @JsonPOJOBuilder(withPrefix = "") - public static class Builder { - private final AtomicConstraint constraint; - - private Builder() { - constraint = new AtomicConstraint(); - } - - @JsonCreator - public static Builder newInstance() { - return new Builder(); - } - - public Builder leftExpression(Expression expression) { - constraint.leftExpression = expression; - return this; - } - - public Builder rightExpression(Expression expression) { - constraint.rightExpression = expression; - return this; - } - - public Builder operator(Operator operator) { - constraint.operator = operator; - return this; - } - - public AtomicConstraint build() { - return constraint; - } - } - -} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/Constraint.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/Constraint.java deleted file mode 100644 index 50a438ccbf..0000000000 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/Constraint.java +++ /dev/null @@ -1,47 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2022, 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - * Copyright (c) 2022, 2023 ZF Friedrichshafen AG - * Copyright (c) 2022, 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.infrastructure.edc.blackbox.policy; - -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -/** - * An expression or set of expressions that refines a permission, prohibitions, or duty. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "edctype") -public abstract class Constraint { - - public abstract R accept(Visitor visitor); - - public interface Visitor { - - R visitAndConstraint(AndConstraint constraint); - - R visitOrConstraint(OrConstraint constraint); - - R visitXoneConstraint(XoneConstraint constraint); - - R visitAtomicConstraint(AtomicConstraint constraint); - - } - - -} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/Expression.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/Expression.java deleted file mode 100644 index 603cb6967c..0000000000 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/Expression.java +++ /dev/null @@ -1,40 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2022, 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - * Copyright (c) 2022, 2023 ZF Friedrichshafen AG - * Copyright (c) 2022, 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.infrastructure.edc.blackbox.policy; - -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -/** - * An expression that can be evaluated. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "edctype") -public abstract class Expression { - - public abstract R accept(Visitor visitor); - - public interface Visitor { - - R visitLiteralExpression(LiteralExpression expression); - - } - -} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/LiteralExpression.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/LiteralExpression.java deleted file mode 100644 index 57504696e0..0000000000 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/LiteralExpression.java +++ /dev/null @@ -1,72 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2022, 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - * Copyright (c) 2022, 2023 ZF Friedrichshafen AG - * Copyright (c) 2022, 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.infrastructure.edc.blackbox.policy; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeName; -import org.jetbrains.annotations.NotNull; - -/** - * A literal value used as an expression. - */ -@JsonTypeName("dataspaceconnector:literalexpression") -public class LiteralExpression extends Expression { - private final Object value; - - public LiteralExpression(@JsonProperty("value") Object value) { - this.value = value; - } - - public Object getValue() { - return value; - } - - @Override - public String toString() { - return value + "'"; - } - - @NotNull - public String asString() { - return value == null ? "null" : value.toString(); - } - - @Override - public R accept(Visitor visitor) { - return visitor.visitLiteralExpression(this); - } - - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (obj instanceof LiteralExpression) { - return ((LiteralExpression) obj).value.equals(value); - } - - return false; - } -} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/MultiplicityConstraint.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/MultiplicityConstraint.java deleted file mode 100644 index b343f8f689..0000000000 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/MultiplicityConstraint.java +++ /dev/null @@ -1,60 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2022, 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - * Copyright (c) 2022, 2023 ZF Friedrichshafen AG - * Copyright (c) 2022, 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.infrastructure.edc.blackbox.policy; - -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -import java.util.ArrayList; -import java.util.List; - -/** - * A collection of child constraints. Subclasses define the semantics for when this constraint is satisfied. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "edctype") -public abstract class MultiplicityConstraint extends Constraint { - protected List constraints = new ArrayList<>(); - - public List getConstraints() { - return constraints; - } - - /** - * Creates another instance of the constraint with the given child constraints. - */ - public abstract MultiplicityConstraint create(List constraints); - - protected abstract static class Builder> { - protected T constraint; - - public B constraint(Constraint constraint) { - this.constraint.constraints.add(constraint); - return (B) this; - } - - public B constraints(List constraints) { - constraint.constraints.addAll(constraints); - return (B) this; - } - - } - -} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/Operator.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/Operator.java deleted file mode 100644 index 492ced5ad4..0000000000 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/Operator.java +++ /dev/null @@ -1,56 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2022, 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - * Copyright (c) 2022, 2023 ZF Friedrichshafen AG - * Copyright (c) 2022, 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.infrastructure.edc.blackbox.policy; - -/** - * The set of supported expression operators. Not all operators may be supported for particular expression types. - */ -public enum Operator { - /** - * Operator expressing equality of two operands - */ - EQ, - /** - * Operator expressing inequality of two operands - */ - NEQ, - /** - * Operator expressing left operand is greater than right operand - */ - GT, - /** - * Operator expressing left operand is greater or equal than to the right operand - */ - GEQ, - /** - * Operator expressing left operand is lesser than to the right operand - */ - LT, - /** - * Operator expressing left operand is lesser or equal than to the right operand - */ - LEQ, - /** - * Operator expressing left operand is contained in the right operand - */ - IN -} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/OrConstraint.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/OrConstraint.java deleted file mode 100644 index b03fc8f5b0..0000000000 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/OrConstraint.java +++ /dev/null @@ -1,75 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2022, 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - * Copyright (c) 2022, 2023 ZF Friedrichshafen AG - * Copyright (c) 2022, 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.infrastructure.edc.blackbox.policy; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; - -import java.util.List; - -import static java.util.stream.Collectors.joining; - -/** - * A collection of child constraints where at least one must be satisfied for the constraint to be satisfied. - */ -@JsonDeserialize(builder = OrConstraint.Builder.class) -@JsonTypeName("dataspaceconnector:orconstraint") -public class OrConstraint extends MultiplicityConstraint { - - private OrConstraint() { - } - - @Override - public R accept(Visitor visitor) { - return visitor.visitOrConstraint(this); - } - - @Override - public MultiplicityConstraint create(List constraints) { - return Builder.newInstance().constraints(constraints).build(); - } - - @Override - public String toString() { - return "Or constraint: [" + constraints.stream().map(Object::toString).collect(joining(",")) + "]"; - } - - @JsonPOJOBuilder(withPrefix = "") - public static class Builder extends MultiplicityConstraint.Builder { - - private Builder() { - constraint = new OrConstraint(); - } - - @JsonCreator - public static Builder newInstance() { - return new Builder(); - } - - public OrConstraint build() { - return constraint; - } - } - -} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/XoneConstraint.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/XoneConstraint.java deleted file mode 100644 index cecb5e5eb6..0000000000 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/XoneConstraint.java +++ /dev/null @@ -1,77 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2022, 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - * Copyright (c) 2022, 2023 ZF Friedrichshafen AG - * Copyright (c) 2022, 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.infrastructure.edc.blackbox.policy; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; - -import java.util.List; - -import static java.util.stream.Collectors.joining; - -/** - * A collection of child constraints where exactly one must be satisfied for the constraint to be satisfied. - */ -@JsonDeserialize(builder = XoneConstraint.Builder.class) -@JsonTypeName("dataspaceconnector:xone") -public class XoneConstraint extends MultiplicityConstraint { - - @Override - public List getConstraints() { - return constraints; - } - - @Override - public R accept(Visitor visitor) { - return visitor.visitXoneConstraint(this); - } - - @Override - public XoneConstraint create(List constraints) { - return Builder.newInstance().constraints(constraints).build(); - } - - @Override - public String toString() { - return "Xone constraint: [" + constraints.stream().map(Object::toString).collect(joining(",")) + "]"; - } - - @JsonPOJOBuilder(withPrefix = "") - public static class Builder extends MultiplicityConstraint.Builder { - - private Builder() { - constraint = new XoneConstraint(); - } - - @JsonCreator - public static Builder newInstance() { - return new Builder(); - } - - public XoneConstraint build() { - return constraint; - } - } - -} diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/InvestigationsEDCFacadeTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/InvestigationsEDCFacadeTest.java index c4f641c5b4..cef5a2c5f3 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/InvestigationsEDCFacadeTest.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/InvestigationsEDCFacadeTest.java @@ -91,7 +91,6 @@ void givenCorrectInvestigationMessage_whenStartEdcTransfer_thenSendIt() throws E when(endpointDataReference.getAuthCode()).thenReturn("authCode"); when(endpointDataReference.getAuthKey()).thenReturn("authKey"); when(endpointDataReference.getEndpoint()).thenReturn(dataReferenceEndpoint); - when(httpCallService.getUrl(dataReferenceEndpoint, null, null)).thenReturn(HttpUrl.parse(dataReferenceEndpoint)); when(endpointDataReferenceStorage.remove(agreementId)).thenReturn(Optional.ofNullable(endpointDataReference)); when(objectMapper.writeValueAsString(any())).thenReturn("{body}"); @@ -126,7 +125,6 @@ void givenCorrectInvestigationMessageButSendRequestThrowsException_whenStartEdcT when(endpointDataReference.getAuthCode()).thenReturn("authCode"); when(endpointDataReference.getAuthKey()).thenReturn("authKey"); when(endpointDataReference.getEndpoint()).thenReturn(dataReferenceEndpoint); - when(httpCallService.getUrl(dataReferenceEndpoint, null, null)).thenReturn(HttpUrl.parse(dataReferenceEndpoint)); when(endpointDataReferenceStorage.remove(agreementId)).thenReturn(Optional.ofNullable(endpointDataReference)); when(objectMapper.writeValueAsString(any())).thenReturn("{body}"); doThrow(new RuntimeException()).when(httpCallService).sendRequest(any()); diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/AndConstraintTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/AndConstraintTest.java deleted file mode 100644 index 2e5767ac08..0000000000 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/AndConstraintTest.java +++ /dev/null @@ -1,56 +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.infrastructure.edc.blackbox.policy; - -import org.junit.jupiter.api.Test; - -import java.util.List; - -import static org.assertj.core.api.Assertions.assertThat; - -class AndConstraintTest { - - @Test - void create() { - // given - final AndConstraint toTest = AndConstraint.Builder.newInstance().build(); - final List constraints = List.of(AndConstraint.Builder.newInstance().build()); - - // when - final AndConstraint result = toTest.create(constraints); - - // then - assertThat(result.getConstraints()).hasSize(1); - } - - @Test - void toStringMethod() { - // given - final AndConstraint toTest = AndConstraint.Builder.newInstance() - .build(); - - // when - final String result = toTest.toString(); - - // then - assertThat(result).isEqualTo("And constraint: []"); - } - -} diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/OrConstraintTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/OrConstraintTest.java deleted file mode 100644 index 4cb86e4a4a..0000000000 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/policy/OrConstraintTest.java +++ /dev/null @@ -1,56 +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.infrastructure.edc.blackbox.policy; - -import org.junit.jupiter.api.Test; - -import java.util.List; - -import static org.assertj.core.api.Assertions.assertThat; - -class OrConstraintTest { - - - @Test - void create() { - // given - final OrConstraint toTest = OrConstraint.Builder.newInstance().build(); - final List constraints = List.of(AndConstraint.Builder.newInstance().build()); - - // when - final MultiplicityConstraint result = toTest.create(constraints); - - // then - assertThat(result.getConstraints()).hasSize(1); - } - - @Test - void toStringMethod() { - // given - final OrConstraint toTest = OrConstraint.Builder.newInstance() - .build(); - - // when - final String result = toTest.toString(); - - // then - assertThat(result).isEqualTo("Or constraint: []"); - } -} From be9bde208c9ca91625e596d8177282939692253f Mon Sep 17 00:00:00 2001 From: Maximilian Wesener Date: Tue, 19 Sep 2023 09:09:40 +0200 Subject: [PATCH 75/84] chore: TRACEFOSS-XXX testing removing subtype from objectmapper --- .../infrastructure/edc/blackbox/EdcController.java | 4 ++-- .../infrastructure/edc/blackbox/HttpCallService.java | 4 ++-- .../domain/base/service/EdcNotificationService.java | 1 - .../domain/base/service}/InvestigationsEDCFacade.java | 4 +++- .../infrastructure/alert/model/AlertEntity.java | 5 +++-- .../edc/blackbox/InvestigationsEDCFacadeTest.java | 2 +- .../domain/service/EdcNotificationServiceTest.java | 2 +- 7 files changed, 12 insertions(+), 10 deletions(-) rename tx-backend/src/main/java/org/eclipse/tractusx/traceability/{infrastructure/edc/blackbox => qualitynotification/domain/base/service}/InvestigationsEDCFacade.java (96%) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/EdcController.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/EdcController.java index de22d8696d..57d7c28ce9 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/EdcController.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/EdcController.java @@ -73,7 +73,7 @@ public void qualityNotificationInvestigationUpdate(final @ValidEDCNotification @ */ @PostMapping("/qualityalerts/receive") public void qualityNotificationAlertReceive(final @ValidEDCNotification @Valid @RequestBody EDCNotification edcNotification) { - log.info("EdcController [qualityNotificationReceive] notificationId:{}", edcNotification); + log.info("EdcController [qualityalertReceive] notificationId:{}", edcNotification); validateIsAlert(edcNotification); alertsReceiverService.handleNotificationReceive(edcNotification); } @@ -83,7 +83,7 @@ public void qualityNotificationAlertReceive(final @ValidEDCNotification @Valid @ */ @PostMapping("/qualityalerts/update") public void qualityNotificationAlertUpdate(final @ValidEDCNotification @Valid @RequestBody EDCNotification edcNotification) { - log.info("EdcController [qualityNotificationUpdate] notificationId:{}", edcNotification); + log.info("EdcController [qualityalertUpdate] notificationId:{}", edcNotification); validateIsAlert(edcNotification); alertsReceiverService.handleNotificationUpdate(edcNotification); } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/HttpCallService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/HttpCallService.java index a8332e1b58..40e5bba4b8 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/HttpCallService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/HttpCallService.java @@ -31,14 +31,14 @@ import static java.lang.String.format; -// TODO - refactor this class to use feignClient with a common httpClient +// TODO - either refactor this class to use feignClient with a common httpClient or remove it once IRS-Lib is done @Slf4j @Component public class HttpCallService { private final OkHttpClient httpClient; - public HttpCallService(OkHttpClient httpClient, ObjectMapper objectMapper) { + public HttpCallService(OkHttpClient httpClient) { this.httpClient = withIncreasedTimeout(httpClient); } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/service/EdcNotificationService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/service/EdcNotificationService.java index 1b58e2c934..04515a4656 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/service/EdcNotificationService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/service/EdcNotificationService.java @@ -27,7 +27,6 @@ import org.eclipse.tractusx.traceability.discovery.domain.model.Discovery; import org.eclipse.tractusx.traceability.discovery.domain.service.DiscoveryService; import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.ContractNegotiationException; -import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.InvestigationsEDCFacade; import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.NoCatalogItemException; import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.NoEndpointDataReferenceException; import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.SendNotificationException; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/InvestigationsEDCFacade.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/service/InvestigationsEDCFacade.java similarity index 96% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/InvestigationsEDCFacade.java rename to tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/service/InvestigationsEDCFacade.java index ee2ff9b5b8..45f53e31ec 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/InvestigationsEDCFacade.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/service/InvestigationsEDCFacade.java @@ -18,7 +18,7 @@ * * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.infrastructure.edc.blackbox; +package org.eclipse.tractusx.traceability.qualitynotification.domain.base.service; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.core.JsonProcessingException; @@ -38,6 +38,7 @@ import org.eclipse.tractusx.irs.edc.client.EndpointDataReferenceStorage; import org.eclipse.tractusx.irs.edc.client.model.CatalogItem; import org.eclipse.tractusx.irs.edc.client.policy.PolicyCheckerService; +import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.*; import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.model.EDCNotification; import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.model.EDCNotificationFactory; import org.eclipse.tractusx.traceability.common.properties.EdcProperties; @@ -134,6 +135,7 @@ private CatalogItem getCatalogItem(final QualityNotificationMessage notification } } + // TODO this method should be completly handled by EDCNotificationFactory.createEdcNotification which is part of this method currently private Request buildNotificationRequestNew( final QualityNotificationMessage notification, final String senderEdcUrl, diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/alert/model/AlertEntity.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/alert/model/AlertEntity.java index 1b5d45a279..32ae980e04 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/alert/model/AlertEntity.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/alert/model/AlertEntity.java @@ -44,6 +44,8 @@ import java.util.List; +import static org.apache.commons.collections4.ListUtils.emptyIfNull; + @NoArgsConstructor @Getter @Setter @@ -72,7 +74,7 @@ public class AlertEntity extends NotificationBaseEntity { private List notifications; public static QualityNotification toDomain(AlertEntity alertNotificationEntity) { - List notifications = alertNotificationEntity.getNotifications().stream() + List notifications = emptyIfNull(alertNotificationEntity.getNotifications()).stream() .map(AlertNotificationEntity::toDomain) .toList(); @@ -98,7 +100,6 @@ public static QualityNotification toDomain(AlertEntity alertNotificationEntity) public static AlertEntity from(QualityNotification qualityNotification, List assetEntities) { return AlertEntity.builder() - // TODO clarify how to handle assetsAsPlanned .assets(assetEntities) .bpn(qualityNotification.getBpn()) .description(qualityNotification.getDescription()) diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/InvestigationsEDCFacadeTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/InvestigationsEDCFacadeTest.java index cef5a2c5f3..816f9055ec 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/InvestigationsEDCFacadeTest.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/InvestigationsEDCFacadeTest.java @@ -19,7 +19,6 @@ package org.eclipse.tractusx.traceability.infrastructure.edc.blackbox; import com.fasterxml.jackson.databind.ObjectMapper; -import okhttp3.HttpUrl; import org.eclipse.edc.spi.types.domain.edr.EndpointDataReference; import org.eclipse.tractusx.irs.edc.client.ContractNegotiationService; import org.eclipse.tractusx.irs.edc.client.EDCCatalogFacade; @@ -31,6 +30,7 @@ import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationMessage; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationStatus; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationType; +import org.eclipse.tractusx.traceability.qualitynotification.domain.base.service.InvestigationsEDCFacade; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/domain/service/EdcNotificationServiceTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/domain/service/EdcNotificationServiceTest.java index 236f4fc362..a62afd0869 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/domain/service/EdcNotificationServiceTest.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/domain/service/EdcNotificationServiceTest.java @@ -22,7 +22,7 @@ import org.eclipse.tractusx.traceability.discovery.domain.model.Discovery; import org.eclipse.tractusx.traceability.discovery.domain.service.DiscoveryService; import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.ContractNegotiationException; -import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.InvestigationsEDCFacade; +import org.eclipse.tractusx.traceability.qualitynotification.domain.base.service.InvestigationsEDCFacade; import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.NoCatalogItemException; import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.NoEndpointDataReferenceException; import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.SendNotificationException; From 6128cd0c151ed98d07984d0e5d66eec85045e711 Mon Sep 17 00:00:00 2001 From: Maximilian Wesener Date: Tue, 19 Sep 2023 09:23:29 +0200 Subject: [PATCH 76/84] chore: TRACEFOSS-XXX refactored edc notification classes --- .../traceability/common/mapper/NotificationMapper.java | 2 +- .../domain/alert/service/AlertsReceiverService.java | 2 +- .../domain/base/exception}/BadRequestException.java | 2 +- .../base/exception}/ContractNegotiationException.java | 2 +- .../domain/base/exception}/NoCatalogItemException.java | 2 +- .../exception}/NoEndpointDataReferenceException.java | 2 +- .../base/exception}/SendNotificationException.java | 2 +- .../domain/base/service/EdcNotificationService.java | 8 ++++---- .../domain/base/service}/HttpCallService.java | 4 ++-- .../domain/base/service/InvestigationsEDCFacade.java | 9 ++++++--- .../service/InvestigationsReceiverService.java | 2 +- .../infrastructure/edc}/EDCNotificationValidator.java | 4 ++-- .../infrastructure/edc}/EdcController.java | 7 +++---- .../infrastructure/edc}/ValidEDCNotification.java | 2 +- .../infrastructure/edc}/model/EDCNotification.java | 3 +-- .../edc}/model/EDCNotificationContent.java | 2 +- .../edc}/model/EDCNotificationFactory.java | 2 +- .../infrastructure/edc}/model/EDCNotificationHeader.java | 2 +- .../infrastructure/edc}/model/NotificationType.java | 4 ++-- .../common/mapper/NotificationMapperTest.java | 6 +++--- .../edc/blackbox/BadRequestExceptionTest.java | 1 + .../edc/blackbox/ContractNegotiationExceptionTest.java | 1 + .../edc/blackbox/InvestigationsEDCFacadeTest.java | 4 ++++ .../edc/blackbox/NoCatalogItemExceptionTest.java | 1 + .../edc/blackbox/SendNotificationExceptionTest.java | 1 + .../validators/EDCNotificationValidatorTest.java | 3 ++- .../integration/edc/blackbox/EdcControllerIT.java | 2 +- .../integration/edc/blackbox/EdcNotificationModelIT.java | 8 ++++---- .../alert/PublisherAlertsControllerIT.java | 4 ++-- .../PublisherInvestigationsControllerIT.java | 4 ++-- .../domain/service/EdcNotificationServiceTest.java | 8 ++++---- .../service/InvestigationsReceiverServiceTest.java | 4 ++-- 32 files changed, 60 insertions(+), 50 deletions(-) rename tx-backend/src/main/java/org/eclipse/tractusx/traceability/{infrastructure/edc/blackbox => qualitynotification/domain/base/exception}/BadRequestException.java (93%) rename tx-backend/src/main/java/org/eclipse/tractusx/traceability/{infrastructure/edc/blackbox => qualitynotification/domain/base/exception}/ContractNegotiationException.java (93%) rename tx-backend/src/main/java/org/eclipse/tractusx/traceability/{infrastructure/edc/blackbox => qualitynotification/domain/base/exception}/NoCatalogItemException.java (93%) rename tx-backend/src/main/java/org/eclipse/tractusx/traceability/{infrastructure/edc/blackbox => qualitynotification/domain/base/exception}/NoEndpointDataReferenceException.java (92%) rename tx-backend/src/main/java/org/eclipse/tractusx/traceability/{infrastructure/edc/blackbox => qualitynotification/domain/base/exception}/SendNotificationException.java (92%) rename tx-backend/src/main/java/org/eclipse/tractusx/traceability/{infrastructure/edc/blackbox => qualitynotification/domain/base/service}/HttpCallService.java (92%) rename tx-backend/src/main/java/org/eclipse/tractusx/traceability/{infrastructure/edc/blackbox/validators => qualitynotification/infrastructure/edc}/EDCNotificationValidator.java (95%) rename tx-backend/src/main/java/org/eclipse/tractusx/traceability/{infrastructure/edc/blackbox => qualitynotification/infrastructure/edc}/EdcController.java (93%) rename tx-backend/src/main/java/org/eclipse/tractusx/traceability/{infrastructure/edc/blackbox/validators => qualitynotification/infrastructure/edc}/ValidEDCNotification.java (94%) rename tx-backend/src/main/java/org/eclipse/tractusx/traceability/{infrastructure/edc/blackbox => qualitynotification/infrastructure/edc}/model/EDCNotification.java (97%) rename tx-backend/src/main/java/org/eclipse/tractusx/traceability/{infrastructure/edc/blackbox => qualitynotification/infrastructure/edc}/model/EDCNotificationContent.java (93%) rename tx-backend/src/main/java/org/eclipse/tractusx/traceability/{infrastructure/edc/blackbox => qualitynotification/infrastructure/edc}/model/EDCNotificationFactory.java (97%) rename tx-backend/src/main/java/org/eclipse/tractusx/traceability/{infrastructure/edc/blackbox => qualitynotification/infrastructure/edc}/model/EDCNotificationHeader.java (94%) rename tx-backend/src/main/java/org/eclipse/tractusx/traceability/{infrastructure/edc/blackbox => qualitynotification/infrastructure/edc}/model/NotificationType.java (92%) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/mapper/NotificationMapper.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/mapper/NotificationMapper.java index f5bb0edf42..fd15701aa5 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/mapper/NotificationMapper.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/mapper/NotificationMapper.java @@ -21,7 +21,7 @@ package org.eclipse.tractusx.traceability.common.mapper; import org.eclipse.tractusx.traceability.assets.domain.base.BpnRepository; -import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.model.EDCNotification; +import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotification; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationMessage; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationSeverity; import org.springframework.beans.factory.annotation.Autowired; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/service/AlertsReceiverService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/service/AlertsReceiverService.java index 59b5af8759..659777e56f 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/service/AlertsReceiverService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/service/AlertsReceiverService.java @@ -25,7 +25,7 @@ import org.eclipse.tractusx.traceability.common.mapper.NotificationMapper; import org.eclipse.tractusx.traceability.common.mapper.QualityNotificationMapper; import org.eclipse.tractusx.traceability.common.model.BPN; -import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.model.EDCNotification; +import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotification; import org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.AlertNotFoundException; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.AlertRepository; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotification; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/BadRequestException.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/exception/BadRequestException.java similarity index 93% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/BadRequestException.java rename to tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/exception/BadRequestException.java index 67dd3b1801..467a3959ea 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/BadRequestException.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/exception/BadRequestException.java @@ -19,7 +19,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.infrastructure.edc.blackbox; +package org.eclipse.tractusx.traceability.qualitynotification.domain.base.exception; public class BadRequestException extends RuntimeException { diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/ContractNegotiationException.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/exception/ContractNegotiationException.java similarity index 93% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/ContractNegotiationException.java rename to tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/exception/ContractNegotiationException.java index b2f8a5cc24..5259663d00 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/ContractNegotiationException.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/exception/ContractNegotiationException.java @@ -17,7 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.infrastructure.edc.blackbox; +package org.eclipse.tractusx.traceability.qualitynotification.domain.base.exception; public class ContractNegotiationException extends RuntimeException { public ContractNegotiationException(final String message, final Throwable exception) { diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/NoCatalogItemException.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/exception/NoCatalogItemException.java similarity index 93% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/NoCatalogItemException.java rename to tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/exception/NoCatalogItemException.java index bcd9070f7b..bbe3a35135 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/NoCatalogItemException.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/exception/NoCatalogItemException.java @@ -17,7 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.infrastructure.edc.blackbox; +package org.eclipse.tractusx.traceability.qualitynotification.domain.base.exception; public class NoCatalogItemException extends RuntimeException{ public static final String MESSAGE = "No Catalog Item in catalog found."; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/NoEndpointDataReferenceException.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/exception/NoEndpointDataReferenceException.java similarity index 92% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/NoEndpointDataReferenceException.java rename to tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/exception/NoEndpointDataReferenceException.java index 9f712e9213..1bf205e080 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/NoEndpointDataReferenceException.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/exception/NoEndpointDataReferenceException.java @@ -17,7 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.infrastructure.edc.blackbox; +package org.eclipse.tractusx.traceability.qualitynotification.domain.base.exception; public class NoEndpointDataReferenceException extends RuntimeException { public NoEndpointDataReferenceException(String message) { diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/SendNotificationException.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/exception/SendNotificationException.java similarity index 92% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/SendNotificationException.java rename to tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/exception/SendNotificationException.java index d8ef285389..0ace8c3fcf 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/SendNotificationException.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/exception/SendNotificationException.java @@ -17,7 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.infrastructure.edc.blackbox; +package org.eclipse.tractusx.traceability.qualitynotification.domain.base.exception; public class SendNotificationException extends RuntimeException { public SendNotificationException(final String message, final Throwable exception) { diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/service/EdcNotificationService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/service/EdcNotificationService.java index 04515a4656..5e4d2bac46 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/service/EdcNotificationService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/service/EdcNotificationService.java @@ -26,10 +26,10 @@ import org.eclipse.tractusx.traceability.common.config.AssetsAsyncConfig; import org.eclipse.tractusx.traceability.discovery.domain.model.Discovery; import org.eclipse.tractusx.traceability.discovery.domain.service.DiscoveryService; -import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.ContractNegotiationException; -import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.NoCatalogItemException; -import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.NoEndpointDataReferenceException; -import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.SendNotificationException; +import org.eclipse.tractusx.traceability.qualitynotification.domain.base.exception.ContractNegotiationException; +import org.eclipse.tractusx.traceability.qualitynotification.domain.base.exception.NoCatalogItemException; +import org.eclipse.tractusx.traceability.qualitynotification.domain.base.exception.NoEndpointDataReferenceException; +import org.eclipse.tractusx.traceability.qualitynotification.domain.base.exception.SendNotificationException; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.AlertRepository; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.InvestigationRepository; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationMessage; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/HttpCallService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/service/HttpCallService.java similarity index 92% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/HttpCallService.java rename to tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/service/HttpCallService.java index 40e5bba4b8..d37cd68223 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/HttpCallService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/service/HttpCallService.java @@ -18,12 +18,12 @@ * * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.infrastructure.edc.blackbox; +package org.eclipse.tractusx.traceability.qualitynotification.domain.base.service; -import com.fasterxml.jackson.databind.ObjectMapper; import lombok.extern.slf4j.Slf4j; import okhttp3.OkHttpClient; import okhttp3.Request; +import org.eclipse.tractusx.traceability.qualitynotification.domain.base.exception.BadRequestException; import org.springframework.stereotype.Component; import java.io.IOException; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/service/InvestigationsEDCFacade.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/service/InvestigationsEDCFacade.java index 45f53e31ec..6f053fcff0 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/service/InvestigationsEDCFacade.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/service/InvestigationsEDCFacade.java @@ -38,10 +38,13 @@ import org.eclipse.tractusx.irs.edc.client.EndpointDataReferenceStorage; import org.eclipse.tractusx.irs.edc.client.model.CatalogItem; import org.eclipse.tractusx.irs.edc.client.policy.PolicyCheckerService; -import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.*; -import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.model.EDCNotification; -import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.model.EDCNotificationFactory; +import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotification; +import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotificationFactory; import org.eclipse.tractusx.traceability.common.properties.EdcProperties; +import org.eclipse.tractusx.traceability.qualitynotification.domain.base.exception.ContractNegotiationException; +import org.eclipse.tractusx.traceability.qualitynotification.domain.base.exception.NoCatalogItemException; +import org.eclipse.tractusx.traceability.qualitynotification.domain.base.exception.NoEndpointDataReferenceException; +import org.eclipse.tractusx.traceability.qualitynotification.domain.base.exception.SendNotificationException; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationMessage; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationType; import org.springframework.stereotype.Component; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/investigation/service/InvestigationsReceiverService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/investigation/service/InvestigationsReceiverService.java index 0fcfee1823..1021ea36a6 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/investigation/service/InvestigationsReceiverService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/investigation/service/InvestigationsReceiverService.java @@ -27,7 +27,7 @@ import org.eclipse.tractusx.traceability.common.mapper.NotificationMapper; import org.eclipse.tractusx.traceability.common.mapper.QualityNotificationMapper; import org.eclipse.tractusx.traceability.common.model.BPN; -import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.model.EDCNotification; +import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotification; 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; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/validators/EDCNotificationValidator.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/edc/EDCNotificationValidator.java similarity index 95% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/validators/EDCNotificationValidator.java rename to tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/edc/EDCNotificationValidator.java index ede6d31003..543f718424 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/validators/EDCNotificationValidator.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/edc/EDCNotificationValidator.java @@ -17,13 +17,13 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.validators; +package org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc; import jakarta.validation.ConstraintValidator; import jakarta.validation.ConstraintValidatorContext; import org.eclipse.tractusx.traceability.common.model.BPN; import org.eclipse.tractusx.traceability.common.properties.TraceabilityProperties; -import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.model.EDCNotification; +import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotification; import org.eclipse.tractusx.traceability.qualitynotification.domain.investigation.model.exception.InvestigationReceiverBpnMismatchException; import org.springframework.stereotype.Component; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/EdcController.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/edc/EdcController.java similarity index 93% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/EdcController.java rename to tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/edc/EdcController.java index 57d7c28ce9..155b9541d4 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/EdcController.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/edc/EdcController.java @@ -18,16 +18,15 @@ * * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.infrastructure.edc.blackbox; +package org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc; import io.swagger.v3.oas.annotations.Hidden; 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.infrastructure.edc.blackbox.model.EDCNotification; -import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.model.NotificationType; -import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.validators.ValidEDCNotification; +import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotification; +import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.NotificationType; 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; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/validators/ValidEDCNotification.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/edc/ValidEDCNotification.java similarity index 94% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/validators/ValidEDCNotification.java rename to tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/edc/ValidEDCNotification.java index ee79c2ce03..5e79399d41 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/validators/ValidEDCNotification.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/edc/ValidEDCNotification.java @@ -17,7 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.validators; +package org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc; import jakarta.validation.Constraint; import jakarta.validation.Payload; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/model/EDCNotification.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/edc/model/EDCNotification.java similarity index 97% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/model/EDCNotification.java rename to tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/edc/model/EDCNotification.java index 1e4d0b1a3e..fe3209f45d 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/model/EDCNotification.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/edc/model/EDCNotification.java @@ -18,14 +18,13 @@ * * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.model; +package org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.Valid; import jakarta.validation.constraints.NotNull; -import lombok.extern.jackson.Jacksonized; import org.apache.commons.lang3.StringUtils; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationAffectedPart; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationStatus; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/model/EDCNotificationContent.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/edc/model/EDCNotificationContent.java similarity index 93% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/model/EDCNotificationContent.java rename to tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/edc/model/EDCNotificationContent.java index d34d0f536f..bb8034c79c 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/model/EDCNotificationContent.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/edc/model/EDCNotificationContent.java @@ -18,7 +18,7 @@ * * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.model; +package org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model; import com.fasterxml.jackson.annotation.JsonInclude; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/model/EDCNotificationFactory.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/edc/model/EDCNotificationFactory.java similarity index 97% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/model/EDCNotificationFactory.java rename to tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/edc/model/EDCNotificationFactory.java index 6bad13edb1..f6757e1650 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/model/EDCNotificationFactory.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/edc/model/EDCNotificationFactory.java @@ -18,7 +18,7 @@ * * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.model; +package org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationAffectedPart; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationMessage; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/model/EDCNotificationHeader.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/edc/model/EDCNotificationHeader.java similarity index 94% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/model/EDCNotificationHeader.java rename to tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/edc/model/EDCNotificationHeader.java index 25a8dd5539..1690219d84 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/model/EDCNotificationHeader.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/edc/model/EDCNotificationHeader.java @@ -18,7 +18,7 @@ * * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.model; +package org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model; import com.fasterxml.jackson.annotation.JsonInclude; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/model/NotificationType.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/edc/model/NotificationType.java similarity index 92% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/model/NotificationType.java rename to tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/edc/model/NotificationType.java index 990193e33d..62d2dffab5 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/model/NotificationType.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/edc/model/NotificationType.java @@ -19,9 +19,9 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.model; +package org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model; -import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.BadRequestException; +import org.eclipse.tractusx.traceability.qualitynotification.domain.base.exception.BadRequestException; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationType; import java.util.Arrays; diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/common/mapper/NotificationMapperTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/common/mapper/NotificationMapperTest.java index b45da30fa1..7e4c1a9e2d 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/common/mapper/NotificationMapperTest.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/common/mapper/NotificationMapperTest.java @@ -21,9 +21,9 @@ package org.eclipse.tractusx.traceability.common.mapper; import org.eclipse.tractusx.traceability.assets.domain.base.BpnRepository; -import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.model.EDCNotification; -import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.model.EDCNotificationContent; -import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.model.EDCNotificationHeader; +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.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationMessage; import org.eclipse.tractusx.traceability.testdata.NotificationTestDataFactory; import org.junit.jupiter.api.Test; diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/BadRequestExceptionTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/BadRequestExceptionTest.java index e3e6b5e8aa..0547dd61e0 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/BadRequestExceptionTest.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/BadRequestExceptionTest.java @@ -22,6 +22,7 @@ package org.eclipse.tractusx.traceability.infrastructure.edc.blackbox; +import org.eclipse.tractusx.traceability.qualitynotification.domain.base.exception.BadRequestException; import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/ContractNegotiationExceptionTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/ContractNegotiationExceptionTest.java index 7858f3015c..c76b46462d 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/ContractNegotiationExceptionTest.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/ContractNegotiationExceptionTest.java @@ -19,6 +19,7 @@ package org.eclipse.tractusx.traceability.infrastructure.edc.blackbox; +import org.eclipse.tractusx.traceability.qualitynotification.domain.base.exception.ContractNegotiationException; import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/InvestigationsEDCFacadeTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/InvestigationsEDCFacadeTest.java index 816f9055ec..a9b3957b88 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/InvestigationsEDCFacadeTest.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/InvestigationsEDCFacadeTest.java @@ -27,9 +27,13 @@ import org.eclipse.tractusx.irs.edc.client.model.NegotiationResponse; import org.eclipse.tractusx.irs.edc.client.policy.PolicyCheckerService; import org.eclipse.tractusx.traceability.common.properties.EdcProperties; +import org.eclipse.tractusx.traceability.qualitynotification.domain.base.exception.ContractNegotiationException; +import org.eclipse.tractusx.traceability.qualitynotification.domain.base.exception.NoCatalogItemException; +import org.eclipse.tractusx.traceability.qualitynotification.domain.base.exception.SendNotificationException; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationMessage; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationStatus; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationType; +import org.eclipse.tractusx.traceability.qualitynotification.domain.base.service.HttpCallService; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.service.InvestigationsEDCFacade; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/NoCatalogItemExceptionTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/NoCatalogItemExceptionTest.java index d9c4bfbd23..c430d5a852 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/NoCatalogItemExceptionTest.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/NoCatalogItemExceptionTest.java @@ -19,6 +19,7 @@ package org.eclipse.tractusx.traceability.infrastructure.edc.blackbox; +import org.eclipse.tractusx.traceability.qualitynotification.domain.base.exception.NoCatalogItemException; import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/SendNotificationExceptionTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/SendNotificationExceptionTest.java index e5cbab53c2..f2bbbfa5f0 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/SendNotificationExceptionTest.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/SendNotificationExceptionTest.java @@ -19,6 +19,7 @@ package org.eclipse.tractusx.traceability.infrastructure.edc.blackbox; +import org.eclipse.tractusx.traceability.qualitynotification.domain.base.exception.SendNotificationException; import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/validators/EDCNotificationValidatorTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/validators/EDCNotificationValidatorTest.java index 9f57985c2e..654f56c179 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/validators/EDCNotificationValidatorTest.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/validators/EDCNotificationValidatorTest.java @@ -22,8 +22,9 @@ import jakarta.validation.ConstraintValidatorContext; import org.eclipse.tractusx.traceability.common.model.BPN; import org.eclipse.tractusx.traceability.common.properties.TraceabilityProperties; -import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.model.EDCNotification; +import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotification; import org.eclipse.tractusx.traceability.qualitynotification.domain.investigation.model.exception.InvestigationReceiverBpnMismatchException; +import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.EDCNotificationValidator; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/edc/blackbox/EdcControllerIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/edc/blackbox/EdcControllerIT.java index 4444533cc4..85f7e59fbf 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/edc/blackbox/EdcControllerIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/edc/blackbox/EdcControllerIT.java @@ -22,7 +22,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import io.restassured.http.ContentType; import org.eclipse.tractusx.traceability.common.security.JwtRole; -import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.model.EDCNotification; +import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotification; import org.eclipse.tractusx.traceability.integration.IntegrationTestSpecification; import org.eclipse.tractusx.traceability.integration.common.support.AssetsSupport; import org.eclipse.tractusx.traceability.integration.common.support.InvestigationNotificationsSupport; diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/edc/blackbox/EdcNotificationModelIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/edc/blackbox/EdcNotificationModelIT.java index e711772af8..532a171829 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/edc/blackbox/EdcNotificationModelIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/edc/blackbox/EdcNotificationModelIT.java @@ -23,10 +23,10 @@ import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.jayway.jsonpath.JsonPath; -import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.model.EDCNotification; -import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.model.EDCNotificationContent; -import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.model.EDCNotificationHeader; -import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.model.NotificationType; +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.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.NotificationType; import org.eclipse.tractusx.traceability.integration.IntegrationTestSpecification; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationStatus; import org.junit.jupiter.api.BeforeEach; 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 7c9db3e554..319e85a48e 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 @@ -26,8 +26,8 @@ import org.eclipse.tractusx.traceability.assets.domain.asplanned.repository.AssetAsPlannedRepository; import org.eclipse.tractusx.traceability.assets.domain.base.model.AssetBase; import org.eclipse.tractusx.traceability.common.security.JwtRole; -import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.model.EDCNotification; -import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.model.EDCNotificationFactory; +import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotification; +import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotificationFactory; import org.eclipse.tractusx.traceability.integration.IntegrationTestSpecification; import org.eclipse.tractusx.traceability.integration.common.support.AlertNotificationsSupport; import org.eclipse.tractusx.traceability.integration.common.support.AlertsSupport; 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 d5c715b451..01aaf7e398 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 @@ -25,8 +25,8 @@ import org.eclipse.tractusx.traceability.assets.domain.asbuilt.repository.AssetAsBuiltRepository; import org.eclipse.tractusx.traceability.assets.domain.base.model.AssetBase; import org.eclipse.tractusx.traceability.common.security.JwtRole; -import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.model.EDCNotification; -import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.model.EDCNotificationFactory; +import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotification; +import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotificationFactory; import org.eclipse.tractusx.traceability.integration.IntegrationTestSpecification; import org.eclipse.tractusx.traceability.integration.common.support.AssetsSupport; import org.eclipse.tractusx.traceability.integration.common.support.InvestigationNotificationsSupport; diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/domain/service/EdcNotificationServiceTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/domain/service/EdcNotificationServiceTest.java index a62afd0869..fb920234b4 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/domain/service/EdcNotificationServiceTest.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/domain/service/EdcNotificationServiceTest.java @@ -21,11 +21,11 @@ import org.eclipse.tractusx.traceability.discovery.domain.model.Discovery; import org.eclipse.tractusx.traceability.discovery.domain.service.DiscoveryService; -import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.ContractNegotiationException; +import org.eclipse.tractusx.traceability.qualitynotification.domain.base.exception.ContractNegotiationException; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.service.InvestigationsEDCFacade; -import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.NoCatalogItemException; -import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.NoEndpointDataReferenceException; -import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.SendNotificationException; +import org.eclipse.tractusx.traceability.qualitynotification.domain.base.exception.NoCatalogItemException; +import org.eclipse.tractusx.traceability.qualitynotification.domain.base.exception.NoEndpointDataReferenceException; +import org.eclipse.tractusx.traceability.qualitynotification.domain.base.exception.SendNotificationException; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.AlertRepository; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.InvestigationRepository; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationMessage; diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/domain/service/InvestigationsReceiverServiceTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/domain/service/InvestigationsReceiverServiceTest.java index dfcfca8ffe..f8778f80b4 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/domain/service/InvestigationsReceiverServiceTest.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/domain/service/InvestigationsReceiverServiceTest.java @@ -23,8 +23,8 @@ import org.eclipse.tractusx.traceability.common.mapper.NotificationMapper; import org.eclipse.tractusx.traceability.common.mapper.QualityNotificationMapper; import org.eclipse.tractusx.traceability.common.model.BPN; -import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.model.EDCNotification; -import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.model.EDCNotificationFactory; +import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotification; +import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotificationFactory; 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.QualityNotificationAffectedPart; From 4b531779528538b1d8cd3fa26235d503791a04ec Mon Sep 17 00:00:00 2001 From: Maximilian Wesener Date: Tue, 19 Sep 2023 09:36:18 +0200 Subject: [PATCH 77/84] chore: TRACEFOSS-XXX refactored edc notification classes --- tx-backend/collection/Insomnia-2.png | Bin 15824 -> 0 bytes tx-backend/collection/Insomnia.png | Bin 40811 -> 0 bytes tx-backend/collection/README.md | 23 +++++++++++------------ 3 files changed, 11 insertions(+), 12 deletions(-) delete mode 100644 tx-backend/collection/Insomnia-2.png delete mode 100644 tx-backend/collection/Insomnia.png diff --git a/tx-backend/collection/Insomnia-2.png b/tx-backend/collection/Insomnia-2.png deleted file mode 100644 index 76a3e258ad4a4edcb869aca8f0b818b8ec831c52..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 15824 zcmc(`2Q=I7|2M2vv|4;iRcX;lRna2UR@y3x*d=0ADN&;~5wW|Bwv>upJN8QK6m9J- zVn>G=VkaabcdFmt{XFM?KmT(-=iJXZk8_+P*XMJs_w}By>-~NW)Ysx*7hq>%V&c$# zc+ZH5i5bhpbmZu9Rz}M@aXX9gam33=OM|Jj@4^z}$FXO3_3kn;Rm7d#w_{=aKH>4u z!i$NC+xyS|kr_u}eu5-XO4b-E2)z!KUT)Qtoz&T??5F}WuDC|dCjZfyQ7t6LzsP&t6Y*W+O9ctVa5WP zLZ)4(YG1V2EPbWJ!w>kiFOJf$0h#|i`5yM(acq|^DDO4jQ>-OokiL??@vEIJ?$0wO zU`AkI;PXk8Yw#O(m*OgoooeUd;@sSCD0jRYjYb<$KOAB?G0e-@I9@OH&R`%E>bf=G z+akjsI3rI#i`5qgs_l#zkK%AznSZFsGy<4=GG{;cbk1RJzP1=xA^`c*%JfbzKtTw} zThFFhLjkT$)ydSd9ky$9b!*$laYRA*&z(DdaP+V(%PK%Y+~jcPke{cKNB%TEd=2FI z^Qo>A@pnL@%YWZ^$DJkc=RruqamJZ4{&MaW94_SIHDRRR>crgIVQa|L&%I>Czg;)8 z0vW_Q;5>ZNA%V!)@zeD3s&f82{az%$r7>f>fbH$=$9{f(>#~2}yT50lpqRR7{O>wA zqWAxP+xV=2_|M4yyG3Q*`(f+w|9%G=fWxW9{wopK>&*cF?Y95BPX8U{fG-++SJ@8) zCjSyJ-8r*n|Jj@$Z1PCNXn)vwzqAr9hxtujRylCHQ|k^Dok*yPBHso>%(T zg~@8?czF55Du#Z5dfLgIq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z+UZ~!N2cGGRI!e$Bj(kfo?v}nnD}x@Nq-Hq8JKj$5CXs<_}Selm6$DnP+I!yF%g1% zb}Wl2#x;a^|KFM=Rh-S3Nuz7Av0F>OFY{FTkodrRb}B|fK>(M|Tu|6H6@DETaK<_F zW~UE2UUGmq6k|`Vd!r#vDnHdtqpLE{ Preferences -> Data -3) Import from file -4) Choose tracex.json file -5) On the top left you will see "dev" -6) Click on it and choose Manage Environments -7) Fill in all sensitive data for desired environments -8) Then you can simply request the api (auth will be automatically done by insomnia) - ![](https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/backend/collection/Insomnia.png) +1) Receive password secured zip file by team +2) Unzip with password from keepass +3) Open Insomnia +4) Click on Application -> Preferences -> Data +5) Import from file +6) On the top left you will see all environments of trace-x +7) Then you can simply request the api (auth will be automatically done by insomnia) ## How to update the collection @@ -16,6 +14,7 @@ 2) Click on Application -> Preferences -> Data 3) Export Trace-X collection 4) Choose insomnia v4 file format -5) Name it tracex.json -6) !!!!!!!!! Click NO on Export Private Environment prompt !!!!!! - ![](Insomnia-2.png) +5) Click YES on Export Private ENV +6) Zip and give it the password saved into keepass +7) Share by mail to all devs / product owners + From 32c9e71af808ba150183fb17de17278ca5c7ed11 Mon Sep 17 00:00:00 2001 From: Maximilian Wesener Date: Tue, 19 Sep 2023 09:47:53 +0200 Subject: [PATCH 78/84] chore: TRACEFOSS-XXX refactored edc notification classes --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef096da958..474b64ce5d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] ### Added +### Removed +- Old edc code not necessary anymore ## [7.0.0 - 18.09.2023] ### Added From 1e539b881c0c3481f7fcddb9623d5aa127da8364 Mon Sep 17 00:00:00 2001 From: Maximilian Wesener Date: Tue, 19 Sep 2023 11:42:34 +0200 Subject: [PATCH 79/84] chore: TRACEFOSS-XXX workflow dispatch --- .github/workflows/docker-image-main_backend.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/docker-image-main_backend.yml b/.github/workflows/docker-image-main_backend.yml index 83177dd098..486bc8c7f8 100644 --- a/.github/workflows/docker-image-main_backend.yml +++ b/.github/workflows/docker-image-main_backend.yml @@ -20,6 +20,8 @@ name: "[BE][BUILT][RELEASE] Docker Image on Main" on: push: branches: main + workflow_dispatch: + env: GHCR_REGISTRY: ghcr.io From b271b68ea54be68b61b611af0e84226f463ae326 Mon Sep 17 00:00:00 2001 From: Maximilian Wesener Date: Tue, 19 Sep 2023 12:59:20 +0200 Subject: [PATCH 80/84] chore: TRACEFOSS-XXX fix check quality investigation proper values. --- .../traceability/test/TraceabilityTestStepDefinition.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tx-cucumber-tests/src/test/java/org/eclipse/tractusx/traceability/test/TraceabilityTestStepDefinition.java b/tx-cucumber-tests/src/test/java/org/eclipse/tractusx/traceability/test/TraceabilityTestStepDefinition.java index 99f3d29a93..46005d2e22 100644 --- a/tx-cucumber-tests/src/test/java/org/eclipse/tractusx/traceability/test/TraceabilityTestStepDefinition.java +++ b/tx-cucumber-tests/src/test/java/org/eclipse/tractusx/traceability/test/TraceabilityTestStepDefinition.java @@ -108,7 +108,7 @@ public void iCheckIfQualityInvestigationHasProperValues(DataTable dataTable) { await() .atMost(Duration.TWO_MINUTES) .pollInterval(1, TimeUnit.SECONDS) - .catchUncaughtExceptions() + .ignoreExceptions() .until(() -> { QualityNotificationResponse result = restProvider.getNotification(getNotificationIdBasedOnEnv(), INVESTIGATION); NotificationValidator.assertHasFields(result, normalize(dataTable.asMap())); From 9a31a7d30d6ee73e5489a64f4c37b045921d6800 Mon Sep 17 00:00:00 2001 From: Maximilian Wesener Date: Tue, 19 Sep 2023 13:25:07 +0200 Subject: [PATCH 81/84] chore: TRACEFOSS-XXX remove feature files. --- .../features/10_TRACEFOSS-1125.feature | 67 ----- .../features/1_TRACEFOSS-1393.feature | 277 ------------------ .../features/2_TRACEFOSS-600.feature | 265 ----------------- .../features/3_TRACEFOSS-936.feature | 145 --------- .../features/4_TRACEFOSS-938.feature | 156 ---------- .../features/5_TRACEFOSS-1625.feature | 46 --- .../features/6_TRACEFOSS-382.feature | 59 ---- .../features/7_TRACEFOSS-1090.feature | 43 --- .../features/8_TRACEFOSS-608.feature | 55 ---- .../features/9_TRACEFOSS-2354.feature | 81 ----- 10 files changed, 1194 deletions(-) delete mode 100644 tx-cucumber-tests/src/test/resources/features/10_TRACEFOSS-1125.feature delete mode 100644 tx-cucumber-tests/src/test/resources/features/1_TRACEFOSS-1393.feature delete mode 100644 tx-cucumber-tests/src/test/resources/features/2_TRACEFOSS-600.feature delete mode 100644 tx-cucumber-tests/src/test/resources/features/3_TRACEFOSS-936.feature delete mode 100644 tx-cucumber-tests/src/test/resources/features/4_TRACEFOSS-938.feature delete mode 100644 tx-cucumber-tests/src/test/resources/features/5_TRACEFOSS-1625.feature delete mode 100644 tx-cucumber-tests/src/test/resources/features/6_TRACEFOSS-382.feature delete mode 100644 tx-cucumber-tests/src/test/resources/features/7_TRACEFOSS-1090.feature delete mode 100644 tx-cucumber-tests/src/test/resources/features/8_TRACEFOSS-608.feature delete mode 100644 tx-cucumber-tests/src/test/resources/features/9_TRACEFOSS-2354.feature diff --git a/tx-cucumber-tests/src/test/resources/features/10_TRACEFOSS-1125.feature b/tx-cucumber-tests/src/test/resources/features/10_TRACEFOSS-1125.feature deleted file mode 100644 index 6d3fb39572..0000000000 --- a/tx-cucumber-tests/src/test/resources/features/10_TRACEFOSS-1125.feature +++ /dev/null @@ -1,67 +0,0 @@ -@TRACEFOSS-1125 -Feature: ⭐[BE] User select severity for Quality Investigation - #*As a* User, - #*I want* to be able to assign a severity status for the part(s) of a notification - #*so that* I am able to inform the supplier (within the notification) about the criticality of my request for investigation. - #h3. Outcome - # * User can select the severity based on the list in the documentation - # ** MINOR - # ** MAJOR - # ** CRITICAL - # ** LIFE-THREATENING - # * Severity is sent to the receiver of the notification in the corresponding field - # * The severity of the parts is changed on sender and receiver side based on the information in the notification. - # - #h2. Hints - # * Today severity is hard coded "minor" in Notification - # * [Concept|https://confluence.catena-x.net/pages/viewpage.action?pageId=69429778] - - #Check if *severity* is processed correctly for created quality investigations which contains following checks: - # * correct creation - # * correct reception on receiver side - # - #h2. Sprint Planning 2 - # * Make sure to not have duplicate lines of gherkin language which link to the same technical methods - # * Write test - # * Validate github action against e2e environment - # * Give Feedback to Alex and make suggestions of gherkin and technical steps - # * Request two new technical users (see reference ticket here: https://jira.catena-x.net/browse/CPLP-2808)  with client id / secret for - # ** ADMIN role - # ** USER role - # * Request system team ticket (see reference ticket here: [https://github.com/eclipse-tractusx/sig-infra/issues/66) |https://github.com/eclipse-tractusx/sig-infra/issues/66] - # ** For the mapping of the secrets in github - # * Add new secrets to the code - # - #  - @TRACEFOSS-1220 @TRACEFOSS-1920 @TEST-1217 @TRACEFOSS-1138 @TRACEFOSS-1139 @TRACEFOSS-1101 @TRACEFOSS-1673 @TEST-904 @INTEGRATION_TEST - Scenario Outline: [BE] Check correct processing of severity in quality investigation - When I am logged into TRACE_X_A application - And I create quality investigation - | "severity" | | - | "description" | "Testing severity TRACEFOSS-1220" | - Then I check, if quality investigation has proper values - | "severity" | | - | "description" | "Testing severity TRACEFOSS-1220" | - | "status" | "CREATED" | - When I approve quality investigation - Then I check, if quality investigation has proper values - | "status" | "SENT" | - When I am logged into TRACE_X_B application - Then I check, if quality investigation has been received - Then I check, if quality investigation has proper values - | "severity" | | - | "description" | "Testing severity TRACEFOSS-1220" | - | "status" | "RECEIVED" | - When I acknowledge quality investigation - Then I check, if quality investigation has proper values - | "status" | "ACKNOWLEDGED" | - When I am logged into TRACE_X_A application - Then I check, if quality investigation has proper values - | "status" | "ACKNOWLEDGED" | - - Examples: - | severity | - | "MINOR" | - | "MAJOR" | - | "CRITICAL" | - | "LIFE-THREATENING" | diff --git a/tx-cucumber-tests/src/test/resources/features/1_TRACEFOSS-1393.feature b/tx-cucumber-tests/src/test/resources/features/1_TRACEFOSS-1393.feature deleted file mode 100644 index 9bedc5be6d..0000000000 --- a/tx-cucumber-tests/src/test/resources/features/1_TRACEFOSS-1393.feature +++ /dev/null @@ -1,277 +0,0 @@ -@TRACEFOSS-1393 -Feature: ⭐ [BE][QUALITY_ALERTS] Create (POST) quality alerts (Rest API) - #h2. User Story - # - #*As a* user - #*I want to* be able to see all quality alerts / notifications based on their status and type with the date created in a separate Quality Alerts inbox - #*so that* I can have an overview and perform actions like view details on the notifications. - # - #h2. Outcome - # - #- (-) New table is added which shows "Quality Alerts" - - #Check if *CANCELLATION* of quality alerts is processed correctly which contains following checks: - #* correct CANCELLATION on receiver side - #* correct reception of status update on sender side - #* correct reason on receiver and sender side - @TRACEFOSS-1864 @TRACEFOSS-1920 @TEST-1217 @TEST-904 @TRACEFOSS-1673 @TRACEFOSS-1101 @INTEGRATION_TEST - Scenario: [BE] Check correct processing of CANCELLATION of quality alerts - When I am logged into TRACE_X_A application - And I create quality alert - | "severity" | "MAJOR" | - | "description" | "Testing ACCEPTANCE TRACEFOSS-1864" | - Then I check, if quality alert has proper values - | "description" | "Testing ACCEPTANCE TRACEFOSS-1864" | - | "status" | "CREATED" | - When I cancel quality alert - Then I check, if quality alert has proper values - | "status" | "CANCELED" | - - When I am logged into TRACE_X_B application - Then I check, if quality alert has not been received - - #Check if *CLOSURE* of quality alerts is processed correctly which contains following checks: - #* correct CLOSURE on receiver side - #* correct reception of status update on sender side - #* correct reason on receiver and sender side - @TRACEFOSS-1863 @TRACEFOSS-1920 @TEST-1217 @TEST-904 @TRACEFOSS-1101 @TRACEFOSS-1673 @INTEGRATION_TEST - Scenario: [BE] Check correct processing of CLOSURE of quality alerts - When I am logged into TRACE_X_A application - And I create quality alert - | "severity" | "MAJOR" | - | "description" | "Testing ACCEPTANCE TRACEFOSS-1863" | - Then I check, if quality alert has proper values - | "description" | "Testing ACCEPTANCE TRACEFOSS-1863" | - | "status" | "CREATED" | - When I approve quality alert - Then I check, if quality alert has proper values - | "status" | "SENT" | - When I am logged into TRACE_X_B application - Then I check, if quality alert has been received - And I check, if quality alert has proper values - | "status" | "RECEIVED" | - When I acknowledge quality alert - Then I check, if quality alert has proper values - | "status" | "ACKNOWLEDGED" | - - When I am logged into TRACE_X_A application - Then I check, if quality alert has proper values - | "status" | "ACKNOWLEDGED" | - When I close quality alert - Then I check, if quality alert has proper values - | "status" | "CLOSED" | - - When I am logged into TRACE_X_B application - Then I check, if quality alert has proper values - | "status" | "CLOSED" | - - #Check if *several parts* are processed correctly in *one* created quality alert which contains following checks: - #* correct sending of several parts in *one* alert - #* correct reception of several parts in *one* alert on receiver side - #* correct update of *one* alert with several parts - @TRACEFOSS-1670 @TRACEFOSS-1920 @TRACEFOSS-1101 @TRACEFOSS-1673 @TEST-904 @TEST-1217 @INTEGRATION_TEST - Scenario: [BE] Check correct processing of several parts in quality alerts - When I am logged into TRACE_X_A application - And I create quality alert with two parts - | "severity" | "MINOR" | - | "description" | "Testing severity TRACEFOSS-1670" | - Then I check, if quality alert has proper values - | "description" | "Testing severity TRACEFOSS-1670" | - | "status" | "CREATED" | - | "assetIdCount" | "2" | - When I approve quality alert - Then I check, if quality alert has proper values - | "status" | "SENT" | - When I am logged into TRACE_X_B application - Then I check, if quality alert has been received - Then I check, if quality alert has proper values - | "description" | "Testing severity TRACEFOSS-1670" | - | "status" | "RECEIVED" | - | "assetIdCount" | "2" | - When I acknowledge quality alert - Then I check, if quality alert has proper values - | "status" | "ACKNOWLEDGED" | - When I am logged into TRACE_X_A application - Then I check, if quality alert has proper values - | "status" | "ACKNOWLEDGED" | - | "assetIdCount" | "2" | - - #Check if *bpn names* of *sender and receiver* are processed correctly for created quality alerts which contains following checks: - #* correct creation on sender side - #* correct reception on receiver side - @TRACEFOSS-1547 @TRACEFOSS-1101 @TRACEFOSS-1920 @TRACEFOSS-1673 @TEST-904 @TEST-1217 @INTEGRATION_TEST - Scenario: [BE] Check correct processing of bpn names in quality alerts - When I am logged into TRACE_X_A application - And I create quality alert - | "description" | "Testing BPNs TRACEFOSS-1547" | - | "severity" | "MINOR" | - Then I check, if quality alert has proper values - | "description" | "Testing BPNs TRACEFOSS-1547" | - | "createdBy" | "BPNL00000003CML1" | - | "sendTo" | "BPNL00000003CNKC" | - | "status" | "CREATED" | - When I approve quality alert - Then I check, if quality alert has proper values - | "status" | "SENT" | - When I am logged into TRACE_X_B application - Then I check, if quality alert has been received - Then I check, if quality alert has proper values - | "description" | "Testing BPNs TRACEFOSS-1547" | - | "createdBy" | "BPNL00000003CML1" | - | "sendTo" | "BPNL00000003CNKC" | - | "status" | "RECEIVED" | - - #Check if *targetDate = null* is processed correctly for created quality alerts which contains following checks: - #* correct sending of _targetDate_ = *null* - #* correct reception on receiver side - @TRACEFOSS-1546 @TRACEFOSS-1101 @TRACEFOSS-1920 @TRACEFOSS-1673 @TEST-904 @TEST-1217 @INTEGRATION_TEST - Scenario: [BE] Check correct processing of targetDate = null in quality alerts - When I am logged into TRACE_X_A application - And I create quality alert - | "severity" | "MINOR" | - | "description" | "Testing without targetDate TRACEFOSS-1546" | - Then I check, if quality alert has proper values - | "description" | "Testing without targetDate TRACEFOSS-1546" | - | "targetDate" | "" | - | "status" | "CREATED" | - When I approve quality alert - Then I check, if quality alert has proper values - | "status" | "SENT" | - When I am logged into TRACE_X_B application - Then I check, if quality alert has been received - Then I check, if quality alert has proper values - | "description" | "Testing without targetDate TRACEFOSS-1546" | - | "targetDate" | "" | - | "status" | "RECEIVED" | - - #Check if *DECLINATION* of quality alerts is processed correctly which contains following checks: - #* correct DECLINATION status on receiver side - #* correct reception of status update on sender side - #* correct reason on receiver and sender side - @TRACEFOSS-1545 @TRACEFOSS-1101 @TRACEFOSS-1920 @TRACEFOSS-1673 @TEST-904 @TEST-1217 @INTEGRATION_TEST - Scenario: [BE] Check correct processing of DECLINATION of quality alerts - When I am logged into TRACE_X_A application - And I create quality alert - | "severity" | "MAJOR" | - | "description" | "Testing DECLINATION TRACEFOSS-1545" | - Then I check, if quality alert has proper values - | "severity" | "MAJOR" | - | "description" | "Testing DECLINATION TRACEFOSS-1545" | - | "status" | "CREATED" | - When I approve quality alert - Then I check, if quality alert has proper values - | "status" | "SENT" | - When I am logged into TRACE_X_B application - Then I check, if quality alert has been received - Then I check, if quality alert has proper values - | "severity" | "MAJOR" | - | "description" | "Testing DECLINATION TRACEFOSS-1545" | - | "status" | "RECEIVED" | - When I acknowledge quality alert - Then I check, if quality alert has proper values - | "status" | "ACKNOWLEDGED" | - When I decline quality alert - | "reason" | "declined in TRACEFOSS-1545" | - Then I check, if quality alert has proper values - | "status" | "DECLINED" | - When I am logged into TRACE_X_A application - Then I check, if quality alert has proper values - | "status" | "DECLINED" | - And I check, if quality alert has proper values - | "description" | "declined in TRACEFOSS-1545" | - - #Check if *ACCEPTANCE* of quality alerts is processed correctly which contains following checks: - #* correct ACCEPTANCE on receiver side - #* correct reception of status update on sender side - #* correct reason on receiver and sender side - @TRACEFOSS-1544 @TRACEFOSS-1101 @TRACEFOSS-1920 @TEST-904 @TRACEFOSS-1673 @TEST-1217 @INTEGRATION_TEST - Scenario: [BE] Check correct processing of ACCEPTANCE of quality alerts - When I am logged into TRACE_X_A application - And I create quality alert - | "severity" | "MAJOR" | - | "description" | "Testing ACCEPTANCE TRACEFOSS-1544" | - Then I check, if quality alert has proper values - | "severity" | "MAJOR" | - | "description" | "Testing ACCEPTANCE TRACEFOSS-1544" | - | "status" | "CREATED" | - When I approve quality alert - Then I check, if quality alert has proper values - | "status" | "SENT" | - When I am logged into TRACE_X_B application - Then I check, if quality alert has been received - Then I check, if quality alert has proper values - | "severity" | "MAJOR" | - | "description" | "Testing ACCEPTANCE TRACEFOSS-1544" | - | "status" | "RECEIVED" | - When I acknowledge quality alert - Then I check, if quality alert has proper values - | "status" | "ACKNOWLEDGED" | - When I accept quality alert - | "reason" | "accepted in TRACEFOSS-1544" | - Then I check, if quality alert has proper values - | "status" | "ACCEPTED" | - When I am logged into TRACE_X_A application - Then I check, if quality alert has proper values - | "status" | "ACCEPTED" | - And I check, if quality alert has proper values - | "acceptReason" | "accepted in TRACEFOSS-1544" | - - #Check if *targetDate* is processed correctly for created quality alerts which contains following checks: - #* correct sending of _targetDate_ - #* correct reception on receiver side - @TRACEFOSS-1543 @TRACEFOSS-1920 @TEST-904 @TRACEFOSS-1673 @TRACEFOSS-1101 @TEST-1217 @INTEGRATION_TEST - Scenario: [BE] Check correct processing of targetDate in quality alerts - When I am logged into TRACE_X_A application - And I create quality alert - | "severity" | "MINOR" | - | "description" | "Testing targetDate TRACEFOSS-1543" | - | "targetDate" | "2055-05-30T20:43:06.333827Z" | - Then I check, if quality alert has proper values - | "description" | "Testing targetDate TRACEFOSS-1543" | - | "targetDate" | "2055-05-30T20:43:06.333827Z" | - | "status" | "CREATED" | - When I approve quality alert - Then I check, if quality alert has proper values - | "status" | "SENT" | - When I am logged into TRACE_X_B application - Then I check, if quality alert has been received - Then I check, if quality alert has proper values - | "description" | "Testing targetDate TRACEFOSS-1543" | - | "targetDate" | "2055-05-30T20:43:06.333827Z" | - | "status" | "RECEIVED" | - - #Check if *severity* is processed correctly for created quality alerts which contains following checks: - #* correct creation - #* correct reception on receiver side - @TRACEFOSS-1539 @TRACEFOSS-1920 @TRACEFOSS-1101 @TRACEFOSS-1673 @TEST-904 @TEST-1217 @INTEGRATION_TEST - Scenario Outline: [BE] Check correct processing of severity in quality alerts - When I am logged into TRACE_X_A application - And I create quality alert - | "severity" | | - | "description" | "Testing severity TRACEFOSS-1539" | - Then I check, if quality alert has proper values - | "severity" | | - | "description" | "Testing severity TRACEFOSS-1539" | - | "status" | "CREATED" | - When I approve quality alert - Then I check, if quality alert has proper values - | "status" | "SENT" | - When I am logged into TRACE_X_B application - Then I check, if quality alert has been received - Then I check, if quality alert has proper values - | "severity" | | - | "description" | "Testing severity TRACEFOSS-1539" | - | "status" | "RECEIVED" | - When I acknowledge quality alert - Then I check, if quality alert has proper values - | "status" | "ACKNOWLEDGED" | - When I am logged into TRACE_X_A application - Then I check, if quality alert has proper values - | "status" | "ACKNOWLEDGED" | - - Examples: - | severity | - | "MINOR" | - | "MAJOR" | - | "CRITICAL" | - | "LIFE-THREATENING" | diff --git a/tx-cucumber-tests/src/test/resources/features/2_TRACEFOSS-600.feature b/tx-cucumber-tests/src/test/resources/features/2_TRACEFOSS-600.feature deleted file mode 100644 index 86fdbcc9dd..0000000000 --- a/tx-cucumber-tests/src/test/resources/features/2_TRACEFOSS-600.feature +++ /dev/null @@ -1,265 +0,0 @@ -@TRACEFOSS-600 -Feature: ⭐ [BE][QUALITY_ALERTS] Enable Quality Alerts - #h2. User Story - # - #*As a* user - #*I want to* be able to use all quality alerts - #*so that* can report quality problems in upstream visibility. - #h2. Outcome - # * (x) Quality Alerts are implementd (HAPPY PATH) - # - #h2. Consolidation for pbis - # * TRACEFOSS-1388 - # - #h2. Sprint Planning 2 - # * Part 1 -> Pull Request 1 - # ** Make sure to not duplicate code instead of base class or reuse existing logic (e.g. state transitions) - # ** Implement a service - # ** Publisher Service - # ** Receiver Service - # ** Implement a repository - # * Part 2 -> Pull Request 2 ( Do not start with it before PR 1 is merged) - # ** Make sure all condiitions which exclude quality alerts are removed - # ** Make sure that the existing api which creates a contract will be able to create it for quality alerts - # *** /api/edc/notification/contract - # ** Make sure that the logic of receiver side does filter for quality alert assets (currently only for quality investigations) - # ** Send alert from a to b - # ** Send alert from b to a - # * Part 3 -> Pull Request 3 -> Enable frontend -> [~martin.maul@doubleslash.de]  - # ** [https://github.com/catenax-ng/tx-traceability-foss/pull/264/files#diff-de4cfce80ee64138f3cdf6ab0af7b29aed8687212738a0a2d18567e29e7b9472R31] - # **   - - #Check if *CANCELLATION* of quality alerts is processed correctly which contains following checks: - #* correct CANCELLATION on receiver side - #* correct reception of status update on sender side - #* correct reason on receiver and sender side - @TRACEFOSS-1864 @TRACEFOSS-1920 @TEST-1217 @TEST-904 @TRACEFOSS-1673 @TRACEFOSS-1101 @INTEGRATION_TEST - Scenario: [BE] Check correct processing of CANCELLATION of quality alerts - When I am logged into TRACE_X_A application - And I create quality alert - | "severity" | "MAJOR" | - | "description" | "Testing ACCEPTANCE TRACEFOSS-1864" | - Then I check, if quality alert has proper values - | "description" | "Testing ACCEPTANCE TRACEFOSS-1864" | - | "status" | "CREATED" | - When I cancel quality alert - Then I check, if quality alert has proper values - | "status" | "CANCELED" | - - When I am logged into TRACE_X_B application - Then I check, if quality alert has not been received - - #Check if *CLOSURE* of quality alerts is processed correctly which contains following checks: - #* correct CLOSURE on receiver side - #* correct reception of status update on sender side - #* correct reason on receiver and sender side - @TRACEFOSS-1863 @TRACEFOSS-1920 @TEST-1217 @TEST-904 @TRACEFOSS-1101 @TRACEFOSS-1673 @INTEGRATION_TEST - Scenario: [BE] Check correct processing of CLOSURE of quality alerts - When I am logged into TRACE_X_A application - And I create quality alert - | "severity" | "MAJOR" | - | "description" | "Testing ACCEPTANCE TRACEFOSS-1863" | - Then I check, if quality alert has proper values - | "description" | "Testing ACCEPTANCE TRACEFOSS-1863" | - | "status" | "CREATED" | - When I approve quality alert - Then I check, if quality alert has proper values - | "status" | "SENT" | - When I am logged into TRACE_X_B application - Then I check, if quality alert has been received - And I check, if quality alert has proper values - | "status" | "RECEIVED" | - When I acknowledge quality alert - Then I check, if quality alert has proper values - | "status" | "ACKNOWLEDGED" | - - When I am logged into TRACE_X_A application - Then I check, if quality alert has proper values - | "status" | "ACKNOWLEDGED" | - When I close quality alert - Then I check, if quality alert has proper values - | "status" | "CLOSED" | - - When I am logged into TRACE_X_B application - Then I check, if quality alert has proper values - | "status" | "CLOSED" | - - #Check if *bpn names* of *sender and receiver* are processed correctly for created quality alerts which contains following checks: - #* correct creation on sender side - #* correct reception on receiver side - @TRACEFOSS-1547 @TRACEFOSS-1101 @TRACEFOSS-1920 @TRACEFOSS-1673 @TEST-904 @TEST-1217 @INTEGRATION_TEST - Scenario: [BE] Check correct processing of bpn names in quality alerts - When I am logged into TRACE_X_A application - And I create quality alert - | "description" | "Testing BPNs TRACEFOSS-1547" | - | "severity" | "MINOR" | - Then I check, if quality alert has proper values - | "description" | "Testing BPNs TRACEFOSS-1547" | - | "createdBy" | "BPNL00000003CML1" | - | "sendTo" | "BPNL00000003CNKC" | - | "status" | "CREATED" | - When I approve quality alert - Then I check, if quality alert has proper values - | "status" | "SENT" | - When I am logged into TRACE_X_B application - Then I check, if quality alert has been received - Then I check, if quality alert has proper values - | "description" | "Testing BPNs TRACEFOSS-1547" | - | "createdBy" | "BPNL00000003CML1" | - | "sendTo" | "BPNL00000003CNKC" | - | "status" | "RECEIVED" | - - #Check if *targetDate = null* is processed correctly for created quality alerts which contains following checks: - #* correct sending of _targetDate_ = *null* - #* correct reception on receiver side - @TRACEFOSS-1546 @TRACEFOSS-1101 @TRACEFOSS-1920 @TRACEFOSS-1673 @TEST-904 @TEST-1217 @INTEGRATION_TEST - Scenario: [BE] Check correct processing of targetDate = null in quality alerts - When I am logged into TRACE_X_A application - And I create quality alert - | "severity" | "MINOR" | - | "description" | "Testing without targetDate TRACEFOSS-1546" | - Then I check, if quality alert has proper values - | "description" | "Testing without targetDate TRACEFOSS-1546" | - | "targetDate" | "" | - | "status" | "CREATED" | - When I approve quality alert - Then I check, if quality alert has proper values - | "status" | "SENT" | - When I am logged into TRACE_X_B application - Then I check, if quality alert has been received - Then I check, if quality alert has proper values - | "description" | "Testing without targetDate TRACEFOSS-1546" | - | "targetDate" | "" | - | "status" | "RECEIVED" | - - #Check if *DECLINATION* of quality alerts is processed correctly which contains following checks: - #* correct DECLINATION status on receiver side - #* correct reception of status update on sender side - #* correct reason on receiver and sender side - @TRACEFOSS-1545 @TRACEFOSS-1101 @TRACEFOSS-1920 @TRACEFOSS-1673 @TEST-904 @TEST-1217 @INTEGRATION_TEST - Scenario: [BE] Check correct processing of DECLINATION of quality alerts - When I am logged into TRACE_X_A application - And I create quality alert - | "severity" | "MAJOR" | - | "description" | "Testing DECLINATION TRACEFOSS-1545" | - Then I check, if quality alert has proper values - | "severity" | "MAJOR" | - | "description" | "Testing DECLINATION TRACEFOSS-1545" | - | "status" | "CREATED" | - When I approve quality alert - Then I check, if quality alert has proper values - | "status" | "SENT" | - When I am logged into TRACE_X_B application - Then I check, if quality alert has been received - Then I check, if quality alert has proper values - | "severity" | "MAJOR" | - | "description" | "Testing DECLINATION TRACEFOSS-1545" | - | "status" | "RECEIVED" | - When I acknowledge quality alert - Then I check, if quality alert has proper values - | "status" | "ACKNOWLEDGED" | - When I decline quality alert - | "reason" | "declined in TRACEFOSS-1545" | - Then I check, if quality alert has proper values - | "status" | "DECLINED" | - When I am logged into TRACE_X_A application - Then I check, if quality alert has proper values - | "status" | "DECLINED" | - And I check, if quality alert has proper values - | "description" | "declined in TRACEFOSS-1545" | - - #Check if *ACCEPTANCE* of quality alerts is processed correctly which contains following checks: - #* correct ACCEPTANCE on receiver side - #* correct reception of status update on sender side - #* correct reason on receiver and sender side - @TRACEFOSS-1544 @TRACEFOSS-1101 @TRACEFOSS-1920 @TEST-904 @TRACEFOSS-1673 @TEST-1217 @INTEGRATION_TEST - Scenario: [BE] Check correct processing of ACCEPTANCE of quality alerts - When I am logged into TRACE_X_A application - And I create quality alert - | "severity" | "MAJOR" | - | "description" | "Testing ACCEPTANCE TRACEFOSS-1544" | - Then I check, if quality alert has proper values - | "severity" | "MAJOR" | - | "description" | "Testing ACCEPTANCE TRACEFOSS-1544" | - | "status" | "CREATED" | - When I approve quality alert - Then I check, if quality alert has proper values - | "status" | "SENT" | - When I am logged into TRACE_X_B application - Then I check, if quality alert has been received - Then I check, if quality alert has proper values - | "severity" | "MAJOR" | - | "description" | "Testing ACCEPTANCE TRACEFOSS-1544" | - | "status" | "RECEIVED" | - When I acknowledge quality alert - Then I check, if quality alert has proper values - | "status" | "ACKNOWLEDGED" | - When I accept quality alert - | "reason" | "accepted in TRACEFOSS-1544" | - Then I check, if quality alert has proper values - | "status" | "ACCEPTED" | - When I am logged into TRACE_X_A application - Then I check, if quality alert has proper values - | "status" | "ACCEPTED" | - And I check, if quality alert has proper values - | "acceptReason" | "accepted in TRACEFOSS-1544" | - - #Check if *targetDate* is processed correctly for created quality alerts which contains following checks: - #* correct sending of _targetDate_ - #* correct reception on receiver side - @TRACEFOSS-1543 @TRACEFOSS-1920 @TEST-904 @TRACEFOSS-1673 @TRACEFOSS-1101 @TEST-1217 @INTEGRATION_TEST - Scenario: [BE] Check correct processing of targetDate in quality alerts - When I am logged into TRACE_X_A application - And I create quality alert - | "severity" | "MINOR" | - | "description" | "Testing targetDate TRACEFOSS-1543" | - | "targetDate" | "2055-05-30T20:43:06.333827Z" | - Then I check, if quality alert has proper values - | "description" | "Testing targetDate TRACEFOSS-1543" | - | "targetDate" | "2055-05-30T20:43:06.333827Z" | - | "status" | "CREATED" | - When I approve quality alert - Then I check, if quality alert has proper values - | "status" | "SENT" | - When I am logged into TRACE_X_B application - Then I check, if quality alert has been received - Then I check, if quality alert has proper values - | "description" | "Testing targetDate TRACEFOSS-1543" | - | "targetDate" | "2055-05-30T20:43:06.333827Z" | - | "status" | "RECEIVED" | - - #Check if *severity* is processed correctly for created quality alerts which contains following checks: - #* correct creation - #* correct reception on receiver side - @TRACEFOSS-1539 @TRACEFOSS-1920 @TRACEFOSS-1101 @TRACEFOSS-1673 @TEST-904 @TEST-1217 @INTEGRATION_TEST - Scenario Outline: [BE] Check correct processing of severity in quality alerts - When I am logged into TRACE_X_A application - And I create quality alert - | "severity" | | - | "description" | "Testing severity TRACEFOSS-1539" | - Then I check, if quality alert has proper values - | "severity" | | - | "description" | "Testing severity TRACEFOSS-1539" | - | "status" | "CREATED" | - When I approve quality alert - Then I check, if quality alert has proper values - | "status" | "SENT" | - When I am logged into TRACE_X_B application - Then I check, if quality alert has been received - Then I check, if quality alert has proper values - | "severity" | | - | "description" | "Testing severity TRACEFOSS-1539" | - | "status" | "RECEIVED" | - When I acknowledge quality alert - Then I check, if quality alert has proper values - | "status" | "ACKNOWLEDGED" | - When I am logged into TRACE_X_A application - Then I check, if quality alert has proper values - | "status" | "ACKNOWLEDGED" | - - Examples: - | severity | - | "MINOR" | - | "MAJOR" | - | "CRITICAL" | - | "LIFE-THREATENING" | diff --git a/tx-cucumber-tests/src/test/resources/features/3_TRACEFOSS-936.feature b/tx-cucumber-tests/src/test/resources/features/3_TRACEFOSS-936.feature deleted file mode 100644 index 58e66bb9a0..0000000000 --- a/tx-cucumber-tests/src/test/resources/features/3_TRACEFOSS-936.feature +++ /dev/null @@ -1,145 +0,0 @@ -@TRACEFOSS-936 -Feature: ⭐[BE] Include reason for receiver and sender investigations - #*As a* Dev - # - #*I want to* update contract of: - # - #/investigations/created (sender side of notifications) - #/investigations/received (receiver side of notifications) - # - #with following object: - #{code:java} - #{ - # "reason" : { - # "close" : $string, - # "accept": $string, | nullable - # "decline": $string | nullable - # } - #} {code} - #Where for accept and decline reason, it's either one or another. Reasons are passed from receiver to sender and from sender to receiver via EDC and stored in the database. - # - #*so that* the information provided with the update is also stored and provided to sender and receiver sides. - - #Check if *CANCELLATION* of quality investigations is processed correctly which contains following checks: - #* correct CANCELLATION on receiver side - #* correct reception of status update on sender side - #* correct reason on receiver and sender side - @TRACEFOSS-1862 @TRACEFOSS-1920 @TEST-1217 @TEST-904 @TRACEFOSS-1101 @TRACEFOSS-1673 @INTEGRATION_TEST - Scenario: [BE] Check correct processing of CANCELLATION of quality investigation - When I am logged into TRACE_X_A application - And I create quality investigation - | "severity" | "MAJOR" | - | "description" | "Testing ACCEPTANCE TRACEFOSS-1862" | - Then I check, if quality investigation has proper values - | "description" | "Testing ACCEPTANCE TRACEFOSS-1862" | - | "status" | "CREATED" | - When I cancel quality investigation - Then I check, if quality investigation has proper values - | "status" | "CANCELED" | - When I am logged into TRACE_X_B application - Then I check, if quality investigation has not been received - - #Check if *CLOSURE* of quality investigations is processed correctly which contains following checks: - #* correct CLOSE on receiver side - #* correct reception of status update on sender side - #* correct reason on receiver and sender side - @TRACEFOSS-1861 @TRACEFOSS-1920 @TEST-1217 @TRACEFOSS-1101 @TEST-904 @TRACEFOSS-1673 @INTEGRATION_TEST - Scenario: [BE] Check correct processing of CLOSURE of quality investigation - When I am logged into TRACE_X_A application - And I create quality investigation - | "severity" | "MAJOR" | - | "description" | "Testing ACCEPTANCE TRACEFOSS-1861" | - Then I check, if quality investigation has proper values - | "description" | "Testing ACCEPTANCE TRACEFOSS-1861" | - | "status" | "CREATED" | - When I approve quality investigation - Then I check, if quality investigation has proper values - | "status" | "SENT" | - When I am logged into TRACE_X_B application - Then I check, if quality investigation has been received - And I check, if quality investigation has proper values - | "status" | "RECEIVED" | - When I acknowledge quality investigation - Then I check, if quality investigation has proper values - | "status" | "ACKNOWLEDGED" | - - When I am logged into TRACE_X_A application - Then I check, if quality investigation has proper values - | "status" | "ACKNOWLEDGED" | - When I close quality investigation - Then I check, if quality investigation has proper values - | "status" | "CLOSED" | - - When I am logged into TRACE_X_B application - Then I check, if quality investigation has proper values - | "status" | "CLOSED" | - - #Check if *DECLINATION* of quality investigations is processed correctly which contains following checks: - #* correct DECLINATION status on receiver side - #* correct reception of status update on sender side - #* correct reason on receiver and sender side - @TRACEFOSS-1223 @TRACEFOSS-1920 @TRACEFOSS-1673 @TEST-1217 @TRACEFOSS-1139 @TEST-904 @TRACEFOSS-1138 @TRACEFOSS-1101 @INTEGRATION_TEST - Scenario: [BE] Check correct processing of DECLINATION of quality investigation - When I am logged into TRACE_X_A application - And I create quality investigation - | "severity" | "MAJOR" | - | "description" | "Testing DECLINATION TRACEFOSS-1223" | - Then I check, if quality investigation has proper values - | "severity" | "MAJOR" | - | "description" | "Testing DECLINATION TRACEFOSS-1223" | - | "status" | "CREATED" | - When I approve quality investigation - Then I check, if quality investigation has proper values - | "status" | "SENT" | - When I am logged into TRACE_X_B application - Then I check, if quality investigation has been received - Then I check, if quality investigation has proper values - | "severity" | "MAJOR" | - | "description" | "Testing DECLINATION TRACEFOSS-1223" | - | "status" | "RECEIVED" | - When I acknowledge quality investigation - Then I check, if quality investigation has proper values - | "status" | "ACKNOWLEDGED" | - When I decline quality investigation - | "reason" | "declined in TRACEFOSS-1223" | - Then I check, if quality investigation has proper values - | "status" | "DECLINED" | - When I am logged into TRACE_X_A application - Then I check, if quality investigation has proper values - | "status" | "DECLINED" | - | "declineReason" | "declined in TRACEFOSS-1223" | - - #Check if *ACCEPTANCE* of quality investigations is processed correctly which contains following checks: - #* correct ACCEPTANCE on receiver side - #* correct reception of status update on sender side - #* correct reason on receiver and sender side - @TRACEFOSS-1222 @TRACEFOSS-1920 @TRACEFOSS-1673 @TEST-1217 @TRACEFOSS-1139 @TRACEFOSS-1138 @TRACEFOSS-1101 @TEST-904 @INTEGRATION_TEST - Scenario: [BE] Check correct processing of ACCEPTANCE of quality investigation - When I am logged into TRACE_X_A application - And I create quality investigation - | "severity" | "MAJOR" | - | "description" | "Testing ACCEPTANCE TRACEFOSS-1222" | - Then I check, if quality investigation has proper values - | "severity" | "MAJOR" | - | "description" | "Testing ACCEPTANCE TRACEFOSS-1222" | - | "status" | "CREATED" | - When I approve quality investigation - Then I check, if quality investigation has proper values - | "status" | "SENT" | - When I am logged into TRACE_X_B application - Then I check, if quality investigation has been received - Then I check, if quality investigation has proper values - | "severity" | "MAJOR" | - | "description" | "Testing ACCEPTANCE TRACEFOSS-1222" | - | "status" | "RECEIVED" | - When I acknowledge quality investigation - Then I check, if quality investigation has proper values - | "status" | "ACKNOWLEDGED" | - When I accept quality investigation - | "reason" | "accepted in TRACEFOSS-1222" | - Then I check, if quality investigation has proper values - | "status" | "ACCEPTED" | - When I am logged into TRACE_X_A application - Then I check, if quality investigation has proper values - | "status" | "ACCEPTED" | - | "acceptReason" | "accepted in TRACEFOSS-1222" | diff --git a/tx-cucumber-tests/src/test/resources/features/4_TRACEFOSS-938.feature b/tx-cucumber-tests/src/test/resources/features/4_TRACEFOSS-938.feature deleted file mode 100644 index 28a43a16fe..0000000000 --- a/tx-cucumber-tests/src/test/resources/features/4_TRACEFOSS-938.feature +++ /dev/null @@ -1,156 +0,0 @@ -@TRACEFOSS-938 -Feature: ⭐[TEST] Update Quality Investigation (over EDC) - #h2. User Story - # - #*As* Supervisor - #*I want* to be able to update a quality investigation that I received - #*so that* the corresponding partner knows in which status the notification is on my side. - #h2. Hints / Details / . Hints & NFR (Technical, Design & Content))* :  - # - #1. BPN B receives a notification - #2. BPN B updates notification - #3. BPN A receives notification update with corresponding status - # * The right notification asset needs to be looked up in the Catalog offer of the counter side - # * Lookup based on asset:props - # * Keep in mind that some fields are optional and might be empty - # ** Handle based on documentation / agreement like for send/receive - # ** E.g. "information" will be empty for Update from REC to ACK - # * Utilize EDC Update functionality in order to send investigation update over EDC from BNP B to BPN A. - # - #Docs: [Notification Update Docu|https://confluence.catena-x.net/pages/viewpage.action?pageId=69429778#id-(TRS)[Release3]%F0%9F%93%9CTraceabilityApp(ImplementationSpecification)-HttpPOSTendpointtoupdateanotification] - # - #!screenshot-1.png|thumbnail! - #h2. TODO: - # * (-) Fill out description - # * (-) Fill out Story Points - # * (-) Assign an Assignee - # * (-) define Acceptance Criteria - # * (-) [DoR |https://confluence.catena-x.net/pages/viewpage.action?pageId=917505]  - # - #h2. LOP - # * (/) [~thomas.braun3@zf.com] Update AC and describe error handling, retry and rollback. - # * (/) Add pbi for "Close notification on sender side". --> TRACEFOSS-961 - - #Check if *CANCELLATION* of quality investigations is processed correctly which contains following checks: - #* correct CANCELLATION on receiver side - #* correct reception of status update on sender side - #* correct reason on receiver and sender side - @TRACEFOSS-1862 @TRACEFOSS-1920 @TEST-1217 @TEST-904 @TRACEFOSS-1101 @TRACEFOSS-1673 @INTEGRATION_TEST - Scenario: [BE] Check correct processing of CANCELLATION of quality investigation - When I am logged into TRACE_X_A application - And I create quality investigation - | "severity" | "MAJOR" | - | "description" | "Testing ACCEPTANCE TRACEFOSS-1862" | - Then I check, if quality investigation has proper values - | "description" | "Testing ACCEPTANCE TRACEFOSS-1862" | - | "status" | "CREATED" | - When I cancel quality investigation - Then I check, if quality investigation has proper values - | "status" | "CANCELED" | - When I am logged into TRACE_X_B application - Then I check, if quality investigation has not been received - - #Check if *CLOSURE* of quality investigations is processed correctly which contains following checks: - #* correct CLOSE on receiver side - #* correct reception of status update on sender side - #* correct reason on receiver and sender side - @TRACEFOSS-1861 @TRACEFOSS-1920 @TEST-1217 @TRACEFOSS-1101 @TEST-904 @TRACEFOSS-1673 @INTEGRATION_TEST - Scenario: [BE] Check correct processing of CLOSURE of quality investigation - When I am logged into TRACE_X_A application - And I create quality investigation - | "severity" | "MAJOR" | - | "description" | "Testing ACCEPTANCE TRACEFOSS-1861" | - Then I check, if quality investigation has proper values - | "description" | "Testing ACCEPTANCE TRACEFOSS-1861" | - | "status" | "CREATED" | - When I approve quality investigation - Then I check, if quality investigation has proper values - | "status" | "SENT" | - When I am logged into TRACE_X_B application - Then I check, if quality investigation has been received - And I check, if quality investigation has proper values - | "status" | "RECEIVED" | - When I acknowledge quality investigation - Then I check, if quality investigation has proper values - | "status" | "ACKNOWLEDGED" | - - When I am logged into TRACE_X_A application - Then I check, if quality investigation has proper values - | "status" | "ACKNOWLEDGED" | - When I close quality investigation - Then I check, if quality investigation has proper values - | "status" | "CLOSED" | - - When I am logged into TRACE_X_B application - Then I check, if quality investigation has proper values - | "status" | "CLOSED" | - - #Check if *DECLINATION* of quality investigations is processed correctly which contains following checks: - #* correct DECLINATION status on receiver side - #* correct reception of status update on sender side - #* correct reason on receiver and sender side - @TRACEFOSS-1223 @TRACEFOSS-1920 @TRACEFOSS-1673 @TEST-1217 @TRACEFOSS-1139 @TEST-904 @TRACEFOSS-1138 @TRACEFOSS-1101 @INTEGRATION_TEST - Scenario: [BE] Check correct processing of DECLINATION of quality investigation - When I am logged into TRACE_X_A application - And I create quality investigation - | "severity" | "MAJOR" | - | "description" | "Testing DECLINATION TRACEFOSS-1223" | - Then I check, if quality investigation has proper values - | "severity" | "MAJOR" | - | "description" | "Testing DECLINATION TRACEFOSS-1223" | - | "status" | "CREATED" | - When I approve quality investigation - Then I check, if quality investigation has proper values - | "status" | "SENT" | - When I am logged into TRACE_X_B application - Then I check, if quality investigation has been received - Then I check, if quality investigation has proper values - | "severity" | "MAJOR" | - | "description" | "Testing DECLINATION TRACEFOSS-1223" | - | "status" | "RECEIVED" | - When I acknowledge quality investigation - Then I check, if quality investigation has proper values - | "status" | "ACKNOWLEDGED" | - When I decline quality investigation - | "reason" | "declined in TRACEFOSS-1223" | - Then I check, if quality investigation has proper values - | "status" | "DECLINED" | - When I am logged into TRACE_X_A application - Then I check, if quality investigation has proper values - | "status" | "DECLINED" | - | "declineReason" | "declined in TRACEFOSS-1223" | - - #Check if *ACCEPTANCE* of quality investigations is processed correctly which contains following checks: - #* correct ACCEPTANCE on receiver side - #* correct reception of status update on sender side - #* correct reason on receiver and sender side - @TRACEFOSS-1222 @TRACEFOSS-1920 @TRACEFOSS-1673 @TEST-1217 @TRACEFOSS-1139 @TRACEFOSS-1138 @TRACEFOSS-1101 @TEST-904 @INTEGRATION_TEST - Scenario: [BE] Check correct processing of ACCEPTANCE of quality investigation - When I am logged into TRACE_X_A application - And I create quality investigation - | "severity" | "MAJOR" | - | "description" | "Testing ACCEPTANCE TRACEFOSS-1222" | - Then I check, if quality investigation has proper values - | "severity" | "MAJOR" | - | "description" | "Testing ACCEPTANCE TRACEFOSS-1222" | - | "status" | "CREATED" | - When I approve quality investigation - Then I check, if quality investigation has proper values - | "status" | "SENT" | - When I am logged into TRACE_X_B application - Then I check, if quality investigation has been received - Then I check, if quality investigation has proper values - | "severity" | "MAJOR" | - | "description" | "Testing ACCEPTANCE TRACEFOSS-1222" | - | "status" | "RECEIVED" | - When I acknowledge quality investigation - Then I check, if quality investigation has proper values - | "status" | "ACKNOWLEDGED" | - When I accept quality investigation - | "reason" | "accepted in TRACEFOSS-1222" | - Then I check, if quality investigation has proper values - | "status" | "ACCEPTED" | - When I am logged into TRACE_X_A application - Then I check, if quality investigation has proper values - | "status" | "ACCEPTED" | - | "acceptReason" | "accepted in TRACEFOSS-1222" | diff --git a/tx-cucumber-tests/src/test/resources/features/5_TRACEFOSS-1625.feature b/tx-cucumber-tests/src/test/resources/features/5_TRACEFOSS-1625.feature deleted file mode 100644 index c116149b48..0000000000 --- a/tx-cucumber-tests/src/test/resources/features/5_TRACEFOSS-1625.feature +++ /dev/null @@ -1,46 +0,0 @@ -@TRACEFOSS-1625 -Feature: [BE][FE]Handling of several parts in one quality alert - #*As* a user - #*I want* to be able to create and response quality alerts with several parts as one alert - #*So that* quality alerts with several parts are able to be processed on either sender or receiver side correctly - # - #*Outcome* - #* quality alerts are created on sender side as one alert even with several parts - #* quality alerts with several parts are sent correctly as one alert to the receiver - #* receiver creates one alert with several parts as sent - #* receiver and sender can change status and update each other for alerts with several parts - # - #*Additional information* - #Currently quality alerts with several parts are created correctly as one alert on the sender side but are created as own alert for each part on the receiver side. - #(!) Quality-Investigations are processed correctly! - - #Check if *several parts* are processed correctly in *one* created quality alert which contains following checks: - #* correct sending of several parts in *one* alert - #* correct reception of several parts in *one* alert on receiver side - #* correct update of *one* alert with several parts - @TRACEFOSS-1670 @TRACEFOSS-1920 @TRACEFOSS-1101 @TRACEFOSS-1673 @TEST-904 @TEST-1217 @INTEGRATION_TEST - Scenario: [BE] Check correct processing of several parts in quality alerts - When I am logged into TRACE_X_A application - And I create quality alert with two parts - | "severity" | "MINOR" | - | "description" | "Testing severity TRACEFOSS-1670" | - Then I check, if quality alert has proper values - | "description" | "Testing severity TRACEFOSS-1670" | - | "status" | "CREATED" | - | "assetIdCount" | "2" | - When I approve quality alert - Then I check, if quality alert has proper values - | "status" | "SENT" | - When I am logged into TRACE_X_B application - Then I check, if quality alert has been received - Then I check, if quality alert has proper values - | "description" | "Testing severity TRACEFOSS-1670" | - | "status" | "RECEIVED" | - | "assetIdCount" | "2" | - When I acknowledge quality alert - Then I check, if quality alert has proper values - | "status" | "ACKNOWLEDGED" | - When I am logged into TRACE_X_A application - Then I check, if quality alert has proper values - | "status" | "ACKNOWLEDGED" | - | "assetIdCount" | "2" | diff --git a/tx-cucumber-tests/src/test/resources/features/6_TRACEFOSS-382.feature b/tx-cucumber-tests/src/test/resources/features/6_TRACEFOSS-382.feature deleted file mode 100644 index 8466c11be6..0000000000 --- a/tx-cucumber-tests/src/test/resources/features/6_TRACEFOSS-382.feature +++ /dev/null @@ -1,59 +0,0 @@ -@TRACEFOSS-382 -Feature: Create Request for quality investigation / store in queue - #h2. Remarks - #* (-) Test the solution - #* (-) Provide test data - #* (-) TRACEFOSS-392 - #* (-) TRACEFOSS-384 - #* (-) - # - #h2. User story - #As a user - # - #I want to be able to create a quality investigation for selected parts with a description of the defect - # - #to notify the corresponding supplier(s) of the parts about a possible quality issue that needs to be investigated. The requests should be stored in a queue with status pending and not be directly send to the supplier(s). - # - #  - # - #*Detailed description* - # - #The user can create a quality investigation for one or more parts. The description added in the pop up will be added to every part. Once the user creates a quality investigation he will get an information that there is one or more investigations pending for distribution. - #The user can click on the information and will directy be redirected to pending Queue in his Quality investigation inbox. - # - #  - # - #*Additional info* - # * - Description: free text, max length: 1000  - # * - Hint: Pending state and store in Queue because *later* we might set up a rights an role concept and only specific role (Supervisor) is able to send Notifications to partners. - - #Check if *several parts* in one investigation are processed correctly which contains following checks: - #* correct sending of several parts in *one* investigation - #* correct reception of several parts in *one* investigation on receiver side - #* correct update of *one* investigation with several parts - @TRACEFOSS-1652 @TRACEFOSS-1101 @INTEGRATION_TEST - Scenario: [BE] Check correct processing of several parts in quality investigation - When I am logged into TRACE_X_A application - And I create quality investigation with two parts - | "severity" | "MINOR" | - | "description" | "Testing severity TRACEFOSS-1652" | - Then I check, if quality investigation has proper values - | "description" | "Testing severity TRACEFOSS-1652" | - | "status" | "CREATED" | - | "assetIdCount" | "2" | - When I approve quality investigation - Then I check, if quality investigation has proper values - | "status" | "SENT" | - When I am logged into TRACE_X_B application - Then I check, if quality investigation has been received - Then I check, if quality investigation has proper values - | "description" | "Testing severity TRACEFOSS-1652" | - | "status" | "RECEIVED" | - | "assetIdCount" | "2" | - When I acknowledge quality investigation - Then I check, if quality investigation has proper values - | "status" | "ACKNOWLEDGED" | - When I am logged into TRACE_X_A application - Then I check, if quality investigation has proper values - | "status" | "ACKNOWLEDGED" | - | "assetIdCount" | "2" | diff --git a/tx-cucumber-tests/src/test/resources/features/7_TRACEFOSS-1090.feature b/tx-cucumber-tests/src/test/resources/features/7_TRACEFOSS-1090.feature deleted file mode 100644 index 1f1126f26f..0000000000 --- a/tx-cucumber-tests/src/test/resources/features/7_TRACEFOSS-1090.feature +++ /dev/null @@ -1,43 +0,0 @@ -@TRACEFOSS-1090 -Feature: 🪓⭐[BE] Add information to notification inbox - #As a *User* - # - #I want to have added the information of severity, send to (BPN / name), and received from (BPN / name) as additional columns to the notifications inbox - # - #so that I am able to see on the first sign who/whom the notification was sent to as well as the severity. - #h3. Outcome - # * Add an additional field for bpn name (sender + receiver) - # * Add an additional field for severity - # - # - #h3. Hint - #* BPN name and severity is published over the API that it could be requested by the frontend API . - #* Mapping between BPN number and company name is part of the job response of IRS. - # - #h3. Sprint Planning 2 - #* Add BPN and severity to the investigation response. - - #Check if *bpn names* of *sender and receiver* are processed correctly for created quality investigations which contains following checks: - #* correct creation on sender side - #* correct reception on receiver side - @TRACEFOSS-1344 @TRACEFOSS-1920 @TRACEFOSS-1101 @TRACEFOSS-1138 @TRACEFOSS-1673 @TEST-1217 @TRACEFOSS-1139 @TEST-904 @INTEGRATION_TEST - Scenario: [BE] Check correct processing of bpn names in quality investigation - When I am logged into TRACE_X_A application - And I create quality investigation - | "description" | "Testing BPNs TRACEFOSS-1344" | - | "severity" | "MINOR" | - Then I check, if quality investigation has proper values - | "description" | "Testing BPNs TRACEFOSS-1344" | - | "createdBy" | "BPNL00000003CML1" | - | "sendTo" | "BPNL00000003CNKC" | - | "status" | "CREATED" | - When I approve quality investigation - Then I check, if quality investigation has proper values - | "status" | "SENT" | - When I am logged into TRACE_X_B application - Then I check, if quality investigation has been received - Then I check, if quality investigation has proper values - | "description" | "Testing BPNs TRACEFOSS-1344" | - | "createdBy" | "BPNL00000003CML1" | - | "sendTo" | "BPNL00000003CNKC" | - | "status" | "RECEIVED" | diff --git a/tx-cucumber-tests/src/test/resources/features/8_TRACEFOSS-608.feature b/tx-cucumber-tests/src/test/resources/features/8_TRACEFOSS-608.feature deleted file mode 100644 index 7847904832..0000000000 --- a/tx-cucumber-tests/src/test/resources/features/8_TRACEFOSS-608.feature +++ /dev/null @@ -1,55 +0,0 @@ -@TRACEFOSS-608 -Feature: ⭐[TEST] [BE] Set and show notification target date - #*As a* User - #*I want to* be able to set a target date for my notification while creating it - #*so that* I am able to monitor if a reply was given in time. - # - #h2. Hints - #[Concept | https://confluence.catena-x.net/pages/viewpage.action?pageId=69429778] - - #Check if *targetDate = null* is processed correctly for created quality investigations which contains following checks: - #* correct sending of _targetDate_ = *null* - #* correct reception on receiver side - @TRACEFOSS-1247 @TRACEFOSS-1920 @TEST-1217 @TRACEFOSS-1139 @TEST-904 @TRACEFOSS-1673 @TRACEFOSS-1138 @TRACEFOSS-1101 @INTEGRATION_TEST - Scenario: [BE] Check correct processing of targetDate = null in quality investigation - When I am logged into TRACE_X_A application - And I create quality investigation - | "severity" | "MINOR" | - | "description" | "Testing without targetDate TRACEFOSS-1247" | - Then I check, if quality investigation has proper values - | "description" | "Testing without targetDate TRACEFOSS-1247" | - | "targetDate" | "" | - | "status" | "CREATED" | - When I approve quality investigation - Then I check, if quality investigation has proper values - | "status" | "SENT" | - When I am logged into TRACE_X_B application - Then I check, if quality investigation has been received - Then I check, if quality investigation has proper values - | "description" | "Testing without targetDate TRACEFOSS-1247" | - | "targetDate" | "" | - | "status" | "RECEIVED" | - - #Check if *targetDate* is processed correctly for created quality investigations which contains following checks: - #* correct sending of _targetDate_ - #* correct reception on receiver side - @TRACEFOSS-1216 @TRACEFOSS-1920 @TEST-1217 @TRACEFOSS-1139 @TRACEFOSS-1673 @TRACEFOSS-1138 @TRACEFOSS-1101 @TEST-904 @INTEGRATION_TEST - Scenario: [BE] Check correct processing of targetDate in quality investigation - When I am logged into TRACE_X_A application - And I create quality investigation - | "severity" | "MINOR" | - | "description" | "Testing targetDate TRACEFOSS-1216" | - | "targetDate" | "2099-03-11T22:44:06.333827Z" | - Then I check, if quality investigation has proper values - | "description" | "Testing targetDate TRACEFOSS-1216" | - | "targetDate" | "2099-03-11T22:44:06.333827Z" | - | "status" | "CREATED" | - When I approve quality investigation - Then I check, if quality investigation has proper values - | "status" | "SENT" | - When I am logged into TRACE_X_B application - Then I check, if quality investigation has been received - Then I check, if quality investigation has proper values - | "description" | "Testing targetDate TRACEFOSS-1216" | - | "targetDate" | "2099-03-11T22:44:06.333827Z" | - | "status" | "RECEIVED" | diff --git a/tx-cucumber-tests/src/test/resources/features/9_TRACEFOSS-2354.feature b/tx-cucumber-tests/src/test/resources/features/9_TRACEFOSS-2354.feature deleted file mode 100644 index da2dc65f46..0000000000 --- a/tx-cucumber-tests/src/test/resources/features/9_TRACEFOSS-2354.feature +++ /dev/null @@ -1,81 +0,0 @@ -@TRACEFOSS-2354 -Feature: 👍[BE][TABLE_FEATURE] Implementation of Sorting in table views - #h2. Clarification - # * (/) [~steffen.duering@bmw.de] should cascading sorting be enabled ? --> [~martin.kanal@doubleslash.de]   If possible yes. Could also be done in a further development if not possible - # * (/) [~steffen.duering@bmw.de] On which result set the sorting shall be implemented (current page vs / complete resultset? ) - #-->[~martin.kanal@doubleslash.de]  complete resultset would be great. Is it possible? - # - #h2. Business Value - # # (y) [ ] {*}User-business value:{*}: - # # (y) [ ] *Risk reduction:* - # # (y) [ ] *Regulatory value:* - # # (y) [ ] *Commercial value:* - # # (y) [ ] *Market value:* - # # (y) [ ] *Efficiency value:* - # # (y) [ ] *Future value:* - # - #h2. User Story - # - #*As a user* of Trace-X - #*I want* to be able to sort within the table views - #*so that* I only see relevant data and I'm able to better handle big amount of data - # - #--> This User Story should cover all *Backend* tasks that are necessary to cover the funcionalities in the frontend - #h2. Outcome - # - #- (/) User can sort for any colums in UI (within all table views --> parts, other parts) - #- (/) Multiple sort functionalities can be set for ascending and descending according to concept for different attributes on the same time - #- (/) enable reset of sorting - #- (/) Cascading multi-column sorting on multiple columns (Number is showing the sort order) - #- (/) Sorting of columns is based on complete resultset  - #- (/) Swagger API documentation is updated and available on DEV - #- (/) Cover specific columns where cascading sorting might causes conflict (Takeing the semantic under account) - #h2. Mockup - # - #!screenshot-1.png|thumbnail! - #h2. NFR - # - #* - #h2. Hints / Details / Design Sketch : - # - #* - Then I check, if only assets with are responded - - Examples: - | owner-filter | - | "SUPPLIER" | - | "CUSTOMER" | - | "OWN" | From e75b20708066a67a51bd2693a3f3fe53996b1184 Mon Sep 17 00:00:00 2001 From: Maximilian Wesener Date: Tue, 19 Sep 2023 13:39:51 +0200 Subject: [PATCH 82/84] chore: TRACEFOSS-XXX remove feature files. --- .github/workflows/xray-cucumber.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/xray-cucumber.yaml b/.github/workflows/xray-cucumber.yaml index db04183e59..4682b71927 100644 --- a/.github/workflows/xray-cucumber.yaml +++ b/.github/workflows/xray-cucumber.yaml @@ -58,11 +58,11 @@ jobs: run: mvn install -pl tx-models # Required step due to fact that jira will name feature files differently with each feature added and that will cause duplicate test runs - - name: Cleanup repository feature files - if: ${{ steps.download.outputs.http_response == '200' }} + #- name: Cleanup repository feature files + # if: ${{ steps.download.outputs.http_response == '200' }} #working-directory: tx-cucumber-tests - run: | - rm -r tx-cucumber-tests/src/test/resources/features/* + # run: | + # rm -r tx-cucumber-tests/src/test/resources/features/* - name: Build with Maven if: ${{ steps.download.outputs.http_response == '200' }} From 09a13fa87130a48e5df4499fa1ed5da29c10a4fc Mon Sep 17 00:00:00 2001 From: Maximilian Wesener Date: Tue, 19 Sep 2023 15:53:40 +0200 Subject: [PATCH 83/84] Revert "chore: TRACEFOSS-XXX remove feature files." This reverts commit e75b20708066a67a51bd2693a3f3fe53996b1184. --- .github/workflows/xray-cucumber.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/xray-cucumber.yaml b/.github/workflows/xray-cucumber.yaml index 4682b71927..db04183e59 100644 --- a/.github/workflows/xray-cucumber.yaml +++ b/.github/workflows/xray-cucumber.yaml @@ -58,11 +58,11 @@ jobs: run: mvn install -pl tx-models # Required step due to fact that jira will name feature files differently with each feature added and that will cause duplicate test runs - #- name: Cleanup repository feature files - # if: ${{ steps.download.outputs.http_response == '200' }} + - name: Cleanup repository feature files + if: ${{ steps.download.outputs.http_response == '200' }} #working-directory: tx-cucumber-tests - # run: | - # rm -r tx-cucumber-tests/src/test/resources/features/* + run: | + rm -r tx-cucumber-tests/src/test/resources/features/* - name: Build with Maven if: ${{ steps.download.outputs.http_response == '200' }} From 4aa5296f99edddff130e34bf48816e874e60a9e2 Mon Sep 17 00:00:00 2001 From: Maximilian Wesener Date: Tue, 19 Sep 2023 15:53:40 +0200 Subject: [PATCH 84/84] Revert "chore: TRACEFOSS-XXX remove feature files." This reverts commit 9a31a7d30d6ee73e5489a64f4c37b045921d6800. --- .../features/10_TRACEFOSS-1125.feature | 67 +++++ .../features/1_TRACEFOSS-1393.feature | 277 ++++++++++++++++++ .../features/2_TRACEFOSS-600.feature | 265 +++++++++++++++++ .../features/3_TRACEFOSS-936.feature | 145 +++++++++ .../features/4_TRACEFOSS-938.feature | 156 ++++++++++ .../features/5_TRACEFOSS-1625.feature | 46 +++ .../features/6_TRACEFOSS-382.feature | 59 ++++ .../features/7_TRACEFOSS-1090.feature | 43 +++ .../features/8_TRACEFOSS-608.feature | 55 ++++ .../features/9_TRACEFOSS-2354.feature | 81 +++++ 10 files changed, 1194 insertions(+) create mode 100644 tx-cucumber-tests/src/test/resources/features/10_TRACEFOSS-1125.feature create mode 100644 tx-cucumber-tests/src/test/resources/features/1_TRACEFOSS-1393.feature create mode 100644 tx-cucumber-tests/src/test/resources/features/2_TRACEFOSS-600.feature create mode 100644 tx-cucumber-tests/src/test/resources/features/3_TRACEFOSS-936.feature create mode 100644 tx-cucumber-tests/src/test/resources/features/4_TRACEFOSS-938.feature create mode 100644 tx-cucumber-tests/src/test/resources/features/5_TRACEFOSS-1625.feature create mode 100644 tx-cucumber-tests/src/test/resources/features/6_TRACEFOSS-382.feature create mode 100644 tx-cucumber-tests/src/test/resources/features/7_TRACEFOSS-1090.feature create mode 100644 tx-cucumber-tests/src/test/resources/features/8_TRACEFOSS-608.feature create mode 100644 tx-cucumber-tests/src/test/resources/features/9_TRACEFOSS-2354.feature diff --git a/tx-cucumber-tests/src/test/resources/features/10_TRACEFOSS-1125.feature b/tx-cucumber-tests/src/test/resources/features/10_TRACEFOSS-1125.feature new file mode 100644 index 0000000000..6d3fb39572 --- /dev/null +++ b/tx-cucumber-tests/src/test/resources/features/10_TRACEFOSS-1125.feature @@ -0,0 +1,67 @@ +@TRACEFOSS-1125 +Feature: ⭐[BE] User select severity for Quality Investigation + #*As a* User, + #*I want* to be able to assign a severity status for the part(s) of a notification + #*so that* I am able to inform the supplier (within the notification) about the criticality of my request for investigation. + #h3. Outcome + # * User can select the severity based on the list in the documentation + # ** MINOR + # ** MAJOR + # ** CRITICAL + # ** LIFE-THREATENING + # * Severity is sent to the receiver of the notification in the corresponding field + # * The severity of the parts is changed on sender and receiver side based on the information in the notification. + # + #h2. Hints + # * Today severity is hard coded "minor" in Notification + # * [Concept|https://confluence.catena-x.net/pages/viewpage.action?pageId=69429778] + + #Check if *severity* is processed correctly for created quality investigations which contains following checks: + # * correct creation + # * correct reception on receiver side + # + #h2. Sprint Planning 2 + # * Make sure to not have duplicate lines of gherkin language which link to the same technical methods + # * Write test + # * Validate github action against e2e environment + # * Give Feedback to Alex and make suggestions of gherkin and technical steps + # * Request two new technical users (see reference ticket here: https://jira.catena-x.net/browse/CPLP-2808)  with client id / secret for + # ** ADMIN role + # ** USER role + # * Request system team ticket (see reference ticket here: [https://github.com/eclipse-tractusx/sig-infra/issues/66) |https://github.com/eclipse-tractusx/sig-infra/issues/66] + # ** For the mapping of the secrets in github + # * Add new secrets to the code + # + #  + @TRACEFOSS-1220 @TRACEFOSS-1920 @TEST-1217 @TRACEFOSS-1138 @TRACEFOSS-1139 @TRACEFOSS-1101 @TRACEFOSS-1673 @TEST-904 @INTEGRATION_TEST + Scenario Outline: [BE] Check correct processing of severity in quality investigation + When I am logged into TRACE_X_A application + And I create quality investigation + | "severity" | | + | "description" | "Testing severity TRACEFOSS-1220" | + Then I check, if quality investigation has proper values + | "severity" | | + | "description" | "Testing severity TRACEFOSS-1220" | + | "status" | "CREATED" | + When I approve quality investigation + Then I check, if quality investigation has proper values + | "status" | "SENT" | + When I am logged into TRACE_X_B application + Then I check, if quality investigation has been received + Then I check, if quality investigation has proper values + | "severity" | | + | "description" | "Testing severity TRACEFOSS-1220" | + | "status" | "RECEIVED" | + When I acknowledge quality investigation + Then I check, if quality investigation has proper values + | "status" | "ACKNOWLEDGED" | + When I am logged into TRACE_X_A application + Then I check, if quality investigation has proper values + | "status" | "ACKNOWLEDGED" | + + Examples: + | severity | + | "MINOR" | + | "MAJOR" | + | "CRITICAL" | + | "LIFE-THREATENING" | diff --git a/tx-cucumber-tests/src/test/resources/features/1_TRACEFOSS-1393.feature b/tx-cucumber-tests/src/test/resources/features/1_TRACEFOSS-1393.feature new file mode 100644 index 0000000000..9bedc5be6d --- /dev/null +++ b/tx-cucumber-tests/src/test/resources/features/1_TRACEFOSS-1393.feature @@ -0,0 +1,277 @@ +@TRACEFOSS-1393 +Feature: ⭐ [BE][QUALITY_ALERTS] Create (POST) quality alerts (Rest API) + #h2. User Story + # + #*As a* user + #*I want to* be able to see all quality alerts / notifications based on their status and type with the date created in a separate Quality Alerts inbox + #*so that* I can have an overview and perform actions like view details on the notifications. + # + #h2. Outcome + # + #- (-) New table is added which shows "Quality Alerts" + + #Check if *CANCELLATION* of quality alerts is processed correctly which contains following checks: + #* correct CANCELLATION on receiver side + #* correct reception of status update on sender side + #* correct reason on receiver and sender side + @TRACEFOSS-1864 @TRACEFOSS-1920 @TEST-1217 @TEST-904 @TRACEFOSS-1673 @TRACEFOSS-1101 @INTEGRATION_TEST + Scenario: [BE] Check correct processing of CANCELLATION of quality alerts + When I am logged into TRACE_X_A application + And I create quality alert + | "severity" | "MAJOR" | + | "description" | "Testing ACCEPTANCE TRACEFOSS-1864" | + Then I check, if quality alert has proper values + | "description" | "Testing ACCEPTANCE TRACEFOSS-1864" | + | "status" | "CREATED" | + When I cancel quality alert + Then I check, if quality alert has proper values + | "status" | "CANCELED" | + + When I am logged into TRACE_X_B application + Then I check, if quality alert has not been received + + #Check if *CLOSURE* of quality alerts is processed correctly which contains following checks: + #* correct CLOSURE on receiver side + #* correct reception of status update on sender side + #* correct reason on receiver and sender side + @TRACEFOSS-1863 @TRACEFOSS-1920 @TEST-1217 @TEST-904 @TRACEFOSS-1101 @TRACEFOSS-1673 @INTEGRATION_TEST + Scenario: [BE] Check correct processing of CLOSURE of quality alerts + When I am logged into TRACE_X_A application + And I create quality alert + | "severity" | "MAJOR" | + | "description" | "Testing ACCEPTANCE TRACEFOSS-1863" | + Then I check, if quality alert has proper values + | "description" | "Testing ACCEPTANCE TRACEFOSS-1863" | + | "status" | "CREATED" | + When I approve quality alert + Then I check, if quality alert has proper values + | "status" | "SENT" | + When I am logged into TRACE_X_B application + Then I check, if quality alert has been received + And I check, if quality alert has proper values + | "status" | "RECEIVED" | + When I acknowledge quality alert + Then I check, if quality alert has proper values + | "status" | "ACKNOWLEDGED" | + + When I am logged into TRACE_X_A application + Then I check, if quality alert has proper values + | "status" | "ACKNOWLEDGED" | + When I close quality alert + Then I check, if quality alert has proper values + | "status" | "CLOSED" | + + When I am logged into TRACE_X_B application + Then I check, if quality alert has proper values + | "status" | "CLOSED" | + + #Check if *several parts* are processed correctly in *one* created quality alert which contains following checks: + #* correct sending of several parts in *one* alert + #* correct reception of several parts in *one* alert on receiver side + #* correct update of *one* alert with several parts + @TRACEFOSS-1670 @TRACEFOSS-1920 @TRACEFOSS-1101 @TRACEFOSS-1673 @TEST-904 @TEST-1217 @INTEGRATION_TEST + Scenario: [BE] Check correct processing of several parts in quality alerts + When I am logged into TRACE_X_A application + And I create quality alert with two parts + | "severity" | "MINOR" | + | "description" | "Testing severity TRACEFOSS-1670" | + Then I check, if quality alert has proper values + | "description" | "Testing severity TRACEFOSS-1670" | + | "status" | "CREATED" | + | "assetIdCount" | "2" | + When I approve quality alert + Then I check, if quality alert has proper values + | "status" | "SENT" | + When I am logged into TRACE_X_B application + Then I check, if quality alert has been received + Then I check, if quality alert has proper values + | "description" | "Testing severity TRACEFOSS-1670" | + | "status" | "RECEIVED" | + | "assetIdCount" | "2" | + When I acknowledge quality alert + Then I check, if quality alert has proper values + | "status" | "ACKNOWLEDGED" | + When I am logged into TRACE_X_A application + Then I check, if quality alert has proper values + | "status" | "ACKNOWLEDGED" | + | "assetIdCount" | "2" | + + #Check if *bpn names* of *sender and receiver* are processed correctly for created quality alerts which contains following checks: + #* correct creation on sender side + #* correct reception on receiver side + @TRACEFOSS-1547 @TRACEFOSS-1101 @TRACEFOSS-1920 @TRACEFOSS-1673 @TEST-904 @TEST-1217 @INTEGRATION_TEST + Scenario: [BE] Check correct processing of bpn names in quality alerts + When I am logged into TRACE_X_A application + And I create quality alert + | "description" | "Testing BPNs TRACEFOSS-1547" | + | "severity" | "MINOR" | + Then I check, if quality alert has proper values + | "description" | "Testing BPNs TRACEFOSS-1547" | + | "createdBy" | "BPNL00000003CML1" | + | "sendTo" | "BPNL00000003CNKC" | + | "status" | "CREATED" | + When I approve quality alert + Then I check, if quality alert has proper values + | "status" | "SENT" | + When I am logged into TRACE_X_B application + Then I check, if quality alert has been received + Then I check, if quality alert has proper values + | "description" | "Testing BPNs TRACEFOSS-1547" | + | "createdBy" | "BPNL00000003CML1" | + | "sendTo" | "BPNL00000003CNKC" | + | "status" | "RECEIVED" | + + #Check if *targetDate = null* is processed correctly for created quality alerts which contains following checks: + #* correct sending of _targetDate_ = *null* + #* correct reception on receiver side + @TRACEFOSS-1546 @TRACEFOSS-1101 @TRACEFOSS-1920 @TRACEFOSS-1673 @TEST-904 @TEST-1217 @INTEGRATION_TEST + Scenario: [BE] Check correct processing of targetDate = null in quality alerts + When I am logged into TRACE_X_A application + And I create quality alert + | "severity" | "MINOR" | + | "description" | "Testing without targetDate TRACEFOSS-1546" | + Then I check, if quality alert has proper values + | "description" | "Testing without targetDate TRACEFOSS-1546" | + | "targetDate" | "" | + | "status" | "CREATED" | + When I approve quality alert + Then I check, if quality alert has proper values + | "status" | "SENT" | + When I am logged into TRACE_X_B application + Then I check, if quality alert has been received + Then I check, if quality alert has proper values + | "description" | "Testing without targetDate TRACEFOSS-1546" | + | "targetDate" | "" | + | "status" | "RECEIVED" | + + #Check if *DECLINATION* of quality alerts is processed correctly which contains following checks: + #* correct DECLINATION status on receiver side + #* correct reception of status update on sender side + #* correct reason on receiver and sender side + @TRACEFOSS-1545 @TRACEFOSS-1101 @TRACEFOSS-1920 @TRACEFOSS-1673 @TEST-904 @TEST-1217 @INTEGRATION_TEST + Scenario: [BE] Check correct processing of DECLINATION of quality alerts + When I am logged into TRACE_X_A application + And I create quality alert + | "severity" | "MAJOR" | + | "description" | "Testing DECLINATION TRACEFOSS-1545" | + Then I check, if quality alert has proper values + | "severity" | "MAJOR" | + | "description" | "Testing DECLINATION TRACEFOSS-1545" | + | "status" | "CREATED" | + When I approve quality alert + Then I check, if quality alert has proper values + | "status" | "SENT" | + When I am logged into TRACE_X_B application + Then I check, if quality alert has been received + Then I check, if quality alert has proper values + | "severity" | "MAJOR" | + | "description" | "Testing DECLINATION TRACEFOSS-1545" | + | "status" | "RECEIVED" | + When I acknowledge quality alert + Then I check, if quality alert has proper values + | "status" | "ACKNOWLEDGED" | + When I decline quality alert + | "reason" | "declined in TRACEFOSS-1545" | + Then I check, if quality alert has proper values + | "status" | "DECLINED" | + When I am logged into TRACE_X_A application + Then I check, if quality alert has proper values + | "status" | "DECLINED" | + And I check, if quality alert has proper values + | "description" | "declined in TRACEFOSS-1545" | + + #Check if *ACCEPTANCE* of quality alerts is processed correctly which contains following checks: + #* correct ACCEPTANCE on receiver side + #* correct reception of status update on sender side + #* correct reason on receiver and sender side + @TRACEFOSS-1544 @TRACEFOSS-1101 @TRACEFOSS-1920 @TEST-904 @TRACEFOSS-1673 @TEST-1217 @INTEGRATION_TEST + Scenario: [BE] Check correct processing of ACCEPTANCE of quality alerts + When I am logged into TRACE_X_A application + And I create quality alert + | "severity" | "MAJOR" | + | "description" | "Testing ACCEPTANCE TRACEFOSS-1544" | + Then I check, if quality alert has proper values + | "severity" | "MAJOR" | + | "description" | "Testing ACCEPTANCE TRACEFOSS-1544" | + | "status" | "CREATED" | + When I approve quality alert + Then I check, if quality alert has proper values + | "status" | "SENT" | + When I am logged into TRACE_X_B application + Then I check, if quality alert has been received + Then I check, if quality alert has proper values + | "severity" | "MAJOR" | + | "description" | "Testing ACCEPTANCE TRACEFOSS-1544" | + | "status" | "RECEIVED" | + When I acknowledge quality alert + Then I check, if quality alert has proper values + | "status" | "ACKNOWLEDGED" | + When I accept quality alert + | "reason" | "accepted in TRACEFOSS-1544" | + Then I check, if quality alert has proper values + | "status" | "ACCEPTED" | + When I am logged into TRACE_X_A application + Then I check, if quality alert has proper values + | "status" | "ACCEPTED" | + And I check, if quality alert has proper values + | "acceptReason" | "accepted in TRACEFOSS-1544" | + + #Check if *targetDate* is processed correctly for created quality alerts which contains following checks: + #* correct sending of _targetDate_ + #* correct reception on receiver side + @TRACEFOSS-1543 @TRACEFOSS-1920 @TEST-904 @TRACEFOSS-1673 @TRACEFOSS-1101 @TEST-1217 @INTEGRATION_TEST + Scenario: [BE] Check correct processing of targetDate in quality alerts + When I am logged into TRACE_X_A application + And I create quality alert + | "severity" | "MINOR" | + | "description" | "Testing targetDate TRACEFOSS-1543" | + | "targetDate" | "2055-05-30T20:43:06.333827Z" | + Then I check, if quality alert has proper values + | "description" | "Testing targetDate TRACEFOSS-1543" | + | "targetDate" | "2055-05-30T20:43:06.333827Z" | + | "status" | "CREATED" | + When I approve quality alert + Then I check, if quality alert has proper values + | "status" | "SENT" | + When I am logged into TRACE_X_B application + Then I check, if quality alert has been received + Then I check, if quality alert has proper values + | "description" | "Testing targetDate TRACEFOSS-1543" | + | "targetDate" | "2055-05-30T20:43:06.333827Z" | + | "status" | "RECEIVED" | + + #Check if *severity* is processed correctly for created quality alerts which contains following checks: + #* correct creation + #* correct reception on receiver side + @TRACEFOSS-1539 @TRACEFOSS-1920 @TRACEFOSS-1101 @TRACEFOSS-1673 @TEST-904 @TEST-1217 @INTEGRATION_TEST + Scenario Outline: [BE] Check correct processing of severity in quality alerts + When I am logged into TRACE_X_A application + And I create quality alert + | "severity" | | + | "description" | "Testing severity TRACEFOSS-1539" | + Then I check, if quality alert has proper values + | "severity" | | + | "description" | "Testing severity TRACEFOSS-1539" | + | "status" | "CREATED" | + When I approve quality alert + Then I check, if quality alert has proper values + | "status" | "SENT" | + When I am logged into TRACE_X_B application + Then I check, if quality alert has been received + Then I check, if quality alert has proper values + | "severity" | | + | "description" | "Testing severity TRACEFOSS-1539" | + | "status" | "RECEIVED" | + When I acknowledge quality alert + Then I check, if quality alert has proper values + | "status" | "ACKNOWLEDGED" | + When I am logged into TRACE_X_A application + Then I check, if quality alert has proper values + | "status" | "ACKNOWLEDGED" | + + Examples: + | severity | + | "MINOR" | + | "MAJOR" | + | "CRITICAL" | + | "LIFE-THREATENING" | diff --git a/tx-cucumber-tests/src/test/resources/features/2_TRACEFOSS-600.feature b/tx-cucumber-tests/src/test/resources/features/2_TRACEFOSS-600.feature new file mode 100644 index 0000000000..86fdbcc9dd --- /dev/null +++ b/tx-cucumber-tests/src/test/resources/features/2_TRACEFOSS-600.feature @@ -0,0 +1,265 @@ +@TRACEFOSS-600 +Feature: ⭐ [BE][QUALITY_ALERTS] Enable Quality Alerts + #h2. User Story + # + #*As a* user + #*I want to* be able to use all quality alerts + #*so that* can report quality problems in upstream visibility. + #h2. Outcome + # * (x) Quality Alerts are implementd (HAPPY PATH) + # + #h2. Consolidation for pbis + # * TRACEFOSS-1388 + # + #h2. Sprint Planning 2 + # * Part 1 -> Pull Request 1 + # ** Make sure to not duplicate code instead of base class or reuse existing logic (e.g. state transitions) + # ** Implement a service + # ** Publisher Service + # ** Receiver Service + # ** Implement a repository + # * Part 2 -> Pull Request 2 ( Do not start with it before PR 1 is merged) + # ** Make sure all condiitions which exclude quality alerts are removed + # ** Make sure that the existing api which creates a contract will be able to create it for quality alerts + # *** /api/edc/notification/contract + # ** Make sure that the logic of receiver side does filter for quality alert assets (currently only for quality investigations) + # ** Send alert from a to b + # ** Send alert from b to a + # * Part 3 -> Pull Request 3 -> Enable frontend -> [~martin.maul@doubleslash.de]  + # ** [https://github.com/catenax-ng/tx-traceability-foss/pull/264/files#diff-de4cfce80ee64138f3cdf6ab0af7b29aed8687212738a0a2d18567e29e7b9472R31] + # **   + + #Check if *CANCELLATION* of quality alerts is processed correctly which contains following checks: + #* correct CANCELLATION on receiver side + #* correct reception of status update on sender side + #* correct reason on receiver and sender side + @TRACEFOSS-1864 @TRACEFOSS-1920 @TEST-1217 @TEST-904 @TRACEFOSS-1673 @TRACEFOSS-1101 @INTEGRATION_TEST + Scenario: [BE] Check correct processing of CANCELLATION of quality alerts + When I am logged into TRACE_X_A application + And I create quality alert + | "severity" | "MAJOR" | + | "description" | "Testing ACCEPTANCE TRACEFOSS-1864" | + Then I check, if quality alert has proper values + | "description" | "Testing ACCEPTANCE TRACEFOSS-1864" | + | "status" | "CREATED" | + When I cancel quality alert + Then I check, if quality alert has proper values + | "status" | "CANCELED" | + + When I am logged into TRACE_X_B application + Then I check, if quality alert has not been received + + #Check if *CLOSURE* of quality alerts is processed correctly which contains following checks: + #* correct CLOSURE on receiver side + #* correct reception of status update on sender side + #* correct reason on receiver and sender side + @TRACEFOSS-1863 @TRACEFOSS-1920 @TEST-1217 @TEST-904 @TRACEFOSS-1101 @TRACEFOSS-1673 @INTEGRATION_TEST + Scenario: [BE] Check correct processing of CLOSURE of quality alerts + When I am logged into TRACE_X_A application + And I create quality alert + | "severity" | "MAJOR" | + | "description" | "Testing ACCEPTANCE TRACEFOSS-1863" | + Then I check, if quality alert has proper values + | "description" | "Testing ACCEPTANCE TRACEFOSS-1863" | + | "status" | "CREATED" | + When I approve quality alert + Then I check, if quality alert has proper values + | "status" | "SENT" | + When I am logged into TRACE_X_B application + Then I check, if quality alert has been received + And I check, if quality alert has proper values + | "status" | "RECEIVED" | + When I acknowledge quality alert + Then I check, if quality alert has proper values + | "status" | "ACKNOWLEDGED" | + + When I am logged into TRACE_X_A application + Then I check, if quality alert has proper values + | "status" | "ACKNOWLEDGED" | + When I close quality alert + Then I check, if quality alert has proper values + | "status" | "CLOSED" | + + When I am logged into TRACE_X_B application + Then I check, if quality alert has proper values + | "status" | "CLOSED" | + + #Check if *bpn names* of *sender and receiver* are processed correctly for created quality alerts which contains following checks: + #* correct creation on sender side + #* correct reception on receiver side + @TRACEFOSS-1547 @TRACEFOSS-1101 @TRACEFOSS-1920 @TRACEFOSS-1673 @TEST-904 @TEST-1217 @INTEGRATION_TEST + Scenario: [BE] Check correct processing of bpn names in quality alerts + When I am logged into TRACE_X_A application + And I create quality alert + | "description" | "Testing BPNs TRACEFOSS-1547" | + | "severity" | "MINOR" | + Then I check, if quality alert has proper values + | "description" | "Testing BPNs TRACEFOSS-1547" | + | "createdBy" | "BPNL00000003CML1" | + | "sendTo" | "BPNL00000003CNKC" | + | "status" | "CREATED" | + When I approve quality alert + Then I check, if quality alert has proper values + | "status" | "SENT" | + When I am logged into TRACE_X_B application + Then I check, if quality alert has been received + Then I check, if quality alert has proper values + | "description" | "Testing BPNs TRACEFOSS-1547" | + | "createdBy" | "BPNL00000003CML1" | + | "sendTo" | "BPNL00000003CNKC" | + | "status" | "RECEIVED" | + + #Check if *targetDate = null* is processed correctly for created quality alerts which contains following checks: + #* correct sending of _targetDate_ = *null* + #* correct reception on receiver side + @TRACEFOSS-1546 @TRACEFOSS-1101 @TRACEFOSS-1920 @TRACEFOSS-1673 @TEST-904 @TEST-1217 @INTEGRATION_TEST + Scenario: [BE] Check correct processing of targetDate = null in quality alerts + When I am logged into TRACE_X_A application + And I create quality alert + | "severity" | "MINOR" | + | "description" | "Testing without targetDate TRACEFOSS-1546" | + Then I check, if quality alert has proper values + | "description" | "Testing without targetDate TRACEFOSS-1546" | + | "targetDate" | "" | + | "status" | "CREATED" | + When I approve quality alert + Then I check, if quality alert has proper values + | "status" | "SENT" | + When I am logged into TRACE_X_B application + Then I check, if quality alert has been received + Then I check, if quality alert has proper values + | "description" | "Testing without targetDate TRACEFOSS-1546" | + | "targetDate" | "" | + | "status" | "RECEIVED" | + + #Check if *DECLINATION* of quality alerts is processed correctly which contains following checks: + #* correct DECLINATION status on receiver side + #* correct reception of status update on sender side + #* correct reason on receiver and sender side + @TRACEFOSS-1545 @TRACEFOSS-1101 @TRACEFOSS-1920 @TRACEFOSS-1673 @TEST-904 @TEST-1217 @INTEGRATION_TEST + Scenario: [BE] Check correct processing of DECLINATION of quality alerts + When I am logged into TRACE_X_A application + And I create quality alert + | "severity" | "MAJOR" | + | "description" | "Testing DECLINATION TRACEFOSS-1545" | + Then I check, if quality alert has proper values + | "severity" | "MAJOR" | + | "description" | "Testing DECLINATION TRACEFOSS-1545" | + | "status" | "CREATED" | + When I approve quality alert + Then I check, if quality alert has proper values + | "status" | "SENT" | + When I am logged into TRACE_X_B application + Then I check, if quality alert has been received + Then I check, if quality alert has proper values + | "severity" | "MAJOR" | + | "description" | "Testing DECLINATION TRACEFOSS-1545" | + | "status" | "RECEIVED" | + When I acknowledge quality alert + Then I check, if quality alert has proper values + | "status" | "ACKNOWLEDGED" | + When I decline quality alert + | "reason" | "declined in TRACEFOSS-1545" | + Then I check, if quality alert has proper values + | "status" | "DECLINED" | + When I am logged into TRACE_X_A application + Then I check, if quality alert has proper values + | "status" | "DECLINED" | + And I check, if quality alert has proper values + | "description" | "declined in TRACEFOSS-1545" | + + #Check if *ACCEPTANCE* of quality alerts is processed correctly which contains following checks: + #* correct ACCEPTANCE on receiver side + #* correct reception of status update on sender side + #* correct reason on receiver and sender side + @TRACEFOSS-1544 @TRACEFOSS-1101 @TRACEFOSS-1920 @TEST-904 @TRACEFOSS-1673 @TEST-1217 @INTEGRATION_TEST + Scenario: [BE] Check correct processing of ACCEPTANCE of quality alerts + When I am logged into TRACE_X_A application + And I create quality alert + | "severity" | "MAJOR" | + | "description" | "Testing ACCEPTANCE TRACEFOSS-1544" | + Then I check, if quality alert has proper values + | "severity" | "MAJOR" | + | "description" | "Testing ACCEPTANCE TRACEFOSS-1544" | + | "status" | "CREATED" | + When I approve quality alert + Then I check, if quality alert has proper values + | "status" | "SENT" | + When I am logged into TRACE_X_B application + Then I check, if quality alert has been received + Then I check, if quality alert has proper values + | "severity" | "MAJOR" | + | "description" | "Testing ACCEPTANCE TRACEFOSS-1544" | + | "status" | "RECEIVED" | + When I acknowledge quality alert + Then I check, if quality alert has proper values + | "status" | "ACKNOWLEDGED" | + When I accept quality alert + | "reason" | "accepted in TRACEFOSS-1544" | + Then I check, if quality alert has proper values + | "status" | "ACCEPTED" | + When I am logged into TRACE_X_A application + Then I check, if quality alert has proper values + | "status" | "ACCEPTED" | + And I check, if quality alert has proper values + | "acceptReason" | "accepted in TRACEFOSS-1544" | + + #Check if *targetDate* is processed correctly for created quality alerts which contains following checks: + #* correct sending of _targetDate_ + #* correct reception on receiver side + @TRACEFOSS-1543 @TRACEFOSS-1920 @TEST-904 @TRACEFOSS-1673 @TRACEFOSS-1101 @TEST-1217 @INTEGRATION_TEST + Scenario: [BE] Check correct processing of targetDate in quality alerts + When I am logged into TRACE_X_A application + And I create quality alert + | "severity" | "MINOR" | + | "description" | "Testing targetDate TRACEFOSS-1543" | + | "targetDate" | "2055-05-30T20:43:06.333827Z" | + Then I check, if quality alert has proper values + | "description" | "Testing targetDate TRACEFOSS-1543" | + | "targetDate" | "2055-05-30T20:43:06.333827Z" | + | "status" | "CREATED" | + When I approve quality alert + Then I check, if quality alert has proper values + | "status" | "SENT" | + When I am logged into TRACE_X_B application + Then I check, if quality alert has been received + Then I check, if quality alert has proper values + | "description" | "Testing targetDate TRACEFOSS-1543" | + | "targetDate" | "2055-05-30T20:43:06.333827Z" | + | "status" | "RECEIVED" | + + #Check if *severity* is processed correctly for created quality alerts which contains following checks: + #* correct creation + #* correct reception on receiver side + @TRACEFOSS-1539 @TRACEFOSS-1920 @TRACEFOSS-1101 @TRACEFOSS-1673 @TEST-904 @TEST-1217 @INTEGRATION_TEST + Scenario Outline: [BE] Check correct processing of severity in quality alerts + When I am logged into TRACE_X_A application + And I create quality alert + | "severity" | | + | "description" | "Testing severity TRACEFOSS-1539" | + Then I check, if quality alert has proper values + | "severity" | | + | "description" | "Testing severity TRACEFOSS-1539" | + | "status" | "CREATED" | + When I approve quality alert + Then I check, if quality alert has proper values + | "status" | "SENT" | + When I am logged into TRACE_X_B application + Then I check, if quality alert has been received + Then I check, if quality alert has proper values + | "severity" | | + | "description" | "Testing severity TRACEFOSS-1539" | + | "status" | "RECEIVED" | + When I acknowledge quality alert + Then I check, if quality alert has proper values + | "status" | "ACKNOWLEDGED" | + When I am logged into TRACE_X_A application + Then I check, if quality alert has proper values + | "status" | "ACKNOWLEDGED" | + + Examples: + | severity | + | "MINOR" | + | "MAJOR" | + | "CRITICAL" | + | "LIFE-THREATENING" | diff --git a/tx-cucumber-tests/src/test/resources/features/3_TRACEFOSS-936.feature b/tx-cucumber-tests/src/test/resources/features/3_TRACEFOSS-936.feature new file mode 100644 index 0000000000..58e66bb9a0 --- /dev/null +++ b/tx-cucumber-tests/src/test/resources/features/3_TRACEFOSS-936.feature @@ -0,0 +1,145 @@ +@TRACEFOSS-936 +Feature: ⭐[BE] Include reason for receiver and sender investigations + #*As a* Dev + # + #*I want to* update contract of: + # + #/investigations/created (sender side of notifications) + #/investigations/received (receiver side of notifications) + # + #with following object: + #{code:java} + #{ + # "reason" : { + # "close" : $string, + # "accept": $string, | nullable + # "decline": $string | nullable + # } + #} {code} + #Where for accept and decline reason, it's either one or another. Reasons are passed from receiver to sender and from sender to receiver via EDC and stored in the database. + # + #*so that* the information provided with the update is also stored and provided to sender and receiver sides. + + #Check if *CANCELLATION* of quality investigations is processed correctly which contains following checks: + #* correct CANCELLATION on receiver side + #* correct reception of status update on sender side + #* correct reason on receiver and sender side + @TRACEFOSS-1862 @TRACEFOSS-1920 @TEST-1217 @TEST-904 @TRACEFOSS-1101 @TRACEFOSS-1673 @INTEGRATION_TEST + Scenario: [BE] Check correct processing of CANCELLATION of quality investigation + When I am logged into TRACE_X_A application + And I create quality investigation + | "severity" | "MAJOR" | + | "description" | "Testing ACCEPTANCE TRACEFOSS-1862" | + Then I check, if quality investigation has proper values + | "description" | "Testing ACCEPTANCE TRACEFOSS-1862" | + | "status" | "CREATED" | + When I cancel quality investigation + Then I check, if quality investigation has proper values + | "status" | "CANCELED" | + When I am logged into TRACE_X_B application + Then I check, if quality investigation has not been received + + #Check if *CLOSURE* of quality investigations is processed correctly which contains following checks: + #* correct CLOSE on receiver side + #* correct reception of status update on sender side + #* correct reason on receiver and sender side + @TRACEFOSS-1861 @TRACEFOSS-1920 @TEST-1217 @TRACEFOSS-1101 @TEST-904 @TRACEFOSS-1673 @INTEGRATION_TEST + Scenario: [BE] Check correct processing of CLOSURE of quality investigation + When I am logged into TRACE_X_A application + And I create quality investigation + | "severity" | "MAJOR" | + | "description" | "Testing ACCEPTANCE TRACEFOSS-1861" | + Then I check, if quality investigation has proper values + | "description" | "Testing ACCEPTANCE TRACEFOSS-1861" | + | "status" | "CREATED" | + When I approve quality investigation + Then I check, if quality investigation has proper values + | "status" | "SENT" | + When I am logged into TRACE_X_B application + Then I check, if quality investigation has been received + And I check, if quality investigation has proper values + | "status" | "RECEIVED" | + When I acknowledge quality investigation + Then I check, if quality investigation has proper values + | "status" | "ACKNOWLEDGED" | + + When I am logged into TRACE_X_A application + Then I check, if quality investigation has proper values + | "status" | "ACKNOWLEDGED" | + When I close quality investigation + Then I check, if quality investigation has proper values + | "status" | "CLOSED" | + + When I am logged into TRACE_X_B application + Then I check, if quality investigation has proper values + | "status" | "CLOSED" | + + #Check if *DECLINATION* of quality investigations is processed correctly which contains following checks: + #* correct DECLINATION status on receiver side + #* correct reception of status update on sender side + #* correct reason on receiver and sender side + @TRACEFOSS-1223 @TRACEFOSS-1920 @TRACEFOSS-1673 @TEST-1217 @TRACEFOSS-1139 @TEST-904 @TRACEFOSS-1138 @TRACEFOSS-1101 @INTEGRATION_TEST + Scenario: [BE] Check correct processing of DECLINATION of quality investigation + When I am logged into TRACE_X_A application + And I create quality investigation + | "severity" | "MAJOR" | + | "description" | "Testing DECLINATION TRACEFOSS-1223" | + Then I check, if quality investigation has proper values + | "severity" | "MAJOR" | + | "description" | "Testing DECLINATION TRACEFOSS-1223" | + | "status" | "CREATED" | + When I approve quality investigation + Then I check, if quality investigation has proper values + | "status" | "SENT" | + When I am logged into TRACE_X_B application + Then I check, if quality investigation has been received + Then I check, if quality investigation has proper values + | "severity" | "MAJOR" | + | "description" | "Testing DECLINATION TRACEFOSS-1223" | + | "status" | "RECEIVED" | + When I acknowledge quality investigation + Then I check, if quality investigation has proper values + | "status" | "ACKNOWLEDGED" | + When I decline quality investigation + | "reason" | "declined in TRACEFOSS-1223" | + Then I check, if quality investigation has proper values + | "status" | "DECLINED" | + When I am logged into TRACE_X_A application + Then I check, if quality investigation has proper values + | "status" | "DECLINED" | + | "declineReason" | "declined in TRACEFOSS-1223" | + + #Check if *ACCEPTANCE* of quality investigations is processed correctly which contains following checks: + #* correct ACCEPTANCE on receiver side + #* correct reception of status update on sender side + #* correct reason on receiver and sender side + @TRACEFOSS-1222 @TRACEFOSS-1920 @TRACEFOSS-1673 @TEST-1217 @TRACEFOSS-1139 @TRACEFOSS-1138 @TRACEFOSS-1101 @TEST-904 @INTEGRATION_TEST + Scenario: [BE] Check correct processing of ACCEPTANCE of quality investigation + When I am logged into TRACE_X_A application + And I create quality investigation + | "severity" | "MAJOR" | + | "description" | "Testing ACCEPTANCE TRACEFOSS-1222" | + Then I check, if quality investigation has proper values + | "severity" | "MAJOR" | + | "description" | "Testing ACCEPTANCE TRACEFOSS-1222" | + | "status" | "CREATED" | + When I approve quality investigation + Then I check, if quality investigation has proper values + | "status" | "SENT" | + When I am logged into TRACE_X_B application + Then I check, if quality investigation has been received + Then I check, if quality investigation has proper values + | "severity" | "MAJOR" | + | "description" | "Testing ACCEPTANCE TRACEFOSS-1222" | + | "status" | "RECEIVED" | + When I acknowledge quality investigation + Then I check, if quality investigation has proper values + | "status" | "ACKNOWLEDGED" | + When I accept quality investigation + | "reason" | "accepted in TRACEFOSS-1222" | + Then I check, if quality investigation has proper values + | "status" | "ACCEPTED" | + When I am logged into TRACE_X_A application + Then I check, if quality investigation has proper values + | "status" | "ACCEPTED" | + | "acceptReason" | "accepted in TRACEFOSS-1222" | diff --git a/tx-cucumber-tests/src/test/resources/features/4_TRACEFOSS-938.feature b/tx-cucumber-tests/src/test/resources/features/4_TRACEFOSS-938.feature new file mode 100644 index 0000000000..28a43a16fe --- /dev/null +++ b/tx-cucumber-tests/src/test/resources/features/4_TRACEFOSS-938.feature @@ -0,0 +1,156 @@ +@TRACEFOSS-938 +Feature: ⭐[TEST] Update Quality Investigation (over EDC) + #h2. User Story + # + #*As* Supervisor + #*I want* to be able to update a quality investigation that I received + #*so that* the corresponding partner knows in which status the notification is on my side. + #h2. Hints / Details / . Hints & NFR (Technical, Design & Content))* :  + # + #1. BPN B receives a notification + #2. BPN B updates notification + #3. BPN A receives notification update with corresponding status + # * The right notification asset needs to be looked up in the Catalog offer of the counter side + # * Lookup based on asset:props + # * Keep in mind that some fields are optional and might be empty + # ** Handle based on documentation / agreement like for send/receive + # ** E.g. "information" will be empty for Update from REC to ACK + # * Utilize EDC Update functionality in order to send investigation update over EDC from BNP B to BPN A. + # + #Docs: [Notification Update Docu|https://confluence.catena-x.net/pages/viewpage.action?pageId=69429778#id-(TRS)[Release3]%F0%9F%93%9CTraceabilityApp(ImplementationSpecification)-HttpPOSTendpointtoupdateanotification] + # + #!screenshot-1.png|thumbnail! + #h2. TODO: + # * (-) Fill out description + # * (-) Fill out Story Points + # * (-) Assign an Assignee + # * (-) define Acceptance Criteria + # * (-) [DoR |https://confluence.catena-x.net/pages/viewpage.action?pageId=917505]  + # + #h2. LOP + # * (/) [~thomas.braun3@zf.com] Update AC and describe error handling, retry and rollback. + # * (/) Add pbi for "Close notification on sender side". --> TRACEFOSS-961 + + #Check if *CANCELLATION* of quality investigations is processed correctly which contains following checks: + #* correct CANCELLATION on receiver side + #* correct reception of status update on sender side + #* correct reason on receiver and sender side + @TRACEFOSS-1862 @TRACEFOSS-1920 @TEST-1217 @TEST-904 @TRACEFOSS-1101 @TRACEFOSS-1673 @INTEGRATION_TEST + Scenario: [BE] Check correct processing of CANCELLATION of quality investigation + When I am logged into TRACE_X_A application + And I create quality investigation + | "severity" | "MAJOR" | + | "description" | "Testing ACCEPTANCE TRACEFOSS-1862" | + Then I check, if quality investigation has proper values + | "description" | "Testing ACCEPTANCE TRACEFOSS-1862" | + | "status" | "CREATED" | + When I cancel quality investigation + Then I check, if quality investigation has proper values + | "status" | "CANCELED" | + When I am logged into TRACE_X_B application + Then I check, if quality investigation has not been received + + #Check if *CLOSURE* of quality investigations is processed correctly which contains following checks: + #* correct CLOSE on receiver side + #* correct reception of status update on sender side + #* correct reason on receiver and sender side + @TRACEFOSS-1861 @TRACEFOSS-1920 @TEST-1217 @TRACEFOSS-1101 @TEST-904 @TRACEFOSS-1673 @INTEGRATION_TEST + Scenario: [BE] Check correct processing of CLOSURE of quality investigation + When I am logged into TRACE_X_A application + And I create quality investigation + | "severity" | "MAJOR" | + | "description" | "Testing ACCEPTANCE TRACEFOSS-1861" | + Then I check, if quality investigation has proper values + | "description" | "Testing ACCEPTANCE TRACEFOSS-1861" | + | "status" | "CREATED" | + When I approve quality investigation + Then I check, if quality investigation has proper values + | "status" | "SENT" | + When I am logged into TRACE_X_B application + Then I check, if quality investigation has been received + And I check, if quality investigation has proper values + | "status" | "RECEIVED" | + When I acknowledge quality investigation + Then I check, if quality investigation has proper values + | "status" | "ACKNOWLEDGED" | + + When I am logged into TRACE_X_A application + Then I check, if quality investigation has proper values + | "status" | "ACKNOWLEDGED" | + When I close quality investigation + Then I check, if quality investigation has proper values + | "status" | "CLOSED" | + + When I am logged into TRACE_X_B application + Then I check, if quality investigation has proper values + | "status" | "CLOSED" | + + #Check if *DECLINATION* of quality investigations is processed correctly which contains following checks: + #* correct DECLINATION status on receiver side + #* correct reception of status update on sender side + #* correct reason on receiver and sender side + @TRACEFOSS-1223 @TRACEFOSS-1920 @TRACEFOSS-1673 @TEST-1217 @TRACEFOSS-1139 @TEST-904 @TRACEFOSS-1138 @TRACEFOSS-1101 @INTEGRATION_TEST + Scenario: [BE] Check correct processing of DECLINATION of quality investigation + When I am logged into TRACE_X_A application + And I create quality investigation + | "severity" | "MAJOR" | + | "description" | "Testing DECLINATION TRACEFOSS-1223" | + Then I check, if quality investigation has proper values + | "severity" | "MAJOR" | + | "description" | "Testing DECLINATION TRACEFOSS-1223" | + | "status" | "CREATED" | + When I approve quality investigation + Then I check, if quality investigation has proper values + | "status" | "SENT" | + When I am logged into TRACE_X_B application + Then I check, if quality investigation has been received + Then I check, if quality investigation has proper values + | "severity" | "MAJOR" | + | "description" | "Testing DECLINATION TRACEFOSS-1223" | + | "status" | "RECEIVED" | + When I acknowledge quality investigation + Then I check, if quality investigation has proper values + | "status" | "ACKNOWLEDGED" | + When I decline quality investigation + | "reason" | "declined in TRACEFOSS-1223" | + Then I check, if quality investigation has proper values + | "status" | "DECLINED" | + When I am logged into TRACE_X_A application + Then I check, if quality investigation has proper values + | "status" | "DECLINED" | + | "declineReason" | "declined in TRACEFOSS-1223" | + + #Check if *ACCEPTANCE* of quality investigations is processed correctly which contains following checks: + #* correct ACCEPTANCE on receiver side + #* correct reception of status update on sender side + #* correct reason on receiver and sender side + @TRACEFOSS-1222 @TRACEFOSS-1920 @TRACEFOSS-1673 @TEST-1217 @TRACEFOSS-1139 @TRACEFOSS-1138 @TRACEFOSS-1101 @TEST-904 @INTEGRATION_TEST + Scenario: [BE] Check correct processing of ACCEPTANCE of quality investigation + When I am logged into TRACE_X_A application + And I create quality investigation + | "severity" | "MAJOR" | + | "description" | "Testing ACCEPTANCE TRACEFOSS-1222" | + Then I check, if quality investigation has proper values + | "severity" | "MAJOR" | + | "description" | "Testing ACCEPTANCE TRACEFOSS-1222" | + | "status" | "CREATED" | + When I approve quality investigation + Then I check, if quality investigation has proper values + | "status" | "SENT" | + When I am logged into TRACE_X_B application + Then I check, if quality investigation has been received + Then I check, if quality investigation has proper values + | "severity" | "MAJOR" | + | "description" | "Testing ACCEPTANCE TRACEFOSS-1222" | + | "status" | "RECEIVED" | + When I acknowledge quality investigation + Then I check, if quality investigation has proper values + | "status" | "ACKNOWLEDGED" | + When I accept quality investigation + | "reason" | "accepted in TRACEFOSS-1222" | + Then I check, if quality investigation has proper values + | "status" | "ACCEPTED" | + When I am logged into TRACE_X_A application + Then I check, if quality investigation has proper values + | "status" | "ACCEPTED" | + | "acceptReason" | "accepted in TRACEFOSS-1222" | diff --git a/tx-cucumber-tests/src/test/resources/features/5_TRACEFOSS-1625.feature b/tx-cucumber-tests/src/test/resources/features/5_TRACEFOSS-1625.feature new file mode 100644 index 0000000000..c116149b48 --- /dev/null +++ b/tx-cucumber-tests/src/test/resources/features/5_TRACEFOSS-1625.feature @@ -0,0 +1,46 @@ +@TRACEFOSS-1625 +Feature: [BE][FE]Handling of several parts in one quality alert + #*As* a user + #*I want* to be able to create and response quality alerts with several parts as one alert + #*So that* quality alerts with several parts are able to be processed on either sender or receiver side correctly + # + #*Outcome* + #* quality alerts are created on sender side as one alert even with several parts + #* quality alerts with several parts are sent correctly as one alert to the receiver + #* receiver creates one alert with several parts as sent + #* receiver and sender can change status and update each other for alerts with several parts + # + #*Additional information* + #Currently quality alerts with several parts are created correctly as one alert on the sender side but are created as own alert for each part on the receiver side. + #(!) Quality-Investigations are processed correctly! + + #Check if *several parts* are processed correctly in *one* created quality alert which contains following checks: + #* correct sending of several parts in *one* alert + #* correct reception of several parts in *one* alert on receiver side + #* correct update of *one* alert with several parts + @TRACEFOSS-1670 @TRACEFOSS-1920 @TRACEFOSS-1101 @TRACEFOSS-1673 @TEST-904 @TEST-1217 @INTEGRATION_TEST + Scenario: [BE] Check correct processing of several parts in quality alerts + When I am logged into TRACE_X_A application + And I create quality alert with two parts + | "severity" | "MINOR" | + | "description" | "Testing severity TRACEFOSS-1670" | + Then I check, if quality alert has proper values + | "description" | "Testing severity TRACEFOSS-1670" | + | "status" | "CREATED" | + | "assetIdCount" | "2" | + When I approve quality alert + Then I check, if quality alert has proper values + | "status" | "SENT" | + When I am logged into TRACE_X_B application + Then I check, if quality alert has been received + Then I check, if quality alert has proper values + | "description" | "Testing severity TRACEFOSS-1670" | + | "status" | "RECEIVED" | + | "assetIdCount" | "2" | + When I acknowledge quality alert + Then I check, if quality alert has proper values + | "status" | "ACKNOWLEDGED" | + When I am logged into TRACE_X_A application + Then I check, if quality alert has proper values + | "status" | "ACKNOWLEDGED" | + | "assetIdCount" | "2" | diff --git a/tx-cucumber-tests/src/test/resources/features/6_TRACEFOSS-382.feature b/tx-cucumber-tests/src/test/resources/features/6_TRACEFOSS-382.feature new file mode 100644 index 0000000000..8466c11be6 --- /dev/null +++ b/tx-cucumber-tests/src/test/resources/features/6_TRACEFOSS-382.feature @@ -0,0 +1,59 @@ +@TRACEFOSS-382 +Feature: Create Request for quality investigation / store in queue + #h2. Remarks + #* (-) Test the solution + #* (-) Provide test data + #* (-) TRACEFOSS-392 + #* (-) TRACEFOSS-384 + #* (-) + # + #h2. User story + #As a user + # + #I want to be able to create a quality investigation for selected parts with a description of the defect + # + #to notify the corresponding supplier(s) of the parts about a possible quality issue that needs to be investigated. The requests should be stored in a queue with status pending and not be directly send to the supplier(s). + # + #  + # + #*Detailed description* + # + #The user can create a quality investigation for one or more parts. The description added in the pop up will be added to every part. Once the user creates a quality investigation he will get an information that there is one or more investigations pending for distribution. + #The user can click on the information and will directy be redirected to pending Queue in his Quality investigation inbox. + # + #  + # + #*Additional info* + # * - Description: free text, max length: 1000  + # * - Hint: Pending state and store in Queue because *later* we might set up a rights an role concept and only specific role (Supervisor) is able to send Notifications to partners. + + #Check if *several parts* in one investigation are processed correctly which contains following checks: + #* correct sending of several parts in *one* investigation + #* correct reception of several parts in *one* investigation on receiver side + #* correct update of *one* investigation with several parts + @TRACEFOSS-1652 @TRACEFOSS-1101 @INTEGRATION_TEST + Scenario: [BE] Check correct processing of several parts in quality investigation + When I am logged into TRACE_X_A application + And I create quality investigation with two parts + | "severity" | "MINOR" | + | "description" | "Testing severity TRACEFOSS-1652" | + Then I check, if quality investigation has proper values + | "description" | "Testing severity TRACEFOSS-1652" | + | "status" | "CREATED" | + | "assetIdCount" | "2" | + When I approve quality investigation + Then I check, if quality investigation has proper values + | "status" | "SENT" | + When I am logged into TRACE_X_B application + Then I check, if quality investigation has been received + Then I check, if quality investigation has proper values + | "description" | "Testing severity TRACEFOSS-1652" | + | "status" | "RECEIVED" | + | "assetIdCount" | "2" | + When I acknowledge quality investigation + Then I check, if quality investigation has proper values + | "status" | "ACKNOWLEDGED" | + When I am logged into TRACE_X_A application + Then I check, if quality investigation has proper values + | "status" | "ACKNOWLEDGED" | + | "assetIdCount" | "2" | diff --git a/tx-cucumber-tests/src/test/resources/features/7_TRACEFOSS-1090.feature b/tx-cucumber-tests/src/test/resources/features/7_TRACEFOSS-1090.feature new file mode 100644 index 0000000000..1f1126f26f --- /dev/null +++ b/tx-cucumber-tests/src/test/resources/features/7_TRACEFOSS-1090.feature @@ -0,0 +1,43 @@ +@TRACEFOSS-1090 +Feature: 🪓⭐[BE] Add information to notification inbox + #As a *User* + # + #I want to have added the information of severity, send to (BPN / name), and received from (BPN / name) as additional columns to the notifications inbox + # + #so that I am able to see on the first sign who/whom the notification was sent to as well as the severity. + #h3. Outcome + # * Add an additional field for bpn name (sender + receiver) + # * Add an additional field for severity + # + # + #h3. Hint + #* BPN name and severity is published over the API that it could be requested by the frontend API . + #* Mapping between BPN number and company name is part of the job response of IRS. + # + #h3. Sprint Planning 2 + #* Add BPN and severity to the investigation response. + + #Check if *bpn names* of *sender and receiver* are processed correctly for created quality investigations which contains following checks: + #* correct creation on sender side + #* correct reception on receiver side + @TRACEFOSS-1344 @TRACEFOSS-1920 @TRACEFOSS-1101 @TRACEFOSS-1138 @TRACEFOSS-1673 @TEST-1217 @TRACEFOSS-1139 @TEST-904 @INTEGRATION_TEST + Scenario: [BE] Check correct processing of bpn names in quality investigation + When I am logged into TRACE_X_A application + And I create quality investigation + | "description" | "Testing BPNs TRACEFOSS-1344" | + | "severity" | "MINOR" | + Then I check, if quality investigation has proper values + | "description" | "Testing BPNs TRACEFOSS-1344" | + | "createdBy" | "BPNL00000003CML1" | + | "sendTo" | "BPNL00000003CNKC" | + | "status" | "CREATED" | + When I approve quality investigation + Then I check, if quality investigation has proper values + | "status" | "SENT" | + When I am logged into TRACE_X_B application + Then I check, if quality investigation has been received + Then I check, if quality investigation has proper values + | "description" | "Testing BPNs TRACEFOSS-1344" | + | "createdBy" | "BPNL00000003CML1" | + | "sendTo" | "BPNL00000003CNKC" | + | "status" | "RECEIVED" | diff --git a/tx-cucumber-tests/src/test/resources/features/8_TRACEFOSS-608.feature b/tx-cucumber-tests/src/test/resources/features/8_TRACEFOSS-608.feature new file mode 100644 index 0000000000..7847904832 --- /dev/null +++ b/tx-cucumber-tests/src/test/resources/features/8_TRACEFOSS-608.feature @@ -0,0 +1,55 @@ +@TRACEFOSS-608 +Feature: ⭐[TEST] [BE] Set and show notification target date + #*As a* User + #*I want to* be able to set a target date for my notification while creating it + #*so that* I am able to monitor if a reply was given in time. + # + #h2. Hints + #[Concept | https://confluence.catena-x.net/pages/viewpage.action?pageId=69429778] + + #Check if *targetDate = null* is processed correctly for created quality investigations which contains following checks: + #* correct sending of _targetDate_ = *null* + #* correct reception on receiver side + @TRACEFOSS-1247 @TRACEFOSS-1920 @TEST-1217 @TRACEFOSS-1139 @TEST-904 @TRACEFOSS-1673 @TRACEFOSS-1138 @TRACEFOSS-1101 @INTEGRATION_TEST + Scenario: [BE] Check correct processing of targetDate = null in quality investigation + When I am logged into TRACE_X_A application + And I create quality investigation + | "severity" | "MINOR" | + | "description" | "Testing without targetDate TRACEFOSS-1247" | + Then I check, if quality investigation has proper values + | "description" | "Testing without targetDate TRACEFOSS-1247" | + | "targetDate" | "" | + | "status" | "CREATED" | + When I approve quality investigation + Then I check, if quality investigation has proper values + | "status" | "SENT" | + When I am logged into TRACE_X_B application + Then I check, if quality investigation has been received + Then I check, if quality investigation has proper values + | "description" | "Testing without targetDate TRACEFOSS-1247" | + | "targetDate" | "" | + | "status" | "RECEIVED" | + + #Check if *targetDate* is processed correctly for created quality investigations which contains following checks: + #* correct sending of _targetDate_ + #* correct reception on receiver side + @TRACEFOSS-1216 @TRACEFOSS-1920 @TEST-1217 @TRACEFOSS-1139 @TRACEFOSS-1673 @TRACEFOSS-1138 @TRACEFOSS-1101 @TEST-904 @INTEGRATION_TEST + Scenario: [BE] Check correct processing of targetDate in quality investigation + When I am logged into TRACE_X_A application + And I create quality investigation + | "severity" | "MINOR" | + | "description" | "Testing targetDate TRACEFOSS-1216" | + | "targetDate" | "2099-03-11T22:44:06.333827Z" | + Then I check, if quality investigation has proper values + | "description" | "Testing targetDate TRACEFOSS-1216" | + | "targetDate" | "2099-03-11T22:44:06.333827Z" | + | "status" | "CREATED" | + When I approve quality investigation + Then I check, if quality investigation has proper values + | "status" | "SENT" | + When I am logged into TRACE_X_B application + Then I check, if quality investigation has been received + Then I check, if quality investigation has proper values + | "description" | "Testing targetDate TRACEFOSS-1216" | + | "targetDate" | "2099-03-11T22:44:06.333827Z" | + | "status" | "RECEIVED" | diff --git a/tx-cucumber-tests/src/test/resources/features/9_TRACEFOSS-2354.feature b/tx-cucumber-tests/src/test/resources/features/9_TRACEFOSS-2354.feature new file mode 100644 index 0000000000..da2dc65f46 --- /dev/null +++ b/tx-cucumber-tests/src/test/resources/features/9_TRACEFOSS-2354.feature @@ -0,0 +1,81 @@ +@TRACEFOSS-2354 +Feature: 👍[BE][TABLE_FEATURE] Implementation of Sorting in table views + #h2. Clarification + # * (/) [~steffen.duering@bmw.de] should cascading sorting be enabled ? --> [~martin.kanal@doubleslash.de]   If possible yes. Could also be done in a further development if not possible + # * (/) [~steffen.duering@bmw.de] On which result set the sorting shall be implemented (current page vs / complete resultset? ) + #-->[~martin.kanal@doubleslash.de]  complete resultset would be great. Is it possible? + # + #h2. Business Value + # # (y) [ ] {*}User-business value:{*}: + # # (y) [ ] *Risk reduction:* + # # (y) [ ] *Regulatory value:* + # # (y) [ ] *Commercial value:* + # # (y) [ ] *Market value:* + # # (y) [ ] *Efficiency value:* + # # (y) [ ] *Future value:* + # + #h2. User Story + # + #*As a user* of Trace-X + #*I want* to be able to sort within the table views + #*so that* I only see relevant data and I'm able to better handle big amount of data + # + #--> This User Story should cover all *Backend* tasks that are necessary to cover the funcionalities in the frontend + #h2. Outcome + # + #- (/) User can sort for any colums in UI (within all table views --> parts, other parts) + #- (/) Multiple sort functionalities can be set for ascending and descending according to concept for different attributes on the same time + #- (/) enable reset of sorting + #- (/) Cascading multi-column sorting on multiple columns (Number is showing the sort order) + #- (/) Sorting of columns is based on complete resultset  + #- (/) Swagger API documentation is updated and available on DEV + #- (/) Cover specific columns where cascading sorting might causes conflict (Takeing the semantic under account) + #h2. Mockup + # + #!screenshot-1.png|thumbnail! + #h2. NFR + # + #* + #h2. Hints / Details / Design Sketch : + # + #* + Then I check, if only assets with are responded + + Examples: + | owner-filter | + | "SUPPLIER" | + | "CUSTOMER" | + | "OWN" |