Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/395 edc client handle multiple dt rs and d ts #462

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
db1973a
feat(imp):[#214] improve variable names
dsmf Jan 30, 2024
b9d9dab
feat(imp):[#395] Partial implementation
dsmf Jan 31, 2024
6ff6dbc
feat(impl):[#395] Merge master into branch
dsmf Feb 6, 2024
e88fd3e
feat(impl):[#395] Group tests
dsmf Feb 6, 2024
e7f0939
feat(impl):[#395] Correct diagrams
dsmf Feb 8, 2024
b2d75ab
feat(impl):[#395] Correct diagrams - fix arrow heads
dsmf Feb 8, 2024
b9af543
feat(impl):[#395] Add some code comments to diagrams
dsmf Feb 8, 2024
e062484
feat(impl):[#395] Add some javadoc
dsmf Feb 9, 2024
2ab61cc
feat(impl):[#395] Rename variable, format code
dsmf Feb 9, 2024
b1e401c
feat(impl):[#395] Add more detailed diagrams
dsmf Feb 9, 2024
4bdd210
feat(impl):[#395] EdcClientException: Add constructor with message an…
dsmf Feb 12, 2024
9552b5b
feat(impl):[#395] Rename local variable
dsmf Feb 12, 2024
88cd165
feat(impl):[#395] Remove duplicate log
dsmf Feb 12, 2024
a0abc33
feat(impl):[#395] Update detail diagrams
dsmf Feb 12, 2024
66568e0
feat(impl):[#395] Add code comment for special scenario (with TODO fo…
dsmf Feb 12, 2024
70f61d5
feat(impl):[#395] Add TODO for clarification
dsmf Feb 12, 2024
3c61508
feat(impl):[#395] Add TODO for clarification
dsmf Feb 12, 2024
c5f4461
feat(impl):[#395] Rename local variable
dsmf Feb 12, 2024
38e82a3
feat(impl):[#395] Correct code comments
dsmf Feb 15, 2024
06b1738
feat(impl):[#395] Remove obsolete todo
dsmf Feb 16, 2024
0373718
feat(impl):[#395] Add Contract Item and Contract Offer to glossary
dsmf Feb 16, 2024
e3857a5
feat(impl):[#395] Improve glossary
dsmf Feb 16, 2024
6f37a0a
feat(impl):[#395] Remove obsolete todo
dsmf Feb 16, 2024
d0d78a9
feat(impl):[#395] Improve comprehensibility
dsmf Feb 16, 2024
1ece516
feat(impl):[#395] Improve glossary
dsmf Feb 16, 2024
8298522
feat(impl):[#395] Implementation (but tests still need to be adapted)
dsmf Feb 16, 2024
0dbb8bb
feat(impl):[#395] Adjust test
dsmf Feb 17, 2024
1d27803
feat(impl):[#395] Fix exception handling
dsmf Feb 19, 2024
1e6cda4
feat(impl):[#395] Add missing Thread.currentThread().interrupt()
dsmf Feb 19, 2024
dbf3066
feat(impl):[#395] Fix tests
dsmf Feb 19, 2024
bb7c3a2
feat(impl):[#395] Improve readability
dsmf Feb 19, 2024
97f6b55
feat(impl):[#395] Assert interrupt
dsmf Feb 19, 2024
d9b08f7
feat(impl):[#395] Fix test
dsmf Feb 19, 2024
b34ffcd
feat(impl):[#395] Add some wiremock tests
dsmf Feb 19, 2024
1cfd3e5
feat(impl):[#395] Cleanup
dsmf Feb 19, 2024
cacf29f
feat(impl):[#395] Fix javadoc
dsmf Feb 19, 2024
090a265
feat(impl):[#395] Fix long line
dsmf Feb 19, 2024
45d069d
feat(impl):[#395] Fix long line
dsmf Feb 19, 2024
ca25d8c
Merge remote-tracking branch 'origin/main' into feat/395-EDC-client-h…
dsmf Feb 19, 2024
3aedb0d
feat(impl):[#395] Inline short method
dsmf Feb 19, 2024
5725012
feat(impl):[#395] Reduce number of dependencies of EdcSubmodelClientImpl
dsmf Feb 19, 2024
db6b13a
feat(impl):[#395] Inline short method
dsmf Feb 19, 2024
880a053
feat(impl):[#395] Cleanup
dsmf Feb 19, 2024
9f88251
feat(impl):[#395] Cleanup
dsmf Feb 19, 2024
4e83d55
Merge remote-tracking branch 'origin/main' into feat/395-EDC-client-h…
dsmf Feb 21, 2024
5fdbd0b
feat(impl):[#395] fix test setup
dsmf Feb 23, 2024
9a435fe
feat(impl):[#395] ignore PMD warning
dsmf Feb 23, 2024
0ad2116
Merge branch 'main' into feat/395-EDC-client-handle-multiple-DTRs-and…
dsmf Feb 23, 2024
031e3d4
feat(impl):[#395] Changelog updated
dsmf Feb 23, 2024
9934128
Merge remote-tracking branch 'origin/main' into feat/395-EDC-client-h…
dsmf Feb 26, 2024
0088530
Merge remote-tracking branch 'origin/main' into feat/395-EDC-client-h…
dsmf Feb 27, 2024
46eeeef
feat(impl):[#395] Remove .cache_ggshield
dsmf Feb 27, 2024
0646086
feat(impl):[#395] Remove obsolete SuppressWarnings
dsmf Feb 27, 2024
fc42751
feat(impl):[#395] Remove obsolete TODOs
dsmf Feb 27, 2024
17cea3d
feat(impl):[#395] Update CHANGELOG.md
dsmf Feb 27, 2024
cfd2279
Merge remote-tracking branch 'origin/main' into feat/395-EDC-client-h…
dsmf Mar 1, 2024
18a6239
feature(impl):[#395] Corrected / improved test according to review se…
dsmf Mar 1, 2024
bf8263b
feat(impl):[#395] Add GitHub issue number to CHANGELOG
dsmf Mar 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- POST /management/v2/contractagreements/request and GET /management/v2/contractagreements/{contractAgreementId}/negotiation to irs-edc-client lib

### Changed
- EDC client handles multiple Digital Twin Registries and Digital Twins now #395
- Change logo of irs
- Added 'businessPartnerNumber' field to Tombstone model. This will be filled only when UsagePolicyValidation tombstone is being created.

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@startuml
actor IRS
participant IRS
participant DTR

IRS -> DTR: /query for globalAssetId
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
@startuml


box IRS
participant DecentralDigitalTwinRegistryService as DTRS
participant EdcSubmodelClientImpl as EdcClient
end box


participant DiscoveryService
participant "EDC Provider 1" as EDCProvider1
participant "EDC Provider 2" as EDCProvider2
participant "EDC Provider 3" as EDCProvider3
participant "DTR1" as DTR1
participant "DTR2" as DTR2

' DigitalTwinDelegate.process
' DecentralDigitalTwinRegistryService.fetchShells
' ConnectorEndpointsService.fetchConnectorEndpoints(String bpn) -- cacheable
DTRS -> DiscoveryService: Get EDCs for BPN
' discoveryFinderClient.findDiscoveryEndpoints(DiscoveryFinderRequest request)
DiscoveryService -> DTRS: Return list of 3 EDCs

' Turned into futures to get the EDR tokens by
' EndpointDataForConnectorsService.createFindEndpointDataForConnectorsFutures(List<String> edcUrls)

par
group CatalogRequestEDC1

== EDC Control Plane ==
DTRS -> EdcClient: Get EDR Token for asset
EdcClient -> EDCProvider1: Query for DTR1 contract offer
EDCProvider1 -> EdcClient: No offer
EdcClient -> DTRS: No token
end

else

group CatalogRequestEDC2 DTR1

== EDC Control Plane ==

' this happens in DecentralDigitalTwinRegistryService.fetchShellDescriptorsForConnectorEndpoints
' when each of List<CompletableFuture<EndpointDataReference>> is composed
' with fetchShellDescriptorsForKey
DTRS -> EdcClient: Get EDR Token for asset
' EdcSubmodelFacade.getEndpointReferenceForAsset
' EdcSubmodelClientImpl.getEndpointReferenceForAsset
EdcClient -> EDCProvider2: Query for DTR1 contract offer
EDCProvider2 -> EdcClient: DTR1 contract offer
' EdcSubmodelClientImpl.negotiateContract
EdcClient -> EDCProvider2: Negotiate contract
EDCProvider2 -> EdcClient: EDR Token callback

EdcClient -> DTRS: EDR token


== EDC Data Plane ==

' DecentralDigitalTwinRegistryService
' .fetchShellDescriptor(EndpointDataReference, DigitalTwinRegistryKey)
DTRS -> DTR1: Query for DT
DTR1 -> DTRS: DT
' result is AssetAdministrationShellDescriptor which is the actual data
end

else

group CatalogRequestEDC2 DTR2

== EDC Control Plane ==

DTRS -> EdcClient: Get EDR Token for asset
EdcClient -> EDCProvider2: Query for DTR1 contract offer
EDCProvider2 -> EdcClient: DTR1 contract offer
EdcClient -> EDCProvider2: Negotiate contract
EDCProvider2 -> EdcClient: EDR Token callback

EdcClient -> DTRS: EDR token


== EDC Data Plane ==

DTRS -> DTR2: Query for DT
DTR2 -> DTRS: DT
end

else

group CatalogRequestEDC3

== EDC Control Plane ==

DTRS -> EdcClient: Get EDR Token for asset
EdcClient -> EDCProvider3: Query for DTR1 contract offer
EDCProvider3 -> EdcClient: DTR1 contract offer
EdcClient -> EDCProvider3: Negotiate contract
EDCProvider3 -> EdcClient: EDR Token callback
EdcClient -> DTRS: EDR token

== EDC Data Plane ==

DTRS -> DTR1: Query for DT
DTR1 -> DTRS: No DT
end
end

@enduml
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,40 @@ participant "EDC Provider 2" as EDCProvider2
participant "EDC Provider 3" as EDCProvider3
participant "DTR" as DTR

IRS ->> DiscoveryService: Get EDCs for BPN
DiscoveryService ->> IRS: Return list of 3 EDCs
IRS -> DiscoveryService: Get EDCs for BPN
DiscoveryService -> IRS: Return list of 3 EDCs

par
group CatalogRequestEDC1
IRS ->> EDCProvider1: Query for DTR contract offer
EDCProvider1 ->> IRS: No offer
' == EDC Control Plane ==
IRS -> EDCProvider1: Query for DTR contract offer
EDCProvider1 -> IRS: No offer
end

else

group CatalogRequestEDC2
IRS ->> EDCProvider2: Query for DTR contract offer
EDCProvider2 ->> IRS: DTR contract offer
' == EDC Control Plane ==
IRS -> EDCProvider2: Query for DTR contract offer
EDCProvider2 -> IRS: DTR contract offer
IRS -> EDCProvider2: Negotiate contract
IRS ->> DTR: Query for DT
DTR ->> IRS: DT

'== EDC Data Plane ==
IRS -> DTR: Query for DT
DTR -> IRS: DT
end

else

group CatalogRequestEDC3
IRS ->> EDCProvider3: Query for DTR contract offer
EDCProvider3 ->> IRS: DTR contract offer
'== EDC Control Plane ==
IRS -> EDCProvider3: Query for DTR contract offer
EDCProvider3 -> IRS: DTR contract offer
IRS -> EDCProvider3: Negotiate contract
IRS ->> DTR: Query for DT
DTR ->> IRS: No DT

'== EDC Data Plane ==
IRS -> DTR: Query for DT
DTR -> IRS: No DT
end
end
@enduml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
@startuml

box IRS
participant DecentralDigitalTwinRegistryService as DTRS
participant EdcSubmodelClientImpl as EdcClient
end box

participant "Discovery Service" as DiscoveryService

participant "EDC 1" as EDCProvider1
participant "EDC 2" as EDCProvider2
participant "EDC 3" as EDCProvider3


' ConnectorEndpointsService.fetchConnectorEndpoints(String bpn) -- cacheable
DTRS -> DiscoveryService: Get EDCs for BPN
' discoveryFinderClient.findDiscoveryEndpoints(DiscoveryFinderRequest request)
DiscoveryService -> DTRS: Return list of 3 EDCs

par
group Catalog Request to EDC 1

== EDC Control Plane ==

DTRS -> EdcClient: Get EDR Token for asset
EdcClient -> EDCProvider1: Query for DTR contract offer
EDCProvider1 -> EdcClient: No offer
EdcClient -> DTRS: No token
end

else

group Catalog Request to EDC 2

== EDC Control Plane ==

DTRS -> EdcClient: Get EDR Token for asset
EdcClient -> EDCProvider2: Query for DTR contract offer
EDCProvider2 -> EdcClient: No offer
EdcClient -> DTRS: No token
end

else

group Catalog Request to EDC 3

== EDC Control Plane ==

DTRS -> EdcClient: Get EDR Token for asset
EdcClient -> EDCProvider3: Query for DTR contract offer
EDCProvider3 -> EdcClient: No offer
EdcClient -> DTRS: No token
end
end

DTRS -> DTRS: Tombstone

@enduml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@startuml
actor IRS
actor "Discovery Service" as DiscoveryService
participant IRS
participant "Discovery Service" as DiscoveryService

participant "EDC 1" as EDCProvider1
participant "EDC 2" as EDCProvider2
Expand All @@ -11,20 +11,23 @@ DiscoveryService -> IRS: Return list of 3 EDCs

par
group Catalog Request to EDC 1
'== EDC Control Plane ==
IRS -> EDCProvider1: Query for DTR contract offer
EDCProvider1 -> IRS: No offer
end

else

group Catalog Request to EDC 2
'== EDC Control Plane ==
IRS -> EDCProvider2: Query for DTR contract offer
EDCProvider2 -> IRS: No offer
end

else

group Catalog Request to EDC 3
'== EDC Control Plane ==
IRS -> EDCProvider3: Query for DTR contract offer
EDCProvider3 -> IRS: No offer
end
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
@startuml

box IRS
participant DecentralDigitalTwinRegistryService as DTRS
participant EdcSubmodelClientImpl as EdcClient
end box

participant DiscoveryService
participant "EDC Provider 1" as EDCProvider1
participant "EDC Provider 2" as EDCProvider2
participant "EDC Provider 3" as EDCProvider3
participant DTR

' ConnectorEndpointsService.fetchConnectorEndpoints(String bpn) -- cacheable
DTRS -> DiscoveryService: Get EDCs for BPN
' discoveryFinderClient.findDiscoveryEndpoints(DiscoveryFinderRequest request)
DiscoveryService -> DTRS: Return list of 3 EDCs

par
group CatalogRequestEDC1

== EDC Control Plane ==

DTRS -> EdcClient: Get EDR Token for asset
EdcClient -> EDCProvider1: Query for DTR contract offer
EDCProvider1 -> EdcClient: No offer
EdcClient -> DTRS: No token
end

else

group CatalogRequestEDC2

== EDC Control Plane ==

DTRS -> EdcClient: Get EDR Token for asset
EdcClient -> EDCProvider2: Query for DTR contract offer
EDCProvider2 -> EdcClient: No offer
EdcClient -> DTRS: No token
end

else

group CatalogRequestEDC3

== EDC Control Plane ==

DTRS -> EdcClient: Get EDR Token for asset
EdcClient -> EDCProvider3: Query for DTR contract offer
EDCProvider3 -> EdcClient: DTR contract offer
EdcClient -> EDCProvider3: Negotiate contract
EDCProvider3 -> EdcClient: EDR Token callback
EdcClient -> DTRS: EDR token

== EDC Data Plane ==

DTRS -> DTR: Query for DT
DTR -> DTRS: DT
end
end
@enduml
Loading
Loading