From d05ba0456480d64e1f631a8253fd952b3e1d4bf3 Mon Sep 17 00:00:00 2001 From: Christophe Loiseau Date: Thu, 10 Oct 2024 17:57:21 +0200 Subject: [PATCH] extensions compilation ok --- docs/api/sovity-edc-api-wrapper.yaml | 4 ++++ .../edc/ext/wrapper/api/ui/pages/asset/AssetApiService.java | 2 +- .../contract_negotiations/ContractNegotiationBuilder.java | 4 +++- .../api/usecase/pages/catalog/UseCaseCatalogApiService.java | 5 ++++- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/docs/api/sovity-edc-api-wrapper.yaml b/docs/api/sovity-edc-api-wrapper.yaml index 955ea0aca..c794ad87c 100644 --- a/docs/api/sovity-edc-api-wrapper.yaml +++ b/docs/api/sovity-edc-api-wrapper.yaml @@ -275,6 +275,10 @@ paths: description: Fetch a connector's data offers operationId: getCatalogPageDataOffers parameters: + - name: participantId + in: query + schema: + type: string - name: connectorEndpoint in: query schema: diff --git a/extensions/wrapper/wrapper/src/main/java/de/sovity/edc/ext/wrapper/api/ui/pages/asset/AssetApiService.java b/extensions/wrapper/wrapper/src/main/java/de/sovity/edc/ext/wrapper/api/ui/pages/asset/AssetApiService.java index c83fc7919..01dc35f8f 100644 --- a/extensions/wrapper/wrapper/src/main/java/de/sovity/edc/ext/wrapper/api/ui/pages/asset/AssetApiService.java +++ b/extensions/wrapper/wrapper/src/main/java/de/sovity/edc/ext/wrapper/api/ui/pages/asset/AssetApiService.java @@ -64,7 +64,7 @@ public IdResponseDto editAsset(String assetId, UiAssetEditRequest request) { Objects.requireNonNull(foundAsset, "Asset with ID %s not found".formatted(assetId)); val editedAsset = assetMapper.editAsset(foundAsset, request); val updatedAsset = assetService.update(editedAsset).orElseThrow(ServiceException::new); - assetService.update(editedAsset.getId(), editedAsset.getDataAddress()); + assetService.update(editedAsset); return new IdResponseDto(updatedAsset.getId()); } diff --git a/extensions/wrapper/wrapper/src/main/java/de/sovity/edc/ext/wrapper/api/ui/pages/contract_negotiations/ContractNegotiationBuilder.java b/extensions/wrapper/wrapper/src/main/java/de/sovity/edc/ext/wrapper/api/ui/pages/contract_negotiations/ContractNegotiationBuilder.java index f58a225e5..9bea99a24 100644 --- a/extensions/wrapper/wrapper/src/main/java/de/sovity/edc/ext/wrapper/api/ui/pages/contract_negotiations/ContractNegotiationBuilder.java +++ b/extensions/wrapper/wrapper/src/main/java/de/sovity/edc/ext/wrapper/api/ui/pages/contract_negotiations/ContractNegotiationBuilder.java @@ -31,7 +31,9 @@ public ContractRequest buildContractNegotiation(ContractNegotiationRequest reque return ContractRequest.Builder.newInstance() .counterPartyAddress(counterPartyAddress) - .providerId(request.getCounterPartyParticipantId()) + // TODO: deprecated and moved into the contractOffer.policy.assigner, set by `.contractOffer()` below + // git diff v0.5.1..v0.6.0 -- spi/control-plane/contract-spi/src/main/java/org/eclipse/edc/connector/contract/spi/types/negotiation/ContractRequest.java +// .providerId(request.getCounterPartyParticipantId()) .protocol(HttpMessageProtocol.DATASPACE_PROTOCOL_HTTP) .contractOffer(contractOfferMapper.buildContractOffer(request)) .build(); diff --git a/extensions/wrapper/wrapper/src/main/java/de/sovity/edc/ext/wrapper/api/usecase/pages/catalog/UseCaseCatalogApiService.java b/extensions/wrapper/wrapper/src/main/java/de/sovity/edc/ext/wrapper/api/usecase/pages/catalog/UseCaseCatalogApiService.java index 49da44363..4d6fe6a41 100644 --- a/extensions/wrapper/wrapper/src/main/java/de/sovity/edc/ext/wrapper/api/usecase/pages/catalog/UseCaseCatalogApiService.java +++ b/extensions/wrapper/wrapper/src/main/java/de/sovity/edc/ext/wrapper/api/usecase/pages/catalog/UseCaseCatalogApiService.java @@ -32,7 +32,10 @@ public class UseCaseCatalogApiService { public List fetchDataOffers(CatalogQuery catalogQuery) { var querySpec = buildQuerySpec(catalogQuery); - var dspCatalog = dspCatalogService.fetchDataOffersWithFilters(catalogQuery.getConnectorEndpoint(), querySpec); + var dspCatalog = dspCatalogService.fetchDataOffersWithFilters( + catalogQuery.getParticipantId(), + catalogQuery.getConnectorEndpoint(), + querySpec); return uiDataOfferBuilder.buildUiDataOffers(dspCatalog); }