Skip to content

Commit

Permalink
chore(exception):978 added todo comments for #978
Browse files Browse the repository at this point in the history
  • Loading branch information
ds-mwesener committed May 16, 2024
1 parent ffc1c5e commit 95fdb94
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ SPDX-License-Identifier: Apache-2.0
<cucumber.version>7.17.0</cucumber.version>
<junit-bom.version>5.10.2</junit-bom.version>
<awaitility.version>4.2.1</awaitility.version>
<!-- TODO https://github.com/eclipse-tractusx/traceability-foss/issues/978 update to the cx release version of irs lib IMPORTANT NO SNAPSHOT-->
<irs-client-lib.version>2.0.4-SNAPSHOT</irs-client-lib.version>
<json-schema-validator.version>5.4.0</json-schema-validator.version>
<!-- Sonar related properties -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
@UtilityClass
public class PolicyMapper {
public static EdcCreatePolicyDefinitionRequest mapToEdcPolicyRequest(PolicyResponse policy) {
// TODO https://github.com/eclipse-tractusx/traceability-foss/issues/978 context needs to be updated with the required ones
OdrlContext odrlContext = OdrlContext.builder().odrl("http://www.w3.org/ns/odrl/2/").build();
EdcPolicy edcPolicy = EdcPolicy.builder().odrlPermissions(mapToPermissions(policy.permissions())).type("odrl:Set").build();
return EdcCreatePolicyDefinitionRequest.builder()
Expand All @@ -50,6 +51,7 @@ public static EdcCreatePolicyDefinitionRequest mapToEdcPolicyRequest(PolicyRespo

private static List<EdcPolicyPermission> mapToPermissions(List<PermissionResponse> permissions) {
return permissions.stream().map(permission -> EdcPolicyPermission.builder()
// TODO https://github.com/eclipse-tractusx/traceability-foss/issues/978 here we need to make sure that the USE is lowercase in the object.
.action(permission.action().name())
.edcPolicyPermissionConstraints(mapToConstraint(permission.constraints()))
.build()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
@Builder
@Schema(example = IrsPolicyResponse.EXAMPLE_PAYLOAD)
public record IrsPolicyResponse(OffsetDateTime validUntil, Payload payload) {
// TODO https://github.com/eclipse-tractusx/traceability-foss/issues/978
// "odrl:action" USE will be use (lowercase) make sure to migrate

@SuppressWarnings({"FileTabCharacter", "java:S2479"})
// required to show correctly example payload in open-api
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@ private CatalogItem getCatalogItem(final NotificationMessage notification, final
.counterPartyAddress(receiverEdcUrl + edcProperties.getIdsPath())
.counterPartyId(notification.getSendTo())
.querySpec(QuerySpec.Builder.newInstance()
// TODO https://github.com/eclipse-tractusx/traceability-foss/issues/978
// Probably:
// leftOperand = http://purl.org/dc/terms/type'.'@id'
// rightOperand = cx-taxo:ReceiveQualityAlertNotification (make sure to check the input for the correct one Receive/Update and Alert or Investigation
// The types are all in the ticket documented
.filter(
List.of(new Criterion(NAMESPACE_EDC + "notificationtype", "=", propertyNotificationTypeValue),
new Criterion(NAMESPACE_EDC + "notificationmethod", "=", propertyMethodValue))
Expand Down

0 comments on commit 95fdb94

Please sign in to comment.