diff --git a/core/common/connector-core/build.gradle.kts b/core/common/connector-core/build.gradle.kts index 459e39a2f50..76d7dd59e83 100644 --- a/core/common/connector-core/build.gradle.kts +++ b/core/common/connector-core/build.gradle.kts @@ -23,6 +23,7 @@ dependencies { api(project(":spi:common:core-spi")) api(project(":spi:common:http-spi")) api(project(":spi:common:keys-spi")) + api(project(":spi:common:participant-spi")) api(project(":spi:common:policy-engine-spi")) api(project(":spi:common:transaction-spi")) api(project(":spi:common:transaction-datasource-spi")) diff --git a/core/common/connector-core/src/main/java/org/eclipse/edc/connector/core/CoreDefaultServicesExtension.java b/core/common/connector-core/src/main/java/org/eclipse/edc/connector/core/CoreDefaultServicesExtension.java index 01781d64e80..1504f9d2b41 100644 --- a/core/common/connector-core/src/main/java/org/eclipse/edc/connector/core/CoreDefaultServicesExtension.java +++ b/core/common/connector-core/src/main/java/org/eclipse/edc/connector/core/CoreDefaultServicesExtension.java @@ -26,11 +26,11 @@ import org.eclipse.edc.connector.core.event.EventExecutorServiceContainer; import org.eclipse.edc.http.client.EdcHttpClientImpl; import org.eclipse.edc.http.spi.EdcHttpClient; +import org.eclipse.edc.participant.spi.ParticipantIdMapper; import org.eclipse.edc.runtime.metamodel.annotation.Extension; import org.eclipse.edc.runtime.metamodel.annotation.Inject; import org.eclipse.edc.runtime.metamodel.annotation.Provider; import org.eclipse.edc.runtime.metamodel.annotation.Setting; -import org.eclipse.edc.spi.agent.ParticipantIdMapper; import org.eclipse.edc.spi.system.ServiceExtension; import org.eclipse.edc.spi.system.ServiceExtensionContext; import org.eclipse.edc.transaction.datasource.spi.DataSourceRegistry; diff --git a/core/common/connector-core/src/main/java/org/eclipse/edc/connector/core/CoreServicesExtension.java b/core/common/connector-core/src/main/java/org/eclipse/edc/connector/core/CoreServicesExtension.java index 184bbaf89dc..e7b01fd5f63 100644 --- a/core/common/connector-core/src/main/java/org/eclipse/edc/connector/core/CoreServicesExtension.java +++ b/core/common/connector-core/src/main/java/org/eclipse/edc/connector/core/CoreServicesExtension.java @@ -26,6 +26,7 @@ import org.eclipse.edc.http.spi.ControlApiHttpClient; import org.eclipse.edc.http.spi.EdcHttpClient; import org.eclipse.edc.json.JacksonTypeManager; +import org.eclipse.edc.participant.spi.ParticipantAgentService; import org.eclipse.edc.policy.engine.PolicyEngineImpl; import org.eclipse.edc.policy.engine.RuleBindingRegistryImpl; import org.eclipse.edc.policy.engine.ScopeFilter; @@ -39,7 +40,6 @@ import org.eclipse.edc.runtime.metamodel.annotation.Inject; import org.eclipse.edc.runtime.metamodel.annotation.Provider; import org.eclipse.edc.runtime.metamodel.annotation.Setting; -import org.eclipse.edc.spi.agent.ParticipantAgentService; import org.eclipse.edc.spi.command.CommandHandlerRegistry; import org.eclipse.edc.spi.event.EventRouter; import org.eclipse.edc.spi.message.RemoteMessageDispatcherRegistry; @@ -53,7 +53,7 @@ import org.eclipse.edc.validator.spi.DataAddressValidatorRegistry; import org.eclipse.edc.validator.spi.JsonObjectValidatorRegistry; -import static org.eclipse.edc.spi.agent.ParticipantAgentService.DEFAULT_IDENTITY_CLAIM_KEY; +import static org.eclipse.edc.participant.spi.ParticipantAgentService.DEFAULT_IDENTITY_CLAIM_KEY; @BaseExtension @Extension(value = CoreServicesExtension.NAME) diff --git a/core/common/connector-core/src/main/java/org/eclipse/edc/connector/core/agent/NoOpParticipantIdMapper.java b/core/common/connector-core/src/main/java/org/eclipse/edc/connector/core/agent/NoOpParticipantIdMapper.java index 4206c2664c6..bd26a9906ba 100644 --- a/core/common/connector-core/src/main/java/org/eclipse/edc/connector/core/agent/NoOpParticipantIdMapper.java +++ b/core/common/connector-core/src/main/java/org/eclipse/edc/connector/core/agent/NoOpParticipantIdMapper.java @@ -14,7 +14,7 @@ package org.eclipse.edc.connector.core.agent; -import org.eclipse.edc.spi.agent.ParticipantIdMapper; +import org.eclipse.edc.participant.spi.ParticipantIdMapper; /** * No-op implementation of the mapper, the ID is already its IRI representation. diff --git a/core/common/connector-core/src/main/java/org/eclipse/edc/connector/core/agent/ParticipantAgentServiceImpl.java b/core/common/connector-core/src/main/java/org/eclipse/edc/connector/core/agent/ParticipantAgentServiceImpl.java index 4a291f75b7f..e899312e2c8 100644 --- a/core/common/connector-core/src/main/java/org/eclipse/edc/connector/core/agent/ParticipantAgentServiceImpl.java +++ b/core/common/connector-core/src/main/java/org/eclipse/edc/connector/core/agent/ParticipantAgentServiceImpl.java @@ -14,9 +14,9 @@ package org.eclipse.edc.connector.core.agent; -import org.eclipse.edc.spi.agent.ParticipantAgent; -import org.eclipse.edc.spi.agent.ParticipantAgentService; -import org.eclipse.edc.spi.agent.ParticipantAgentServiceExtension; +import org.eclipse.edc.participant.spi.ParticipantAgent; +import org.eclipse.edc.participant.spi.ParticipantAgentService; +import org.eclipse.edc.participant.spi.ParticipantAgentServiceExtension; import org.eclipse.edc.spi.iam.ClaimToken; import java.util.ArrayList; @@ -24,7 +24,7 @@ import java.util.List; import static java.util.Objects.requireNonNull; -import static org.eclipse.edc.spi.agent.ParticipantAgent.PARTICIPANT_IDENTITY; +import static org.eclipse.edc.participant.spi.ParticipantAgent.PARTICIPANT_IDENTITY; /** * Default implementation. diff --git a/core/common/connector-core/src/test/java/org/eclipse/edc/connector/core/agent/ParticipantAgentServiceImplTest.java b/core/common/connector-core/src/test/java/org/eclipse/edc/connector/core/agent/ParticipantAgentServiceImplTest.java index 159069c902f..2da3f78634d 100644 --- a/core/common/connector-core/src/test/java/org/eclipse/edc/connector/core/agent/ParticipantAgentServiceImplTest.java +++ b/core/common/connector-core/src/test/java/org/eclipse/edc/connector/core/agent/ParticipantAgentServiceImplTest.java @@ -14,7 +14,7 @@ package org.eclipse.edc.connector.core.agent; -import org.eclipse.edc.spi.agent.ParticipantAgentServiceExtension; +import org.eclipse.edc.participant.spi.ParticipantAgentServiceExtension; import org.eclipse.edc.spi.iam.ClaimToken; import org.junit.jupiter.api.Test; @@ -22,7 +22,7 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.eclipse.edc.connector.core.agent.ParticipantAgentServiceImpl.DEFAULT_IDENTITY_CLAIM_KEY; -import static org.eclipse.edc.spi.agent.ParticipantAgent.PARTICIPANT_IDENTITY; +import static org.eclipse.edc.participant.spi.ParticipantAgent.PARTICIPANT_IDENTITY; import static org.mockito.ArgumentMatchers.isA; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; diff --git a/core/common/lib/policy-engine-lib/build.gradle.kts b/core/common/lib/policy-engine-lib/build.gradle.kts index 0cbcc276a45..1f0e80329d3 100644 --- a/core/common/lib/policy-engine-lib/build.gradle.kts +++ b/core/common/lib/policy-engine-lib/build.gradle.kts @@ -22,7 +22,8 @@ dependencies { api(project(":spi:common:policy-model")) implementation(project(":core:common:lib:policy-evaluator-lib")) - testImplementation(project(":tests:junit-base")); + testImplementation(project(":spi:common:participant-spi")) + testImplementation(project(":tests:junit-base")) } diff --git a/core/common/lib/policy-engine-lib/src/test/java/org/eclipse/edc/policy/engine/PolicyEngineImplScenariosTest.java b/core/common/lib/policy-engine-lib/src/test/java/org/eclipse/edc/policy/engine/PolicyEngineImplScenariosTest.java index c189f002b70..3a6c4695982 100644 --- a/core/common/lib/policy-engine-lib/src/test/java/org/eclipse/edc/policy/engine/PolicyEngineImplScenariosTest.java +++ b/core/common/lib/policy-engine-lib/src/test/java/org/eclipse/edc/policy/engine/PolicyEngineImplScenariosTest.java @@ -14,6 +14,7 @@ package org.eclipse.edc.policy.engine; +import org.eclipse.edc.participant.spi.ParticipantAgent; import org.eclipse.edc.policy.engine.spi.PolicyContextImpl; import org.eclipse.edc.policy.engine.spi.RuleBindingRegistry; import org.eclipse.edc.policy.engine.validation.RuleValidator; @@ -23,7 +24,6 @@ import org.eclipse.edc.policy.model.Permission; import org.eclipse.edc.policy.model.Policy; import org.eclipse.edc.policy.model.Prohibition; -import org.eclipse.edc.spi.agent.ParticipantAgent; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/core/control-plane/control-plane-aggregate-services/src/main/java/org/eclipse/edc/connector/controlplane/services/ControlPlaneServicesExtension.java b/core/control-plane/control-plane-aggregate-services/src/main/java/org/eclipse/edc/connector/controlplane/services/ControlPlaneServicesExtension.java index efc6101d440..98db2d63c0a 100644 --- a/core/control-plane/control-plane-aggregate-services/src/main/java/org/eclipse/edc/connector/controlplane/services/ControlPlaneServicesExtension.java +++ b/core/control-plane/control-plane-aggregate-services/src/main/java/org/eclipse/edc/connector/controlplane/services/ControlPlaneServicesExtension.java @@ -64,6 +64,7 @@ import org.eclipse.edc.connector.controlplane.transfer.spi.store.TransferProcessStore; import org.eclipse.edc.connector.secret.spi.observe.SecretObservableImpl; import org.eclipse.edc.connector.spi.service.SecretService; +import org.eclipse.edc.participant.spi.ParticipantAgentService; import org.eclipse.edc.policy.context.request.spi.RequestCatalogPolicyContext; import org.eclipse.edc.policy.context.request.spi.RequestContractNegotiationPolicyContext; import org.eclipse.edc.policy.context.request.spi.RequestTransferProcessPolicyContext; @@ -72,7 +73,6 @@ import org.eclipse.edc.runtime.metamodel.annotation.Extension; import org.eclipse.edc.runtime.metamodel.annotation.Inject; import org.eclipse.edc.runtime.metamodel.annotation.Provider; -import org.eclipse.edc.spi.agent.ParticipantAgentService; import org.eclipse.edc.spi.command.CommandHandlerRegistry; import org.eclipse.edc.spi.event.EventRouter; import org.eclipse.edc.spi.iam.IdentityService; diff --git a/core/control-plane/control-plane-aggregate-services/src/main/java/org/eclipse/edc/connector/controlplane/services/contractnegotiation/ContractNegotiationProtocolServiceImpl.java b/core/control-plane/control-plane-aggregate-services/src/main/java/org/eclipse/edc/connector/controlplane/services/contractnegotiation/ContractNegotiationProtocolServiceImpl.java index 2504010f9e1..e3cc23cbbfc 100644 --- a/core/control-plane/control-plane-aggregate-services/src/main/java/org/eclipse/edc/connector/controlplane/services/contractnegotiation/ContractNegotiationProtocolServiceImpl.java +++ b/core/control-plane/control-plane-aggregate-services/src/main/java/org/eclipse/edc/connector/controlplane/services/contractnegotiation/ContractNegotiationProtocolServiceImpl.java @@ -32,9 +32,9 @@ import org.eclipse.edc.connector.controlplane.contract.spi.validation.ValidatedConsumerOffer; import org.eclipse.edc.connector.controlplane.services.spi.contractnegotiation.ContractNegotiationProtocolService; import org.eclipse.edc.connector.controlplane.services.spi.protocol.ProtocolTokenValidator; +import org.eclipse.edc.participant.spi.ParticipantAgent; import org.eclipse.edc.policy.context.request.spi.RequestContractNegotiationPolicyContext; import org.eclipse.edc.policy.model.Policy; -import org.eclipse.edc.spi.agent.ParticipantAgent; import org.eclipse.edc.spi.iam.TokenRepresentation; import org.eclipse.edc.spi.monitor.Monitor; import org.eclipse.edc.spi.result.ServiceResult; diff --git a/core/control-plane/control-plane-aggregate-services/src/main/java/org/eclipse/edc/connector/controlplane/services/protocol/ProtocolTokenValidatorImpl.java b/core/control-plane/control-plane-aggregate-services/src/main/java/org/eclipse/edc/connector/controlplane/services/protocol/ProtocolTokenValidatorImpl.java index 4b90a2ce650..1b7da356716 100644 --- a/core/control-plane/control-plane-aggregate-services/src/main/java/org/eclipse/edc/connector/controlplane/services/protocol/ProtocolTokenValidatorImpl.java +++ b/core/control-plane/control-plane-aggregate-services/src/main/java/org/eclipse/edc/connector/controlplane/services/protocol/ProtocolTokenValidatorImpl.java @@ -15,11 +15,11 @@ package org.eclipse.edc.connector.controlplane.services.protocol; import org.eclipse.edc.connector.controlplane.services.spi.protocol.ProtocolTokenValidator; +import org.eclipse.edc.participant.spi.ParticipantAgent; +import org.eclipse.edc.participant.spi.ParticipantAgentService; import org.eclipse.edc.policy.context.request.spi.RequestPolicyContext; import org.eclipse.edc.policy.engine.spi.PolicyEngine; import org.eclipse.edc.policy.model.Policy; -import org.eclipse.edc.spi.agent.ParticipantAgent; -import org.eclipse.edc.spi.agent.ParticipantAgentService; import org.eclipse.edc.spi.iam.IdentityService; import org.eclipse.edc.spi.iam.RequestContext; import org.eclipse.edc.spi.iam.RequestScope; diff --git a/core/control-plane/control-plane-aggregate-services/src/main/java/org/eclipse/edc/connector/controlplane/services/transferprocess/TransferProcessProtocolServiceImpl.java b/core/control-plane/control-plane-aggregate-services/src/main/java/org/eclipse/edc/connector/controlplane/services/transferprocess/TransferProcessProtocolServiceImpl.java index 6b06004aec9..84d20b421b0 100644 --- a/core/control-plane/control-plane-aggregate-services/src/main/java/org/eclipse/edc/connector/controlplane/services/transferprocess/TransferProcessProtocolServiceImpl.java +++ b/core/control-plane/control-plane-aggregate-services/src/main/java/org/eclipse/edc/connector/controlplane/services/transferprocess/TransferProcessProtocolServiceImpl.java @@ -33,8 +33,8 @@ import org.eclipse.edc.connector.controlplane.transfer.spi.types.protocol.TransferStartMessage; import org.eclipse.edc.connector.controlplane.transfer.spi.types.protocol.TransferSuspensionMessage; import org.eclipse.edc.connector.controlplane.transfer.spi.types.protocol.TransferTerminationMessage; +import org.eclipse.edc.participant.spi.ParticipantAgent; import org.eclipse.edc.policy.context.request.spi.RequestTransferProcessPolicyContext; -import org.eclipse.edc.spi.agent.ParticipantAgent; import org.eclipse.edc.spi.iam.TokenRepresentation; import org.eclipse.edc.spi.monitor.Monitor; import org.eclipse.edc.spi.result.ServiceResult; diff --git a/core/control-plane/control-plane-aggregate-services/src/test/java/org/eclipse/edc/connector/controlplane/services/catalog/CatalogProtocolServiceImplTest.java b/core/control-plane/control-plane-aggregate-services/src/test/java/org/eclipse/edc/connector/controlplane/services/catalog/CatalogProtocolServiceImplTest.java index d989b218c85..a3834ad22cb 100644 --- a/core/control-plane/control-plane-aggregate-services/src/test/java/org/eclipse/edc/connector/controlplane/services/catalog/CatalogProtocolServiceImplTest.java +++ b/core/control-plane/control-plane-aggregate-services/src/test/java/org/eclipse/edc/connector/controlplane/services/catalog/CatalogProtocolServiceImplTest.java @@ -21,8 +21,8 @@ import org.eclipse.edc.connector.controlplane.catalog.spi.DatasetResolver; import org.eclipse.edc.connector.controlplane.catalog.spi.Distribution; import org.eclipse.edc.connector.controlplane.services.spi.protocol.ProtocolTokenValidator; +import org.eclipse.edc.participant.spi.ParticipantAgent; import org.eclipse.edc.policy.model.Policy; -import org.eclipse.edc.spi.agent.ParticipantAgent; import org.eclipse.edc.spi.iam.TokenRepresentation; import org.eclipse.edc.spi.query.QuerySpec; import org.eclipse.edc.spi.result.ServiceFailure; diff --git a/core/control-plane/control-plane-aggregate-services/src/test/java/org/eclipse/edc/connector/controlplane/services/contractnegotiation/ContractNegotiationEventDispatchTest.java b/core/control-plane/control-plane-aggregate-services/src/test/java/org/eclipse/edc/connector/controlplane/services/contractnegotiation/ContractNegotiationEventDispatchTest.java index 9eb7d225165..f8a03f51603 100644 --- a/core/control-plane/control-plane-aggregate-services/src/test/java/org/eclipse/edc/connector/controlplane/services/contractnegotiation/ContractNegotiationEventDispatchTest.java +++ b/core/control-plane/control-plane-aggregate-services/src/test/java/org/eclipse/edc/connector/controlplane/services/contractnegotiation/ContractNegotiationEventDispatchTest.java @@ -32,8 +32,8 @@ import org.eclipse.edc.connector.dataplane.selector.spi.store.DataPlaneInstanceStore; import org.eclipse.edc.junit.annotations.ComponentTest; import org.eclipse.edc.junit.extensions.EdcExtension; +import org.eclipse.edc.participant.spi.ParticipantAgentService; import org.eclipse.edc.policy.model.Policy; -import org.eclipse.edc.spi.agent.ParticipantAgentService; import org.eclipse.edc.spi.event.EventRouter; import org.eclipse.edc.spi.event.EventSubscriber; import org.eclipse.edc.spi.iam.ClaimToken; diff --git a/core/control-plane/control-plane-aggregate-services/src/test/java/org/eclipse/edc/connector/controlplane/services/contractnegotiation/ContractNegotiationProtocolServiceImplTest.java b/core/control-plane/control-plane-aggregate-services/src/test/java/org/eclipse/edc/connector/controlplane/services/contractnegotiation/ContractNegotiationProtocolServiceImplTest.java index 201dd5a96c5..be9b6c4efc0 100644 --- a/core/control-plane/control-plane-aggregate-services/src/test/java/org/eclipse/edc/connector/controlplane/services/contractnegotiation/ContractNegotiationProtocolServiceImplTest.java +++ b/core/control-plane/control-plane-aggregate-services/src/test/java/org/eclipse/edc/connector/controlplane/services/contractnegotiation/ContractNegotiationProtocolServiceImplTest.java @@ -34,8 +34,8 @@ import org.eclipse.edc.connector.controlplane.contract.spi.validation.ValidatedConsumerOffer; import org.eclipse.edc.connector.controlplane.services.spi.contractnegotiation.ContractNegotiationProtocolService; import org.eclipse.edc.connector.controlplane.services.spi.protocol.ProtocolTokenValidator; +import org.eclipse.edc.participant.spi.ParticipantAgent; import org.eclipse.edc.policy.model.Policy; -import org.eclipse.edc.spi.agent.ParticipantAgent; import org.eclipse.edc.spi.iam.TokenRepresentation; import org.eclipse.edc.spi.result.Result; import org.eclipse.edc.spi.result.ServiceFailure; @@ -75,7 +75,7 @@ import static org.eclipse.edc.connector.controlplane.services.contractnegotiation.ContractNegotiationProtocolServiceImplTest.TestFunctions.contractOffer; import static org.eclipse.edc.connector.controlplane.services.contractnegotiation.ContractNegotiationProtocolServiceImplTest.TestFunctions.createPolicy; import static org.eclipse.edc.junit.assertions.AbstractResultAssert.assertThat; -import static org.eclipse.edc.spi.agent.ParticipantAgent.PARTICIPANT_IDENTITY; +import static org.eclipse.edc.participant.spi.ParticipantAgent.PARTICIPANT_IDENTITY; import static org.eclipse.edc.spi.result.ServiceFailure.Reason.BAD_REQUEST; import static org.eclipse.edc.spi.result.ServiceFailure.Reason.NOT_FOUND; import static org.eclipse.edc.spi.result.ServiceFailure.Reason.UNAUTHORIZED; diff --git a/core/control-plane/control-plane-aggregate-services/src/test/java/org/eclipse/edc/connector/controlplane/services/protocol/ProtocolTokenValidatorImplTest.java b/core/control-plane/control-plane-aggregate-services/src/test/java/org/eclipse/edc/connector/controlplane/services/protocol/ProtocolTokenValidatorImplTest.java index 3463a98719e..ef8e0f4afd0 100644 --- a/core/control-plane/control-plane-aggregate-services/src/test/java/org/eclipse/edc/connector/controlplane/services/protocol/ProtocolTokenValidatorImplTest.java +++ b/core/control-plane/control-plane-aggregate-services/src/test/java/org/eclipse/edc/connector/controlplane/services/protocol/ProtocolTokenValidatorImplTest.java @@ -14,11 +14,11 @@ package org.eclipse.edc.connector.controlplane.services.protocol; +import org.eclipse.edc.participant.spi.ParticipantAgent; +import org.eclipse.edc.participant.spi.ParticipantAgentService; import org.eclipse.edc.policy.context.request.spi.RequestPolicyContext; import org.eclipse.edc.policy.engine.spi.PolicyEngine; import org.eclipse.edc.policy.model.Policy; -import org.eclipse.edc.spi.agent.ParticipantAgent; -import org.eclipse.edc.spi.agent.ParticipantAgentService; import org.eclipse.edc.spi.iam.ClaimToken; import org.eclipse.edc.spi.iam.IdentityService; import org.eclipse.edc.spi.iam.RequestContext; diff --git a/core/control-plane/control-plane-aggregate-services/src/test/java/org/eclipse/edc/connector/controlplane/services/transferprocess/TransferProcessEventDispatchTest.java b/core/control-plane/control-plane-aggregate-services/src/test/java/org/eclipse/edc/connector/controlplane/services/transferprocess/TransferProcessEventDispatchTest.java index 4ae955691e6..a574c2b5927 100644 --- a/core/control-plane/control-plane-aggregate-services/src/test/java/org/eclipse/edc/connector/controlplane/services/transferprocess/TransferProcessEventDispatchTest.java +++ b/core/control-plane/control-plane-aggregate-services/src/test/java/org/eclipse/edc/connector/controlplane/services/transferprocess/TransferProcessEventDispatchTest.java @@ -39,10 +39,10 @@ import org.eclipse.edc.junit.annotations.ComponentTest; import org.eclipse.edc.junit.extensions.RuntimeExtension; import org.eclipse.edc.junit.extensions.RuntimePerClassExtension; +import org.eclipse.edc.participant.spi.ParticipantAgent; +import org.eclipse.edc.participant.spi.ParticipantAgentService; import org.eclipse.edc.policy.model.Policy; import org.eclipse.edc.spi.EdcException; -import org.eclipse.edc.spi.agent.ParticipantAgent; -import org.eclipse.edc.spi.agent.ParticipantAgentService; import org.eclipse.edc.spi.event.EventEnvelope; import org.eclipse.edc.spi.event.EventRouter; import org.eclipse.edc.spi.event.EventSubscriber; diff --git a/core/control-plane/control-plane-aggregate-services/src/test/java/org/eclipse/edc/connector/controlplane/services/transferprocess/TransferProcessProtocolServiceImplTest.java b/core/control-plane/control-plane-aggregate-services/src/test/java/org/eclipse/edc/connector/controlplane/services/transferprocess/TransferProcessProtocolServiceImplTest.java index d4bcc28f659..e78e636a7e5 100644 --- a/core/control-plane/control-plane-aggregate-services/src/test/java/org/eclipse/edc/connector/controlplane/services/transferprocess/TransferProcessProtocolServiceImplTest.java +++ b/core/control-plane/control-plane-aggregate-services/src/test/java/org/eclipse/edc/connector/controlplane/services/transferprocess/TransferProcessProtocolServiceImplTest.java @@ -34,8 +34,8 @@ import org.eclipse.edc.connector.controlplane.transfer.spi.types.protocol.TransferStartMessage; import org.eclipse.edc.connector.controlplane.transfer.spi.types.protocol.TransferSuspensionMessage; import org.eclipse.edc.connector.controlplane.transfer.spi.types.protocol.TransferTerminationMessage; +import org.eclipse.edc.participant.spi.ParticipantAgent; import org.eclipse.edc.policy.model.Policy; -import org.eclipse.edc.spi.agent.ParticipantAgent; import org.eclipse.edc.spi.iam.TokenRepresentation; import org.eclipse.edc.spi.response.StatusResult; import org.eclipse.edc.spi.result.Result; diff --git a/core/control-plane/control-plane-catalog/src/main/java/org/eclipse/edc/connector/controlplane/catalog/ContractDefinitionResolverImpl.java b/core/control-plane/control-plane-catalog/src/main/java/org/eclipse/edc/connector/controlplane/catalog/ContractDefinitionResolverImpl.java index 05eb33cdc78..476bef064a3 100644 --- a/core/control-plane/control-plane-catalog/src/main/java/org/eclipse/edc/connector/controlplane/catalog/ContractDefinitionResolverImpl.java +++ b/core/control-plane/control-plane-catalog/src/main/java/org/eclipse/edc/connector/controlplane/catalog/ContractDefinitionResolverImpl.java @@ -21,9 +21,9 @@ import org.eclipse.edc.connector.controlplane.contract.spi.types.offer.ContractDefinition; import org.eclipse.edc.connector.controlplane.policy.spi.PolicyDefinition; import org.eclipse.edc.connector.controlplane.policy.spi.store.PolicyDefinitionStore; +import org.eclipse.edc.participant.spi.ParticipantAgent; import org.eclipse.edc.policy.engine.spi.PolicyEngine; import org.eclipse.edc.policy.model.Policy; -import org.eclipse.edc.spi.agent.ParticipantAgent; import org.eclipse.edc.spi.query.QuerySpec; import org.eclipse.edc.spi.result.Result; diff --git a/core/control-plane/control-plane-catalog/src/main/java/org/eclipse/edc/connector/controlplane/catalog/DatasetResolverImpl.java b/core/control-plane/control-plane-catalog/src/main/java/org/eclipse/edc/connector/controlplane/catalog/DatasetResolverImpl.java index d9931825183..b98ba98ae93 100644 --- a/core/control-plane/control-plane-catalog/src/main/java/org/eclipse/edc/connector/controlplane/catalog/DatasetResolverImpl.java +++ b/core/control-plane/control-plane-catalog/src/main/java/org/eclipse/edc/connector/controlplane/catalog/DatasetResolverImpl.java @@ -27,9 +27,9 @@ import org.eclipse.edc.connector.controlplane.policy.spi.PolicyDefinition; import org.eclipse.edc.connector.controlplane.policy.spi.store.PolicyDefinitionStore; import org.eclipse.edc.dataaddress.httpdata.spi.HttpDataAddressSchema; +import org.eclipse.edc.participant.spi.ParticipantAgent; import org.eclipse.edc.policy.model.Policy; import org.eclipse.edc.policy.model.PolicyType; -import org.eclipse.edc.spi.agent.ParticipantAgent; import org.eclipse.edc.spi.query.CriterionOperatorRegistry; import org.eclipse.edc.spi.query.QuerySpec; import org.jetbrains.annotations.NotNull; diff --git a/core/control-plane/control-plane-catalog/src/test/java/org/eclipse/edc/connector/controlplane/catalog/ContractDefinitionResolverImplTest.java b/core/control-plane/control-plane-catalog/src/test/java/org/eclipse/edc/connector/controlplane/catalog/ContractDefinitionResolverImplTest.java index 162a96f8334..55634574e14 100644 --- a/core/control-plane/control-plane-catalog/src/test/java/org/eclipse/edc/connector/controlplane/catalog/ContractDefinitionResolverImplTest.java +++ b/core/control-plane/control-plane-catalog/src/test/java/org/eclipse/edc/connector/controlplane/catalog/ContractDefinitionResolverImplTest.java @@ -20,10 +20,10 @@ import org.eclipse.edc.connector.controlplane.contract.spi.types.offer.ContractDefinition; import org.eclipse.edc.connector.controlplane.policy.spi.PolicyDefinition; import org.eclipse.edc.connector.controlplane.policy.spi.store.PolicyDefinitionStore; +import org.eclipse.edc.participant.spi.ParticipantAgent; import org.eclipse.edc.policy.engine.spi.PolicyContext; import org.eclipse.edc.policy.engine.spi.PolicyEngine; import org.eclipse.edc.policy.model.Policy; -import org.eclipse.edc.spi.agent.ParticipantAgent; import org.eclipse.edc.spi.query.QuerySpec; import org.eclipse.edc.spi.result.Result; import org.junit.jupiter.api.Test; @@ -68,7 +68,7 @@ void shouldReturnDefinition_whenAccessPolicySatisfied() { assertThat(result.policies()).hasSize(1); verify(policyEngine, atLeastOnce()).evaluate( eq(def.getPolicy()), - and(isA(CatalogPolicyContext.class), argThat(c -> c.agent().equals(agent))) + and(isA(CatalogPolicyContext.class), argThat(c -> c.participantAgent().equals(agent))) ); verify(definitionStore).findAll(any()); } diff --git a/core/control-plane/control-plane-catalog/src/test/java/org/eclipse/edc/connector/controlplane/catalog/DatasetResolverImplIntegrationTest.java b/core/control-plane/control-plane-catalog/src/test/java/org/eclipse/edc/connector/controlplane/catalog/DatasetResolverImplIntegrationTest.java index 6c323f2bdbc..a4fd93d08fb 100644 --- a/core/control-plane/control-plane-catalog/src/test/java/org/eclipse/edc/connector/controlplane/catalog/DatasetResolverImplIntegrationTest.java +++ b/core/control-plane/control-plane-catalog/src/test/java/org/eclipse/edc/connector/controlplane/catalog/DatasetResolverImplIntegrationTest.java @@ -24,9 +24,9 @@ import org.eclipse.edc.connector.controlplane.policy.spi.PolicyDefinition; import org.eclipse.edc.connector.controlplane.policy.spi.store.PolicyDefinitionStore; import org.eclipse.edc.connector.controlplane.query.asset.AssetPropertyLookup; +import org.eclipse.edc.participant.spi.ParticipantAgent; import org.eclipse.edc.policy.model.Policy; import org.eclipse.edc.query.CriterionOperatorRegistryImpl; -import org.eclipse.edc.spi.agent.ParticipantAgent; import org.eclipse.edc.spi.message.Range; import org.eclipse.edc.spi.query.Criterion; import org.eclipse.edc.spi.query.QuerySpec; diff --git a/core/control-plane/control-plane-catalog/src/test/java/org/eclipse/edc/connector/controlplane/catalog/DatasetResolverImplTest.java b/core/control-plane/control-plane-catalog/src/test/java/org/eclipse/edc/connector/controlplane/catalog/DatasetResolverImplTest.java index afd546008fe..eb84332b321 100644 --- a/core/control-plane/control-plane-catalog/src/test/java/org/eclipse/edc/connector/controlplane/catalog/DatasetResolverImplTest.java +++ b/core/control-plane/control-plane-catalog/src/test/java/org/eclipse/edc/connector/controlplane/catalog/DatasetResolverImplTest.java @@ -31,9 +31,9 @@ import org.eclipse.edc.connector.controlplane.policy.spi.PolicyDefinition; import org.eclipse.edc.connector.controlplane.policy.spi.store.PolicyDefinitionStore; import org.eclipse.edc.dataaddress.httpdata.spi.HttpDataAddressSchema; +import org.eclipse.edc.participant.spi.ParticipantAgent; import org.eclipse.edc.policy.model.Policy; import org.eclipse.edc.query.CriterionOperatorRegistryImpl; -import org.eclipse.edc.spi.agent.ParticipantAgent; import org.eclipse.edc.spi.message.Range; import org.eclipse.edc.spi.query.Criterion; import org.eclipse.edc.spi.query.QuerySpec; diff --git a/core/control-plane/control-plane-contract/src/main/java/org/eclipse/edc/connector/controlplane/contract/validation/ContractValidationServiceImpl.java b/core/control-plane/control-plane-contract/src/main/java/org/eclipse/edc/connector/controlplane/contract/validation/ContractValidationServiceImpl.java index 97ebec61ab6..e20f99bb438 100644 --- a/core/control-plane/control-plane-contract/src/main/java/org/eclipse/edc/connector/controlplane/contract/validation/ContractValidationServiceImpl.java +++ b/core/control-plane/control-plane-contract/src/main/java/org/eclipse/edc/connector/controlplane/contract/validation/ContractValidationServiceImpl.java @@ -29,9 +29,9 @@ import org.eclipse.edc.connector.controlplane.contract.spi.validation.ContractValidationService; import org.eclipse.edc.connector.controlplane.contract.spi.validation.ValidatableConsumerOffer; import org.eclipse.edc.connector.controlplane.contract.spi.validation.ValidatedConsumerOffer; +import org.eclipse.edc.participant.spi.ParticipantAgent; import org.eclipse.edc.policy.engine.spi.PolicyEngine; import org.eclipse.edc.policy.model.Policy; -import org.eclipse.edc.spi.agent.ParticipantAgent; import org.eclipse.edc.spi.query.Criterion; import org.eclipse.edc.spi.result.Result; import org.jetbrains.annotations.NotNull; diff --git a/core/control-plane/control-plane-contract/src/test/java/org/eclipse/edc/connector/controlplane/contract/negotiation/ContractNegotiationIntegrationTest.java b/core/control-plane/control-plane-contract/src/test/java/org/eclipse/edc/connector/controlplane/contract/negotiation/ContractNegotiationIntegrationTest.java index 4e811fcca7f..9a9726ad167 100644 --- a/core/control-plane/control-plane-contract/src/test/java/org/eclipse/edc/connector/controlplane/contract/negotiation/ContractNegotiationIntegrationTest.java +++ b/core/control-plane/control-plane-contract/src/test/java/org/eclipse/edc/connector/controlplane/contract/negotiation/ContractNegotiationIntegrationTest.java @@ -38,12 +38,12 @@ import org.eclipse.edc.connector.controlplane.services.spi.contractnegotiation.ContractNegotiationProtocolService; import org.eclipse.edc.connector.controlplane.services.spi.protocol.ProtocolTokenValidator; import org.eclipse.edc.junit.annotations.ComponentTest; +import org.eclipse.edc.participant.spi.ParticipantAgent; import org.eclipse.edc.policy.model.Action; import org.eclipse.edc.policy.model.Duty; import org.eclipse.edc.policy.model.Policy; import org.eclipse.edc.policy.model.PolicyType; import org.eclipse.edc.query.CriterionOperatorRegistryImpl; -import org.eclipse.edc.spi.agent.ParticipantAgent; import org.eclipse.edc.spi.iam.TokenRepresentation; import org.eclipse.edc.spi.message.RemoteMessageDispatcherRegistry; import org.eclipse.edc.spi.monitor.ConsoleMonitor; diff --git a/core/control-plane/control-plane-contract/src/test/java/org/eclipse/edc/connector/controlplane/contract/validation/ContractValidationServiceImplTest.java b/core/control-plane/control-plane-contract/src/test/java/org/eclipse/edc/connector/controlplane/contract/validation/ContractValidationServiceImplTest.java index 8f2f10d5c26..7fb1442f4e5 100644 --- a/core/control-plane/control-plane-contract/src/test/java/org/eclipse/edc/connector/controlplane/contract/validation/ContractValidationServiceImplTest.java +++ b/core/control-plane/control-plane-contract/src/test/java/org/eclipse/edc/connector/controlplane/contract/validation/ContractValidationServiceImplTest.java @@ -30,11 +30,11 @@ import org.eclipse.edc.connector.controlplane.contract.spi.types.offer.ContractOffer; import org.eclipse.edc.connector.controlplane.contract.spi.validation.ContractValidationService; import org.eclipse.edc.connector.controlplane.contract.spi.validation.ValidatableConsumerOffer; +import org.eclipse.edc.participant.spi.ParticipantAgent; import org.eclipse.edc.policy.engine.spi.PolicyContext; import org.eclipse.edc.policy.engine.spi.PolicyEngine; import org.eclipse.edc.policy.model.Permission; import org.eclipse.edc.policy.model.Policy; -import org.eclipse.edc.spi.agent.ParticipantAgent; import org.eclipse.edc.spi.result.Result; import org.jetbrains.annotations.NotNull; import org.junit.jupiter.api.BeforeEach; @@ -52,7 +52,7 @@ import static java.util.Collections.emptyMap; import static org.assertj.core.api.Assertions.assertThat; import static org.eclipse.edc.junit.assertions.AbstractResultAssert.assertThat; -import static org.eclipse.edc.spi.agent.ParticipantAgent.PARTICIPANT_IDENTITY; +import static org.eclipse.edc.participant.spi.ParticipantAgent.PARTICIPANT_IDENTITY; import static org.mockito.AdditionalMatchers.and; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyList; @@ -115,11 +115,11 @@ void verifyContractOfferValidation() { verify(assetIndex).findById("1"); verify(policyEngine).evaluate( eq(newPolicy), - and(isA(CatalogPolicyContext.class), argThat(c -> c.agent().equals(participantAgent))) + and(isA(CatalogPolicyContext.class), argThat(c -> c.participantAgent().equals(participantAgent))) ); verify(policyEngine).evaluate( eq(newPolicy), - and(isA(ContractNegotiationPolicyContext.class), argThat(c -> c.agent().equals(participantAgent))) + and(isA(ContractNegotiationPolicyContext.class), argThat(c -> c.participantAgent().equals(participantAgent))) ); } diff --git a/core/control-plane/control-plane-transform/build.gradle.kts b/core/control-plane/control-plane-transform/build.gradle.kts index 95841d00f48..654bb9de461 100644 --- a/core/control-plane/control-plane-transform/build.gradle.kts +++ b/core/control-plane/control-plane-transform/build.gradle.kts @@ -18,8 +18,9 @@ plugins { } dependencies { - api(project(":spi:common:transform-spi")) api(project(":spi:common:json-ld-spi")) + api(project(":spi:common:participant-spi")) + api(project(":spi:common:transform-spi")) api(project(":spi:control-plane:asset-spi")) testImplementation(project(":tests:junit-base")); diff --git a/core/control-plane/control-plane-transform/src/main/java/org/eclipse/edc/connector/controlplane/transform/odrl/OdrlTransformersFactory.java b/core/control-plane/control-plane-transform/src/main/java/org/eclipse/edc/connector/controlplane/transform/odrl/OdrlTransformersFactory.java index ef2028b926a..6ce6bd0e8e3 100644 --- a/core/control-plane/control-plane-transform/src/main/java/org/eclipse/edc/connector/controlplane/transform/odrl/OdrlTransformersFactory.java +++ b/core/control-plane/control-plane-transform/src/main/java/org/eclipse/edc/connector/controlplane/transform/odrl/OdrlTransformersFactory.java @@ -21,7 +21,7 @@ import org.eclipse.edc.connector.controlplane.transform.odrl.to.JsonObjectToPermissionTransformer; import org.eclipse.edc.connector.controlplane.transform.odrl.to.JsonObjectToPolicyTransformer; import org.eclipse.edc.connector.controlplane.transform.odrl.to.JsonObjectToProhibitionTransformer; -import org.eclipse.edc.spi.agent.ParticipantIdMapper; +import org.eclipse.edc.participant.spi.ParticipantIdMapper; import org.eclipse.edc.transform.spi.TypeTransformer; import java.util.stream.Stream; diff --git a/core/control-plane/control-plane-transform/src/main/java/org/eclipse/edc/connector/controlplane/transform/odrl/from/JsonObjectFromPolicyTransformer.java b/core/control-plane/control-plane-transform/src/main/java/org/eclipse/edc/connector/controlplane/transform/odrl/from/JsonObjectFromPolicyTransformer.java index 89876145bfb..cd74316129f 100644 --- a/core/control-plane/control-plane-transform/src/main/java/org/eclipse/edc/connector/controlplane/transform/odrl/from/JsonObjectFromPolicyTransformer.java +++ b/core/control-plane/control-plane-transform/src/main/java/org/eclipse/edc/connector/controlplane/transform/odrl/from/JsonObjectFromPolicyTransformer.java @@ -20,6 +20,7 @@ import jakarta.json.JsonObject; import jakarta.json.JsonObjectBuilder; import org.eclipse.edc.jsonld.spi.transformer.AbstractJsonLdTransformer; +import org.eclipse.edc.participant.spi.ParticipantIdMapper; import org.eclipse.edc.policy.model.Action; import org.eclipse.edc.policy.model.AndConstraint; import org.eclipse.edc.policy.model.AtomicConstraint; @@ -35,7 +36,6 @@ import org.eclipse.edc.policy.model.Prohibition; import org.eclipse.edc.policy.model.Rule; import org.eclipse.edc.policy.model.XoneConstraint; -import org.eclipse.edc.spi.agent.ParticipantIdMapper; import org.eclipse.edc.transform.spi.TransformerContext; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; diff --git a/core/control-plane/control-plane-transform/src/main/java/org/eclipse/edc/connector/controlplane/transform/odrl/to/JsonObjectToPolicyTransformer.java b/core/control-plane/control-plane-transform/src/main/java/org/eclipse/edc/connector/controlplane/transform/odrl/to/JsonObjectToPolicyTransformer.java index 6ffb55e2117..c75a3fb44e3 100644 --- a/core/control-plane/control-plane-transform/src/main/java/org/eclipse/edc/connector/controlplane/transform/odrl/to/JsonObjectToPolicyTransformer.java +++ b/core/control-plane/control-plane-transform/src/main/java/org/eclipse/edc/connector/controlplane/transform/odrl/to/JsonObjectToPolicyTransformer.java @@ -18,12 +18,12 @@ import jakarta.json.JsonString; import jakarta.json.JsonValue; import org.eclipse.edc.jsonld.spi.transformer.AbstractJsonLdTransformer; +import org.eclipse.edc.participant.spi.ParticipantIdMapper; import org.eclipse.edc.policy.model.Duty; import org.eclipse.edc.policy.model.Permission; import org.eclipse.edc.policy.model.Policy; import org.eclipse.edc.policy.model.PolicyType; import org.eclipse.edc.policy.model.Prohibition; -import org.eclipse.edc.spi.agent.ParticipantIdMapper; import org.eclipse.edc.transform.spi.TransformerContext; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; diff --git a/core/control-plane/control-plane-transform/src/test/java/org/eclipse/edc/connector/controlplane/transform/odrl/from/JsonObjectFromPolicyTransformerTest.java b/core/control-plane/control-plane-transform/src/test/java/org/eclipse/edc/connector/controlplane/transform/odrl/from/JsonObjectFromPolicyTransformerTest.java index 0d4f174ec48..79b54dbf14d 100644 --- a/core/control-plane/control-plane-transform/src/test/java/org/eclipse/edc/connector/controlplane/transform/odrl/from/JsonObjectFromPolicyTransformerTest.java +++ b/core/control-plane/control-plane-transform/src/test/java/org/eclipse/edc/connector/controlplane/transform/odrl/from/JsonObjectFromPolicyTransformerTest.java @@ -19,6 +19,7 @@ import jakarta.json.JsonBuilderFactory; import jakarta.json.JsonObject; import jakarta.json.JsonValue; +import org.eclipse.edc.participant.spi.ParticipantIdMapper; import org.eclipse.edc.policy.model.Action; import org.eclipse.edc.policy.model.AndConstraint; import org.eclipse.edc.policy.model.AtomicConstraint; @@ -31,7 +32,6 @@ import org.eclipse.edc.policy.model.PolicyType; import org.eclipse.edc.policy.model.Prohibition; import org.eclipse.edc.policy.model.XoneConstraint; -import org.eclipse.edc.spi.agent.ParticipantIdMapper; import org.eclipse.edc.transform.spi.TransformerContext; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/core/control-plane/control-plane-transform/src/test/java/org/eclipse/edc/connector/controlplane/transform/odrl/to/JsonObjectToPolicyTransformerTest.java b/core/control-plane/control-plane-transform/src/test/java/org/eclipse/edc/connector/controlplane/transform/odrl/to/JsonObjectToPolicyTransformerTest.java index d816dc65737..d3fd03d66f9 100644 --- a/core/control-plane/control-plane-transform/src/test/java/org/eclipse/edc/connector/controlplane/transform/odrl/to/JsonObjectToPolicyTransformerTest.java +++ b/core/control-plane/control-plane-transform/src/test/java/org/eclipse/edc/connector/controlplane/transform/odrl/to/JsonObjectToPolicyTransformerTest.java @@ -19,12 +19,12 @@ import jakarta.json.JsonObject; import jakarta.json.JsonValue; import org.eclipse.edc.connector.controlplane.transform.TestInput; +import org.eclipse.edc.participant.spi.ParticipantIdMapper; import org.eclipse.edc.policy.model.Duty; import org.eclipse.edc.policy.model.Permission; import org.eclipse.edc.policy.model.Policy; import org.eclipse.edc.policy.model.PolicyType; import org.eclipse.edc.policy.model.Prohibition; -import org.eclipse.edc.spi.agent.ParticipantIdMapper; import org.eclipse.edc.transform.spi.ProblemBuilder; import org.eclipse.edc.transform.spi.TransformerContext; import org.junit.jupiter.api.BeforeEach; diff --git a/data-protocols/dsp/dsp-catalog/dsp-catalog-transform/src/main/java/org/eclipse/edc/protocol/dsp/catalog/transform/DspCatalogTransformExtension.java b/data-protocols/dsp/dsp-catalog/dsp-catalog-transform/src/main/java/org/eclipse/edc/protocol/dsp/catalog/transform/DspCatalogTransformExtension.java index 9ad11aadb2b..ff8b3c103be 100644 --- a/data-protocols/dsp/dsp-catalog/dsp-catalog-transform/src/main/java/org/eclipse/edc/protocol/dsp/catalog/transform/DspCatalogTransformExtension.java +++ b/data-protocols/dsp/dsp-catalog/dsp-catalog-transform/src/main/java/org/eclipse/edc/protocol/dsp/catalog/transform/DspCatalogTransformExtension.java @@ -16,6 +16,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import jakarta.json.Json; +import org.eclipse.edc.participant.spi.ParticipantIdMapper; import org.eclipse.edc.protocol.dsp.catalog.transform.from.JsonObjectFromCatalogErrorTransformer; import org.eclipse.edc.protocol.dsp.catalog.transform.from.JsonObjectFromCatalogRequestMessageTransformer; import org.eclipse.edc.protocol.dsp.catalog.transform.from.JsonObjectFromCatalogTransformer; @@ -25,7 +26,6 @@ import org.eclipse.edc.protocol.dsp.catalog.transform.to.JsonObjectToCatalogRequestMessageTransformer; import org.eclipse.edc.runtime.metamodel.annotation.Extension; import org.eclipse.edc.runtime.metamodel.annotation.Inject; -import org.eclipse.edc.spi.agent.ParticipantIdMapper; import org.eclipse.edc.spi.system.ServiceExtension; import org.eclipse.edc.spi.system.ServiceExtensionContext; import org.eclipse.edc.spi.types.TypeManager; @@ -80,4 +80,4 @@ private void registerTransformers(String version, ObjectMapper mapper) { dspApiTransformerRegistry.register(new JsonObjectFromDataServiceTransformer(jsonFactory)); dspApiTransformerRegistry.register(new JsonObjectFromCatalogErrorTransformer(jsonFactory)); } -} \ No newline at end of file +} diff --git a/data-protocols/dsp/dsp-catalog/lib/dsp-catalog-transform-lib/src/main/java/org/eclipse/edc/protocol/dsp/catalog/transform/from/JsonObjectFromCatalogTransformer.java b/data-protocols/dsp/dsp-catalog/lib/dsp-catalog-transform-lib/src/main/java/org/eclipse/edc/protocol/dsp/catalog/transform/from/JsonObjectFromCatalogTransformer.java index cf20a94ee8a..63d4d326edc 100644 --- a/data-protocols/dsp/dsp-catalog/lib/dsp-catalog-transform-lib/src/main/java/org/eclipse/edc/protocol/dsp/catalog/transform/from/JsonObjectFromCatalogTransformer.java +++ b/data-protocols/dsp/dsp-catalog/lib/dsp-catalog-transform-lib/src/main/java/org/eclipse/edc/protocol/dsp/catalog/transform/from/JsonObjectFromCatalogTransformer.java @@ -20,7 +20,7 @@ import org.eclipse.edc.connector.controlplane.catalog.spi.Catalog; import org.eclipse.edc.jsonld.spi.JsonLdNamespace; import org.eclipse.edc.jsonld.spi.transformer.AbstractNamespaceAwareJsonLdTransformer; -import org.eclipse.edc.spi.agent.ParticipantIdMapper; +import org.eclipse.edc.participant.spi.ParticipantIdMapper; import org.eclipse.edc.transform.spi.TransformerContext; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; diff --git a/data-protocols/dsp/dsp-catalog/lib/dsp-catalog-transform-lib/src/test/java/org/eclipse/edc/protocol/dsp/catalog/transform/from/JsonObjectFromCatalogTransformerTest.java b/data-protocols/dsp/dsp-catalog/lib/dsp-catalog-transform-lib/src/test/java/org/eclipse/edc/protocol/dsp/catalog/transform/from/JsonObjectFromCatalogTransformerTest.java index fc42ba4612e..44055b0ef92 100644 --- a/data-protocols/dsp/dsp-catalog/lib/dsp-catalog-transform-lib/src/test/java/org/eclipse/edc/protocol/dsp/catalog/transform/from/JsonObjectFromCatalogTransformerTest.java +++ b/data-protocols/dsp/dsp-catalog/lib/dsp-catalog-transform-lib/src/test/java/org/eclipse/edc/protocol/dsp/catalog/transform/from/JsonObjectFromCatalogTransformerTest.java @@ -24,8 +24,8 @@ import org.eclipse.edc.connector.controlplane.catalog.spi.DataService; import org.eclipse.edc.connector.controlplane.catalog.spi.Dataset; import org.eclipse.edc.connector.controlplane.catalog.spi.Distribution; +import org.eclipse.edc.participant.spi.ParticipantIdMapper; import org.eclipse.edc.policy.model.Policy; -import org.eclipse.edc.spi.agent.ParticipantIdMapper; import org.eclipse.edc.transform.spi.ProblemBuilder; import org.eclipse.edc.transform.spi.TransformerContext; import org.junit.jupiter.api.BeforeEach; diff --git a/data-protocols/dsp/dsp-http-api-configuration/src/main/java/org/eclipse/edc/protocol/dsp/http/api/configuration/DspApiConfigurationExtension.java b/data-protocols/dsp/dsp-http-api-configuration/src/main/java/org/eclipse/edc/protocol/dsp/http/api/configuration/DspApiConfigurationExtension.java index e5840bdfd75..d8698ef6fba 100644 --- a/data-protocols/dsp/dsp-http-api-configuration/src/main/java/org/eclipse/edc/protocol/dsp/http/api/configuration/DspApiConfigurationExtension.java +++ b/data-protocols/dsp/dsp-http-api-configuration/src/main/java/org/eclipse/edc/protocol/dsp/http/api/configuration/DspApiConfigurationExtension.java @@ -21,6 +21,7 @@ import org.eclipse.edc.connector.controlplane.transform.odrl.OdrlTransformersFactory; import org.eclipse.edc.connector.controlplane.transform.odrl.from.JsonObjectFromPolicyTransformer; import org.eclipse.edc.jsonld.spi.JsonLd; +import org.eclipse.edc.participant.spi.ParticipantIdMapper; import org.eclipse.edc.policy.model.AtomicConstraint; import org.eclipse.edc.policy.model.LiteralExpression; import org.eclipse.edc.runtime.metamodel.annotation.Extension; @@ -28,7 +29,6 @@ import org.eclipse.edc.runtime.metamodel.annotation.Provides; import org.eclipse.edc.runtime.metamodel.annotation.Setting; import org.eclipse.edc.runtime.metamodel.annotation.SettingContext; -import org.eclipse.edc.spi.agent.ParticipantIdMapper; import org.eclipse.edc.spi.protocol.ProtocolWebhook; import org.eclipse.edc.spi.system.Hostname; import org.eclipse.edc.spi.system.ServiceExtension; diff --git a/extensions/common/api/management-api-configuration/src/main/java/org/eclipse/edc/connector/api/management/configuration/ManagementApiConfigurationExtension.java b/extensions/common/api/management-api-configuration/src/main/java/org/eclipse/edc/connector/api/management/configuration/ManagementApiConfigurationExtension.java index 24c101c7a89..45b476d0dc7 100644 --- a/extensions/common/api/management-api-configuration/src/main/java/org/eclipse/edc/connector/api/management/configuration/ManagementApiConfigurationExtension.java +++ b/extensions/common/api/management-api-configuration/src/main/java/org/eclipse/edc/connector/api/management/configuration/ManagementApiConfigurationExtension.java @@ -24,13 +24,13 @@ import org.eclipse.edc.connector.controlplane.transform.odrl.OdrlTransformersFactory; import org.eclipse.edc.connector.controlplane.transform.odrl.from.JsonObjectFromPolicyTransformer; import org.eclipse.edc.jsonld.spi.JsonLd; +import org.eclipse.edc.participant.spi.ParticipantIdMapper; import org.eclipse.edc.runtime.metamodel.annotation.Extension; import org.eclipse.edc.runtime.metamodel.annotation.Inject; import org.eclipse.edc.runtime.metamodel.annotation.Provides; import org.eclipse.edc.runtime.metamodel.annotation.Setting; import org.eclipse.edc.runtime.metamodel.annotation.SettingContext; import org.eclipse.edc.spi.EdcException; -import org.eclipse.edc.spi.agent.ParticipantIdMapper; import org.eclipse.edc.spi.system.Hostname; import org.eclipse.edc.spi.system.ServiceExtension; import org.eclipse.edc.spi.system.ServiceExtensionContext; diff --git a/extensions/common/iam/identity-trust/identity-trust-core/build.gradle.kts b/extensions/common/iam/identity-trust/identity-trust-core/build.gradle.kts index 9ebf85a7dd6..32205c8498c 100644 --- a/extensions/common/iam/identity-trust/identity-trust-core/build.gradle.kts +++ b/extensions/common/iam/identity-trust/identity-trust-core/build.gradle.kts @@ -6,9 +6,10 @@ plugins { dependencies { api(project(":spi:common:identity-trust-spi")) api(project(":spi:common:policy:request-policy-context-spi")) - implementation(project(":spi:common:keys-spi")) - implementation(project(":spi:common:http-spi")) implementation(project(":spi:common:json-ld-spi")) + implementation(project(":spi:common:http-spi")) + implementation(project(":spi:common:keys-spi")) + implementation(project(":spi:common:participant-spi")) implementation(project(":core:common:lib:util-lib")) implementation(project(":core:common:lib:crypto-common-lib")) implementation(project(":core:common:token-core")) diff --git a/extensions/common/iam/identity-trust/identity-trust-core/src/main/java/org/eclipse/edc/iam/identitytrust/core/IdentityAndTrustExtension.java b/extensions/common/iam/identity-trust/identity-trust-core/src/main/java/org/eclipse/edc/iam/identitytrust/core/IdentityAndTrustExtension.java index 39603b4c7cf..42214033564 100644 --- a/extensions/common/iam/identity-trust/identity-trust-core/src/main/java/org/eclipse/edc/iam/identitytrust/core/IdentityAndTrustExtension.java +++ b/extensions/common/iam/identity-trust/identity-trust-core/src/main/java/org/eclipse/edc/iam/identitytrust/core/IdentityAndTrustExtension.java @@ -37,12 +37,12 @@ import org.eclipse.edc.iam.verifiablecredentials.spi.validation.PresentationVerifier; import org.eclipse.edc.iam.verifiablecredentials.spi.validation.TrustedIssuerRegistry; import org.eclipse.edc.jsonld.spi.JsonLd; +import org.eclipse.edc.participant.spi.ParticipantAgentService; import org.eclipse.edc.runtime.metamodel.annotation.Extension; import org.eclipse.edc.runtime.metamodel.annotation.Inject; import org.eclipse.edc.runtime.metamodel.annotation.Provider; import org.eclipse.edc.runtime.metamodel.annotation.Setting; import org.eclipse.edc.security.signature.jws2020.Jws2020SignatureSuite; -import org.eclipse.edc.spi.agent.ParticipantAgentService; import org.eclipse.edc.spi.iam.IdentityService; import org.eclipse.edc.spi.system.ServiceExtension; import org.eclipse.edc.spi.system.ServiceExtensionContext; diff --git a/extensions/common/iam/identity-trust/identity-trust-core/src/main/java/org/eclipse/edc/iam/identitytrust/core/defaults/DefaultDcpParticipantAgentServiceExtension.java b/extensions/common/iam/identity-trust/identity-trust-core/src/main/java/org/eclipse/edc/iam/identitytrust/core/defaults/DefaultDcpParticipantAgentServiceExtension.java index bb8173f9a9f..9a72ee30483 100644 --- a/extensions/common/iam/identity-trust/identity-trust-core/src/main/java/org/eclipse/edc/iam/identitytrust/core/defaults/DefaultDcpParticipantAgentServiceExtension.java +++ b/extensions/common/iam/identity-trust/identity-trust-core/src/main/java/org/eclipse/edc/iam/identitytrust/core/defaults/DefaultDcpParticipantAgentServiceExtension.java @@ -27,7 +27,7 @@ import static java.util.Collections.emptyMap; import static java.util.Optional.ofNullable; import static org.eclipse.edc.iam.identitytrust.core.DcpDefaultServicesExtension.CLAIMTOKEN_VC_KEY; -import static org.eclipse.edc.spi.agent.ParticipantAgent.PARTICIPANT_IDENTITY; +import static org.eclipse.edc.participant.spi.ParticipantAgent.PARTICIPANT_IDENTITY; /** * Retrieve subject id from the list of {@link VerifiableCredential} and set the diff --git a/extensions/common/iam/identity-trust/identity-trust-core/src/test/java/org/eclipse/edc/iam/identitytrust/core/defaults/DefaultDcpParticipantAgentServiceExtensionTest.java b/extensions/common/iam/identity-trust/identity-trust-core/src/test/java/org/eclipse/edc/iam/identitytrust/core/defaults/DefaultDcpParticipantAgentServiceExtensionTest.java index 5cdc9c4808f..eb41708eccf 100644 --- a/extensions/common/iam/identity-trust/identity-trust-core/src/test/java/org/eclipse/edc/iam/identitytrust/core/defaults/DefaultDcpParticipantAgentServiceExtensionTest.java +++ b/extensions/common/iam/identity-trust/identity-trust-core/src/test/java/org/eclipse/edc/iam/identitytrust/core/defaults/DefaultDcpParticipantAgentServiceExtensionTest.java @@ -14,7 +14,7 @@ package org.eclipse.edc.iam.identitytrust.core.defaults; -import org.eclipse.edc.spi.agent.ParticipantAgent; +import org.eclipse.edc.participant.spi.ParticipantAgent; import org.eclipse.edc.spi.iam.ClaimToken; import org.junit.jupiter.api.Test; @@ -53,4 +53,4 @@ void attributesFor_claimIsNotVc_shouldReturnEmptyMap() { assertThat(attributes).isEmpty(); } -} \ No newline at end of file +} diff --git a/extensions/control-plane/api/management-api/contract-negotiation-api/src/test/java/org/eclipse/edc/connector/controlplane/api/management/contractnegotiation/BaseContractNegotiationApiTest.java b/extensions/control-plane/api/management-api/contract-negotiation-api/src/test/java/org/eclipse/edc/connector/controlplane/api/management/contractnegotiation/BaseContractNegotiationApiTest.java index 9d290467c96..be21b8b6553 100644 --- a/extensions/control-plane/api/management-api/contract-negotiation-api/src/test/java/org/eclipse/edc/connector/controlplane/api/management/contractnegotiation/BaseContractNegotiationApiTest.java +++ b/extensions/control-plane/api/management-api/contract-negotiation-api/src/test/java/org/eclipse/edc/connector/controlplane/api/management/contractnegotiation/BaseContractNegotiationApiTest.java @@ -31,9 +31,8 @@ import org.eclipse.edc.jsonld.spi.JsonLd; import org.eclipse.edc.jsonld.util.JacksonJsonLd; import org.eclipse.edc.junit.assertions.AbstractResultAssert; +import org.eclipse.edc.participant.spi.ParticipantIdMapper; import org.eclipse.edc.policy.model.Policy; -import org.eclipse.edc.spi.agent.ParticipantIdMapper; -import org.eclipse.edc.spi.monitor.Monitor; import org.eclipse.edc.transform.TypeTransformerRegistryImpl; import org.eclipse.edc.transform.spi.TypeTransformerRegistry; import org.eclipse.edc.validator.jsonobject.JsonObjectValidator; @@ -52,7 +51,6 @@ public abstract class BaseContractNegotiationApiTest { protected final TypeTransformerRegistry transformer = new TypeTransformerRegistryImpl(); private final ObjectMapper objectMapper = JacksonJsonLd.createObjectMapper(); private final JsonLd jsonLd = new JsonLdExtension().createJsonLdService(testServiceExtensionContext()); - private final Monitor monitor = mock(); @BeforeEach void setUp() { diff --git a/extensions/control-plane/api/management-api/contract-negotiation-api/src/test/java/org/eclipse/edc/connector/controlplane/api/management/contractnegotiation/v2/ContractNegotiationApiV2Test.java b/extensions/control-plane/api/management-api/contract-negotiation-api/src/test/java/org/eclipse/edc/connector/controlplane/api/management/contractnegotiation/v2/ContractNegotiationApiV2Test.java index b6b863b3824..5c6bc872ac2 100644 --- a/extensions/control-plane/api/management-api/contract-negotiation-api/src/test/java/org/eclipse/edc/connector/controlplane/api/management/contractnegotiation/v2/ContractNegotiationApiV2Test.java +++ b/extensions/control-plane/api/management-api/contract-negotiation-api/src/test/java/org/eclipse/edc/connector/controlplane/api/management/contractnegotiation/v2/ContractNegotiationApiV2Test.java @@ -20,7 +20,7 @@ import org.eclipse.edc.connector.controlplane.api.management.contractnegotiation.transform.JsonObjectToContractRequestTransformer; import org.eclipse.edc.connector.controlplane.api.management.contractnegotiation.transform.JsonObjectToTerminateNegotiationCommandTransformer; import org.eclipse.edc.connector.controlplane.transform.odrl.OdrlTransformersFactory; -import org.eclipse.edc.spi.agent.ParticipantIdMapper; +import org.eclipse.edc.participant.spi.ParticipantIdMapper; import org.junit.jupiter.api.BeforeEach; import static org.mockito.ArgumentMatchers.any; diff --git a/extensions/control-plane/api/management-api/contract-negotiation-api/src/test/java/org/eclipse/edc/connector/controlplane/api/management/contractnegotiation/v3/ContractNegotiationApiV3Test.java b/extensions/control-plane/api/management-api/contract-negotiation-api/src/test/java/org/eclipse/edc/connector/controlplane/api/management/contractnegotiation/v3/ContractNegotiationApiV3Test.java index 945ac30f203..440bac6215f 100644 --- a/extensions/control-plane/api/management-api/contract-negotiation-api/src/test/java/org/eclipse/edc/connector/controlplane/api/management/contractnegotiation/v3/ContractNegotiationApiV3Test.java +++ b/extensions/control-plane/api/management-api/contract-negotiation-api/src/test/java/org/eclipse/edc/connector/controlplane/api/management/contractnegotiation/v3/ContractNegotiationApiV3Test.java @@ -20,7 +20,7 @@ import org.eclipse.edc.connector.controlplane.api.management.contractnegotiation.transform.JsonObjectToContractRequestTransformer; import org.eclipse.edc.connector.controlplane.api.management.contractnegotiation.transform.JsonObjectToTerminateNegotiationCommandTransformer; import org.eclipse.edc.connector.controlplane.transform.odrl.OdrlTransformersFactory; -import org.eclipse.edc.spi.agent.ParticipantIdMapper; +import org.eclipse.edc.participant.spi.ParticipantIdMapper; import org.junit.jupiter.api.BeforeEach; import static org.mockito.ArgumentMatchers.any; diff --git a/extensions/control-plane/provision/provision-http/src/test/java/org/eclipse/edc/connector/controlplane/provision/http/impl/HttpProvisionerExtensionEndToEndTest.java b/extensions/control-plane/provision/provision-http/src/test/java/org/eclipse/edc/connector/controlplane/provision/http/impl/HttpProvisionerExtensionEndToEndTest.java index cb4948cd9c6..f5d035055e3 100644 --- a/extensions/control-plane/provision/provision-http/src/test/java/org/eclipse/edc/connector/controlplane/provision/http/impl/HttpProvisionerExtensionEndToEndTest.java +++ b/extensions/control-plane/provision/provision-http/src/test/java/org/eclipse/edc/connector/controlplane/provision/http/impl/HttpProvisionerExtensionEndToEndTest.java @@ -34,10 +34,10 @@ import org.eclipse.edc.http.spi.EdcHttpClient; import org.eclipse.edc.junit.annotations.ComponentTest; import org.eclipse.edc.junit.extensions.EdcExtension; +import org.eclipse.edc.participant.spi.ParticipantAgent; import org.eclipse.edc.policy.model.Policy; import org.eclipse.edc.runtime.metamodel.annotation.Inject; import org.eclipse.edc.runtime.metamodel.annotation.Provides; -import org.eclipse.edc.spi.agent.ParticipantAgent; import org.eclipse.edc.spi.entity.StatefulEntity; import org.eclipse.edc.spi.iam.ClaimToken; import org.eclipse.edc.spi.iam.IdentityService; diff --git a/settings.gradle.kts b/settings.gradle.kts index 5f572b01e63..40deb599ecb 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -239,6 +239,7 @@ include(":spi:common:jwt-spi") include(":spi:common:jwt-signer-spi") include(":spi:common:token-spi") include(":spi:common:oauth2-spi") +include(":spi:common:participant-spi") include(":spi:common:policy-engine-spi") include(":spi:common:policy-model") include(":spi:common:policy:request-policy-context-spi") diff --git a/spi/common/identity-trust-spi/build.gradle.kts b/spi/common/identity-trust-spi/build.gradle.kts index 78122495c4d..5cb5dd1e7ed 100644 --- a/spi/common/identity-trust-spi/build.gradle.kts +++ b/spi/common/identity-trust-spi/build.gradle.kts @@ -20,8 +20,9 @@ plugins { dependencies { api(project(":spi:common:core-spi")) - api(project(":spi:common:verifiable-credentials-spi")) + api(project(":spi:common:participant-spi")) api(project(":spi:common:policy-engine-spi")) + api(project(":spi:common:verifiable-credentials-spi")) api(libs.iron.vc) { //this is not on MavenCentral, and we don't really need it anyway exclude("com.github.multiformats") diff --git a/spi/common/identity-trust-spi/src/main/java/org/eclipse/edc/iam/identitytrust/spi/DcpParticipantAgentServiceExtension.java b/spi/common/identity-trust-spi/src/main/java/org/eclipse/edc/iam/identitytrust/spi/DcpParticipantAgentServiceExtension.java index b508e40fbd9..5bba25a7e68 100644 --- a/spi/common/identity-trust-spi/src/main/java/org/eclipse/edc/iam/identitytrust/spi/DcpParticipantAgentServiceExtension.java +++ b/spi/common/identity-trust-spi/src/main/java/org/eclipse/edc/iam/identitytrust/spi/DcpParticipantAgentServiceExtension.java @@ -14,7 +14,7 @@ package org.eclipse.edc.iam.identitytrust.spi; -import org.eclipse.edc.spi.agent.ParticipantAgentServiceExtension; +import org.eclipse.edc.participant.spi.ParticipantAgentServiceExtension; /** * Marker class for a {@link ParticipantAgentServiceExtension} that will be registered for Identity And Trust diff --git a/spi/common/participant-spi/build.gradle.kts b/spi/common/participant-spi/build.gradle.kts new file mode 100644 index 00000000000..df604849ebe --- /dev/null +++ b/spi/common/participant-spi/build.gradle.kts @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2024 Cofinity-X + * + * 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 + * + * SPDX-License-Identifier: Apache-2.0 + * + * Contributors: + * Cofinity-X - initial API and implementation + * + */ + +plugins { + `java-library` + `maven-publish` +} + +dependencies { + api(project(":spi:common:core-spi")) + api(project(":spi:common:policy-engine-spi")) +} + + diff --git a/spi/common/core-spi/src/main/java/org/eclipse/edc/spi/agent/ParticipantAgent.java b/spi/common/participant-spi/src/main/java/org/eclipse/edc/participant/spi/ParticipantAgent.java similarity index 98% rename from spi/common/core-spi/src/main/java/org/eclipse/edc/spi/agent/ParticipantAgent.java rename to spi/common/participant-spi/src/main/java/org/eclipse/edc/participant/spi/ParticipantAgent.java index 17456502e7b..925fa467103 100644 --- a/spi/common/core-spi/src/main/java/org/eclipse/edc/spi/agent/ParticipantAgent.java +++ b/spi/common/participant-spi/src/main/java/org/eclipse/edc/participant/spi/ParticipantAgent.java @@ -12,7 +12,7 @@ * */ -package org.eclipse.edc.spi.agent; +package org.eclipse.edc.participant.spi; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; diff --git a/spi/common/participant-spi/src/main/java/org/eclipse/edc/participant/spi/ParticipantAgentPolicyContext.java b/spi/common/participant-spi/src/main/java/org/eclipse/edc/participant/spi/ParticipantAgentPolicyContext.java new file mode 100644 index 00000000000..9b8daf505f8 --- /dev/null +++ b/spi/common/participant-spi/src/main/java/org/eclipse/edc/participant/spi/ParticipantAgentPolicyContext.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2024 Cofinity-X + * + * 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 + * + * SPDX-License-Identifier: Apache-2.0 + * + * Contributors: + * Cofinity-X - initial API and implementation + * + */ + +package org.eclipse.edc.participant.spi; + +import org.eclipse.edc.policy.engine.spi.PolicyContext; + +/** + * Marker interface + */ +public interface ParticipantAgentPolicyContext extends PolicyContext { + + /** + * The participant agent. + * + * @return The participant agent. + */ + ParticipantAgent participantAgent(); +} diff --git a/spi/common/core-spi/src/main/java/org/eclipse/edc/spi/agent/ParticipantAgentService.java b/spi/common/participant-spi/src/main/java/org/eclipse/edc/participant/spi/ParticipantAgentService.java similarity index 95% rename from spi/common/core-spi/src/main/java/org/eclipse/edc/spi/agent/ParticipantAgentService.java rename to spi/common/participant-spi/src/main/java/org/eclipse/edc/participant/spi/ParticipantAgentService.java index d0e3a315534..66118aaf599 100644 --- a/spi/common/core-spi/src/main/java/org/eclipse/edc/spi/agent/ParticipantAgentService.java +++ b/spi/common/participant-spi/src/main/java/org/eclipse/edc/participant/spi/ParticipantAgentService.java @@ -12,7 +12,7 @@ * */ -package org.eclipse.edc.spi.agent; +package org.eclipse.edc.participant.spi; import org.eclipse.edc.spi.iam.ClaimToken; diff --git a/spi/common/core-spi/src/main/java/org/eclipse/edc/spi/agent/ParticipantAgentServiceExtension.java b/spi/common/participant-spi/src/main/java/org/eclipse/edc/participant/spi/ParticipantAgentServiceExtension.java similarity index 96% rename from spi/common/core-spi/src/main/java/org/eclipse/edc/spi/agent/ParticipantAgentServiceExtension.java rename to spi/common/participant-spi/src/main/java/org/eclipse/edc/participant/spi/ParticipantAgentServiceExtension.java index 6c1b400977a..13c6d2ed4c3 100644 --- a/spi/common/core-spi/src/main/java/org/eclipse/edc/spi/agent/ParticipantAgentServiceExtension.java +++ b/spi/common/participant-spi/src/main/java/org/eclipse/edc/participant/spi/ParticipantAgentServiceExtension.java @@ -12,7 +12,7 @@ * */ -package org.eclipse.edc.spi.agent; +package org.eclipse.edc.participant.spi; import org.eclipse.edc.spi.iam.ClaimToken; import org.jetbrains.annotations.NotNull; diff --git a/spi/common/core-spi/src/main/java/org/eclipse/edc/spi/agent/ParticipantIdMapper.java b/spi/common/participant-spi/src/main/java/org/eclipse/edc/participant/spi/ParticipantIdMapper.java similarity index 78% rename from spi/common/core-spi/src/main/java/org/eclipse/edc/spi/agent/ParticipantIdMapper.java rename to spi/common/participant-spi/src/main/java/org/eclipse/edc/participant/spi/ParticipantIdMapper.java index a9fdeeb9aee..af4812bdfc6 100644 --- a/spi/common/core-spi/src/main/java/org/eclipse/edc/spi/agent/ParticipantIdMapper.java +++ b/spi/common/participant-spi/src/main/java/org/eclipse/edc/participant/spi/ParticipantIdMapper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) + * Copyright (c) 2021 Microsoft Corporation * * This program and the accompanying materials are made available under the * terms of the Apache License, Version 2.0 which is available at @@ -8,11 +8,11 @@ * SPDX-License-Identifier: Apache-2.0 * * Contributors: - * Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation + * Microsoft Corporation - initial API and implementation * */ -package org.eclipse.edc.spi.agent; +package org.eclipse.edc.participant.spi; import org.eclipse.edc.runtime.metamodel.annotation.ExtensionPoint; diff --git a/spi/control-plane/catalog-spi/build.gradle.kts b/spi/control-plane/catalog-spi/build.gradle.kts index 546cbada839..42c724d903d 100644 --- a/spi/control-plane/catalog-spi/build.gradle.kts +++ b/spi/control-plane/catalog-spi/build.gradle.kts @@ -19,6 +19,7 @@ plugins { dependencies { api(project(":spi:common:core-spi")) + api(project(":spi:common:participant-spi")) api(project(":spi:common:policy-engine-spi")) api(project(":spi:control-plane:asset-spi")) api(project(":spi:control-plane:contract-spi")) diff --git a/spi/control-plane/catalog-spi/src/main/java/org/eclipse/edc/connector/controlplane/catalog/spi/ContractDefinitionResolver.java b/spi/control-plane/catalog-spi/src/main/java/org/eclipse/edc/connector/controlplane/catalog/spi/ContractDefinitionResolver.java index 641702f113a..459eaea8c84 100644 --- a/spi/control-plane/catalog-spi/src/main/java/org/eclipse/edc/connector/controlplane/catalog/spi/ContractDefinitionResolver.java +++ b/spi/control-plane/catalog-spi/src/main/java/org/eclipse/edc/connector/controlplane/catalog/spi/ContractDefinitionResolver.java @@ -15,8 +15,8 @@ package org.eclipse.edc.connector.controlplane.catalog.spi; import org.eclipse.edc.connector.controlplane.contract.spi.types.offer.ContractDefinition; +import org.eclipse.edc.participant.spi.ParticipantAgent; import org.eclipse.edc.runtime.metamodel.annotation.ExtensionPoint; -import org.eclipse.edc.spi.agent.ParticipantAgent; /** * Returns {@link ContractDefinition} for a given participant agent. diff --git a/spi/control-plane/catalog-spi/src/main/java/org/eclipse/edc/connector/controlplane/catalog/spi/DatasetResolver.java b/spi/control-plane/catalog-spi/src/main/java/org/eclipse/edc/connector/controlplane/catalog/spi/DatasetResolver.java index 750f82efd55..263efd9ca06 100644 --- a/spi/control-plane/catalog-spi/src/main/java/org/eclipse/edc/connector/controlplane/catalog/spi/DatasetResolver.java +++ b/spi/control-plane/catalog-spi/src/main/java/org/eclipse/edc/connector/controlplane/catalog/spi/DatasetResolver.java @@ -14,7 +14,7 @@ package org.eclipse.edc.connector.controlplane.catalog.spi; -import org.eclipse.edc.spi.agent.ParticipantAgent; +import org.eclipse.edc.participant.spi.ParticipantAgent; import org.eclipse.edc.spi.query.QuerySpec; import org.jetbrains.annotations.NotNull; diff --git a/spi/control-plane/catalog-spi/src/main/java/org/eclipse/edc/connector/controlplane/catalog/spi/policy/CatalogPolicyContext.java b/spi/control-plane/catalog-spi/src/main/java/org/eclipse/edc/connector/controlplane/catalog/spi/policy/CatalogPolicyContext.java index e5f35375262..b88f802032a 100644 --- a/spi/control-plane/catalog-spi/src/main/java/org/eclipse/edc/connector/controlplane/catalog/spi/policy/CatalogPolicyContext.java +++ b/spi/control-plane/catalog-spi/src/main/java/org/eclipse/edc/connector/controlplane/catalog/spi/policy/CatalogPolicyContext.java @@ -14,14 +14,15 @@ package org.eclipse.edc.connector.controlplane.catalog.spi.policy; +import org.eclipse.edc.participant.spi.ParticipantAgent; +import org.eclipse.edc.participant.spi.ParticipantAgentPolicyContext; import org.eclipse.edc.policy.engine.spi.PolicyContextImpl; import org.eclipse.edc.policy.engine.spi.PolicyScope; -import org.eclipse.edc.spi.agent.ParticipantAgent; /** * Policy Context for "catalog" scope */ -public class CatalogPolicyContext extends PolicyContextImpl { +public class CatalogPolicyContext extends PolicyContextImpl implements ParticipantAgentPolicyContext { @PolicyScope public static final String CATALOG_SCOPE = "catalog"; @@ -32,7 +33,8 @@ public CatalogPolicyContext(ParticipantAgent agent) { this.agent = agent; } - public ParticipantAgent agent() { + @Override + public ParticipantAgent participantAgent() { return agent; } diff --git a/spi/control-plane/contract-spi/build.gradle.kts b/spi/control-plane/contract-spi/build.gradle.kts index 1b2ea001b52..fb0879f87f9 100644 --- a/spi/control-plane/contract-spi/build.gradle.kts +++ b/spi/control-plane/contract-spi/build.gradle.kts @@ -20,6 +20,7 @@ plugins { dependencies { api(project(":spi:common:core-spi")) + api(project(":spi:common:participant-spi")) api(project(":spi:common:policy-engine-spi")) api(project(":spi:control-plane:policy-spi")) diff --git a/spi/control-plane/contract-spi/src/main/java/org/eclipse/edc/connector/controlplane/contract/spi/policy/ContractNegotiationPolicyContext.java b/spi/control-plane/contract-spi/src/main/java/org/eclipse/edc/connector/controlplane/contract/spi/policy/ContractNegotiationPolicyContext.java index 208031a1a56..4d75da20b3f 100644 --- a/spi/control-plane/contract-spi/src/main/java/org/eclipse/edc/connector/controlplane/contract/spi/policy/ContractNegotiationPolicyContext.java +++ b/spi/control-plane/contract-spi/src/main/java/org/eclipse/edc/connector/controlplane/contract/spi/policy/ContractNegotiationPolicyContext.java @@ -14,14 +14,15 @@ package org.eclipse.edc.connector.controlplane.contract.spi.policy; +import org.eclipse.edc.participant.spi.ParticipantAgent; +import org.eclipse.edc.participant.spi.ParticipantAgentPolicyContext; import org.eclipse.edc.policy.engine.spi.PolicyContextImpl; import org.eclipse.edc.policy.engine.spi.PolicyScope; -import org.eclipse.edc.spi.agent.ParticipantAgent; /** * Policy Context for "contract.negotiation" scope */ -public class ContractNegotiationPolicyContext extends PolicyContextImpl { +public class ContractNegotiationPolicyContext extends PolicyContextImpl implements ParticipantAgentPolicyContext { @PolicyScope public static final String NEGOTIATION_SCOPE = "contract.negotiation"; @@ -32,7 +33,8 @@ public ContractNegotiationPolicyContext(ParticipantAgent agent) { this.agent = agent; } - public ParticipantAgent agent() { + @Override + public ParticipantAgent participantAgent() { return agent; } diff --git a/spi/control-plane/contract-spi/src/main/java/org/eclipse/edc/connector/controlplane/contract/spi/policy/TransferProcessPolicyContext.java b/spi/control-plane/contract-spi/src/main/java/org/eclipse/edc/connector/controlplane/contract/spi/policy/TransferProcessPolicyContext.java index 308b445c38b..3f479447326 100644 --- a/spi/control-plane/contract-spi/src/main/java/org/eclipse/edc/connector/controlplane/contract/spi/policy/TransferProcessPolicyContext.java +++ b/spi/control-plane/contract-spi/src/main/java/org/eclipse/edc/connector/controlplane/contract/spi/policy/TransferProcessPolicyContext.java @@ -15,16 +15,17 @@ package org.eclipse.edc.connector.controlplane.contract.spi.policy; import org.eclipse.edc.connector.controlplane.contract.spi.types.agreement.ContractAgreement; +import org.eclipse.edc.participant.spi.ParticipantAgent; +import org.eclipse.edc.participant.spi.ParticipantAgentPolicyContext; import org.eclipse.edc.policy.engine.spi.PolicyContextImpl; import org.eclipse.edc.policy.engine.spi.PolicyScope; -import org.eclipse.edc.spi.agent.ParticipantAgent; import java.time.Instant; /** * Policy Context for "transfer.process" scope */ -public class TransferProcessPolicyContext extends PolicyContextImpl implements AgreementPolicyContext { +public class TransferProcessPolicyContext extends PolicyContextImpl implements AgreementPolicyContext, ParticipantAgentPolicyContext { @PolicyScope public static final String TRANSFER_SCOPE = "transfer.process"; @@ -39,7 +40,8 @@ public TransferProcessPolicyContext(ParticipantAgent agent, ContractAgreement ag this.now = now; } - public ParticipantAgent agent() { + @Override + public ParticipantAgent participantAgent() { return agent; } diff --git a/spi/control-plane/contract-spi/src/main/java/org/eclipse/edc/connector/controlplane/contract/spi/validation/ContractValidationService.java b/spi/control-plane/contract-spi/src/main/java/org/eclipse/edc/connector/controlplane/contract/spi/validation/ContractValidationService.java index a80ef60921d..a724319e866 100644 --- a/spi/control-plane/contract-spi/src/main/java/org/eclipse/edc/connector/controlplane/contract/spi/validation/ContractValidationService.java +++ b/spi/control-plane/contract-spi/src/main/java/org/eclipse/edc/connector/controlplane/contract/spi/validation/ContractValidationService.java @@ -18,8 +18,8 @@ import org.eclipse.edc.connector.controlplane.contract.spi.types.agreement.ContractAgreement; import org.eclipse.edc.connector.controlplane.contract.spi.types.negotiation.ContractNegotiation; import org.eclipse.edc.connector.controlplane.contract.spi.types.offer.ContractOffer; +import org.eclipse.edc.participant.spi.ParticipantAgent; import org.eclipse.edc.runtime.metamodel.annotation.ExtensionPoint; -import org.eclipse.edc.spi.agent.ParticipantAgent; import org.eclipse.edc.spi.result.Result; import org.jetbrains.annotations.NotNull; diff --git a/spi/control-plane/control-plane-spi/src/main/java/org/eclipse/edc/connector/controlplane/services/spi/protocol/ProtocolTokenValidator.java b/spi/control-plane/control-plane-spi/src/main/java/org/eclipse/edc/connector/controlplane/services/spi/protocol/ProtocolTokenValidator.java index d8bb4b4a70e..416d15c2369 100644 --- a/spi/control-plane/control-plane-spi/src/main/java/org/eclipse/edc/connector/controlplane/services/spi/protocol/ProtocolTokenValidator.java +++ b/spi/control-plane/control-plane-spi/src/main/java/org/eclipse/edc/connector/controlplane/services/spi/protocol/ProtocolTokenValidator.java @@ -14,10 +14,10 @@ package org.eclipse.edc.connector.controlplane.services.spi.protocol; +import org.eclipse.edc.participant.spi.ParticipantAgent; import org.eclipse.edc.policy.context.request.spi.RequestPolicyContext; import org.eclipse.edc.policy.model.Policy; import org.eclipse.edc.runtime.metamodel.annotation.ExtensionPoint; -import org.eclipse.edc.spi.agent.ParticipantAgent; import org.eclipse.edc.spi.iam.TokenRepresentation; import org.eclipse.edc.spi.result.ServiceResult; import org.eclipse.edc.spi.types.domain.message.RemoteMessage;