Skip to content

Commit

Permalink
Fixed "unknown UC contract" issue for provider push scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
milux committed Mar 2, 2022
1 parent eed269e commit 07f8f32
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class ContractAgreementReceiverProcessor : Processor {

ProviderDB.contractAgreements[contractAgreement.id] = contractAgreement
for (permission in contractAgreement.permission) {
// Entry for the case when provider is setting up multiple agreements with different requesting connectors
ProviderDB.artifactUrisMapped2ContractAgreements[
Pair(
permission.target,
Expand All @@ -60,6 +61,8 @@ class ContractAgreementReceiverProcessor : Processor {
)
)
] = contractAgreement.id
// Additional entry for the case when an artifact is pushed directly to the consumer
ProviderDB.artifactUrisMapped2ContractAgreements[Pair(permission.target, null)] = contractAgreement.id
}

if (LOG.isDebugEnabled) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import java.util.concurrent.ConcurrentHashMap
object ProviderDB {
val availableArtifactURIs: ConcurrentHashMap<URI, String> = ConcurrentHashMap()
val artifactUrisMapped2ContractAgreements:
ConcurrentHashMap<Pair<URI, AppLayerConnection>, URI> = ConcurrentHashMap()
ConcurrentHashMap<Pair<URI, AppLayerConnection?>, URI> = ConcurrentHashMap()
val contractAgreements: ConcurrentHashMap<URI, ContractAgreement> = ConcurrentHashMap()

init {
Expand Down

0 comments on commit 07f8f32

Please sign in to comment.