From 3a375cc4c7824d29c1b913f3d4b1c678da757eca Mon Sep 17 00:00:00 2001 From: ndr_brt Date: Wed, 17 Aug 2022 11:59:22 +0200 Subject: [PATCH 1/5] Move contract and transfer core modules into control-plane --- .github/workflows/verify.yaml | 2 +- core/build.gradle.kts | 35 ----- core/{ => common}/base/README.md | 0 core/{ => common}/base/build.gradle.kts | 3 +- .../core/CoreServicesExtension.java | 0 .../core/base/CommandHandlerRegistryImpl.java | 0 .../core/base/OkHttpClientFactory.java | 0 .../RemoteMessageDispatcherRegistryImpl.java | 0 .../agent/ParticipantAgentServiceImpl.java | 0 .../core/base/policy/PolicyContextImpl.java | 0 .../core/base/policy/PolicyEngineImpl.java | 0 .../base/policy/RuleBindingRegistryImpl.java | 0 .../core/base/policy/ScopeFilter.java | 0 .../defaults/DefaultServicesExtension.java | 73 +--------- .../event/EventExecutorServiceContainer.java | 0 .../core/event/EventRouterImpl.java | 0 .../HealthCheckServiceConfiguration.java | 0 .../core/health/HealthCheckServiceImpl.java | 0 .../DefaultPrivateKeyParseFunction.java | 0 ...spaceconnector.spi.system.ServiceExtension | 0 .../CoreServicesExtensionIntegrationTest.java | 0 .../core/CoreServicesExtensionTest.java | 0 ...peManagerDependencyInjectionExtension.java | 0 .../core/base/OkHttpClientFactoryTest.java | 0 .../ParticipantAgentServiceImplTest.java | 0 .../policy/PolicyEngineImplScenariosTest.java | 0 .../base/policy/PolicyEngineImplTest.java | 0 .../policy/RuleBindingRegistryImplTest.java | 0 .../core/base/policy/ScopeFilterTest.java | 0 .../core/event/EventRouterImplTest.java | 0 .../health/HealthCheckServiceImplTest.java | 0 .../DefaultPrivateKeyParseFunctionTest.java | 0 .../base/src/test/resources/ec-privatekey.pem | 0 .../src/test/resources/rsa-privatekey.pem | 0 core/{ => common}/boot/build.gradle.kts | 0 .../boot/monitor/MonitorProvider.java | 0 .../DefaultServiceExtensionContext.java | 0 .../boot/system/DependencyGraph.java | 0 .../boot/system/ExtensionLoader.java | 0 .../boot/system/ServiceLocator.java | 0 .../boot/system/ServiceLocatorImpl.java | 0 .../boot/system/injection/InjectorImpl.java | 0 .../injection/ReflectiveObjectFactory.java | 0 .../lifecycle/ExtensionLifecycleManager.java | 0 .../injection/lifecycle/InitializePhase.java | 0 .../system/injection/lifecycle/Phase.java | 0 .../injection/lifecycle/PreparePhase.java | 0 .../lifecycle/RegistrationPhase.java | 0 .../injection/lifecycle/StartPhase.java | 0 .../boot/system/runtime/BaseRuntime.java | 0 .../boot/util/CyclicDependencyException.java | 0 .../boot/util/TopologicalSort.java | 0 .../org.slf4j.spi.SLF4JServiceProvider | 0 .../DefaultServiceExtensionContextTest.java | 0 .../boot/system/DependencyGraphTest.java | 0 .../boot/system/ExtensionLoaderTest.java | 0 .../boot/system/InjectorTest.java | 0 .../system/ReflectiveObjectFactoryTest.java | 0 .../boot/system/TestFunctions.java | 0 .../boot/system/TestObject.java | 0 .../lifecycle/InitializePhaseTest.java | 0 .../system/injection/lifecycle/PhaseTest.java | 0 .../lifecycle/RegistrationPhaseTest.java | 0 .../injection/lifecycle/StartPhaseTest.java | 0 .../system/testextensions/BaseExtension.java | 0 .../system/testextensions/CoreExtension.java | 0 .../DefaultProviderExtension.java | 0 .../testextensions/DependentExtension.java | 0 .../testextensions/ProviderExtension.java | 0 .../RequiredDependentExtension.java | 0 .../boot/util/TopologicalSortTest.java | 0 .../org.mockito.plugins.MockMaker | 0 .../policy-engine/build.gradle.kts | 2 +- .../policy/engine/ConstraintProblem.java | 0 .../policy/engine/PolicyEvaluationResult.java | 0 .../policy/engine/PolicyEvaluator.java | 0 .../policy/engine/RuleProblem.java | 0 .../model/PolicyEvaluatorScenarioTest.java | 0 .../engine/model/PolicyEvaluatorTest.java | 0 .../engine/model/PolicyTestFunctions.java | 0 .../policy-evaluator/build.gradle.kts | 0 .../policy/model/Action.java | 0 .../policy/model/AndConstraint.java | 0 .../policy/model/AtomicConstraint.java | 0 .../model/AtomicConstraintFunction.java | 0 .../policy/model/Constraint.java | 0 .../dataspaceconnector/policy/model/Duty.java | 0 .../policy/model/Expression.java | 0 .../policy/model/Identifiable.java | 0 .../policy/model/LiteralExpression.java | 0 .../policy/model/MultiplicityConstraint.java | 0 .../policy/model/Operator.java | 0 .../policy/model/OrConstraint.java | 0 .../policy/model/Permission.java | 0 .../policy/model/Policy.java | 0 .../policy/model/PolicyRegistrationTypes.java | 0 .../policy/model/PolicyType.java | 0 .../policy/model/Prohibition.java | 0 .../dataspaceconnector/policy/model/Rule.java | 0 .../policy/model/RuleFunction.java | 0 .../policy/model/XoneConstraint.java | 0 .../policy/model/ActionTest.java | 0 .../policy/model/AndConstraintTest.java | 0 .../policy/model/AtomicConstraintTest.java | 0 .../policy/model/DutyTest.java | 0 .../policy/model/LiteralExpressionTest.java | 0 .../policy/model/OrConstraintTest.java | 0 .../policy/model/PermissionTest.java | 0 .../policy/model/PolicyTest.java | 0 .../policy/model/PolicyTypeTest.java | 0 .../policy/model/ProhibitionTest.java | 0 .../policy/model/XoneConstraintTest.java | 0 core/{ => control-plane}/contract/README.md | 0 .../contract/build.gradle.kts | 2 +- .../ContractNegotiationCommandExtension.java | 0 .../contract/ContractServiceExtension.java | 0 .../ContractNegotiationEventListener.java | 0 .../AbstractContractNegotiationManager.java | 0 ...onsumerContractNegotiationManagerImpl.java | 6 +- ...roviderContractNegotiationManagerImpl.java | 6 +- .../CancelNegotiationCommandHandler.java | 2 +- ...ngleContractNegotiationCommandHandler.java | 2 +- .../ContractNegotiationObservableImpl.java | 0 .../offer/ContractDefinitionServiceImpl.java | 0 .../offer/ContractOfferServiceImpl.java | 2 +- .../contract/policy/PolicyArchiveImpl.java | 0 .../contract/policy/PolicyEquality.java | 0 .../ContractValidationServiceImpl.java | 4 +- ...spaceconnector.spi.system.ServiceExtension | 0 .../ContractServiceExtensionTest.java | 0 ...actContractNegotiationIntegrationTest.java | 4 +- ...merContractNegotiationManagerImplTest.java | 0 .../ContractNegotiationIntegrationTest.java | 0 ...derContractNegotiationManagerImplTest.java | 2 +- ...egotiationCommandQueueIntegrationTest.java | 2 +- .../CancelNegotiationCommandHandlerTest.java | 2 +- .../ContractDefinitionServiceImplTest.java | 0 .../offer/ContractOfferServiceImplTest.java | 0 .../policy/PolicyArchiveImplTest.java | 0 .../contract/policy/PolicyEqualityTest.java | 0 .../ContractValidationServiceImplTest.java | 0 .../control-plane-core/build.gradle.kts | 37 +++++ .../ControlPlaneCoreExtension.java | 94 ++++++++++++ .../defaults/InMemoryStatefulEntityStore.java | 2 +- .../assetindex/AssetPredicateConverter.java | 2 +- .../assetindex/InMemoryAssetIndex.java | 2 +- .../InMemoryContractDefinitionStore.java | 2 +- .../InMemoryContractNegotiationStore.java | 4 +- .../InMemoryPolicyDefinitionStore.java | 2 +- .../InMemoryTransferProcessStore.java | 4 +- ...spaceconnector.spi.system.ServiceExtension | 6 +- .../AssetPredicateConverterTest.java | 2 +- .../assetindex/InMemoryAssetIndexTest.java | 2 +- .../InMemoryAssetLoaderIndexTest.java | 2 +- .../InMemoryDataAddressResolverTest.java | 2 +- .../InMemoryContractDefinitionStoreTest.java | 2 +- .../InMemoryContractNegotiationStoreTest.java | 13 +- .../negotiationstore/TestFunctions.java | 2 +- .../InMemoryPolicyDefinitionStoreTest.java | 2 +- .../InMemoryTransferProcessStoreTest.java | 7 +- .../transferprocessstore/TestFunctions.java | 2 +- core/{ => control-plane}/transfer/README.md | 0 .../transfer/build.gradle.kts | 2 +- .../transfer/core/CoreTransferExtension.java | 0 .../core/TransferProcessCommandExtension.java | 0 .../AddProvisionedResourceCommandHandler.java | 0 .../CancelTransferCommandHandler.java | 0 .../DeprovisionCompleteCommandHandler.java | 1 + .../handlers/DeprovisionRequestHandler.java | 0 .../SingleTransferProcessCommandHandler.java | 0 ...ointDataReferenceReceiverRegistryImpl.java | 0 ...tDataReferenceTransformerRegistryImpl.java | 0 .../core/flow/DataFlowManagerImpl.java | 0 .../TransferProcessEventListener.java | 0 .../TransferProcessObservableImpl.java | 0 .../core/provision/ProvisionManagerImpl.java | 0 .../ResourceManifestGeneratorImpl.java | 0 .../transfer/ProvisionCallbackDelegate.java | 0 .../transfer/StatusCheckerRegistryImpl.java | 0 .../transfer/TransferProcessManagerImpl.java | 0 ...spaceconnector.spi.system.ServiceExtension | 0 ...estProvisionedDataDestinationResource.java | 0 .../transfer/core/TestResourceDefinition.java | 0 .../CancelTransferCommandHandlerTest.java | 0 .../DeprovisionCommandHandlerTest.java | 0 .../edr/EndpointDataReferenceFixtures.java | 0 ...DataReferenceReceiverRegistryImplTest.java | 0 ...aReferenceTransformerRegistryImplTest.java | 0 .../core/flow/DataFlowManagerImplTest.java | 0 .../provision/ProvisionManagerImplTest.java | 0 .../ResourceManifestGeneratorImplTest.java | 0 ...sferProcessManagerImplIntegrationTest.java | 2 +- .../TransferProcessManagerImplTest.java | 0 .../build.gradle.kts | 4 +- .../DataPlaneSelectorServiceImpl.java | 0 .../core/DataPlaneSelectorExtension.java | 7 + .../selector/core/DataPlaneSelectorImpl.java | 0 .../store/DefaultDataPlaneInstanceStore.java | 0 ...spaceconnector.spi.system.ServiceExtension | 0 .../dataplane/selector/TestFunctions.java | 9 ++ .../core/DataPlaneSelectorImplTest.java | 0 .../DefaultDataPlaneInstanceStoreTest.java | 10 +- .../data-plane-core/build.gradle.kts | 35 +++++ .../data-plane/data-plane-framework/README.md | 0 .../data-plane-framework/build.gradle.kts | 0 .../DataPlaneFrameworkExtension.java | 0 .../manager/DataPlaneManagerImpl.java | 0 .../pipeline/PipelineServiceImpl.java | 0 .../PipelineServiceTransferServiceImpl.java | 0 .../registry/TransferServiceRegistryImpl.java | 0 .../TransferServiceSelectionStrategy.java | 0 .../store/InMemoryDataPlaneStore.java | 0 ...spaceconnector.spi.system.ServiceExtension | 0 .../DataPlaneFrameworkExtensionTest.java | 0 .../dataplane/framework/e2e/EndToEndTest.java | 0 .../manager/DataPlaneManagerImplTest.java | 0 .../pipeline/PipelineServiceImplTest.java | 0 .../TransferServiceRegistryImplTest.java | 0 .../TransferServiceSelectionStrategyTest.java | 0 .../store/InMemoryDataPlaneStoreTest.java | 0 core/defaults/README.md | 3 - core/defaults/build.gradle.kts | 44 ------ .../docs/Catalog Architecture.pdf | Bin .../docs/FCC-Modules.draw.io.drawio.png | Bin .../docs/FCC_Sequence.drawio.png | Bin .../federated-catalog/docs}/README.md | 0 .../docs/federated_catalog.md | 0 .../federated-catalog-cache/README.md | 0 .../federated-catalog-cache/build.gradle.kts | 2 +- .../catalog/cache/ExecutionManager.java | 0 .../cache/FederatedCatalogCacheExtension.java | 0 .../FederatedCatalogApiController.java | 0 .../catalog/cache/crawler/CatalogCrawler.java | 0 .../crawler/NodeQueryAdapterRegistryImpl.java | 0 .../cache/query/BatchedRequestFetcher.java | 0 .../cache/query/CacheQueryAdapterImpl.java | 0 .../query/CacheQueryAdapterRegistryImpl.java | 0 .../query/IdsMultipartNodeQueryAdapter.java | 0 .../catalog/cache/query/QueryEngineImpl.java | 0 .../catalog/cache/query/QueryException.java | 0 .../query/QueryNotAcceptedException.java | 0 .../directory/InMemoryNodeDirectory.java | 0 .../store/InMemoryFederatedCacheStore.java | 0 ...spaceconnector.spi.system.ServiceExtension | 0 .../catalog/cache/ExecutionManagerTest.java | 0 .../catalog/cache/FccTestExtension.java | 0 .../FederatedCatalogCacheEndToEndTest.java | 0 .../FederatedCatalogCacheExtensionTest.java | 0 .../catalog/cache/TestUtil.java | 0 .../cache/crawler/CatalogCrawlerTest.java | 0 .../InMemoryFccQueryAdapterRegistryTest.java | 0 .../cache/query/QueryEngineImplTest.java | 0 .../InMemoryFederatedCacheStoreTest.java | 0 .../query/BatchedRequestFetcherTest.java | 0 .../federated-catalog-core}/build.gradle.kts | 12 +- core/policy/build.gradle.kts | 34 ----- .../build.gradle.kts | 5 +- ...cherV1IntegrationTestServiceExtension.java | 2 +- .../build.gradle.kts | 2 +- ...actMultipartControllerIntegrationTest.java | 43 +----- .../FakeContractNegotiationManager.java | 109 ++++++++++++++ .../multipart/FakeContractOfferService.java | 51 +++++++ ...ointV1IntegrationTestServiceExtension.java | 135 +----------------- data-protocols/ids/ids-core/build.gradle.kts | 2 - data-protocols/ids/ids-spi/build.gradle.kts | 2 +- .../ids/ids-token-validation/build.gradle.kts | 1 - docs/developer/modules.md | 80 ++--------- docs/overview/extensions.md | 1 - .../data-management/asset/build.gradle.kts | 2 +- .../contractagreement/build.gradle.kts | 2 +- .../contractdefinition/build.gradle.kts | 2 +- .../contractnegotiation/build.gradle.kts | 3 +- .../ContractNegotiationServiceImpl.java | 2 +- .../ContractNegotiationEventDispatchTest.java | 2 +- .../ContractNegotiationServiceImplTest.java | 2 +- .../policydefinition/build.gradle.kts | 5 +- .../transferprocess/build.gradle.kts | 5 +- extensions/aws/data-plane-s3/build.gradle.kts | 2 +- .../build.gradle.kts | 2 - ...ntractNegotiationStoreIntegrationTest.java | 2 +- .../data-plane/data-factory/build.gradle.kts | 2 +- .../security/azure/AzureVaultExtension.java | 5 +- .../data-plane-selector/build.gradle.kts | 4 +- .../selector-api/build.gradle.kts | 5 +- .../selector-client/build.gradle.kts | 2 +- .../dataplane/selector/TestFunctions.java | 29 ---- .../selector-store/build.gradle.kts | 33 ----- .../DataPlaneInstanceStoreExtension.java | 28 ---- .../build.gradle.kts | 2 +- .../data-plane-transfer-sync/build.gradle.kts | 2 +- extensions/hashicorp-vault/build.gradle.kts | 5 +- .../HashicorpVaultExtension.java | 6 +- extensions/http-provisioner/build.gradle.kts | 4 +- .../HttpProvisionerWebhookApiController.java | 2 +- extensions/junit/build.gradle.kts | 4 +- {core => extensions}/micrometer/README.md | 0 .../micrometer/build.gradle.kts | 3 +- .../MicrometerExecutorInstrumentation.java | 0 .../micrometer/MicrometerExtension.java | 0 ...spaceconnector.spi.system.ServiceExtension | 0 .../MicrometerExtensionIntegrationTest.java | 0 .../build.gradle.kts | 2 - .../store/ContractNegotiationStoreTest.java | 2 +- .../PostgresContractNegotiationStoreTest.java | 2 +- extensions/sql/lease-sql/build.gradle.kts | 1 - .../apache-commons-pool-sql/build.gradle.kts | 1 - .../build.gradle.kts | 4 + launchers/data-loader-cli/build.gradle.kts | 2 +- launchers/data-plane-server/build.gradle.kts | 7 +- launchers/dpf-selector/build.gradle.kts | 6 +- launchers/ids-connector/README.md | 1 - launchers/ids-connector/build.gradle.kts | 2 +- samples/01-basic-connector/README.md | 2 +- samples/01-basic-connector/build.gradle.kts | 2 +- samples/02-health-endpoint/build.gradle.kts | 2 +- samples/03-configuration/build.gradle.kts | 4 +- .../consumer/build.gradle.kts | 2 +- .../provider/build.gradle.kts | 2 +- .../transfer-file/build.gradle.kts | 7 +- .../consumer/build.gradle.kts | 2 +- .../consumer/build.gradle.kts | 2 +- .../simulator/build.gradle.kts | 2 +- .../watchdog/build.gradle.kts | 2 +- .../consumer/build.gradle.kts | 4 +- .../provider/build.gradle.kts | 2 +- .../consumer/build.gradle.kts | 2 +- .../provider/build.gradle.kts | 2 +- .../transfer-file/build.gradle.kts | 10 +- samples/other/custom-runtime/build.gradle.kts | 2 +- settings.gradle.kts | 28 ++-- spi/common/core-spi/build.gradle.kts | 2 +- .../security/VaultCertificateResolver.java | 8 +- .../VaultCertificateResolverTest.java | 17 ++- .../core-spi}/src/test/resources/testCert.pem | 0 .../spi/contract}/ContractId.java | 2 +- .../command}/CancelNegotiationCommand.java | 2 +- .../SingleContractNegotiationCommand.java | 2 +- .../domain/contract}/ContractIdTest.java | 3 +- .../transfer-spi/build.gradle.kts | 2 +- .../command}/DeprovisionCompleteCommand.java | 3 +- .../build.gradle.kts | 0 .../dataplane/selector/DataPlaneSelector.java | 0 .../selector/DataPlaneSelectorService.java | 0 .../client/DataPlaneSelectorClient.java | 0 .../selector/instance/DataPlaneInstance.java | 0 .../instance/DataPlaneInstanceImpl.java | 0 .../store/DataPlaneInstanceStore.java | 0 .../DefaultSelectionStrategyRegistry.java | 0 .../strategy/RandomSelectionStrategy.java | 0 .../selector/strategy/SelectionStrategy.java | 0 .../strategy/SelectionStrategyRegistry.java | 0 .../instance/DataPlaneInstanceImplTest.java | 0 .../strategy/RandomSelectionStrategyTest.java | 0 .../backend-service/build.gradle.kts | 4 +- .../control-plane/build.gradle.kts | 8 +- .../data-plane/build.gradle.kts | 8 +- .../build.gradle.kts | 2 +- .../build.gradle.kts | 32 ++--- .../build.gradle.kts | 2 +- .../build.gradle.kts | 14 +- .../file-transfer-consumer/build.gradle.kts | 2 +- .../file-transfer-provider/build.gradle.kts | 10 +- 362 files changed, 569 insertions(+), 768 deletions(-) delete mode 100644 core/build.gradle.kts rename core/{ => common}/base/README.md (100%) rename core/{ => common}/base/build.gradle.kts (93%) rename core/{ => common}/base/src/main/java/org/eclipse/dataspaceconnector/core/CoreServicesExtension.java (100%) rename core/{ => common}/base/src/main/java/org/eclipse/dataspaceconnector/core/base/CommandHandlerRegistryImpl.java (100%) rename core/{ => common}/base/src/main/java/org/eclipse/dataspaceconnector/core/base/OkHttpClientFactory.java (100%) rename core/{ => common}/base/src/main/java/org/eclipse/dataspaceconnector/core/base/RemoteMessageDispatcherRegistryImpl.java (100%) rename core/{ => common}/base/src/main/java/org/eclipse/dataspaceconnector/core/base/agent/ParticipantAgentServiceImpl.java (100%) rename core/{ => common}/base/src/main/java/org/eclipse/dataspaceconnector/core/base/policy/PolicyContextImpl.java (100%) rename core/{ => common}/base/src/main/java/org/eclipse/dataspaceconnector/core/base/policy/PolicyEngineImpl.java (100%) rename core/{ => common}/base/src/main/java/org/eclipse/dataspaceconnector/core/base/policy/RuleBindingRegistryImpl.java (100%) rename core/{ => common}/base/src/main/java/org/eclipse/dataspaceconnector/core/base/policy/ScopeFilter.java (100%) rename core/{ => common}/base/src/main/java/org/eclipse/dataspaceconnector/core/defaults/DefaultServicesExtension.java (50%) rename core/{ => common}/base/src/main/java/org/eclipse/dataspaceconnector/core/event/EventExecutorServiceContainer.java (100%) rename core/{ => common}/base/src/main/java/org/eclipse/dataspaceconnector/core/event/EventRouterImpl.java (100%) rename core/{ => common}/base/src/main/java/org/eclipse/dataspaceconnector/core/health/HealthCheckServiceConfiguration.java (100%) rename core/{ => common}/base/src/main/java/org/eclipse/dataspaceconnector/core/health/HealthCheckServiceImpl.java (100%) rename core/{ => common}/base/src/main/java/org/eclipse/dataspaceconnector/core/security/DefaultPrivateKeyParseFunction.java (100%) rename core/{ => common}/base/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension (100%) rename core/{ => common}/base/src/test/java/org/eclipse/dataspaceconnector/core/CoreServicesExtensionIntegrationTest.java (100%) rename core/{ => common}/base/src/test/java/org/eclipse/dataspaceconnector/core/CoreServicesExtensionTest.java (100%) rename core/{ => common}/base/src/test/java/org/eclipse/dataspaceconnector/core/TypeManagerDependencyInjectionExtension.java (100%) rename core/{ => common}/base/src/test/java/org/eclipse/dataspaceconnector/core/base/OkHttpClientFactoryTest.java (100%) rename core/{ => common}/base/src/test/java/org/eclipse/dataspaceconnector/core/base/agent/ParticipantAgentServiceImplTest.java (100%) rename core/{ => common}/base/src/test/java/org/eclipse/dataspaceconnector/core/base/policy/PolicyEngineImplScenariosTest.java (100%) rename core/{ => common}/base/src/test/java/org/eclipse/dataspaceconnector/core/base/policy/PolicyEngineImplTest.java (100%) rename core/{ => common}/base/src/test/java/org/eclipse/dataspaceconnector/core/base/policy/RuleBindingRegistryImplTest.java (100%) rename core/{ => common}/base/src/test/java/org/eclipse/dataspaceconnector/core/base/policy/ScopeFilterTest.java (100%) rename core/{ => common}/base/src/test/java/org/eclipse/dataspaceconnector/core/event/EventRouterImplTest.java (100%) rename core/{ => common}/base/src/test/java/org/eclipse/dataspaceconnector/core/health/HealthCheckServiceImplTest.java (100%) rename core/{ => common}/base/src/test/java/org/eclipse/dataspaceconnector/core/security/DefaultPrivateKeyParseFunctionTest.java (100%) rename core/{ => common}/base/src/test/resources/ec-privatekey.pem (100%) rename core/{ => common}/base/src/test/resources/rsa-privatekey.pem (100%) rename core/{ => common}/boot/build.gradle.kts (100%) rename core/{ => common}/boot/src/main/java/org/eclipse/dataspaceconnector/boot/monitor/MonitorProvider.java (100%) rename core/{ => common}/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/DefaultServiceExtensionContext.java (100%) rename core/{ => common}/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/DependencyGraph.java (100%) rename core/{ => common}/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/ExtensionLoader.java (100%) rename core/{ => common}/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/ServiceLocator.java (100%) rename core/{ => common}/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/ServiceLocatorImpl.java (100%) rename core/{ => common}/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/injection/InjectorImpl.java (100%) rename core/{ => common}/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/injection/ReflectiveObjectFactory.java (100%) rename core/{ => common}/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/injection/lifecycle/ExtensionLifecycleManager.java (100%) rename core/{ => common}/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/injection/lifecycle/InitializePhase.java (100%) rename core/{ => common}/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/injection/lifecycle/Phase.java (100%) rename core/{ => common}/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/injection/lifecycle/PreparePhase.java (100%) rename core/{ => common}/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/injection/lifecycle/RegistrationPhase.java (100%) rename core/{ => common}/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/injection/lifecycle/StartPhase.java (100%) rename core/{ => common}/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/runtime/BaseRuntime.java (100%) rename core/{ => common}/boot/src/main/java/org/eclipse/dataspaceconnector/boot/util/CyclicDependencyException.java (100%) rename core/{ => common}/boot/src/main/java/org/eclipse/dataspaceconnector/boot/util/TopologicalSort.java (100%) rename core/{ => common}/boot/src/main/resources/META-INF/services/org.slf4j.spi.SLF4JServiceProvider (100%) rename core/{ => common}/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/DefaultServiceExtensionContextTest.java (100%) rename core/{ => common}/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/DependencyGraphTest.java (100%) rename core/{ => common}/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/ExtensionLoaderTest.java (100%) rename core/{ => common}/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/InjectorTest.java (100%) rename core/{ => common}/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/ReflectiveObjectFactoryTest.java (100%) rename core/{ => common}/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/TestFunctions.java (100%) rename core/{ => common}/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/TestObject.java (100%) rename core/{ => common}/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/injection/lifecycle/InitializePhaseTest.java (100%) rename core/{ => common}/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/injection/lifecycle/PhaseTest.java (100%) rename core/{ => common}/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/injection/lifecycle/RegistrationPhaseTest.java (100%) rename core/{ => common}/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/injection/lifecycle/StartPhaseTest.java (100%) rename core/{ => common}/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/testextensions/BaseExtension.java (100%) rename core/{ => common}/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/testextensions/CoreExtension.java (100%) rename core/{ => common}/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/testextensions/DefaultProviderExtension.java (100%) rename core/{ => common}/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/testextensions/DependentExtension.java (100%) rename core/{ => common}/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/testextensions/ProviderExtension.java (100%) rename core/{ => common}/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/testextensions/RequiredDependentExtension.java (100%) rename core/{ => common}/boot/src/test/java/org/eclipse/dataspaceconnector/boot/util/TopologicalSortTest.java (100%) rename core/{ => common}/boot/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker (100%) rename core/{policy => common}/policy-engine/build.gradle.kts (92%) rename core/{policy => common}/policy-engine/src/main/java/org/eclipse/dataspaceconnector/policy/engine/ConstraintProblem.java (100%) rename core/{policy => common}/policy-engine/src/main/java/org/eclipse/dataspaceconnector/policy/engine/PolicyEvaluationResult.java (100%) rename core/{policy => common}/policy-engine/src/main/java/org/eclipse/dataspaceconnector/policy/engine/PolicyEvaluator.java (100%) rename core/{policy => common}/policy-engine/src/main/java/org/eclipse/dataspaceconnector/policy/engine/RuleProblem.java (100%) rename core/{policy => common}/policy-engine/src/test/java/org/eclipse/dataspaceconnector/policy/engine/model/PolicyEvaluatorScenarioTest.java (100%) rename core/{policy => common}/policy-engine/src/test/java/org/eclipse/dataspaceconnector/policy/engine/model/PolicyEvaluatorTest.java (100%) rename core/{policy => common}/policy-engine/src/test/java/org/eclipse/dataspaceconnector/policy/engine/model/PolicyTestFunctions.java (100%) rename core/{policy => common}/policy-evaluator/build.gradle.kts (100%) rename core/{policy => common}/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/Action.java (100%) rename core/{policy => common}/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/AndConstraint.java (100%) rename core/{policy => common}/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/AtomicConstraint.java (100%) rename core/{policy => common}/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/AtomicConstraintFunction.java (100%) rename core/{policy => common}/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/Constraint.java (100%) rename core/{policy => common}/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/Duty.java (100%) rename core/{policy => common}/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/Expression.java (100%) rename core/{policy => common}/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/Identifiable.java (100%) rename core/{policy => common}/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/LiteralExpression.java (100%) rename core/{policy => common}/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/MultiplicityConstraint.java (100%) rename core/{policy => common}/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/Operator.java (100%) rename core/{policy => common}/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/OrConstraint.java (100%) rename core/{policy => common}/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/Permission.java (100%) rename core/{policy => common}/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/Policy.java (100%) rename core/{policy => common}/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/PolicyRegistrationTypes.java (100%) rename core/{policy => common}/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/PolicyType.java (100%) rename core/{policy => common}/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/Prohibition.java (100%) rename core/{policy => common}/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/Rule.java (100%) rename core/{policy => common}/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/RuleFunction.java (100%) rename core/{policy => common}/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/XoneConstraint.java (100%) rename core/{policy => common}/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/ActionTest.java (100%) rename core/{policy => common}/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/AndConstraintTest.java (100%) rename core/{policy => common}/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/AtomicConstraintTest.java (100%) rename core/{policy => common}/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/DutyTest.java (100%) rename core/{policy => common}/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/LiteralExpressionTest.java (100%) rename core/{policy => common}/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/OrConstraintTest.java (100%) rename core/{policy => common}/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/PermissionTest.java (100%) rename core/{policy => common}/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/PolicyTest.java (100%) rename core/{policy => common}/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/PolicyTypeTest.java (100%) rename core/{policy => common}/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/ProhibitionTest.java (100%) rename core/{policy => common}/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/XoneConstraintTest.java (100%) rename core/{ => control-plane}/contract/README.md (100%) rename core/{ => control-plane}/contract/build.gradle.kts (93%) rename core/{ => control-plane}/contract/src/main/java/org/eclipse/dataspaceconnector/contract/ContractNegotiationCommandExtension.java (100%) rename core/{ => control-plane}/contract/src/main/java/org/eclipse/dataspaceconnector/contract/ContractServiceExtension.java (100%) rename core/{ => control-plane}/contract/src/main/java/org/eclipse/dataspaceconnector/contract/listener/ContractNegotiationEventListener.java (100%) rename core/{ => control-plane}/contract/src/main/java/org/eclipse/dataspaceconnector/contract/negotiation/AbstractContractNegotiationManager.java (100%) rename core/{ => control-plane}/contract/src/main/java/org/eclipse/dataspaceconnector/contract/negotiation/ConsumerContractNegotiationManagerImpl.java (98%) rename core/{ => control-plane}/contract/src/main/java/org/eclipse/dataspaceconnector/contract/negotiation/ProviderContractNegotiationManagerImpl.java (98%) rename core/{ => control-plane}/contract/src/main/java/org/eclipse/dataspaceconnector/contract/negotiation/command/handlers/CancelNegotiationCommandHandler.java (93%) rename core/{ => control-plane}/contract/src/main/java/org/eclipse/dataspaceconnector/contract/negotiation/command/handlers/SingleContractNegotiationCommandHandler.java (96%) rename core/{ => control-plane}/contract/src/main/java/org/eclipse/dataspaceconnector/contract/observe/ContractNegotiationObservableImpl.java (100%) rename core/{ => control-plane}/contract/src/main/java/org/eclipse/dataspaceconnector/contract/offer/ContractDefinitionServiceImpl.java (100%) rename core/{ => control-plane}/contract/src/main/java/org/eclipse/dataspaceconnector/contract/offer/ContractOfferServiceImpl.java (98%) rename core/{ => control-plane}/contract/src/main/java/org/eclipse/dataspaceconnector/contract/policy/PolicyArchiveImpl.java (100%) rename core/{ => control-plane}/contract/src/main/java/org/eclipse/dataspaceconnector/contract/policy/PolicyEquality.java (100%) rename core/{ => control-plane}/contract/src/main/java/org/eclipse/dataspaceconnector/contract/validation/ContractValidationServiceImpl.java (97%) rename core/{ => control-plane}/contract/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension (100%) rename core/{ => control-plane}/contract/src/test/java/org/eclipse/dataspaceconnector/contract/ContractServiceExtensionTest.java (100%) rename core/{ => control-plane}/contract/src/test/java/org/eclipse/dataspaceconnector/contract/negotiation/AbstractContractNegotiationIntegrationTest.java (98%) rename core/{ => control-plane}/contract/src/test/java/org/eclipse/dataspaceconnector/contract/negotiation/ConsumerContractNegotiationManagerImplTest.java (100%) rename core/{ => control-plane}/contract/src/test/java/org/eclipse/dataspaceconnector/contract/negotiation/ContractNegotiationIntegrationTest.java (100%) rename core/{ => control-plane}/contract/src/test/java/org/eclipse/dataspaceconnector/contract/negotiation/ProviderContractNegotiationManagerImplTest.java (99%) rename core/{ => control-plane}/contract/src/test/java/org/eclipse/dataspaceconnector/contract/negotiation/command/ContractNegotiationCommandQueueIntegrationTest.java (98%) rename core/{ => control-plane}/contract/src/test/java/org/eclipse/dataspaceconnector/contract/negotiation/command/handlers/CancelNegotiationCommandHandlerTest.java (96%) rename core/{ => control-plane}/contract/src/test/java/org/eclipse/dataspaceconnector/contract/offer/ContractDefinitionServiceImplTest.java (100%) rename core/{ => control-plane}/contract/src/test/java/org/eclipse/dataspaceconnector/contract/offer/ContractOfferServiceImplTest.java (100%) rename core/{ => control-plane}/contract/src/test/java/org/eclipse/dataspaceconnector/contract/policy/PolicyArchiveImplTest.java (100%) rename core/{ => control-plane}/contract/src/test/java/org/eclipse/dataspaceconnector/contract/policy/PolicyEqualityTest.java (100%) rename core/{ => control-plane}/contract/src/test/java/org/eclipse/dataspaceconnector/contract/validation/ContractValidationServiceImplTest.java (100%) create mode 100644 core/control-plane/control-plane-core/build.gradle.kts create mode 100644 core/control-plane/control-plane-core/src/main/java/org/eclipse/dataspaceconnector/core/controlplane/ControlPlaneCoreExtension.java rename core/{defaults/src/main/java/org/eclipse/dataspaceconnector/core => control-plane/control-plane-core/src/main/java/org/eclipse/dataspaceconnector/core/controlplane}/defaults/InMemoryStatefulEntityStore.java (97%) rename core/{defaults/src/main/java/org/eclipse/dataspaceconnector/core => control-plane/control-plane-core/src/main/java/org/eclipse/dataspaceconnector/core/controlplane}/defaults/assetindex/AssetPredicateConverter.java (95%) rename core/{defaults/src/main/java/org/eclipse/dataspaceconnector/core => control-plane/control-plane-core/src/main/java/org/eclipse/dataspaceconnector/core/controlplane}/defaults/assetindex/InMemoryAssetIndex.java (98%) rename core/{defaults/src/main/java/org/eclipse/dataspaceconnector/core => control-plane/control-plane-core/src/main/java/org/eclipse/dataspaceconnector/core/controlplane}/defaults/contractdefinition/InMemoryContractDefinitionStore.java (96%) rename core/{defaults/src/main/java/org/eclipse/dataspaceconnector/core => control-plane/control-plane-core/src/main/java/org/eclipse/dataspaceconnector/core/controlplane}/defaults/negotiationstore/InMemoryContractNegotiationStore.java (95%) rename core/{defaults/src/main/java/org/eclipse/dataspaceconnector/core => control-plane/control-plane-core/src/main/java/org/eclipse/dataspaceconnector/core/controlplane}/defaults/policystore/InMemoryPolicyDefinitionStore.java (97%) rename core/{defaults/src/main/java/org/eclipse/dataspaceconnector/core => control-plane/control-plane-core/src/main/java/org/eclipse/dataspaceconnector/core/controlplane}/defaults/transferprocessstore/InMemoryTransferProcessStore.java (92%) rename {extensions/data-plane-selector/selector-store => core/control-plane/control-plane-core}/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension (51%) rename core/{defaults/src/test/java/org/eclipse/dataspaceconnector/core => control-plane/control-plane-core/src/test/java/org/eclipse/dataspaceconnector/core/controlplane}/defaults/assetindex/AssetPredicateConverterTest.java (97%) rename core/{defaults/src/test/java/org/eclipse/dataspaceconnector/core => control-plane/control-plane-core/src/test/java/org/eclipse/dataspaceconnector/core/controlplane}/defaults/assetindex/InMemoryAssetIndexTest.java (99%) rename core/{defaults/src/test/java/org/eclipse/dataspaceconnector/core => control-plane/control-plane-core/src/test/java/org/eclipse/dataspaceconnector/core/controlplane}/defaults/assetindex/InMemoryAssetLoaderIndexTest.java (98%) rename core/{defaults/src/test/java/org/eclipse/dataspaceconnector/core => control-plane/control-plane-core/src/test/java/org/eclipse/dataspaceconnector/core/controlplane}/defaults/assetindex/InMemoryDataAddressResolverTest.java (96%) rename core/{defaults/src/test/java/org/eclipse/dataspaceconnector/core => control-plane/control-plane-core/src/test/java/org/eclipse/dataspaceconnector/core/controlplane}/defaults/contractdefinition/InMemoryContractDefinitionStoreTest.java (98%) rename core/{defaults/src/test/java/org/eclipse/dataspaceconnector/core => control-plane/control-plane-core/src/test/java/org/eclipse/dataspaceconnector/core/controlplane}/defaults/negotiationstore/InMemoryContractNegotiationStoreTest.java (96%) rename core/{defaults/src/test/java/org/eclipse/dataspaceconnector/core => control-plane/control-plane-core/src/test/java/org/eclipse/dataspaceconnector/core/controlplane}/defaults/negotiationstore/TestFunctions.java (97%) rename core/{defaults/src/test/java/org/eclipse/dataspaceconnector/core => control-plane/control-plane-core/src/test/java/org/eclipse/dataspaceconnector/core/controlplane}/defaults/policystore/InMemoryPolicyDefinitionStoreTest.java (98%) rename core/{defaults/src/test/java/org/eclipse/dataspaceconnector/core => control-plane/control-plane-core/src/test/java/org/eclipse/dataspaceconnector/core/controlplane}/defaults/transferprocessstore/InMemoryTransferProcessStoreTest.java (97%) rename core/{defaults/src/test/java/org/eclipse/dataspaceconnector/core => control-plane/control-plane-core/src/test/java/org/eclipse/dataspaceconnector/core/controlplane}/defaults/transferprocessstore/TestFunctions.java (93%) rename core/{ => control-plane}/transfer/README.md (100%) rename core/{ => control-plane}/transfer/build.gradle.kts (93%) rename core/{ => control-plane}/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/CoreTransferExtension.java (100%) rename core/{ => control-plane}/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/TransferProcessCommandExtension.java (100%) rename core/{ => control-plane}/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/command/handlers/AddProvisionedResourceCommandHandler.java (100%) rename core/{ => control-plane}/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/command/handlers/CancelTransferCommandHandler.java (100%) rename core/{ => control-plane}/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/command/handlers/DeprovisionCompleteCommandHandler.java (93%) rename core/{ => control-plane}/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/command/handlers/DeprovisionRequestHandler.java (100%) rename core/{ => control-plane}/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/command/handlers/SingleTransferProcessCommandHandler.java (100%) rename core/{ => control-plane}/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/edr/EndpointDataReferenceReceiverRegistryImpl.java (100%) rename core/{ => control-plane}/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/edr/EndpointDataReferenceTransformerRegistryImpl.java (100%) rename core/{ => control-plane}/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/flow/DataFlowManagerImpl.java (100%) rename core/{ => control-plane}/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/listener/TransferProcessEventListener.java (100%) rename core/{ => control-plane}/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/observe/TransferProcessObservableImpl.java (100%) rename core/{ => control-plane}/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/provision/ProvisionManagerImpl.java (100%) rename core/{ => control-plane}/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/provision/ResourceManifestGeneratorImpl.java (100%) rename core/{ => control-plane}/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/transfer/ProvisionCallbackDelegate.java (100%) rename core/{ => control-plane}/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/transfer/StatusCheckerRegistryImpl.java (100%) rename core/{ => control-plane}/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/transfer/TransferProcessManagerImpl.java (100%) rename core/{ => control-plane}/transfer/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension (100%) rename core/{ => control-plane}/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/TestProvisionedDataDestinationResource.java (100%) rename core/{ => control-plane}/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/TestResourceDefinition.java (100%) rename core/{ => control-plane}/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/command/handlers/CancelTransferCommandHandlerTest.java (100%) rename core/{ => control-plane}/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/command/handlers/DeprovisionCommandHandlerTest.java (100%) rename core/{ => control-plane}/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/edr/EndpointDataReferenceFixtures.java (100%) rename core/{ => control-plane}/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/edr/EndpointDataReferenceReceiverRegistryImplTest.java (100%) rename core/{ => control-plane}/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/edr/EndpointDataReferenceTransformerRegistryImplTest.java (100%) rename core/{ => control-plane}/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/flow/DataFlowManagerImplTest.java (100%) rename core/{ => control-plane}/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/provision/ProvisionManagerImplTest.java (100%) rename core/{ => control-plane}/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/provision/ResourceManifestGeneratorImplTest.java (100%) rename core/{ => control-plane}/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/transfer/TransferProcessManagerImplIntegrationTest.java (98%) rename core/{ => control-plane}/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/transfer/TransferProcessManagerImplTest.java (100%) rename {extensions/data-plane-selector/selector-core => core/data-plane-selector/data-plane-selector-core}/build.gradle.kts (83%) rename {extensions/data-plane-selector/selector-core => core/data-plane-selector/data-plane-selector-core}/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/DataPlaneSelectorServiceImpl.java (100%) rename {extensions/data-plane-selector/selector-core => core/data-plane-selector/data-plane-selector-core}/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/core/DataPlaneSelectorExtension.java (87%) rename {extensions/data-plane-selector/selector-core => core/data-plane-selector/data-plane-selector-core}/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/core/DataPlaneSelectorImpl.java (100%) rename {extensions/data-plane-selector/selector-store => core/data-plane-selector/data-plane-selector-core}/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/store/DefaultDataPlaneInstanceStore.java (100%) rename {extensions/data-plane-selector/selector-core => core/data-plane-selector/data-plane-selector-core}/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension (100%) rename {extensions/data-plane-selector/selector-store => core/data-plane-selector/data-plane-selector-core}/src/test/java/org/eclipse/dataspaceconnector/dataplane/selector/TestFunctions.java (73%) rename {extensions/data-plane-selector/selector-core => core/data-plane-selector/data-plane-selector-core}/src/test/java/org/eclipse/dataspaceconnector/dataplane/selector/core/DataPlaneSelectorImplTest.java (100%) rename {extensions/data-plane-selector/selector-store => core/data-plane-selector/data-plane-selector-core}/src/test/java/org/eclipse/dataspaceconnector/dataplane/selector/store/DefaultDataPlaneInstanceStoreTest.java (86%) create mode 100644 core/data-plane/data-plane-core/build.gradle.kts rename {extensions => core}/data-plane/data-plane-framework/README.md (100%) rename {extensions => core}/data-plane/data-plane-framework/build.gradle.kts (100%) rename {extensions => core}/data-plane/data-plane-framework/src/main/java/org/eclipse/dataspaceconnector/dataplane/framework/DataPlaneFrameworkExtension.java (100%) rename {extensions => core}/data-plane/data-plane-framework/src/main/java/org/eclipse/dataspaceconnector/dataplane/framework/manager/DataPlaneManagerImpl.java (100%) rename {extensions => core}/data-plane/data-plane-framework/src/main/java/org/eclipse/dataspaceconnector/dataplane/framework/pipeline/PipelineServiceImpl.java (100%) rename {extensions => core}/data-plane/data-plane-framework/src/main/java/org/eclipse/dataspaceconnector/dataplane/framework/pipeline/PipelineServiceTransferServiceImpl.java (100%) rename {extensions => core}/data-plane/data-plane-framework/src/main/java/org/eclipse/dataspaceconnector/dataplane/framework/registry/TransferServiceRegistryImpl.java (100%) rename {extensions => core}/data-plane/data-plane-framework/src/main/java/org/eclipse/dataspaceconnector/dataplane/framework/registry/TransferServiceSelectionStrategy.java (100%) rename {extensions => core}/data-plane/data-plane-framework/src/main/java/org/eclipse/dataspaceconnector/dataplane/framework/store/InMemoryDataPlaneStore.java (100%) rename {extensions => core}/data-plane/data-plane-framework/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension (100%) rename {extensions => core}/data-plane/data-plane-framework/src/test/java/org/eclipse/dataspaceconnector/dataplane/framework/DataPlaneFrameworkExtensionTest.java (100%) rename {extensions => core}/data-plane/data-plane-framework/src/test/java/org/eclipse/dataspaceconnector/dataplane/framework/e2e/EndToEndTest.java (100%) rename {extensions => core}/data-plane/data-plane-framework/src/test/java/org/eclipse/dataspaceconnector/dataplane/framework/manager/DataPlaneManagerImplTest.java (100%) rename {extensions => core}/data-plane/data-plane-framework/src/test/java/org/eclipse/dataspaceconnector/dataplane/framework/pipeline/PipelineServiceImplTest.java (100%) rename {extensions => core}/data-plane/data-plane-framework/src/test/java/org/eclipse/dataspaceconnector/dataplane/framework/registry/TransferServiceRegistryImplTest.java (100%) rename {extensions => core}/data-plane/data-plane-framework/src/test/java/org/eclipse/dataspaceconnector/dataplane/framework/registry/TransferServiceSelectionStrategyTest.java (100%) rename {extensions => core}/data-plane/data-plane-framework/src/test/java/org/eclipse/dataspaceconnector/dataplane/framework/store/InMemoryDataPlaneStoreTest.java (100%) delete mode 100644 core/defaults/README.md delete mode 100644 core/defaults/build.gradle.kts rename {extensions/catalog => core/federated-catalog}/docs/Catalog Architecture.pdf (100%) rename {extensions/catalog => core/federated-catalog}/docs/FCC-Modules.draw.io.drawio.png (100%) rename {extensions/catalog => core/federated-catalog}/docs/FCC_Sequence.drawio.png (100%) rename {extensions/catalog => core/federated-catalog/docs}/README.md (100%) rename {extensions/catalog => core/federated-catalog}/docs/federated_catalog.md (100%) rename {extensions/catalog => core/federated-catalog}/federated-catalog-cache/README.md (100%) rename {extensions/catalog => core/federated-catalog}/federated-catalog-cache/build.gradle.kts (96%) rename {extensions/catalog => core/federated-catalog}/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/ExecutionManager.java (100%) rename {extensions/catalog => core/federated-catalog}/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/FederatedCatalogCacheExtension.java (100%) rename {extensions/catalog => core/federated-catalog}/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/controller/FederatedCatalogApiController.java (100%) rename {extensions/catalog => core/federated-catalog}/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/crawler/CatalogCrawler.java (100%) rename {extensions/catalog => core/federated-catalog}/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/crawler/NodeQueryAdapterRegistryImpl.java (100%) rename {extensions/catalog => core/federated-catalog}/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/BatchedRequestFetcher.java (100%) rename {extensions/catalog => core/federated-catalog}/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/CacheQueryAdapterImpl.java (100%) rename {extensions/catalog => core/federated-catalog}/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/CacheQueryAdapterRegistryImpl.java (100%) rename {extensions/catalog => core/federated-catalog}/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/IdsMultipartNodeQueryAdapter.java (100%) rename {extensions/catalog => core/federated-catalog}/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/QueryEngineImpl.java (100%) rename {extensions/catalog => core/federated-catalog}/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/QueryException.java (100%) rename {extensions/catalog => core/federated-catalog}/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/QueryNotAcceptedException.java (100%) rename {extensions/catalog => core/federated-catalog}/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/directory/InMemoryNodeDirectory.java (100%) rename {extensions/catalog => core/federated-catalog}/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/store/InMemoryFederatedCacheStore.java (100%) rename {extensions/catalog => core/federated-catalog}/federated-catalog-cache/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension (100%) rename {extensions/catalog => core/federated-catalog}/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/ExecutionManagerTest.java (100%) rename {extensions/catalog => core/federated-catalog}/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/FccTestExtension.java (100%) rename {extensions/catalog => core/federated-catalog}/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/FederatedCatalogCacheEndToEndTest.java (100%) rename {extensions/catalog => core/federated-catalog}/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/FederatedCatalogCacheExtensionTest.java (100%) rename {extensions/catalog => core/federated-catalog}/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/TestUtil.java (100%) rename {extensions/catalog => core/federated-catalog}/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/crawler/CatalogCrawlerTest.java (100%) rename {extensions/catalog => core/federated-catalog}/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/query/InMemoryFccQueryAdapterRegistryTest.java (100%) rename {extensions/catalog => core/federated-catalog}/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/query/QueryEngineImplTest.java (100%) rename {extensions/catalog => core/federated-catalog}/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/defaults/store/InMemoryFederatedCacheStoreTest.java (100%) rename {extensions/catalog => core/federated-catalog}/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/query/BatchedRequestFetcherTest.java (100%) rename {extensions/catalog => core/federated-catalog/federated-catalog-core}/build.gradle.kts (57%) delete mode 100644 core/policy/build.gradle.kts create mode 100644 data-protocols/ids/ids-api-multipart-endpoint-v1/src/test/java/org/eclipse/dataspaceconnector/ids/api/multipart/FakeContractNegotiationManager.java create mode 100644 data-protocols/ids/ids-api-multipart-endpoint-v1/src/test/java/org/eclipse/dataspaceconnector/ids/api/multipart/FakeContractOfferService.java delete mode 100644 extensions/data-plane-selector/selector-core/src/test/java/org/eclipse/dataspaceconnector/dataplane/selector/TestFunctions.java delete mode 100644 extensions/data-plane-selector/selector-store/build.gradle.kts delete mode 100644 extensions/data-plane-selector/selector-store/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/store/DataPlaneInstanceStoreExtension.java rename {core => extensions}/micrometer/README.md (100%) rename {core => extensions}/micrometer/build.gradle.kts (97%) rename {core => extensions}/micrometer/src/main/java/org/eclipse/dataspaceconnector/metrics/micrometer/MicrometerExecutorInstrumentation.java (100%) rename {core => extensions}/micrometer/src/main/java/org/eclipse/dataspaceconnector/metrics/micrometer/MicrometerExtension.java (100%) rename {core => extensions}/micrometer/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension (100%) rename {core => extensions}/micrometer/src/test/java/org/eclipse/dataspaceconnector/metrics/micrometer/MicrometerExtensionIntegrationTest.java (100%) rename core/defaults/src/main/java/org/eclipse/dataspaceconnector/core/defaults/certificateresolver/DefaultCertificateResolver.java => spi/common/core-spi/src/main/java/org/eclipse/dataspaceconnector/spi/security/VaultCertificateResolver.java (84%) rename core/defaults/src/test/java/org/eclipse/dataspaceconnector/core/defaults/certificateresolver/DefaultCertificateResolverTest.java => spi/common/core-spi/src/test/java/org/eclipse/dataspaceconnector/spi/security/VaultCertificateResolverTest.java (84%) rename {core/defaults => spi/common/core-spi}/src/test/resources/testCert.pem (100%) rename {core/contract/src/main/java/org/eclipse/dataspaceconnector/contract/common => spi/control-plane/contract-spi/src/main/java/org/eclipse/dataspaceconnector/spi/contract}/ContractId.java (96%) rename {core/contract/src/main/java/org/eclipse/dataspaceconnector/contract/negotiation/command/commands => spi/control-plane/contract-spi/src/main/java/org/eclipse/dataspaceconnector/spi/types/domain/contract/command}/CancelNegotiationCommand.java (90%) rename {core/contract/src/main/java/org/eclipse/dataspaceconnector/contract/negotiation/command/commands => spi/control-plane/contract-spi/src/main/java/org/eclipse/dataspaceconnector/spi/types/domain/contract/command}/SingleContractNegotiationCommand.java (93%) rename {core/contract/src/test/java/org/eclipse/dataspaceconnector/contract/common => spi/control-plane/contract-spi/src/test/java/org/eclipse/dataspaceconnector/spi/types/domain/contract}/ContractIdTest.java (84%) rename {core/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/command/handlers => spi/control-plane/transfer-spi/src/main/java/org/eclipse/dataspaceconnector/spi/types/domain/transfer/command}/DeprovisionCompleteCommand.java (84%) rename spi/data-plane-selector/{selector-spi => data-plane-selector-spi}/build.gradle.kts (100%) rename spi/data-plane-selector/{selector-spi => data-plane-selector-spi}/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/DataPlaneSelector.java (100%) rename spi/data-plane-selector/{selector-spi => data-plane-selector-spi}/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/DataPlaneSelectorService.java (100%) rename spi/data-plane-selector/{selector-spi => data-plane-selector-spi}/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/client/DataPlaneSelectorClient.java (100%) rename spi/data-plane-selector/{selector-spi => data-plane-selector-spi}/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/instance/DataPlaneInstance.java (100%) rename spi/data-plane-selector/{selector-spi => data-plane-selector-spi}/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/instance/DataPlaneInstanceImpl.java (100%) rename spi/data-plane-selector/{selector-spi => data-plane-selector-spi}/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/store/DataPlaneInstanceStore.java (100%) rename spi/data-plane-selector/{selector-spi => data-plane-selector-spi}/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/strategy/DefaultSelectionStrategyRegistry.java (100%) rename spi/data-plane-selector/{selector-spi => data-plane-selector-spi}/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/strategy/RandomSelectionStrategy.java (100%) rename spi/data-plane-selector/{selector-spi => data-plane-selector-spi}/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/strategy/SelectionStrategy.java (100%) rename spi/data-plane-selector/{selector-spi => data-plane-selector-spi}/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/strategy/SelectionStrategyRegistry.java (100%) rename spi/data-plane-selector/{selector-spi => data-plane-selector-spi}/src/test/java/org/eclipse/dataspaceconnector/dataplane/selector/instance/DataPlaneInstanceImplTest.java (100%) rename spi/data-plane-selector/{selector-spi => data-plane-selector-spi}/src/test/java/org/eclipse/dataspaceconnector/dataplane/selector/strategy/RandomSelectionStrategyTest.java (100%) diff --git a/.github/workflows/verify.yaml b/.github/workflows/verify.yaml index 39161b55279..85ad082ecc1 100644 --- a/.github/workflows/verify.yaml +++ b/.github/workflows/verify.yaml @@ -371,7 +371,7 @@ jobs: uses: ./.github/actions/run-tests with: command: | - ./gradlew -p core/micrometer test -DincludeTags="OpenTelemetryIntegrationTest" + ./gradlew -p extensions/micrometer test -DincludeTags="OpenTelemetryIntegrationTest" ./gradlew -p system-tests/tests test -DincludeTags="OpenTelemetryIntegrationTest" Check-Cloud-Environments: diff --git a/core/build.gradle.kts b/core/build.gradle.kts deleted file mode 100644 index f45e46f75ad..00000000000 --- a/core/build.gradle.kts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2020, 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 - * https://www.apache.org/licenses/LICENSE-2.0 - * - * SPDX-License-Identifier: Apache-2.0 - * - * Contributors: - * Microsoft Corporation - initial API and implementation - * - */ - -plugins { - `java-library` -} - - -dependencies { - api(project(":core:base")) - api(project(":core:boot")) - api(project(":core:contract")) - api(project(":core:policy")) - api(project(":core:transfer")) -} - -publishing { - publications { - create("core") { - artifactId = "core" - from(components["java"]) - } - } -} diff --git a/core/base/README.md b/core/common/base/README.md similarity index 100% rename from core/base/README.md rename to core/common/base/README.md diff --git a/core/base/build.gradle.kts b/core/common/base/build.gradle.kts similarity index 93% rename from core/base/build.gradle.kts rename to core/common/base/build.gradle.kts index 3adf7463c38..fa0805865fb 100644 --- a/core/base/build.gradle.kts +++ b/core/common/base/build.gradle.kts @@ -28,8 +28,7 @@ dependencies { api(project(":spi:common:core-spi")) api(project(":spi:common:transaction-spi")) implementation(project(":common:util")) - implementation(project(":core:defaults")) - implementation(project(":core:policy:policy-engine")) + implementation(project(":core:common:policy-engine")) implementation(project(":extensions:dataloading")) api("com.squareup.okhttp3:okhttp:${okHttpVersion}") diff --git a/core/base/src/main/java/org/eclipse/dataspaceconnector/core/CoreServicesExtension.java b/core/common/base/src/main/java/org/eclipse/dataspaceconnector/core/CoreServicesExtension.java similarity index 100% rename from core/base/src/main/java/org/eclipse/dataspaceconnector/core/CoreServicesExtension.java rename to core/common/base/src/main/java/org/eclipse/dataspaceconnector/core/CoreServicesExtension.java diff --git a/core/base/src/main/java/org/eclipse/dataspaceconnector/core/base/CommandHandlerRegistryImpl.java b/core/common/base/src/main/java/org/eclipse/dataspaceconnector/core/base/CommandHandlerRegistryImpl.java similarity index 100% rename from core/base/src/main/java/org/eclipse/dataspaceconnector/core/base/CommandHandlerRegistryImpl.java rename to core/common/base/src/main/java/org/eclipse/dataspaceconnector/core/base/CommandHandlerRegistryImpl.java diff --git a/core/base/src/main/java/org/eclipse/dataspaceconnector/core/base/OkHttpClientFactory.java b/core/common/base/src/main/java/org/eclipse/dataspaceconnector/core/base/OkHttpClientFactory.java similarity index 100% rename from core/base/src/main/java/org/eclipse/dataspaceconnector/core/base/OkHttpClientFactory.java rename to core/common/base/src/main/java/org/eclipse/dataspaceconnector/core/base/OkHttpClientFactory.java diff --git a/core/base/src/main/java/org/eclipse/dataspaceconnector/core/base/RemoteMessageDispatcherRegistryImpl.java b/core/common/base/src/main/java/org/eclipse/dataspaceconnector/core/base/RemoteMessageDispatcherRegistryImpl.java similarity index 100% rename from core/base/src/main/java/org/eclipse/dataspaceconnector/core/base/RemoteMessageDispatcherRegistryImpl.java rename to core/common/base/src/main/java/org/eclipse/dataspaceconnector/core/base/RemoteMessageDispatcherRegistryImpl.java diff --git a/core/base/src/main/java/org/eclipse/dataspaceconnector/core/base/agent/ParticipantAgentServiceImpl.java b/core/common/base/src/main/java/org/eclipse/dataspaceconnector/core/base/agent/ParticipantAgentServiceImpl.java similarity index 100% rename from core/base/src/main/java/org/eclipse/dataspaceconnector/core/base/agent/ParticipantAgentServiceImpl.java rename to core/common/base/src/main/java/org/eclipse/dataspaceconnector/core/base/agent/ParticipantAgentServiceImpl.java diff --git a/core/base/src/main/java/org/eclipse/dataspaceconnector/core/base/policy/PolicyContextImpl.java b/core/common/base/src/main/java/org/eclipse/dataspaceconnector/core/base/policy/PolicyContextImpl.java similarity index 100% rename from core/base/src/main/java/org/eclipse/dataspaceconnector/core/base/policy/PolicyContextImpl.java rename to core/common/base/src/main/java/org/eclipse/dataspaceconnector/core/base/policy/PolicyContextImpl.java diff --git a/core/base/src/main/java/org/eclipse/dataspaceconnector/core/base/policy/PolicyEngineImpl.java b/core/common/base/src/main/java/org/eclipse/dataspaceconnector/core/base/policy/PolicyEngineImpl.java similarity index 100% rename from core/base/src/main/java/org/eclipse/dataspaceconnector/core/base/policy/PolicyEngineImpl.java rename to core/common/base/src/main/java/org/eclipse/dataspaceconnector/core/base/policy/PolicyEngineImpl.java diff --git a/core/base/src/main/java/org/eclipse/dataspaceconnector/core/base/policy/RuleBindingRegistryImpl.java b/core/common/base/src/main/java/org/eclipse/dataspaceconnector/core/base/policy/RuleBindingRegistryImpl.java similarity index 100% rename from core/base/src/main/java/org/eclipse/dataspaceconnector/core/base/policy/RuleBindingRegistryImpl.java rename to core/common/base/src/main/java/org/eclipse/dataspaceconnector/core/base/policy/RuleBindingRegistryImpl.java diff --git a/core/base/src/main/java/org/eclipse/dataspaceconnector/core/base/policy/ScopeFilter.java b/core/common/base/src/main/java/org/eclipse/dataspaceconnector/core/base/policy/ScopeFilter.java similarity index 100% rename from core/base/src/main/java/org/eclipse/dataspaceconnector/core/base/policy/ScopeFilter.java rename to core/common/base/src/main/java/org/eclipse/dataspaceconnector/core/base/policy/ScopeFilter.java diff --git a/core/base/src/main/java/org/eclipse/dataspaceconnector/core/defaults/DefaultServicesExtension.java b/core/common/base/src/main/java/org/eclipse/dataspaceconnector/core/defaults/DefaultServicesExtension.java similarity index 50% rename from core/base/src/main/java/org/eclipse/dataspaceconnector/core/defaults/DefaultServicesExtension.java rename to core/common/base/src/main/java/org/eclipse/dataspaceconnector/core/defaults/DefaultServicesExtension.java index cc0a812ec5f..b87d5862be9 100644 --- a/core/base/src/main/java/org/eclipse/dataspaceconnector/core/defaults/DefaultServicesExtension.java +++ b/core/common/base/src/main/java/org/eclipse/dataspaceconnector/core/defaults/DefaultServicesExtension.java @@ -17,34 +17,19 @@ import dev.failsafe.RetryPolicy; import okhttp3.EventListener; import okhttp3.OkHttpClient; -import org.eclipse.dataspaceconnector.common.concurrency.LockManager; import org.eclipse.dataspaceconnector.core.base.OkHttpClientFactory; -import org.eclipse.dataspaceconnector.core.defaults.assetindex.InMemoryAssetIndex; -import org.eclipse.dataspaceconnector.core.defaults.contractdefinition.InMemoryContractDefinitionStore; -import org.eclipse.dataspaceconnector.core.defaults.negotiationstore.InMemoryContractNegotiationStore; -import org.eclipse.dataspaceconnector.core.defaults.policystore.InMemoryPolicyDefinitionStore; -import org.eclipse.dataspaceconnector.core.defaults.transferprocessstore.InMemoryTransferProcessStore; -import org.eclipse.dataspaceconnector.dataloading.AssetLoader; -import org.eclipse.dataspaceconnector.dataloading.ContractDefinitionLoader; import org.eclipse.dataspaceconnector.spi.EdcSetting; -import org.eclipse.dataspaceconnector.spi.asset.AssetIndex; -import org.eclipse.dataspaceconnector.spi.asset.DataAddressResolver; -import org.eclipse.dataspaceconnector.spi.contract.negotiation.store.ContractNegotiationStore; -import org.eclipse.dataspaceconnector.spi.contract.offer.store.ContractDefinitionStore; -import org.eclipse.dataspaceconnector.spi.policy.store.PolicyDefinitionStore; import org.eclipse.dataspaceconnector.spi.system.Inject; import org.eclipse.dataspaceconnector.spi.system.Provider; import org.eclipse.dataspaceconnector.spi.system.ServiceExtension; import org.eclipse.dataspaceconnector.spi.system.ServiceExtensionContext; import org.eclipse.dataspaceconnector.spi.transaction.NoopTransactionContext; import org.eclipse.dataspaceconnector.spi.transaction.TransactionContext; -import org.eclipse.dataspaceconnector.spi.transfer.store.TransferProcessStore; import java.time.temporal.ChronoUnit; -import java.util.concurrent.locks.ReentrantReadWriteLock; /** - * Provides (in-mem & no-op) defaults for various stores, registries etc. + * Provides defaults for various services. * Provider methods are only invoked if no other implementation was found on the classpath. */ public class DefaultServicesExtension implements ServiceExtension { @@ -55,8 +40,6 @@ public class DefaultServicesExtension implements ServiceExtension { @EdcSetting(value = "Maximum number of milliseconds for exponential backoff. ") public static final String BACKOFF_MAX_MILLIS = "edc.core.retry.backoff.max"; - private InMemoryAssetIndex assetIndex; - private InMemoryContractDefinitionStore contractDefinitionStore; /** * An optional OkHttp {@link EventListener} that can be used to instrument OkHttp client for collecting metrics. * Used by the optional {@code micrometer} module. @@ -79,46 +62,6 @@ public RetryPolicy retryPolicy(ServiceExtensionContext context) { .build(); } - @Provider(isDefault = true) - public AssetIndex defaultAssetIndex() { - return getAssetIndex(); - } - - @Provider(isDefault = true) - public DataAddressResolver defaultDataAddressResolver() { - return getAssetIndex(); - } - - @Provider(isDefault = true) - public AssetLoader defaultAssetLoader() { - return getAssetIndex(); - } - - @Provider(isDefault = true) - public ContractDefinitionStore defaultContractDefinitionStore() { - return getContractDefinitionStore(); - } - - @Provider(isDefault = true) - public ContractDefinitionLoader defaultContractDefinitionLoader() { - return getContractDefinitionStore()::save; - } - - @Provider(isDefault = true) - public ContractNegotiationStore defaultContractNegotiationStore() { - return new InMemoryContractNegotiationStore(); - } - - @Provider(isDefault = true) - public TransferProcessStore defaultTransferProcessStore() { - return new InMemoryTransferProcessStore(); - } - - @Provider(isDefault = true) - public PolicyDefinitionStore defaultPolicyStore() { - return new InMemoryPolicyDefinitionStore(new LockManager(new ReentrantReadWriteLock(true))); - } - @Provider(isDefault = true) public TransactionContext defaultTransactionContext(ServiceExtensionContext context) { context.getMonitor().warning("No TransactionContext registered, a no-op implementation will be used, not suitable for production environments"); @@ -130,18 +73,4 @@ public TransactionContext defaultTransactionContext(ServiceExtensionContext cont public OkHttpClient okHttpClient(ServiceExtensionContext context) { return OkHttpClientFactory.create(context, okHttpEventListener); } - - private ContractDefinitionStore getContractDefinitionStore() { - if (contractDefinitionStore == null) { - contractDefinitionStore = new InMemoryContractDefinitionStore(); - } - return contractDefinitionStore; - } - - private InMemoryAssetIndex getAssetIndex() { - if (assetIndex == null) { - assetIndex = new InMemoryAssetIndex(); - } - return assetIndex; - } } diff --git a/core/base/src/main/java/org/eclipse/dataspaceconnector/core/event/EventExecutorServiceContainer.java b/core/common/base/src/main/java/org/eclipse/dataspaceconnector/core/event/EventExecutorServiceContainer.java similarity index 100% rename from core/base/src/main/java/org/eclipse/dataspaceconnector/core/event/EventExecutorServiceContainer.java rename to core/common/base/src/main/java/org/eclipse/dataspaceconnector/core/event/EventExecutorServiceContainer.java diff --git a/core/base/src/main/java/org/eclipse/dataspaceconnector/core/event/EventRouterImpl.java b/core/common/base/src/main/java/org/eclipse/dataspaceconnector/core/event/EventRouterImpl.java similarity index 100% rename from core/base/src/main/java/org/eclipse/dataspaceconnector/core/event/EventRouterImpl.java rename to core/common/base/src/main/java/org/eclipse/dataspaceconnector/core/event/EventRouterImpl.java diff --git a/core/base/src/main/java/org/eclipse/dataspaceconnector/core/health/HealthCheckServiceConfiguration.java b/core/common/base/src/main/java/org/eclipse/dataspaceconnector/core/health/HealthCheckServiceConfiguration.java similarity index 100% rename from core/base/src/main/java/org/eclipse/dataspaceconnector/core/health/HealthCheckServiceConfiguration.java rename to core/common/base/src/main/java/org/eclipse/dataspaceconnector/core/health/HealthCheckServiceConfiguration.java diff --git a/core/base/src/main/java/org/eclipse/dataspaceconnector/core/health/HealthCheckServiceImpl.java b/core/common/base/src/main/java/org/eclipse/dataspaceconnector/core/health/HealthCheckServiceImpl.java similarity index 100% rename from core/base/src/main/java/org/eclipse/dataspaceconnector/core/health/HealthCheckServiceImpl.java rename to core/common/base/src/main/java/org/eclipse/dataspaceconnector/core/health/HealthCheckServiceImpl.java diff --git a/core/base/src/main/java/org/eclipse/dataspaceconnector/core/security/DefaultPrivateKeyParseFunction.java b/core/common/base/src/main/java/org/eclipse/dataspaceconnector/core/security/DefaultPrivateKeyParseFunction.java similarity index 100% rename from core/base/src/main/java/org/eclipse/dataspaceconnector/core/security/DefaultPrivateKeyParseFunction.java rename to core/common/base/src/main/java/org/eclipse/dataspaceconnector/core/security/DefaultPrivateKeyParseFunction.java diff --git a/core/base/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension b/core/common/base/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension similarity index 100% rename from core/base/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension rename to core/common/base/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension diff --git a/core/base/src/test/java/org/eclipse/dataspaceconnector/core/CoreServicesExtensionIntegrationTest.java b/core/common/base/src/test/java/org/eclipse/dataspaceconnector/core/CoreServicesExtensionIntegrationTest.java similarity index 100% rename from core/base/src/test/java/org/eclipse/dataspaceconnector/core/CoreServicesExtensionIntegrationTest.java rename to core/common/base/src/test/java/org/eclipse/dataspaceconnector/core/CoreServicesExtensionIntegrationTest.java diff --git a/core/base/src/test/java/org/eclipse/dataspaceconnector/core/CoreServicesExtensionTest.java b/core/common/base/src/test/java/org/eclipse/dataspaceconnector/core/CoreServicesExtensionTest.java similarity index 100% rename from core/base/src/test/java/org/eclipse/dataspaceconnector/core/CoreServicesExtensionTest.java rename to core/common/base/src/test/java/org/eclipse/dataspaceconnector/core/CoreServicesExtensionTest.java diff --git a/core/base/src/test/java/org/eclipse/dataspaceconnector/core/TypeManagerDependencyInjectionExtension.java b/core/common/base/src/test/java/org/eclipse/dataspaceconnector/core/TypeManagerDependencyInjectionExtension.java similarity index 100% rename from core/base/src/test/java/org/eclipse/dataspaceconnector/core/TypeManagerDependencyInjectionExtension.java rename to core/common/base/src/test/java/org/eclipse/dataspaceconnector/core/TypeManagerDependencyInjectionExtension.java diff --git a/core/base/src/test/java/org/eclipse/dataspaceconnector/core/base/OkHttpClientFactoryTest.java b/core/common/base/src/test/java/org/eclipse/dataspaceconnector/core/base/OkHttpClientFactoryTest.java similarity index 100% rename from core/base/src/test/java/org/eclipse/dataspaceconnector/core/base/OkHttpClientFactoryTest.java rename to core/common/base/src/test/java/org/eclipse/dataspaceconnector/core/base/OkHttpClientFactoryTest.java diff --git a/core/base/src/test/java/org/eclipse/dataspaceconnector/core/base/agent/ParticipantAgentServiceImplTest.java b/core/common/base/src/test/java/org/eclipse/dataspaceconnector/core/base/agent/ParticipantAgentServiceImplTest.java similarity index 100% rename from core/base/src/test/java/org/eclipse/dataspaceconnector/core/base/agent/ParticipantAgentServiceImplTest.java rename to core/common/base/src/test/java/org/eclipse/dataspaceconnector/core/base/agent/ParticipantAgentServiceImplTest.java diff --git a/core/base/src/test/java/org/eclipse/dataspaceconnector/core/base/policy/PolicyEngineImplScenariosTest.java b/core/common/base/src/test/java/org/eclipse/dataspaceconnector/core/base/policy/PolicyEngineImplScenariosTest.java similarity index 100% rename from core/base/src/test/java/org/eclipse/dataspaceconnector/core/base/policy/PolicyEngineImplScenariosTest.java rename to core/common/base/src/test/java/org/eclipse/dataspaceconnector/core/base/policy/PolicyEngineImplScenariosTest.java diff --git a/core/base/src/test/java/org/eclipse/dataspaceconnector/core/base/policy/PolicyEngineImplTest.java b/core/common/base/src/test/java/org/eclipse/dataspaceconnector/core/base/policy/PolicyEngineImplTest.java similarity index 100% rename from core/base/src/test/java/org/eclipse/dataspaceconnector/core/base/policy/PolicyEngineImplTest.java rename to core/common/base/src/test/java/org/eclipse/dataspaceconnector/core/base/policy/PolicyEngineImplTest.java diff --git a/core/base/src/test/java/org/eclipse/dataspaceconnector/core/base/policy/RuleBindingRegistryImplTest.java b/core/common/base/src/test/java/org/eclipse/dataspaceconnector/core/base/policy/RuleBindingRegistryImplTest.java similarity index 100% rename from core/base/src/test/java/org/eclipse/dataspaceconnector/core/base/policy/RuleBindingRegistryImplTest.java rename to core/common/base/src/test/java/org/eclipse/dataspaceconnector/core/base/policy/RuleBindingRegistryImplTest.java diff --git a/core/base/src/test/java/org/eclipse/dataspaceconnector/core/base/policy/ScopeFilterTest.java b/core/common/base/src/test/java/org/eclipse/dataspaceconnector/core/base/policy/ScopeFilterTest.java similarity index 100% rename from core/base/src/test/java/org/eclipse/dataspaceconnector/core/base/policy/ScopeFilterTest.java rename to core/common/base/src/test/java/org/eclipse/dataspaceconnector/core/base/policy/ScopeFilterTest.java diff --git a/core/base/src/test/java/org/eclipse/dataspaceconnector/core/event/EventRouterImplTest.java b/core/common/base/src/test/java/org/eclipse/dataspaceconnector/core/event/EventRouterImplTest.java similarity index 100% rename from core/base/src/test/java/org/eclipse/dataspaceconnector/core/event/EventRouterImplTest.java rename to core/common/base/src/test/java/org/eclipse/dataspaceconnector/core/event/EventRouterImplTest.java diff --git a/core/base/src/test/java/org/eclipse/dataspaceconnector/core/health/HealthCheckServiceImplTest.java b/core/common/base/src/test/java/org/eclipse/dataspaceconnector/core/health/HealthCheckServiceImplTest.java similarity index 100% rename from core/base/src/test/java/org/eclipse/dataspaceconnector/core/health/HealthCheckServiceImplTest.java rename to core/common/base/src/test/java/org/eclipse/dataspaceconnector/core/health/HealthCheckServiceImplTest.java diff --git a/core/base/src/test/java/org/eclipse/dataspaceconnector/core/security/DefaultPrivateKeyParseFunctionTest.java b/core/common/base/src/test/java/org/eclipse/dataspaceconnector/core/security/DefaultPrivateKeyParseFunctionTest.java similarity index 100% rename from core/base/src/test/java/org/eclipse/dataspaceconnector/core/security/DefaultPrivateKeyParseFunctionTest.java rename to core/common/base/src/test/java/org/eclipse/dataspaceconnector/core/security/DefaultPrivateKeyParseFunctionTest.java diff --git a/core/base/src/test/resources/ec-privatekey.pem b/core/common/base/src/test/resources/ec-privatekey.pem similarity index 100% rename from core/base/src/test/resources/ec-privatekey.pem rename to core/common/base/src/test/resources/ec-privatekey.pem diff --git a/core/base/src/test/resources/rsa-privatekey.pem b/core/common/base/src/test/resources/rsa-privatekey.pem similarity index 100% rename from core/base/src/test/resources/rsa-privatekey.pem rename to core/common/base/src/test/resources/rsa-privatekey.pem diff --git a/core/boot/build.gradle.kts b/core/common/boot/build.gradle.kts similarity index 100% rename from core/boot/build.gradle.kts rename to core/common/boot/build.gradle.kts diff --git a/core/boot/src/main/java/org/eclipse/dataspaceconnector/boot/monitor/MonitorProvider.java b/core/common/boot/src/main/java/org/eclipse/dataspaceconnector/boot/monitor/MonitorProvider.java similarity index 100% rename from core/boot/src/main/java/org/eclipse/dataspaceconnector/boot/monitor/MonitorProvider.java rename to core/common/boot/src/main/java/org/eclipse/dataspaceconnector/boot/monitor/MonitorProvider.java diff --git a/core/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/DefaultServiceExtensionContext.java b/core/common/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/DefaultServiceExtensionContext.java similarity index 100% rename from core/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/DefaultServiceExtensionContext.java rename to core/common/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/DefaultServiceExtensionContext.java diff --git a/core/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/DependencyGraph.java b/core/common/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/DependencyGraph.java similarity index 100% rename from core/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/DependencyGraph.java rename to core/common/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/DependencyGraph.java diff --git a/core/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/ExtensionLoader.java b/core/common/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/ExtensionLoader.java similarity index 100% rename from core/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/ExtensionLoader.java rename to core/common/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/ExtensionLoader.java diff --git a/core/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/ServiceLocator.java b/core/common/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/ServiceLocator.java similarity index 100% rename from core/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/ServiceLocator.java rename to core/common/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/ServiceLocator.java diff --git a/core/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/ServiceLocatorImpl.java b/core/common/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/ServiceLocatorImpl.java similarity index 100% rename from core/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/ServiceLocatorImpl.java rename to core/common/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/ServiceLocatorImpl.java diff --git a/core/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/injection/InjectorImpl.java b/core/common/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/injection/InjectorImpl.java similarity index 100% rename from core/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/injection/InjectorImpl.java rename to core/common/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/injection/InjectorImpl.java diff --git a/core/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/injection/ReflectiveObjectFactory.java b/core/common/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/injection/ReflectiveObjectFactory.java similarity index 100% rename from core/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/injection/ReflectiveObjectFactory.java rename to core/common/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/injection/ReflectiveObjectFactory.java diff --git a/core/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/injection/lifecycle/ExtensionLifecycleManager.java b/core/common/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/injection/lifecycle/ExtensionLifecycleManager.java similarity index 100% rename from core/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/injection/lifecycle/ExtensionLifecycleManager.java rename to core/common/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/injection/lifecycle/ExtensionLifecycleManager.java diff --git a/core/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/injection/lifecycle/InitializePhase.java b/core/common/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/injection/lifecycle/InitializePhase.java similarity index 100% rename from core/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/injection/lifecycle/InitializePhase.java rename to core/common/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/injection/lifecycle/InitializePhase.java diff --git a/core/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/injection/lifecycle/Phase.java b/core/common/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/injection/lifecycle/Phase.java similarity index 100% rename from core/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/injection/lifecycle/Phase.java rename to core/common/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/injection/lifecycle/Phase.java diff --git a/core/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/injection/lifecycle/PreparePhase.java b/core/common/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/injection/lifecycle/PreparePhase.java similarity index 100% rename from core/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/injection/lifecycle/PreparePhase.java rename to core/common/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/injection/lifecycle/PreparePhase.java diff --git a/core/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/injection/lifecycle/RegistrationPhase.java b/core/common/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/injection/lifecycle/RegistrationPhase.java similarity index 100% rename from core/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/injection/lifecycle/RegistrationPhase.java rename to core/common/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/injection/lifecycle/RegistrationPhase.java diff --git a/core/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/injection/lifecycle/StartPhase.java b/core/common/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/injection/lifecycle/StartPhase.java similarity index 100% rename from core/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/injection/lifecycle/StartPhase.java rename to core/common/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/injection/lifecycle/StartPhase.java diff --git a/core/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/runtime/BaseRuntime.java b/core/common/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/runtime/BaseRuntime.java similarity index 100% rename from core/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/runtime/BaseRuntime.java rename to core/common/boot/src/main/java/org/eclipse/dataspaceconnector/boot/system/runtime/BaseRuntime.java diff --git a/core/boot/src/main/java/org/eclipse/dataspaceconnector/boot/util/CyclicDependencyException.java b/core/common/boot/src/main/java/org/eclipse/dataspaceconnector/boot/util/CyclicDependencyException.java similarity index 100% rename from core/boot/src/main/java/org/eclipse/dataspaceconnector/boot/util/CyclicDependencyException.java rename to core/common/boot/src/main/java/org/eclipse/dataspaceconnector/boot/util/CyclicDependencyException.java diff --git a/core/boot/src/main/java/org/eclipse/dataspaceconnector/boot/util/TopologicalSort.java b/core/common/boot/src/main/java/org/eclipse/dataspaceconnector/boot/util/TopologicalSort.java similarity index 100% rename from core/boot/src/main/java/org/eclipse/dataspaceconnector/boot/util/TopologicalSort.java rename to core/common/boot/src/main/java/org/eclipse/dataspaceconnector/boot/util/TopologicalSort.java diff --git a/core/boot/src/main/resources/META-INF/services/org.slf4j.spi.SLF4JServiceProvider b/core/common/boot/src/main/resources/META-INF/services/org.slf4j.spi.SLF4JServiceProvider similarity index 100% rename from core/boot/src/main/resources/META-INF/services/org.slf4j.spi.SLF4JServiceProvider rename to core/common/boot/src/main/resources/META-INF/services/org.slf4j.spi.SLF4JServiceProvider diff --git a/core/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/DefaultServiceExtensionContextTest.java b/core/common/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/DefaultServiceExtensionContextTest.java similarity index 100% rename from core/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/DefaultServiceExtensionContextTest.java rename to core/common/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/DefaultServiceExtensionContextTest.java diff --git a/core/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/DependencyGraphTest.java b/core/common/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/DependencyGraphTest.java similarity index 100% rename from core/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/DependencyGraphTest.java rename to core/common/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/DependencyGraphTest.java diff --git a/core/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/ExtensionLoaderTest.java b/core/common/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/ExtensionLoaderTest.java similarity index 100% rename from core/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/ExtensionLoaderTest.java rename to core/common/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/ExtensionLoaderTest.java diff --git a/core/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/InjectorTest.java b/core/common/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/InjectorTest.java similarity index 100% rename from core/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/InjectorTest.java rename to core/common/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/InjectorTest.java diff --git a/core/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/ReflectiveObjectFactoryTest.java b/core/common/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/ReflectiveObjectFactoryTest.java similarity index 100% rename from core/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/ReflectiveObjectFactoryTest.java rename to core/common/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/ReflectiveObjectFactoryTest.java diff --git a/core/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/TestFunctions.java b/core/common/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/TestFunctions.java similarity index 100% rename from core/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/TestFunctions.java rename to core/common/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/TestFunctions.java diff --git a/core/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/TestObject.java b/core/common/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/TestObject.java similarity index 100% rename from core/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/TestObject.java rename to core/common/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/TestObject.java diff --git a/core/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/injection/lifecycle/InitializePhaseTest.java b/core/common/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/injection/lifecycle/InitializePhaseTest.java similarity index 100% rename from core/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/injection/lifecycle/InitializePhaseTest.java rename to core/common/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/injection/lifecycle/InitializePhaseTest.java diff --git a/core/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/injection/lifecycle/PhaseTest.java b/core/common/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/injection/lifecycle/PhaseTest.java similarity index 100% rename from core/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/injection/lifecycle/PhaseTest.java rename to core/common/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/injection/lifecycle/PhaseTest.java diff --git a/core/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/injection/lifecycle/RegistrationPhaseTest.java b/core/common/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/injection/lifecycle/RegistrationPhaseTest.java similarity index 100% rename from core/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/injection/lifecycle/RegistrationPhaseTest.java rename to core/common/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/injection/lifecycle/RegistrationPhaseTest.java diff --git a/core/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/injection/lifecycle/StartPhaseTest.java b/core/common/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/injection/lifecycle/StartPhaseTest.java similarity index 100% rename from core/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/injection/lifecycle/StartPhaseTest.java rename to core/common/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/injection/lifecycle/StartPhaseTest.java diff --git a/core/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/testextensions/BaseExtension.java b/core/common/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/testextensions/BaseExtension.java similarity index 100% rename from core/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/testextensions/BaseExtension.java rename to core/common/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/testextensions/BaseExtension.java diff --git a/core/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/testextensions/CoreExtension.java b/core/common/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/testextensions/CoreExtension.java similarity index 100% rename from core/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/testextensions/CoreExtension.java rename to core/common/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/testextensions/CoreExtension.java diff --git a/core/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/testextensions/DefaultProviderExtension.java b/core/common/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/testextensions/DefaultProviderExtension.java similarity index 100% rename from core/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/testextensions/DefaultProviderExtension.java rename to core/common/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/testextensions/DefaultProviderExtension.java diff --git a/core/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/testextensions/DependentExtension.java b/core/common/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/testextensions/DependentExtension.java similarity index 100% rename from core/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/testextensions/DependentExtension.java rename to core/common/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/testextensions/DependentExtension.java diff --git a/core/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/testextensions/ProviderExtension.java b/core/common/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/testextensions/ProviderExtension.java similarity index 100% rename from core/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/testextensions/ProviderExtension.java rename to core/common/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/testextensions/ProviderExtension.java diff --git a/core/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/testextensions/RequiredDependentExtension.java b/core/common/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/testextensions/RequiredDependentExtension.java similarity index 100% rename from core/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/testextensions/RequiredDependentExtension.java rename to core/common/boot/src/test/java/org/eclipse/dataspaceconnector/boot/system/testextensions/RequiredDependentExtension.java diff --git a/core/boot/src/test/java/org/eclipse/dataspaceconnector/boot/util/TopologicalSortTest.java b/core/common/boot/src/test/java/org/eclipse/dataspaceconnector/boot/util/TopologicalSortTest.java similarity index 100% rename from core/boot/src/test/java/org/eclipse/dataspaceconnector/boot/util/TopologicalSortTest.java rename to core/common/boot/src/test/java/org/eclipse/dataspaceconnector/boot/util/TopologicalSortTest.java diff --git a/core/boot/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker b/core/common/boot/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker similarity index 100% rename from core/boot/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker rename to core/common/boot/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker diff --git a/core/policy/policy-engine/build.gradle.kts b/core/common/policy-engine/build.gradle.kts similarity index 92% rename from core/policy/policy-engine/build.gradle.kts rename to core/common/policy-engine/build.gradle.kts index b4872ecd704..2efa9f08f44 100644 --- a/core/policy/policy-engine/build.gradle.kts +++ b/core/common/policy-engine/build.gradle.kts @@ -18,7 +18,7 @@ plugins { } dependencies { - api(project(":core:policy:policy-evaluator")) + api(project(":core:common:policy-evaluator")) } publishing { diff --git a/core/policy/policy-engine/src/main/java/org/eclipse/dataspaceconnector/policy/engine/ConstraintProblem.java b/core/common/policy-engine/src/main/java/org/eclipse/dataspaceconnector/policy/engine/ConstraintProblem.java similarity index 100% rename from core/policy/policy-engine/src/main/java/org/eclipse/dataspaceconnector/policy/engine/ConstraintProblem.java rename to core/common/policy-engine/src/main/java/org/eclipse/dataspaceconnector/policy/engine/ConstraintProblem.java diff --git a/core/policy/policy-engine/src/main/java/org/eclipse/dataspaceconnector/policy/engine/PolicyEvaluationResult.java b/core/common/policy-engine/src/main/java/org/eclipse/dataspaceconnector/policy/engine/PolicyEvaluationResult.java similarity index 100% rename from core/policy/policy-engine/src/main/java/org/eclipse/dataspaceconnector/policy/engine/PolicyEvaluationResult.java rename to core/common/policy-engine/src/main/java/org/eclipse/dataspaceconnector/policy/engine/PolicyEvaluationResult.java diff --git a/core/policy/policy-engine/src/main/java/org/eclipse/dataspaceconnector/policy/engine/PolicyEvaluator.java b/core/common/policy-engine/src/main/java/org/eclipse/dataspaceconnector/policy/engine/PolicyEvaluator.java similarity index 100% rename from core/policy/policy-engine/src/main/java/org/eclipse/dataspaceconnector/policy/engine/PolicyEvaluator.java rename to core/common/policy-engine/src/main/java/org/eclipse/dataspaceconnector/policy/engine/PolicyEvaluator.java diff --git a/core/policy/policy-engine/src/main/java/org/eclipse/dataspaceconnector/policy/engine/RuleProblem.java b/core/common/policy-engine/src/main/java/org/eclipse/dataspaceconnector/policy/engine/RuleProblem.java similarity index 100% rename from core/policy/policy-engine/src/main/java/org/eclipse/dataspaceconnector/policy/engine/RuleProblem.java rename to core/common/policy-engine/src/main/java/org/eclipse/dataspaceconnector/policy/engine/RuleProblem.java diff --git a/core/policy/policy-engine/src/test/java/org/eclipse/dataspaceconnector/policy/engine/model/PolicyEvaluatorScenarioTest.java b/core/common/policy-engine/src/test/java/org/eclipse/dataspaceconnector/policy/engine/model/PolicyEvaluatorScenarioTest.java similarity index 100% rename from core/policy/policy-engine/src/test/java/org/eclipse/dataspaceconnector/policy/engine/model/PolicyEvaluatorScenarioTest.java rename to core/common/policy-engine/src/test/java/org/eclipse/dataspaceconnector/policy/engine/model/PolicyEvaluatorScenarioTest.java diff --git a/core/policy/policy-engine/src/test/java/org/eclipse/dataspaceconnector/policy/engine/model/PolicyEvaluatorTest.java b/core/common/policy-engine/src/test/java/org/eclipse/dataspaceconnector/policy/engine/model/PolicyEvaluatorTest.java similarity index 100% rename from core/policy/policy-engine/src/test/java/org/eclipse/dataspaceconnector/policy/engine/model/PolicyEvaluatorTest.java rename to core/common/policy-engine/src/test/java/org/eclipse/dataspaceconnector/policy/engine/model/PolicyEvaluatorTest.java diff --git a/core/policy/policy-engine/src/test/java/org/eclipse/dataspaceconnector/policy/engine/model/PolicyTestFunctions.java b/core/common/policy-engine/src/test/java/org/eclipse/dataspaceconnector/policy/engine/model/PolicyTestFunctions.java similarity index 100% rename from core/policy/policy-engine/src/test/java/org/eclipse/dataspaceconnector/policy/engine/model/PolicyTestFunctions.java rename to core/common/policy-engine/src/test/java/org/eclipse/dataspaceconnector/policy/engine/model/PolicyTestFunctions.java diff --git a/core/policy/policy-evaluator/build.gradle.kts b/core/common/policy-evaluator/build.gradle.kts similarity index 100% rename from core/policy/policy-evaluator/build.gradle.kts rename to core/common/policy-evaluator/build.gradle.kts diff --git a/core/policy/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/Action.java b/core/common/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/Action.java similarity index 100% rename from core/policy/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/Action.java rename to core/common/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/Action.java diff --git a/core/policy/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/AndConstraint.java b/core/common/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/AndConstraint.java similarity index 100% rename from core/policy/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/AndConstraint.java rename to core/common/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/AndConstraint.java diff --git a/core/policy/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/AtomicConstraint.java b/core/common/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/AtomicConstraint.java similarity index 100% rename from core/policy/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/AtomicConstraint.java rename to core/common/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/AtomicConstraint.java diff --git a/core/policy/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/AtomicConstraintFunction.java b/core/common/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/AtomicConstraintFunction.java similarity index 100% rename from core/policy/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/AtomicConstraintFunction.java rename to core/common/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/AtomicConstraintFunction.java diff --git a/core/policy/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/Constraint.java b/core/common/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/Constraint.java similarity index 100% rename from core/policy/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/Constraint.java rename to core/common/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/Constraint.java diff --git a/core/policy/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/Duty.java b/core/common/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/Duty.java similarity index 100% rename from core/policy/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/Duty.java rename to core/common/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/Duty.java diff --git a/core/policy/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/Expression.java b/core/common/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/Expression.java similarity index 100% rename from core/policy/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/Expression.java rename to core/common/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/Expression.java diff --git a/core/policy/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/Identifiable.java b/core/common/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/Identifiable.java similarity index 100% rename from core/policy/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/Identifiable.java rename to core/common/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/Identifiable.java diff --git a/core/policy/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/LiteralExpression.java b/core/common/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/LiteralExpression.java similarity index 100% rename from core/policy/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/LiteralExpression.java rename to core/common/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/LiteralExpression.java diff --git a/core/policy/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/MultiplicityConstraint.java b/core/common/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/MultiplicityConstraint.java similarity index 100% rename from core/policy/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/MultiplicityConstraint.java rename to core/common/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/MultiplicityConstraint.java diff --git a/core/policy/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/Operator.java b/core/common/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/Operator.java similarity index 100% rename from core/policy/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/Operator.java rename to core/common/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/Operator.java diff --git a/core/policy/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/OrConstraint.java b/core/common/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/OrConstraint.java similarity index 100% rename from core/policy/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/OrConstraint.java rename to core/common/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/OrConstraint.java diff --git a/core/policy/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/Permission.java b/core/common/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/Permission.java similarity index 100% rename from core/policy/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/Permission.java rename to core/common/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/Permission.java diff --git a/core/policy/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/Policy.java b/core/common/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/Policy.java similarity index 100% rename from core/policy/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/Policy.java rename to core/common/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/Policy.java diff --git a/core/policy/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/PolicyRegistrationTypes.java b/core/common/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/PolicyRegistrationTypes.java similarity index 100% rename from core/policy/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/PolicyRegistrationTypes.java rename to core/common/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/PolicyRegistrationTypes.java diff --git a/core/policy/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/PolicyType.java b/core/common/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/PolicyType.java similarity index 100% rename from core/policy/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/PolicyType.java rename to core/common/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/PolicyType.java diff --git a/core/policy/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/Prohibition.java b/core/common/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/Prohibition.java similarity index 100% rename from core/policy/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/Prohibition.java rename to core/common/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/Prohibition.java diff --git a/core/policy/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/Rule.java b/core/common/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/Rule.java similarity index 100% rename from core/policy/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/Rule.java rename to core/common/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/Rule.java diff --git a/core/policy/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/RuleFunction.java b/core/common/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/RuleFunction.java similarity index 100% rename from core/policy/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/RuleFunction.java rename to core/common/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/RuleFunction.java diff --git a/core/policy/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/XoneConstraint.java b/core/common/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/XoneConstraint.java similarity index 100% rename from core/policy/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/XoneConstraint.java rename to core/common/policy-evaluator/src/main/java/org/eclipse/dataspaceconnector/policy/model/XoneConstraint.java diff --git a/core/policy/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/ActionTest.java b/core/common/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/ActionTest.java similarity index 100% rename from core/policy/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/ActionTest.java rename to core/common/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/ActionTest.java diff --git a/core/policy/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/AndConstraintTest.java b/core/common/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/AndConstraintTest.java similarity index 100% rename from core/policy/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/AndConstraintTest.java rename to core/common/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/AndConstraintTest.java diff --git a/core/policy/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/AtomicConstraintTest.java b/core/common/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/AtomicConstraintTest.java similarity index 100% rename from core/policy/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/AtomicConstraintTest.java rename to core/common/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/AtomicConstraintTest.java diff --git a/core/policy/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/DutyTest.java b/core/common/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/DutyTest.java similarity index 100% rename from core/policy/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/DutyTest.java rename to core/common/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/DutyTest.java diff --git a/core/policy/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/LiteralExpressionTest.java b/core/common/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/LiteralExpressionTest.java similarity index 100% rename from core/policy/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/LiteralExpressionTest.java rename to core/common/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/LiteralExpressionTest.java diff --git a/core/policy/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/OrConstraintTest.java b/core/common/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/OrConstraintTest.java similarity index 100% rename from core/policy/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/OrConstraintTest.java rename to core/common/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/OrConstraintTest.java diff --git a/core/policy/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/PermissionTest.java b/core/common/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/PermissionTest.java similarity index 100% rename from core/policy/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/PermissionTest.java rename to core/common/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/PermissionTest.java diff --git a/core/policy/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/PolicyTest.java b/core/common/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/PolicyTest.java similarity index 100% rename from core/policy/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/PolicyTest.java rename to core/common/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/PolicyTest.java diff --git a/core/policy/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/PolicyTypeTest.java b/core/common/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/PolicyTypeTest.java similarity index 100% rename from core/policy/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/PolicyTypeTest.java rename to core/common/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/PolicyTypeTest.java diff --git a/core/policy/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/ProhibitionTest.java b/core/common/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/ProhibitionTest.java similarity index 100% rename from core/policy/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/ProhibitionTest.java rename to core/common/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/ProhibitionTest.java diff --git a/core/policy/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/XoneConstraintTest.java b/core/common/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/XoneConstraintTest.java similarity index 100% rename from core/policy/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/XoneConstraintTest.java rename to core/common/policy-evaluator/src/test/java/org/eclipse/dataspaceconnector/policy/model/XoneConstraintTest.java diff --git a/core/contract/README.md b/core/control-plane/contract/README.md similarity index 100% rename from core/contract/README.md rename to core/control-plane/contract/README.md diff --git a/core/contract/build.gradle.kts b/core/control-plane/contract/build.gradle.kts similarity index 93% rename from core/contract/build.gradle.kts rename to core/control-plane/contract/build.gradle.kts index b1d6e16b982..c066c4d996b 100644 --- a/core/contract/build.gradle.kts +++ b/core/control-plane/contract/build.gradle.kts @@ -27,7 +27,7 @@ dependencies { implementation(project(":common:state-machine-lib")) implementation("io.opentelemetry:opentelemetry-extension-annotations:${openTelemetryVersion}") - testImplementation(project(":core:defaults")) + testImplementation(project(":core:control-plane:control-plane-core")) testImplementation(project(":extensions:junit")) testImplementation(testFixtures(project(":common:util"))) testImplementation("org.awaitility:awaitility:${awaitility}") diff --git a/core/contract/src/main/java/org/eclipse/dataspaceconnector/contract/ContractNegotiationCommandExtension.java b/core/control-plane/contract/src/main/java/org/eclipse/dataspaceconnector/contract/ContractNegotiationCommandExtension.java similarity index 100% rename from core/contract/src/main/java/org/eclipse/dataspaceconnector/contract/ContractNegotiationCommandExtension.java rename to core/control-plane/contract/src/main/java/org/eclipse/dataspaceconnector/contract/ContractNegotiationCommandExtension.java diff --git a/core/contract/src/main/java/org/eclipse/dataspaceconnector/contract/ContractServiceExtension.java b/core/control-plane/contract/src/main/java/org/eclipse/dataspaceconnector/contract/ContractServiceExtension.java similarity index 100% rename from core/contract/src/main/java/org/eclipse/dataspaceconnector/contract/ContractServiceExtension.java rename to core/control-plane/contract/src/main/java/org/eclipse/dataspaceconnector/contract/ContractServiceExtension.java diff --git a/core/contract/src/main/java/org/eclipse/dataspaceconnector/contract/listener/ContractNegotiationEventListener.java b/core/control-plane/contract/src/main/java/org/eclipse/dataspaceconnector/contract/listener/ContractNegotiationEventListener.java similarity index 100% rename from core/contract/src/main/java/org/eclipse/dataspaceconnector/contract/listener/ContractNegotiationEventListener.java rename to core/control-plane/contract/src/main/java/org/eclipse/dataspaceconnector/contract/listener/ContractNegotiationEventListener.java diff --git a/core/contract/src/main/java/org/eclipse/dataspaceconnector/contract/negotiation/AbstractContractNegotiationManager.java b/core/control-plane/contract/src/main/java/org/eclipse/dataspaceconnector/contract/negotiation/AbstractContractNegotiationManager.java similarity index 100% rename from core/contract/src/main/java/org/eclipse/dataspaceconnector/contract/negotiation/AbstractContractNegotiationManager.java rename to core/control-plane/contract/src/main/java/org/eclipse/dataspaceconnector/contract/negotiation/AbstractContractNegotiationManager.java diff --git a/core/contract/src/main/java/org/eclipse/dataspaceconnector/contract/negotiation/ConsumerContractNegotiationManagerImpl.java b/core/control-plane/contract/src/main/java/org/eclipse/dataspaceconnector/contract/negotiation/ConsumerContractNegotiationManagerImpl.java similarity index 98% rename from core/contract/src/main/java/org/eclipse/dataspaceconnector/contract/negotiation/ConsumerContractNegotiationManagerImpl.java rename to core/control-plane/contract/src/main/java/org/eclipse/dataspaceconnector/contract/negotiation/ConsumerContractNegotiationManagerImpl.java index 1877f08ea20..d68614ec58f 100644 --- a/core/contract/src/main/java/org/eclipse/dataspaceconnector/contract/negotiation/ConsumerContractNegotiationManagerImpl.java +++ b/core/control-plane/contract/src/main/java/org/eclipse/dataspaceconnector/contract/negotiation/ConsumerContractNegotiationManagerImpl.java @@ -20,8 +20,8 @@ import io.opentelemetry.extension.annotations.WithSpan; import org.eclipse.dataspaceconnector.common.statemachine.StateMachineManager; import org.eclipse.dataspaceconnector.common.statemachine.StateProcessorImpl; -import org.eclipse.dataspaceconnector.contract.common.ContractId; import org.eclipse.dataspaceconnector.policy.model.Policy; +import org.eclipse.dataspaceconnector.spi.contract.ContractId; import org.eclipse.dataspaceconnector.spi.contract.negotiation.ConsumerContractNegotiationManager; import org.eclipse.dataspaceconnector.spi.iam.ClaimToken; import org.eclipse.dataspaceconnector.spi.response.StatusResult; @@ -44,8 +44,8 @@ import java.util.function.Function; import static java.lang.String.format; -import static org.eclipse.dataspaceconnector.contract.common.ContractId.DEFINITION_PART; -import static org.eclipse.dataspaceconnector.contract.common.ContractId.parseContractId; +import static org.eclipse.dataspaceconnector.spi.contract.ContractId.DEFINITION_PART; +import static org.eclipse.dataspaceconnector.spi.contract.ContractId.parseContractId; import static org.eclipse.dataspaceconnector.spi.response.ResponseStatus.FATAL_ERROR; import static org.eclipse.dataspaceconnector.spi.types.domain.contract.negotiation.ContractNegotiation.Type.CONSUMER; import static org.eclipse.dataspaceconnector.spi.types.domain.contract.negotiation.ContractNegotiationStates.CONFIRMED; diff --git a/core/contract/src/main/java/org/eclipse/dataspaceconnector/contract/negotiation/ProviderContractNegotiationManagerImpl.java b/core/control-plane/contract/src/main/java/org/eclipse/dataspaceconnector/contract/negotiation/ProviderContractNegotiationManagerImpl.java similarity index 98% rename from core/contract/src/main/java/org/eclipse/dataspaceconnector/contract/negotiation/ProviderContractNegotiationManagerImpl.java rename to core/control-plane/contract/src/main/java/org/eclipse/dataspaceconnector/contract/negotiation/ProviderContractNegotiationManagerImpl.java index d5c51fd51ec..b36c8d5e4ad 100644 --- a/core/contract/src/main/java/org/eclipse/dataspaceconnector/contract/negotiation/ProviderContractNegotiationManagerImpl.java +++ b/core/control-plane/contract/src/main/java/org/eclipse/dataspaceconnector/contract/negotiation/ProviderContractNegotiationManagerImpl.java @@ -20,8 +20,8 @@ import io.opentelemetry.extension.annotations.WithSpan; import org.eclipse.dataspaceconnector.common.statemachine.StateMachineManager; import org.eclipse.dataspaceconnector.common.statemachine.StateProcessorImpl; -import org.eclipse.dataspaceconnector.contract.common.ContractId; import org.eclipse.dataspaceconnector.policy.model.Policy; +import org.eclipse.dataspaceconnector.spi.contract.ContractId; import org.eclipse.dataspaceconnector.spi.contract.negotiation.ProviderContractNegotiationManager; import org.eclipse.dataspaceconnector.spi.iam.ClaimToken; import org.eclipse.dataspaceconnector.spi.response.StatusResult; @@ -41,8 +41,8 @@ import java.util.function.BiConsumer; import java.util.function.Function; -import static org.eclipse.dataspaceconnector.contract.common.ContractId.DEFINITION_PART; -import static org.eclipse.dataspaceconnector.contract.common.ContractId.parseContractId; +import static org.eclipse.dataspaceconnector.spi.contract.ContractId.DEFINITION_PART; +import static org.eclipse.dataspaceconnector.spi.contract.ContractId.parseContractId; import static org.eclipse.dataspaceconnector.spi.response.ResponseStatus.FATAL_ERROR; import static org.eclipse.dataspaceconnector.spi.types.domain.contract.negotiation.ContractNegotiation.Type.PROVIDER; import static org.eclipse.dataspaceconnector.spi.types.domain.contract.negotiation.ContractNegotiationStates.CONFIRMING; diff --git a/core/contract/src/main/java/org/eclipse/dataspaceconnector/contract/negotiation/command/handlers/CancelNegotiationCommandHandler.java b/core/control-plane/contract/src/main/java/org/eclipse/dataspaceconnector/contract/negotiation/command/handlers/CancelNegotiationCommandHandler.java similarity index 93% rename from core/contract/src/main/java/org/eclipse/dataspaceconnector/contract/negotiation/command/handlers/CancelNegotiationCommandHandler.java rename to core/control-plane/contract/src/main/java/org/eclipse/dataspaceconnector/contract/negotiation/command/handlers/CancelNegotiationCommandHandler.java index 77074a37a15..4fdafe8ae0e 100644 --- a/core/contract/src/main/java/org/eclipse/dataspaceconnector/contract/negotiation/command/handlers/CancelNegotiationCommandHandler.java +++ b/core/control-plane/contract/src/main/java/org/eclipse/dataspaceconnector/contract/negotiation/command/handlers/CancelNegotiationCommandHandler.java @@ -14,8 +14,8 @@ package org.eclipse.dataspaceconnector.contract.negotiation.command.handlers; -import org.eclipse.dataspaceconnector.contract.negotiation.command.commands.CancelNegotiationCommand; import org.eclipse.dataspaceconnector.spi.contract.negotiation.store.ContractNegotiationStore; +import org.eclipse.dataspaceconnector.spi.types.domain.contract.command.CancelNegotiationCommand; import org.eclipse.dataspaceconnector.spi.types.domain.contract.negotiation.ContractNegotiation; /** diff --git a/core/contract/src/main/java/org/eclipse/dataspaceconnector/contract/negotiation/command/handlers/SingleContractNegotiationCommandHandler.java b/core/control-plane/contract/src/main/java/org/eclipse/dataspaceconnector/contract/negotiation/command/handlers/SingleContractNegotiationCommandHandler.java similarity index 96% rename from core/contract/src/main/java/org/eclipse/dataspaceconnector/contract/negotiation/command/handlers/SingleContractNegotiationCommandHandler.java rename to core/control-plane/contract/src/main/java/org/eclipse/dataspaceconnector/contract/negotiation/command/handlers/SingleContractNegotiationCommandHandler.java index bf0478b1124..23adbca5c2f 100644 --- a/core/contract/src/main/java/org/eclipse/dataspaceconnector/contract/negotiation/command/handlers/SingleContractNegotiationCommandHandler.java +++ b/core/control-plane/contract/src/main/java/org/eclipse/dataspaceconnector/contract/negotiation/command/handlers/SingleContractNegotiationCommandHandler.java @@ -14,10 +14,10 @@ package org.eclipse.dataspaceconnector.contract.negotiation.command.handlers; -import org.eclipse.dataspaceconnector.contract.negotiation.command.commands.SingleContractNegotiationCommand; import org.eclipse.dataspaceconnector.spi.EdcException; import org.eclipse.dataspaceconnector.spi.command.CommandHandler; import org.eclipse.dataspaceconnector.spi.contract.negotiation.store.ContractNegotiationStore; +import org.eclipse.dataspaceconnector.spi.types.domain.contract.command.SingleContractNegotiationCommand; import org.eclipse.dataspaceconnector.spi.types.domain.contract.negotiation.ContractNegotiation; import static java.lang.String.format; diff --git a/core/contract/src/main/java/org/eclipse/dataspaceconnector/contract/observe/ContractNegotiationObservableImpl.java b/core/control-plane/contract/src/main/java/org/eclipse/dataspaceconnector/contract/observe/ContractNegotiationObservableImpl.java similarity index 100% rename from core/contract/src/main/java/org/eclipse/dataspaceconnector/contract/observe/ContractNegotiationObservableImpl.java rename to core/control-plane/contract/src/main/java/org/eclipse/dataspaceconnector/contract/observe/ContractNegotiationObservableImpl.java diff --git a/core/contract/src/main/java/org/eclipse/dataspaceconnector/contract/offer/ContractDefinitionServiceImpl.java b/core/control-plane/contract/src/main/java/org/eclipse/dataspaceconnector/contract/offer/ContractDefinitionServiceImpl.java similarity index 100% rename from core/contract/src/main/java/org/eclipse/dataspaceconnector/contract/offer/ContractDefinitionServiceImpl.java rename to core/control-plane/contract/src/main/java/org/eclipse/dataspaceconnector/contract/offer/ContractDefinitionServiceImpl.java diff --git a/core/contract/src/main/java/org/eclipse/dataspaceconnector/contract/offer/ContractOfferServiceImpl.java b/core/control-plane/contract/src/main/java/org/eclipse/dataspaceconnector/contract/offer/ContractOfferServiceImpl.java similarity index 98% rename from core/contract/src/main/java/org/eclipse/dataspaceconnector/contract/offer/ContractOfferServiceImpl.java rename to core/control-plane/contract/src/main/java/org/eclipse/dataspaceconnector/contract/offer/ContractOfferServiceImpl.java index bb382a2e90c..38c38d3f573 100644 --- a/core/contract/src/main/java/org/eclipse/dataspaceconnector/contract/offer/ContractOfferServiceImpl.java +++ b/core/control-plane/contract/src/main/java/org/eclipse/dataspaceconnector/contract/offer/ContractOfferServiceImpl.java @@ -17,10 +17,10 @@ package org.eclipse.dataspaceconnector.contract.offer; -import org.eclipse.dataspaceconnector.contract.common.ContractId; import org.eclipse.dataspaceconnector.policy.model.Policy; import org.eclipse.dataspaceconnector.spi.agent.ParticipantAgentService; import org.eclipse.dataspaceconnector.spi.asset.AssetIndex; +import org.eclipse.dataspaceconnector.spi.contract.ContractId; import org.eclipse.dataspaceconnector.spi.contract.offer.ContractDefinitionService; import org.eclipse.dataspaceconnector.spi.contract.offer.ContractOfferQuery; import org.eclipse.dataspaceconnector.spi.contract.offer.ContractOfferService; diff --git a/core/contract/src/main/java/org/eclipse/dataspaceconnector/contract/policy/PolicyArchiveImpl.java b/core/control-plane/contract/src/main/java/org/eclipse/dataspaceconnector/contract/policy/PolicyArchiveImpl.java similarity index 100% rename from core/contract/src/main/java/org/eclipse/dataspaceconnector/contract/policy/PolicyArchiveImpl.java rename to core/control-plane/contract/src/main/java/org/eclipse/dataspaceconnector/contract/policy/PolicyArchiveImpl.java diff --git a/core/contract/src/main/java/org/eclipse/dataspaceconnector/contract/policy/PolicyEquality.java b/core/control-plane/contract/src/main/java/org/eclipse/dataspaceconnector/contract/policy/PolicyEquality.java similarity index 100% rename from core/contract/src/main/java/org/eclipse/dataspaceconnector/contract/policy/PolicyEquality.java rename to core/control-plane/contract/src/main/java/org/eclipse/dataspaceconnector/contract/policy/PolicyEquality.java diff --git a/core/contract/src/main/java/org/eclipse/dataspaceconnector/contract/validation/ContractValidationServiceImpl.java b/core/control-plane/contract/src/main/java/org/eclipse/dataspaceconnector/contract/validation/ContractValidationServiceImpl.java similarity index 97% rename from core/contract/src/main/java/org/eclipse/dataspaceconnector/contract/validation/ContractValidationServiceImpl.java rename to core/control-plane/contract/src/main/java/org/eclipse/dataspaceconnector/contract/validation/ContractValidationServiceImpl.java index f37d98b97cd..ef00ae56779 100644 --- a/core/contract/src/main/java/org/eclipse/dataspaceconnector/contract/validation/ContractValidationServiceImpl.java +++ b/core/control-plane/contract/src/main/java/org/eclipse/dataspaceconnector/contract/validation/ContractValidationServiceImpl.java @@ -32,8 +32,8 @@ import java.time.Clock; import static java.lang.String.format; -import static org.eclipse.dataspaceconnector.contract.common.ContractId.DEFINITION_PART; -import static org.eclipse.dataspaceconnector.contract.common.ContractId.parseContractId; +import static org.eclipse.dataspaceconnector.spi.contract.ContractId.DEFINITION_PART; +import static org.eclipse.dataspaceconnector.spi.contract.ContractId.parseContractId; /** * Implementation of the {@link ContractValidationService}. diff --git a/core/contract/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension b/core/control-plane/contract/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension similarity index 100% rename from core/contract/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension rename to core/control-plane/contract/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension diff --git a/core/contract/src/test/java/org/eclipse/dataspaceconnector/contract/ContractServiceExtensionTest.java b/core/control-plane/contract/src/test/java/org/eclipse/dataspaceconnector/contract/ContractServiceExtensionTest.java similarity index 100% rename from core/contract/src/test/java/org/eclipse/dataspaceconnector/contract/ContractServiceExtensionTest.java rename to core/control-plane/contract/src/test/java/org/eclipse/dataspaceconnector/contract/ContractServiceExtensionTest.java diff --git a/core/contract/src/test/java/org/eclipse/dataspaceconnector/contract/negotiation/AbstractContractNegotiationIntegrationTest.java b/core/control-plane/contract/src/test/java/org/eclipse/dataspaceconnector/contract/negotiation/AbstractContractNegotiationIntegrationTest.java similarity index 98% rename from core/contract/src/test/java/org/eclipse/dataspaceconnector/contract/negotiation/AbstractContractNegotiationIntegrationTest.java rename to core/control-plane/contract/src/test/java/org/eclipse/dataspaceconnector/contract/negotiation/AbstractContractNegotiationIntegrationTest.java index 3a6e0f0153d..ec3d6368093 100644 --- a/core/contract/src/test/java/org/eclipse/dataspaceconnector/contract/negotiation/AbstractContractNegotiationIntegrationTest.java +++ b/core/control-plane/contract/src/test/java/org/eclipse/dataspaceconnector/contract/negotiation/AbstractContractNegotiationIntegrationTest.java @@ -15,15 +15,15 @@ package org.eclipse.dataspaceconnector.contract.negotiation; import org.eclipse.dataspaceconnector.common.statemachine.retry.SendRetryManager; -import org.eclipse.dataspaceconnector.contract.common.ContractId; import org.eclipse.dataspaceconnector.contract.observe.ContractNegotiationObservableImpl; -import org.eclipse.dataspaceconnector.core.defaults.negotiationstore.InMemoryContractNegotiationStore; +import org.eclipse.dataspaceconnector.core.controlplane.defaults.negotiationstore.InMemoryContractNegotiationStore; import org.eclipse.dataspaceconnector.policy.model.Action; import org.eclipse.dataspaceconnector.policy.model.Duty; import org.eclipse.dataspaceconnector.policy.model.Policy; import org.eclipse.dataspaceconnector.policy.model.PolicyType; import org.eclipse.dataspaceconnector.spi.command.CommandQueue; import org.eclipse.dataspaceconnector.spi.command.CommandRunner; +import org.eclipse.dataspaceconnector.spi.contract.ContractId; import org.eclipse.dataspaceconnector.spi.contract.negotiation.observe.ContractNegotiationObservable; import org.eclipse.dataspaceconnector.spi.contract.validation.ContractValidationService; import org.eclipse.dataspaceconnector.spi.entity.StatefulEntity; diff --git a/core/contract/src/test/java/org/eclipse/dataspaceconnector/contract/negotiation/ConsumerContractNegotiationManagerImplTest.java b/core/control-plane/contract/src/test/java/org/eclipse/dataspaceconnector/contract/negotiation/ConsumerContractNegotiationManagerImplTest.java similarity index 100% rename from core/contract/src/test/java/org/eclipse/dataspaceconnector/contract/negotiation/ConsumerContractNegotiationManagerImplTest.java rename to core/control-plane/contract/src/test/java/org/eclipse/dataspaceconnector/contract/negotiation/ConsumerContractNegotiationManagerImplTest.java diff --git a/core/contract/src/test/java/org/eclipse/dataspaceconnector/contract/negotiation/ContractNegotiationIntegrationTest.java b/core/control-plane/contract/src/test/java/org/eclipse/dataspaceconnector/contract/negotiation/ContractNegotiationIntegrationTest.java similarity index 100% rename from core/contract/src/test/java/org/eclipse/dataspaceconnector/contract/negotiation/ContractNegotiationIntegrationTest.java rename to core/control-plane/contract/src/test/java/org/eclipse/dataspaceconnector/contract/negotiation/ContractNegotiationIntegrationTest.java diff --git a/core/contract/src/test/java/org/eclipse/dataspaceconnector/contract/negotiation/ProviderContractNegotiationManagerImplTest.java b/core/control-plane/contract/src/test/java/org/eclipse/dataspaceconnector/contract/negotiation/ProviderContractNegotiationManagerImplTest.java similarity index 99% rename from core/contract/src/test/java/org/eclipse/dataspaceconnector/contract/negotiation/ProviderContractNegotiationManagerImplTest.java rename to core/control-plane/contract/src/test/java/org/eclipse/dataspaceconnector/contract/negotiation/ProviderContractNegotiationManagerImplTest.java index 126cecadeb9..cd8c438b668 100644 --- a/core/contract/src/test/java/org/eclipse/dataspaceconnector/contract/negotiation/ProviderContractNegotiationManagerImplTest.java +++ b/core/control-plane/contract/src/test/java/org/eclipse/dataspaceconnector/contract/negotiation/ProviderContractNegotiationManagerImplTest.java @@ -16,12 +16,12 @@ package org.eclipse.dataspaceconnector.contract.negotiation; import org.eclipse.dataspaceconnector.common.statemachine.retry.SendRetryManager; -import org.eclipse.dataspaceconnector.contract.common.ContractId; import org.eclipse.dataspaceconnector.contract.observe.ContractNegotiationObservableImpl; import org.eclipse.dataspaceconnector.policy.model.Policy; import org.eclipse.dataspaceconnector.spi.EdcException; import org.eclipse.dataspaceconnector.spi.command.CommandQueue; import org.eclipse.dataspaceconnector.spi.command.CommandRunner; +import org.eclipse.dataspaceconnector.spi.contract.ContractId; import org.eclipse.dataspaceconnector.spi.contract.negotiation.observe.ContractNegotiationListener; import org.eclipse.dataspaceconnector.spi.contract.negotiation.store.ContractNegotiationStore; import org.eclipse.dataspaceconnector.spi.contract.validation.ContractValidationService; diff --git a/core/contract/src/test/java/org/eclipse/dataspaceconnector/contract/negotiation/command/ContractNegotiationCommandQueueIntegrationTest.java b/core/control-plane/contract/src/test/java/org/eclipse/dataspaceconnector/contract/negotiation/command/ContractNegotiationCommandQueueIntegrationTest.java similarity index 98% rename from core/contract/src/test/java/org/eclipse/dataspaceconnector/contract/negotiation/command/ContractNegotiationCommandQueueIntegrationTest.java rename to core/control-plane/contract/src/test/java/org/eclipse/dataspaceconnector/contract/negotiation/command/ContractNegotiationCommandQueueIntegrationTest.java index c301bf69a00..095bb1ed61c 100644 --- a/core/contract/src/test/java/org/eclipse/dataspaceconnector/contract/negotiation/command/ContractNegotiationCommandQueueIntegrationTest.java +++ b/core/control-plane/contract/src/test/java/org/eclipse/dataspaceconnector/contract/negotiation/command/ContractNegotiationCommandQueueIntegrationTest.java @@ -17,7 +17,6 @@ import org.eclipse.dataspaceconnector.common.statemachine.retry.SendRetryManager; import org.eclipse.dataspaceconnector.contract.negotiation.ConsumerContractNegotiationManagerImpl; import org.eclipse.dataspaceconnector.contract.negotiation.ProviderContractNegotiationManagerImpl; -import org.eclipse.dataspaceconnector.contract.negotiation.command.commands.SingleContractNegotiationCommand; import org.eclipse.dataspaceconnector.contract.negotiation.command.handlers.SingleContractNegotiationCommandHandler; import org.eclipse.dataspaceconnector.spi.command.BoundedCommandQueue; import org.eclipse.dataspaceconnector.spi.command.CommandHandlerRegistry; @@ -30,6 +29,7 @@ import org.eclipse.dataspaceconnector.spi.message.RemoteMessageDispatcherRegistry; import org.eclipse.dataspaceconnector.spi.monitor.Monitor; import org.eclipse.dataspaceconnector.spi.policy.store.PolicyDefinitionStore; +import org.eclipse.dataspaceconnector.spi.types.domain.contract.command.SingleContractNegotiationCommand; import org.eclipse.dataspaceconnector.spi.types.domain.contract.negotiation.ContractNegotiation; import org.eclipse.dataspaceconnector.spi.types.domain.contract.negotiation.ContractNegotiationStates; import org.eclipse.dataspaceconnector.spi.types.domain.contract.negotiation.command.ContractNegotiationCommand; diff --git a/core/contract/src/test/java/org/eclipse/dataspaceconnector/contract/negotiation/command/handlers/CancelNegotiationCommandHandlerTest.java b/core/control-plane/contract/src/test/java/org/eclipse/dataspaceconnector/contract/negotiation/command/handlers/CancelNegotiationCommandHandlerTest.java similarity index 96% rename from core/contract/src/test/java/org/eclipse/dataspaceconnector/contract/negotiation/command/handlers/CancelNegotiationCommandHandlerTest.java rename to core/control-plane/contract/src/test/java/org/eclipse/dataspaceconnector/contract/negotiation/command/handlers/CancelNegotiationCommandHandlerTest.java index 7bc4b0794af..2f80f057bf7 100644 --- a/core/contract/src/test/java/org/eclipse/dataspaceconnector/contract/negotiation/command/handlers/CancelNegotiationCommandHandlerTest.java +++ b/core/control-plane/contract/src/test/java/org/eclipse/dataspaceconnector/contract/negotiation/command/handlers/CancelNegotiationCommandHandlerTest.java @@ -14,9 +14,9 @@ package org.eclipse.dataspaceconnector.contract.negotiation.command.handlers; -import org.eclipse.dataspaceconnector.contract.negotiation.command.commands.CancelNegotiationCommand; import org.eclipse.dataspaceconnector.spi.EdcException; import org.eclipse.dataspaceconnector.spi.contract.negotiation.store.ContractNegotiationStore; +import org.eclipse.dataspaceconnector.spi.types.domain.contract.command.CancelNegotiationCommand; import org.eclipse.dataspaceconnector.spi.types.domain.contract.negotiation.ContractNegotiation; import org.eclipse.dataspaceconnector.spi.types.domain.contract.negotiation.ContractNegotiationStates; import org.junit.jupiter.api.BeforeEach; diff --git a/core/contract/src/test/java/org/eclipse/dataspaceconnector/contract/offer/ContractDefinitionServiceImplTest.java b/core/control-plane/contract/src/test/java/org/eclipse/dataspaceconnector/contract/offer/ContractDefinitionServiceImplTest.java similarity index 100% rename from core/contract/src/test/java/org/eclipse/dataspaceconnector/contract/offer/ContractDefinitionServiceImplTest.java rename to core/control-plane/contract/src/test/java/org/eclipse/dataspaceconnector/contract/offer/ContractDefinitionServiceImplTest.java diff --git a/core/contract/src/test/java/org/eclipse/dataspaceconnector/contract/offer/ContractOfferServiceImplTest.java b/core/control-plane/contract/src/test/java/org/eclipse/dataspaceconnector/contract/offer/ContractOfferServiceImplTest.java similarity index 100% rename from core/contract/src/test/java/org/eclipse/dataspaceconnector/contract/offer/ContractOfferServiceImplTest.java rename to core/control-plane/contract/src/test/java/org/eclipse/dataspaceconnector/contract/offer/ContractOfferServiceImplTest.java diff --git a/core/contract/src/test/java/org/eclipse/dataspaceconnector/contract/policy/PolicyArchiveImplTest.java b/core/control-plane/contract/src/test/java/org/eclipse/dataspaceconnector/contract/policy/PolicyArchiveImplTest.java similarity index 100% rename from core/contract/src/test/java/org/eclipse/dataspaceconnector/contract/policy/PolicyArchiveImplTest.java rename to core/control-plane/contract/src/test/java/org/eclipse/dataspaceconnector/contract/policy/PolicyArchiveImplTest.java diff --git a/core/contract/src/test/java/org/eclipse/dataspaceconnector/contract/policy/PolicyEqualityTest.java b/core/control-plane/contract/src/test/java/org/eclipse/dataspaceconnector/contract/policy/PolicyEqualityTest.java similarity index 100% rename from core/contract/src/test/java/org/eclipse/dataspaceconnector/contract/policy/PolicyEqualityTest.java rename to core/control-plane/contract/src/test/java/org/eclipse/dataspaceconnector/contract/policy/PolicyEqualityTest.java diff --git a/core/contract/src/test/java/org/eclipse/dataspaceconnector/contract/validation/ContractValidationServiceImplTest.java b/core/control-plane/contract/src/test/java/org/eclipse/dataspaceconnector/contract/validation/ContractValidationServiceImplTest.java similarity index 100% rename from core/contract/src/test/java/org/eclipse/dataspaceconnector/contract/validation/ContractValidationServiceImplTest.java rename to core/control-plane/contract/src/test/java/org/eclipse/dataspaceconnector/contract/validation/ContractValidationServiceImplTest.java diff --git a/core/control-plane/control-plane-core/build.gradle.kts b/core/control-plane/control-plane-core/build.gradle.kts new file mode 100644 index 00000000000..0f15002dd3e --- /dev/null +++ b/core/control-plane/control-plane-core/build.gradle.kts @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2022 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) + * + * 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: + * Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation + * + */ + +plugins { + `java-library` +} + + +dependencies { + api(project(":core:common:base")) + api(project(":core:common:boot")) + api(project(":core:common:policy-engine")) + api(project(":core:control-plane:contract")) + api(project(":core:control-plane:transfer")) + implementation(project(":common:util")) + implementation(project(":extensions:dataloading")) +} + +publishing { + publications { + create("control-plane-core") { + artifactId = "control-plane-core" + from(components["java"]) + } + } +} diff --git a/core/control-plane/control-plane-core/src/main/java/org/eclipse/dataspaceconnector/core/controlplane/ControlPlaneCoreExtension.java b/core/control-plane/control-plane-core/src/main/java/org/eclipse/dataspaceconnector/core/controlplane/ControlPlaneCoreExtension.java new file mode 100644 index 00000000000..b9f5ced5438 --- /dev/null +++ b/core/control-plane/control-plane-core/src/main/java/org/eclipse/dataspaceconnector/core/controlplane/ControlPlaneCoreExtension.java @@ -0,0 +1,94 @@ +/* + * Copyright (c) 2022 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) + * + * 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: + * Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation + * + */ + +package org.eclipse.dataspaceconnector.core.controlplane; + +import org.eclipse.dataspaceconnector.common.concurrency.LockManager; +import org.eclipse.dataspaceconnector.core.controlplane.defaults.assetindex.InMemoryAssetIndex; +import org.eclipse.dataspaceconnector.core.controlplane.defaults.contractdefinition.InMemoryContractDefinitionStore; +import org.eclipse.dataspaceconnector.core.controlplane.defaults.negotiationstore.InMemoryContractNegotiationStore; +import org.eclipse.dataspaceconnector.core.controlplane.defaults.policystore.InMemoryPolicyDefinitionStore; +import org.eclipse.dataspaceconnector.core.controlplane.defaults.transferprocessstore.InMemoryTransferProcessStore; +import org.eclipse.dataspaceconnector.dataloading.AssetLoader; +import org.eclipse.dataspaceconnector.dataloading.ContractDefinitionLoader; +import org.eclipse.dataspaceconnector.spi.asset.AssetIndex; +import org.eclipse.dataspaceconnector.spi.asset.DataAddressResolver; +import org.eclipse.dataspaceconnector.spi.contract.negotiation.store.ContractNegotiationStore; +import org.eclipse.dataspaceconnector.spi.contract.offer.store.ContractDefinitionStore; +import org.eclipse.dataspaceconnector.spi.policy.store.PolicyDefinitionStore; +import org.eclipse.dataspaceconnector.spi.system.Provider; +import org.eclipse.dataspaceconnector.spi.system.ServiceExtension; +import org.eclipse.dataspaceconnector.spi.transfer.store.TransferProcessStore; + +import java.util.concurrent.locks.ReentrantReadWriteLock; + +public class ControlPlaneCoreExtension implements ServiceExtension { + + private InMemoryAssetIndex assetIndex; + private InMemoryContractDefinitionStore contractDefinitionStore; + + @Provider(isDefault = true) + public AssetIndex defaultAssetIndex() { + return getAssetIndex(); + } + + @Provider(isDefault = true) + public DataAddressResolver defaultDataAddressResolver() { + return getAssetIndex(); + } + + @Provider(isDefault = true) + public AssetLoader defaultAssetLoader() { + return getAssetIndex(); + } + + @Provider(isDefault = true) + public ContractDefinitionStore defaultContractDefinitionStore() { + return getContractDefinitionStore(); + } + + @Provider(isDefault = true) + public ContractDefinitionLoader defaultContractDefinitionLoader() { + return getContractDefinitionStore()::save; + } + + @Provider(isDefault = true) + public ContractNegotiationStore defaultContractNegotiationStore() { + return new InMemoryContractNegotiationStore(); + } + + @Provider(isDefault = true) + public TransferProcessStore defaultTransferProcessStore() { + return new InMemoryTransferProcessStore(); + } + + @Provider(isDefault = true) + public PolicyDefinitionStore defaultPolicyStore() { + return new InMemoryPolicyDefinitionStore(new LockManager(new ReentrantReadWriteLock(true))); + } + + private ContractDefinitionStore getContractDefinitionStore() { + if (contractDefinitionStore == null) { + contractDefinitionStore = new InMemoryContractDefinitionStore(); + } + return contractDefinitionStore; + } + + private InMemoryAssetIndex getAssetIndex() { + if (assetIndex == null) { + assetIndex = new InMemoryAssetIndex(); + } + return assetIndex; + } +} diff --git a/core/defaults/src/main/java/org/eclipse/dataspaceconnector/core/defaults/InMemoryStatefulEntityStore.java b/core/control-plane/control-plane-core/src/main/java/org/eclipse/dataspaceconnector/core/controlplane/defaults/InMemoryStatefulEntityStore.java similarity index 97% rename from core/defaults/src/main/java/org/eclipse/dataspaceconnector/core/defaults/InMemoryStatefulEntityStore.java rename to core/control-plane/control-plane-core/src/main/java/org/eclipse/dataspaceconnector/core/controlplane/defaults/InMemoryStatefulEntityStore.java index fc9133954f9..287d7ebb949 100644 --- a/core/defaults/src/main/java/org/eclipse/dataspaceconnector/core/defaults/InMemoryStatefulEntityStore.java +++ b/core/control-plane/control-plane-core/src/main/java/org/eclipse/dataspaceconnector/core/controlplane/defaults/InMemoryStatefulEntityStore.java @@ -12,7 +12,7 @@ * */ -package org.eclipse.dataspaceconnector.core.defaults; +package org.eclipse.dataspaceconnector.core.controlplane.defaults; import org.eclipse.dataspaceconnector.common.concurrency.LockManager; import org.eclipse.dataspaceconnector.spi.entity.StatefulEntity; diff --git a/core/defaults/src/main/java/org/eclipse/dataspaceconnector/core/defaults/assetindex/AssetPredicateConverter.java b/core/control-plane/control-plane-core/src/main/java/org/eclipse/dataspaceconnector/core/controlplane/defaults/assetindex/AssetPredicateConverter.java similarity index 95% rename from core/defaults/src/main/java/org/eclipse/dataspaceconnector/core/defaults/assetindex/AssetPredicateConverter.java rename to core/control-plane/control-plane-core/src/main/java/org/eclipse/dataspaceconnector/core/controlplane/defaults/assetindex/AssetPredicateConverter.java index 51c4e77990b..b815c14c5b0 100644 --- a/core/defaults/src/main/java/org/eclipse/dataspaceconnector/core/defaults/assetindex/AssetPredicateConverter.java +++ b/core/control-plane/control-plane-core/src/main/java/org/eclipse/dataspaceconnector/core/controlplane/defaults/assetindex/AssetPredicateConverter.java @@ -12,7 +12,7 @@ * */ -package org.eclipse.dataspaceconnector.core.defaults.assetindex; +package org.eclipse.dataspaceconnector.core.controlplane.defaults.assetindex; import org.eclipse.dataspaceconnector.spi.query.BaseCriterionToPredicateConverter; import org.eclipse.dataspaceconnector.spi.query.Criterion; diff --git a/core/defaults/src/main/java/org/eclipse/dataspaceconnector/core/defaults/assetindex/InMemoryAssetIndex.java b/core/control-plane/control-plane-core/src/main/java/org/eclipse/dataspaceconnector/core/controlplane/defaults/assetindex/InMemoryAssetIndex.java similarity index 98% rename from core/defaults/src/main/java/org/eclipse/dataspaceconnector/core/defaults/assetindex/InMemoryAssetIndex.java rename to core/control-plane/control-plane-core/src/main/java/org/eclipse/dataspaceconnector/core/controlplane/defaults/assetindex/InMemoryAssetIndex.java index fca9465def2..3bad5e78f6c 100644 --- a/core/defaults/src/main/java/org/eclipse/dataspaceconnector/core/defaults/assetindex/InMemoryAssetIndex.java +++ b/core/control-plane/control-plane-core/src/main/java/org/eclipse/dataspaceconnector/core/controlplane/defaults/assetindex/InMemoryAssetIndex.java @@ -12,7 +12,7 @@ * */ -package org.eclipse.dataspaceconnector.core.defaults.assetindex; +package org.eclipse.dataspaceconnector.core.controlplane.defaults.assetindex; import org.eclipse.dataspaceconnector.common.collection.CollectionUtil; import org.eclipse.dataspaceconnector.dataloading.AssetEntry; diff --git a/core/defaults/src/main/java/org/eclipse/dataspaceconnector/core/defaults/contractdefinition/InMemoryContractDefinitionStore.java b/core/control-plane/control-plane-core/src/main/java/org/eclipse/dataspaceconnector/core/controlplane/defaults/contractdefinition/InMemoryContractDefinitionStore.java similarity index 96% rename from core/defaults/src/main/java/org/eclipse/dataspaceconnector/core/defaults/contractdefinition/InMemoryContractDefinitionStore.java rename to core/control-plane/control-plane-core/src/main/java/org/eclipse/dataspaceconnector/core/controlplane/defaults/contractdefinition/InMemoryContractDefinitionStore.java index b93b81cbd4c..24073a6a43c 100644 --- a/core/defaults/src/main/java/org/eclipse/dataspaceconnector/core/defaults/contractdefinition/InMemoryContractDefinitionStore.java +++ b/core/control-plane/control-plane-core/src/main/java/org/eclipse/dataspaceconnector/core/controlplane/defaults/contractdefinition/InMemoryContractDefinitionStore.java @@ -13,7 +13,7 @@ * */ -package org.eclipse.dataspaceconnector.core.defaults.contractdefinition; +package org.eclipse.dataspaceconnector.core.controlplane.defaults.contractdefinition; import org.eclipse.dataspaceconnector.spi.contract.offer.store.ContractDefinitionStore; import org.eclipse.dataspaceconnector.spi.query.QueryResolver; diff --git a/core/defaults/src/main/java/org/eclipse/dataspaceconnector/core/defaults/negotiationstore/InMemoryContractNegotiationStore.java b/core/control-plane/control-plane-core/src/main/java/org/eclipse/dataspaceconnector/core/controlplane/defaults/negotiationstore/InMemoryContractNegotiationStore.java similarity index 95% rename from core/defaults/src/main/java/org/eclipse/dataspaceconnector/core/defaults/negotiationstore/InMemoryContractNegotiationStore.java rename to core/control-plane/control-plane-core/src/main/java/org/eclipse/dataspaceconnector/core/controlplane/defaults/negotiationstore/InMemoryContractNegotiationStore.java index 668c7b0749d..d3e1451f768 100644 --- a/core/defaults/src/main/java/org/eclipse/dataspaceconnector/core/defaults/negotiationstore/InMemoryContractNegotiationStore.java +++ b/core/control-plane/control-plane-core/src/main/java/org/eclipse/dataspaceconnector/core/controlplane/defaults/negotiationstore/InMemoryContractNegotiationStore.java @@ -13,9 +13,9 @@ * */ -package org.eclipse.dataspaceconnector.core.defaults.negotiationstore; +package org.eclipse.dataspaceconnector.core.controlplane.defaults.negotiationstore; -import org.eclipse.dataspaceconnector.core.defaults.InMemoryStatefulEntityStore; +import org.eclipse.dataspaceconnector.core.controlplane.defaults.InMemoryStatefulEntityStore; import org.eclipse.dataspaceconnector.spi.contract.negotiation.store.ContractNegotiationStore; import org.eclipse.dataspaceconnector.spi.query.QueryResolver; import org.eclipse.dataspaceconnector.spi.query.QuerySpec; diff --git a/core/defaults/src/main/java/org/eclipse/dataspaceconnector/core/defaults/policystore/InMemoryPolicyDefinitionStore.java b/core/control-plane/control-plane-core/src/main/java/org/eclipse/dataspaceconnector/core/controlplane/defaults/policystore/InMemoryPolicyDefinitionStore.java similarity index 97% rename from core/defaults/src/main/java/org/eclipse/dataspaceconnector/core/defaults/policystore/InMemoryPolicyDefinitionStore.java rename to core/control-plane/control-plane-core/src/main/java/org/eclipse/dataspaceconnector/core/controlplane/defaults/policystore/InMemoryPolicyDefinitionStore.java index ca1c70aa2e5..c02c0babe35 100644 --- a/core/defaults/src/main/java/org/eclipse/dataspaceconnector/core/defaults/policystore/InMemoryPolicyDefinitionStore.java +++ b/core/control-plane/control-plane-core/src/main/java/org/eclipse/dataspaceconnector/core/controlplane/defaults/policystore/InMemoryPolicyDefinitionStore.java @@ -12,7 +12,7 @@ * */ -package org.eclipse.dataspaceconnector.core.defaults.policystore; +package org.eclipse.dataspaceconnector.core.controlplane.defaults.policystore; import org.eclipse.dataspaceconnector.common.concurrency.LockManager; import org.eclipse.dataspaceconnector.spi.persistence.EdcPersistenceException; diff --git a/core/defaults/src/main/java/org/eclipse/dataspaceconnector/core/defaults/transferprocessstore/InMemoryTransferProcessStore.java b/core/control-plane/control-plane-core/src/main/java/org/eclipse/dataspaceconnector/core/controlplane/defaults/transferprocessstore/InMemoryTransferProcessStore.java similarity index 92% rename from core/defaults/src/main/java/org/eclipse/dataspaceconnector/core/defaults/transferprocessstore/InMemoryTransferProcessStore.java rename to core/control-plane/control-plane-core/src/main/java/org/eclipse/dataspaceconnector/core/controlplane/defaults/transferprocessstore/InMemoryTransferProcessStore.java index 86edced5790..b2beca6b409 100644 --- a/core/defaults/src/main/java/org/eclipse/dataspaceconnector/core/defaults/transferprocessstore/InMemoryTransferProcessStore.java +++ b/core/control-plane/control-plane-core/src/main/java/org/eclipse/dataspaceconnector/core/controlplane/defaults/transferprocessstore/InMemoryTransferProcessStore.java @@ -12,9 +12,9 @@ * */ -package org.eclipse.dataspaceconnector.core.defaults.transferprocessstore; +package org.eclipse.dataspaceconnector.core.controlplane.defaults.transferprocessstore; -import org.eclipse.dataspaceconnector.core.defaults.InMemoryStatefulEntityStore; +import org.eclipse.dataspaceconnector.core.controlplane.defaults.InMemoryStatefulEntityStore; import org.eclipse.dataspaceconnector.spi.query.QuerySpec; import org.eclipse.dataspaceconnector.spi.transfer.store.TransferProcessStore; import org.eclipse.dataspaceconnector.spi.types.domain.transfer.TransferProcess; diff --git a/extensions/data-plane-selector/selector-store/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension b/core/control-plane/control-plane-core/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension similarity index 51% rename from extensions/data-plane-selector/selector-store/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension rename to core/control-plane/control-plane-core/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension index b382da4fe0f..7eb1e93eb5d 100644 --- a/extensions/data-plane-selector/selector-store/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension +++ b/core/control-plane/control-plane-core/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension @@ -1,5 +1,5 @@ # -# Copyright (c) 2020 - 2022 Microsoft Corporation +# Copyright (c) 2022 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # # This program and the accompanying materials are made available under the # terms of the Apache License, Version 2.0 which is available at @@ -8,8 +8,8 @@ # SPDX-License-Identifier: Apache-2.0 # # Contributors: -# Microsoft Corporation - initial API and implementation +# Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation # # -org.eclipse.dataspaceconnector.dataplane.selector.store.DataPlaneInstanceStoreExtension +org.eclipse.dataspaceconnector.core.controlplane.ControlPlaneCoreExtension diff --git a/core/defaults/src/test/java/org/eclipse/dataspaceconnector/core/defaults/assetindex/AssetPredicateConverterTest.java b/core/control-plane/control-plane-core/src/test/java/org/eclipse/dataspaceconnector/core/controlplane/defaults/assetindex/AssetPredicateConverterTest.java similarity index 97% rename from core/defaults/src/test/java/org/eclipse/dataspaceconnector/core/defaults/assetindex/AssetPredicateConverterTest.java rename to core/control-plane/control-plane-core/src/test/java/org/eclipse/dataspaceconnector/core/controlplane/defaults/assetindex/AssetPredicateConverterTest.java index 55bbdd4e56c..a7ad313026a 100644 --- a/core/defaults/src/test/java/org/eclipse/dataspaceconnector/core/defaults/assetindex/AssetPredicateConverterTest.java +++ b/core/control-plane/control-plane-core/src/test/java/org/eclipse/dataspaceconnector/core/controlplane/defaults/assetindex/AssetPredicateConverterTest.java @@ -12,7 +12,7 @@ * */ -package org.eclipse.dataspaceconnector.core.defaults.assetindex; +package org.eclipse.dataspaceconnector.core.controlplane.defaults.assetindex; import org.eclipse.dataspaceconnector.spi.query.Criterion; import org.eclipse.dataspaceconnector.spi.types.domain.asset.Asset; diff --git a/core/defaults/src/test/java/org/eclipse/dataspaceconnector/core/defaults/assetindex/InMemoryAssetIndexTest.java b/core/control-plane/control-plane-core/src/test/java/org/eclipse/dataspaceconnector/core/controlplane/defaults/assetindex/InMemoryAssetIndexTest.java similarity index 99% rename from core/defaults/src/test/java/org/eclipse/dataspaceconnector/core/defaults/assetindex/InMemoryAssetIndexTest.java rename to core/control-plane/control-plane-core/src/test/java/org/eclipse/dataspaceconnector/core/controlplane/defaults/assetindex/InMemoryAssetIndexTest.java index 2445806b2b3..31457dc1ed1 100644 --- a/core/defaults/src/test/java/org/eclipse/dataspaceconnector/core/defaults/assetindex/InMemoryAssetIndexTest.java +++ b/core/control-plane/control-plane-core/src/test/java/org/eclipse/dataspaceconnector/core/controlplane/defaults/assetindex/InMemoryAssetIndexTest.java @@ -12,7 +12,7 @@ * */ -package org.eclipse.dataspaceconnector.core.defaults.assetindex; +package org.eclipse.dataspaceconnector.core.controlplane.defaults.assetindex; import org.eclipse.dataspaceconnector.spi.asset.AssetSelectorExpression; diff --git a/core/defaults/src/test/java/org/eclipse/dataspaceconnector/core/defaults/assetindex/InMemoryAssetLoaderIndexTest.java b/core/control-plane/control-plane-core/src/test/java/org/eclipse/dataspaceconnector/core/controlplane/defaults/assetindex/InMemoryAssetLoaderIndexTest.java similarity index 98% rename from core/defaults/src/test/java/org/eclipse/dataspaceconnector/core/defaults/assetindex/InMemoryAssetLoaderIndexTest.java rename to core/control-plane/control-plane-core/src/test/java/org/eclipse/dataspaceconnector/core/controlplane/defaults/assetindex/InMemoryAssetLoaderIndexTest.java index e5988dca234..9460aba33f8 100644 --- a/core/defaults/src/test/java/org/eclipse/dataspaceconnector/core/defaults/assetindex/InMemoryAssetLoaderIndexTest.java +++ b/core/control-plane/control-plane-core/src/test/java/org/eclipse/dataspaceconnector/core/controlplane/defaults/assetindex/InMemoryAssetLoaderIndexTest.java @@ -12,7 +12,7 @@ * */ -package org.eclipse.dataspaceconnector.core.defaults.assetindex; +package org.eclipse.dataspaceconnector.core.controlplane.defaults.assetindex; import org.eclipse.dataspaceconnector.dataloading.AssetEntry; import org.eclipse.dataspaceconnector.dataloading.AssetLoader; diff --git a/core/defaults/src/test/java/org/eclipse/dataspaceconnector/core/defaults/assetindex/InMemoryDataAddressResolverTest.java b/core/control-plane/control-plane-core/src/test/java/org/eclipse/dataspaceconnector/core/controlplane/defaults/assetindex/InMemoryDataAddressResolverTest.java similarity index 96% rename from core/defaults/src/test/java/org/eclipse/dataspaceconnector/core/defaults/assetindex/InMemoryDataAddressResolverTest.java rename to core/control-plane/control-plane-core/src/test/java/org/eclipse/dataspaceconnector/core/controlplane/defaults/assetindex/InMemoryDataAddressResolverTest.java index c5e630c7e9b..f2132dea3dc 100644 --- a/core/defaults/src/test/java/org/eclipse/dataspaceconnector/core/defaults/assetindex/InMemoryDataAddressResolverTest.java +++ b/core/control-plane/control-plane-core/src/test/java/org/eclipse/dataspaceconnector/core/controlplane/defaults/assetindex/InMemoryDataAddressResolverTest.java @@ -12,7 +12,7 @@ * */ -package org.eclipse.dataspaceconnector.core.defaults.assetindex; +package org.eclipse.dataspaceconnector.core.controlplane.defaults.assetindex; import org.eclipse.dataspaceconnector.spi.types.domain.DataAddress; import org.eclipse.dataspaceconnector.spi.types.domain.asset.Asset; diff --git a/core/defaults/src/test/java/org/eclipse/dataspaceconnector/core/defaults/contractdefinition/InMemoryContractDefinitionStoreTest.java b/core/control-plane/control-plane-core/src/test/java/org/eclipse/dataspaceconnector/core/controlplane/defaults/contractdefinition/InMemoryContractDefinitionStoreTest.java similarity index 98% rename from core/defaults/src/test/java/org/eclipse/dataspaceconnector/core/defaults/contractdefinition/InMemoryContractDefinitionStoreTest.java rename to core/control-plane/control-plane-core/src/test/java/org/eclipse/dataspaceconnector/core/controlplane/defaults/contractdefinition/InMemoryContractDefinitionStoreTest.java index 1ca78815a5a..68356f7a995 100644 --- a/core/defaults/src/test/java/org/eclipse/dataspaceconnector/core/defaults/contractdefinition/InMemoryContractDefinitionStoreTest.java +++ b/core/control-plane/control-plane-core/src/test/java/org/eclipse/dataspaceconnector/core/controlplane/defaults/contractdefinition/InMemoryContractDefinitionStoreTest.java @@ -12,7 +12,7 @@ * */ -package org.eclipse.dataspaceconnector.core.defaults.contractdefinition; +package org.eclipse.dataspaceconnector.core.controlplane.defaults.contractdefinition; import org.eclipse.dataspaceconnector.spi.query.QuerySpec; import org.eclipse.dataspaceconnector.spi.query.SortOrder; diff --git a/core/defaults/src/test/java/org/eclipse/dataspaceconnector/core/defaults/negotiationstore/InMemoryContractNegotiationStoreTest.java b/core/control-plane/control-plane-core/src/test/java/org/eclipse/dataspaceconnector/core/controlplane/defaults/negotiationstore/InMemoryContractNegotiationStoreTest.java similarity index 96% rename from core/defaults/src/test/java/org/eclipse/dataspaceconnector/core/defaults/negotiationstore/InMemoryContractNegotiationStoreTest.java rename to core/control-plane/control-plane-core/src/test/java/org/eclipse/dataspaceconnector/core/controlplane/defaults/negotiationstore/InMemoryContractNegotiationStoreTest.java index 8af6df4c64a..520c7a2f0eb 100644 --- a/core/defaults/src/test/java/org/eclipse/dataspaceconnector/core/defaults/negotiationstore/InMemoryContractNegotiationStoreTest.java +++ b/core/control-plane/control-plane-core/src/test/java/org/eclipse/dataspaceconnector/core/controlplane/defaults/negotiationstore/InMemoryContractNegotiationStoreTest.java @@ -12,10 +12,10 @@ * */ -package org.eclipse.dataspaceconnector.core.defaults.negotiationstore; +package org.eclipse.dataspaceconnector.core.controlplane.defaults.negotiationstore; -import org.eclipse.dataspaceconnector.contract.common.ContractId; +import org.eclipse.dataspaceconnector.spi.contract.ContractId; import org.eclipse.dataspaceconnector.spi.query.Criterion; import org.eclipse.dataspaceconnector.spi.query.QuerySpec; import org.eclipse.dataspaceconnector.spi.query.SortOrder; @@ -23,7 +23,6 @@ import org.eclipse.dataspaceconnector.spi.types.domain.contract.negotiation.ContractNegotiation; import org.eclipse.dataspaceconnector.spi.types.domain.contract.negotiation.ContractNegotiationStates; import org.jetbrains.annotations.NotNull; -import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -35,9 +34,9 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; -import static org.eclipse.dataspaceconnector.core.defaults.negotiationstore.TestFunctions.createAgreementBuilder; -import static org.eclipse.dataspaceconnector.core.defaults.negotiationstore.TestFunctions.createNegotiation; -import static org.eclipse.dataspaceconnector.core.defaults.negotiationstore.TestFunctions.createNegotiationBuilder; +import static org.eclipse.dataspaceconnector.core.controlplane.defaults.negotiationstore.TestFunctions.createAgreementBuilder; +import static org.eclipse.dataspaceconnector.core.controlplane.defaults.negotiationstore.TestFunctions.createNegotiation; +import static org.eclipse.dataspaceconnector.core.controlplane.defaults.negotiationstore.TestFunctions.createNegotiationBuilder; import static org.eclipse.dataspaceconnector.spi.types.domain.contract.negotiation.ContractNegotiationStates.INITIAL; import static org.eclipse.dataspaceconnector.spi.types.domain.contract.negotiation.ContractNegotiationStates.REQUESTED; import static org.eclipse.dataspaceconnector.spi.types.domain.contract.negotiation.ContractNegotiationStates.REQUESTING; @@ -80,7 +79,7 @@ void verifyCreateUpdateDelete() { assertEquals(REQUESTING.code(), found.getState()); store.delete(id); - Assertions.assertNull(store.find(id)); + assertNull(store.find(id)); assertNull(store.findContractAgreement("agreementId")); } diff --git a/core/defaults/src/test/java/org/eclipse/dataspaceconnector/core/defaults/negotiationstore/TestFunctions.java b/core/control-plane/control-plane-core/src/test/java/org/eclipse/dataspaceconnector/core/controlplane/defaults/negotiationstore/TestFunctions.java similarity index 97% rename from core/defaults/src/test/java/org/eclipse/dataspaceconnector/core/defaults/negotiationstore/TestFunctions.java rename to core/control-plane/control-plane-core/src/test/java/org/eclipse/dataspaceconnector/core/controlplane/defaults/negotiationstore/TestFunctions.java index e3c4aa9dcc9..b5f43ee386b 100644 --- a/core/defaults/src/test/java/org/eclipse/dataspaceconnector/core/defaults/negotiationstore/TestFunctions.java +++ b/core/control-plane/control-plane-core/src/test/java/org/eclipse/dataspaceconnector/core/controlplane/defaults/negotiationstore/TestFunctions.java @@ -13,7 +13,7 @@ * */ -package org.eclipse.dataspaceconnector.core.defaults.negotiationstore; +package org.eclipse.dataspaceconnector.core.controlplane.defaults.negotiationstore; import org.eclipse.dataspaceconnector.policy.model.Action; import org.eclipse.dataspaceconnector.policy.model.AtomicConstraint; diff --git a/core/defaults/src/test/java/org/eclipse/dataspaceconnector/core/defaults/policystore/InMemoryPolicyDefinitionStoreTest.java b/core/control-plane/control-plane-core/src/test/java/org/eclipse/dataspaceconnector/core/controlplane/defaults/policystore/InMemoryPolicyDefinitionStoreTest.java similarity index 98% rename from core/defaults/src/test/java/org/eclipse/dataspaceconnector/core/defaults/policystore/InMemoryPolicyDefinitionStoreTest.java rename to core/control-plane/control-plane-core/src/test/java/org/eclipse/dataspaceconnector/core/controlplane/defaults/policystore/InMemoryPolicyDefinitionStoreTest.java index e6f7431f39a..7285984e27b 100644 --- a/core/defaults/src/test/java/org/eclipse/dataspaceconnector/core/defaults/policystore/InMemoryPolicyDefinitionStoreTest.java +++ b/core/control-plane/control-plane-core/src/test/java/org/eclipse/dataspaceconnector/core/controlplane/defaults/policystore/InMemoryPolicyDefinitionStoreTest.java @@ -12,7 +12,7 @@ * */ -package org.eclipse.dataspaceconnector.core.defaults.policystore; +package org.eclipse.dataspaceconnector.core.controlplane.defaults.policystore; import org.eclipse.dataspaceconnector.common.concurrency.LockManager; import org.eclipse.dataspaceconnector.policy.model.Policy; diff --git a/core/defaults/src/test/java/org/eclipse/dataspaceconnector/core/defaults/transferprocessstore/InMemoryTransferProcessStoreTest.java b/core/control-plane/control-plane-core/src/test/java/org/eclipse/dataspaceconnector/core/controlplane/defaults/transferprocessstore/InMemoryTransferProcessStoreTest.java similarity index 97% rename from core/defaults/src/test/java/org/eclipse/dataspaceconnector/core/defaults/transferprocessstore/InMemoryTransferProcessStoreTest.java rename to core/control-plane/control-plane-core/src/test/java/org/eclipse/dataspaceconnector/core/controlplane/defaults/transferprocessstore/InMemoryTransferProcessStoreTest.java index 13b25d84f1d..8312964d448 100644 --- a/core/defaults/src/test/java/org/eclipse/dataspaceconnector/core/defaults/transferprocessstore/InMemoryTransferProcessStoreTest.java +++ b/core/control-plane/control-plane-core/src/test/java/org/eclipse/dataspaceconnector/core/controlplane/defaults/transferprocessstore/InMemoryTransferProcessStoreTest.java @@ -12,7 +12,7 @@ * */ -package org.eclipse.dataspaceconnector.core.defaults.transferprocessstore; +package org.eclipse.dataspaceconnector.core.controlplane.defaults.transferprocessstore; import org.eclipse.dataspaceconnector.spi.query.QuerySpec; import org.eclipse.dataspaceconnector.spi.query.SortOrder; @@ -21,7 +21,6 @@ import org.eclipse.dataspaceconnector.spi.types.domain.transfer.TransferProcess; import org.eclipse.dataspaceconnector.spi.types.domain.transfer.TransferProcessStates; import org.jetbrains.annotations.NotNull; -import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -33,7 +32,7 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; -import static org.eclipse.dataspaceconnector.core.defaults.transferprocessstore.TestFunctions.createProcess; +import static org.eclipse.dataspaceconnector.core.controlplane.defaults.transferprocessstore.TestFunctions.createProcess; import static org.eclipse.dataspaceconnector.spi.types.domain.transfer.TransferProcessStates.INITIAL; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; @@ -73,7 +72,7 @@ void verifyCreateUpdateDelete() { assertEquals(TransferProcessStates.PROVISIONING.code(), found.getState()); store.delete(id); - Assertions.assertNull(store.find(id)); + assertNull(store.find(id)); assertNull(store.processIdForTransferId("clientid")); } diff --git a/core/defaults/src/test/java/org/eclipse/dataspaceconnector/core/defaults/transferprocessstore/TestFunctions.java b/core/control-plane/control-plane-core/src/test/java/org/eclipse/dataspaceconnector/core/controlplane/defaults/transferprocessstore/TestFunctions.java similarity index 93% rename from core/defaults/src/test/java/org/eclipse/dataspaceconnector/core/defaults/transferprocessstore/TestFunctions.java rename to core/control-plane/control-plane-core/src/test/java/org/eclipse/dataspaceconnector/core/controlplane/defaults/transferprocessstore/TestFunctions.java index 8c4fad69c20..96b53f0361d 100644 --- a/core/defaults/src/test/java/org/eclipse/dataspaceconnector/core/defaults/transferprocessstore/TestFunctions.java +++ b/core/control-plane/control-plane-core/src/test/java/org/eclipse/dataspaceconnector/core/controlplane/defaults/transferprocessstore/TestFunctions.java @@ -12,7 +12,7 @@ * */ -package org.eclipse.dataspaceconnector.core.defaults.transferprocessstore; +package org.eclipse.dataspaceconnector.core.controlplane.defaults.transferprocessstore; import org.eclipse.dataspaceconnector.spi.types.domain.transfer.DataRequest; import org.eclipse.dataspaceconnector.spi.types.domain.transfer.ProvisionedResourceSet; diff --git a/core/transfer/README.md b/core/control-plane/transfer/README.md similarity index 100% rename from core/transfer/README.md rename to core/control-plane/transfer/README.md diff --git a/core/transfer/build.gradle.kts b/core/control-plane/transfer/build.gradle.kts similarity index 93% rename from core/transfer/build.gradle.kts rename to core/control-plane/transfer/build.gradle.kts index c1903311c07..f861dccd892 100644 --- a/core/transfer/build.gradle.kts +++ b/core/control-plane/transfer/build.gradle.kts @@ -27,7 +27,7 @@ dependencies { implementation("io.opentelemetry:opentelemetry-extension-annotations:${openTelemetryVersion}") testImplementation(project(":extensions:junit")) - testImplementation(project(":core:defaults")) //used in the component test + testImplementation(project(":core:control-plane:control-plane-core")) testImplementation(testFixtures(project(":common:util"))) testImplementation("org.awaitility:awaitility:${awaitility}") } diff --git a/core/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/CoreTransferExtension.java b/core/control-plane/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/CoreTransferExtension.java similarity index 100% rename from core/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/CoreTransferExtension.java rename to core/control-plane/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/CoreTransferExtension.java diff --git a/core/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/TransferProcessCommandExtension.java b/core/control-plane/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/TransferProcessCommandExtension.java similarity index 100% rename from core/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/TransferProcessCommandExtension.java rename to core/control-plane/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/TransferProcessCommandExtension.java diff --git a/core/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/command/handlers/AddProvisionedResourceCommandHandler.java b/core/control-plane/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/command/handlers/AddProvisionedResourceCommandHandler.java similarity index 100% rename from core/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/command/handlers/AddProvisionedResourceCommandHandler.java rename to core/control-plane/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/command/handlers/AddProvisionedResourceCommandHandler.java diff --git a/core/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/command/handlers/CancelTransferCommandHandler.java b/core/control-plane/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/command/handlers/CancelTransferCommandHandler.java similarity index 100% rename from core/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/command/handlers/CancelTransferCommandHandler.java rename to core/control-plane/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/command/handlers/CancelTransferCommandHandler.java diff --git a/core/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/command/handlers/DeprovisionCompleteCommandHandler.java b/core/control-plane/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/command/handlers/DeprovisionCompleteCommandHandler.java similarity index 93% rename from core/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/command/handlers/DeprovisionCompleteCommandHandler.java rename to core/control-plane/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/command/handlers/DeprovisionCompleteCommandHandler.java index 8d10b627f4c..d6d77bbfd8a 100644 --- a/core/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/command/handlers/DeprovisionCompleteCommandHandler.java +++ b/core/control-plane/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/command/handlers/DeprovisionCompleteCommandHandler.java @@ -16,6 +16,7 @@ import org.eclipse.dataspaceconnector.spi.command.CommandHandler; import org.eclipse.dataspaceconnector.spi.response.StatusResult; +import org.eclipse.dataspaceconnector.spi.types.domain.transfer.command.DeprovisionCompleteCommand; import org.eclipse.dataspaceconnector.transfer.core.transfer.ProvisionCallbackDelegate; import java.util.List; diff --git a/core/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/command/handlers/DeprovisionRequestHandler.java b/core/control-plane/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/command/handlers/DeprovisionRequestHandler.java similarity index 100% rename from core/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/command/handlers/DeprovisionRequestHandler.java rename to core/control-plane/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/command/handlers/DeprovisionRequestHandler.java diff --git a/core/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/command/handlers/SingleTransferProcessCommandHandler.java b/core/control-plane/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/command/handlers/SingleTransferProcessCommandHandler.java similarity index 100% rename from core/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/command/handlers/SingleTransferProcessCommandHandler.java rename to core/control-plane/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/command/handlers/SingleTransferProcessCommandHandler.java diff --git a/core/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/edr/EndpointDataReferenceReceiverRegistryImpl.java b/core/control-plane/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/edr/EndpointDataReferenceReceiverRegistryImpl.java similarity index 100% rename from core/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/edr/EndpointDataReferenceReceiverRegistryImpl.java rename to core/control-plane/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/edr/EndpointDataReferenceReceiverRegistryImpl.java diff --git a/core/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/edr/EndpointDataReferenceTransformerRegistryImpl.java b/core/control-plane/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/edr/EndpointDataReferenceTransformerRegistryImpl.java similarity index 100% rename from core/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/edr/EndpointDataReferenceTransformerRegistryImpl.java rename to core/control-plane/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/edr/EndpointDataReferenceTransformerRegistryImpl.java diff --git a/core/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/flow/DataFlowManagerImpl.java b/core/control-plane/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/flow/DataFlowManagerImpl.java similarity index 100% rename from core/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/flow/DataFlowManagerImpl.java rename to core/control-plane/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/flow/DataFlowManagerImpl.java diff --git a/core/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/listener/TransferProcessEventListener.java b/core/control-plane/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/listener/TransferProcessEventListener.java similarity index 100% rename from core/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/listener/TransferProcessEventListener.java rename to core/control-plane/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/listener/TransferProcessEventListener.java diff --git a/core/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/observe/TransferProcessObservableImpl.java b/core/control-plane/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/observe/TransferProcessObservableImpl.java similarity index 100% rename from core/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/observe/TransferProcessObservableImpl.java rename to core/control-plane/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/observe/TransferProcessObservableImpl.java diff --git a/core/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/provision/ProvisionManagerImpl.java b/core/control-plane/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/provision/ProvisionManagerImpl.java similarity index 100% rename from core/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/provision/ProvisionManagerImpl.java rename to core/control-plane/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/provision/ProvisionManagerImpl.java diff --git a/core/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/provision/ResourceManifestGeneratorImpl.java b/core/control-plane/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/provision/ResourceManifestGeneratorImpl.java similarity index 100% rename from core/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/provision/ResourceManifestGeneratorImpl.java rename to core/control-plane/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/provision/ResourceManifestGeneratorImpl.java diff --git a/core/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/transfer/ProvisionCallbackDelegate.java b/core/control-plane/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/transfer/ProvisionCallbackDelegate.java similarity index 100% rename from core/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/transfer/ProvisionCallbackDelegate.java rename to core/control-plane/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/transfer/ProvisionCallbackDelegate.java diff --git a/core/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/transfer/StatusCheckerRegistryImpl.java b/core/control-plane/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/transfer/StatusCheckerRegistryImpl.java similarity index 100% rename from core/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/transfer/StatusCheckerRegistryImpl.java rename to core/control-plane/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/transfer/StatusCheckerRegistryImpl.java diff --git a/core/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/transfer/TransferProcessManagerImpl.java b/core/control-plane/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/transfer/TransferProcessManagerImpl.java similarity index 100% rename from core/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/transfer/TransferProcessManagerImpl.java rename to core/control-plane/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/transfer/TransferProcessManagerImpl.java diff --git a/core/transfer/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension b/core/control-plane/transfer/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension similarity index 100% rename from core/transfer/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension rename to core/control-plane/transfer/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension diff --git a/core/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/TestProvisionedDataDestinationResource.java b/core/control-plane/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/TestProvisionedDataDestinationResource.java similarity index 100% rename from core/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/TestProvisionedDataDestinationResource.java rename to core/control-plane/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/TestProvisionedDataDestinationResource.java diff --git a/core/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/TestResourceDefinition.java b/core/control-plane/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/TestResourceDefinition.java similarity index 100% rename from core/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/TestResourceDefinition.java rename to core/control-plane/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/TestResourceDefinition.java diff --git a/core/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/command/handlers/CancelTransferCommandHandlerTest.java b/core/control-plane/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/command/handlers/CancelTransferCommandHandlerTest.java similarity index 100% rename from core/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/command/handlers/CancelTransferCommandHandlerTest.java rename to core/control-plane/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/command/handlers/CancelTransferCommandHandlerTest.java diff --git a/core/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/command/handlers/DeprovisionCommandHandlerTest.java b/core/control-plane/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/command/handlers/DeprovisionCommandHandlerTest.java similarity index 100% rename from core/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/command/handlers/DeprovisionCommandHandlerTest.java rename to core/control-plane/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/command/handlers/DeprovisionCommandHandlerTest.java diff --git a/core/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/edr/EndpointDataReferenceFixtures.java b/core/control-plane/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/edr/EndpointDataReferenceFixtures.java similarity index 100% rename from core/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/edr/EndpointDataReferenceFixtures.java rename to core/control-plane/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/edr/EndpointDataReferenceFixtures.java diff --git a/core/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/edr/EndpointDataReferenceReceiverRegistryImplTest.java b/core/control-plane/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/edr/EndpointDataReferenceReceiverRegistryImplTest.java similarity index 100% rename from core/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/edr/EndpointDataReferenceReceiverRegistryImplTest.java rename to core/control-plane/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/edr/EndpointDataReferenceReceiverRegistryImplTest.java diff --git a/core/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/edr/EndpointDataReferenceTransformerRegistryImplTest.java b/core/control-plane/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/edr/EndpointDataReferenceTransformerRegistryImplTest.java similarity index 100% rename from core/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/edr/EndpointDataReferenceTransformerRegistryImplTest.java rename to core/control-plane/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/edr/EndpointDataReferenceTransformerRegistryImplTest.java diff --git a/core/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/flow/DataFlowManagerImplTest.java b/core/control-plane/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/flow/DataFlowManagerImplTest.java similarity index 100% rename from core/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/flow/DataFlowManagerImplTest.java rename to core/control-plane/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/flow/DataFlowManagerImplTest.java diff --git a/core/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/provision/ProvisionManagerImplTest.java b/core/control-plane/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/provision/ProvisionManagerImplTest.java similarity index 100% rename from core/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/provision/ProvisionManagerImplTest.java rename to core/control-plane/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/provision/ProvisionManagerImplTest.java diff --git a/core/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/provision/ResourceManifestGeneratorImplTest.java b/core/control-plane/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/provision/ResourceManifestGeneratorImplTest.java similarity index 100% rename from core/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/provision/ResourceManifestGeneratorImplTest.java rename to core/control-plane/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/provision/ResourceManifestGeneratorImplTest.java diff --git a/core/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/transfer/TransferProcessManagerImplIntegrationTest.java b/core/control-plane/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/transfer/TransferProcessManagerImplIntegrationTest.java similarity index 98% rename from core/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/transfer/TransferProcessManagerImplIntegrationTest.java rename to core/control-plane/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/transfer/TransferProcessManagerImplIntegrationTest.java index c597edd81a5..bc80f73cf8a 100644 --- a/core/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/transfer/TransferProcessManagerImplIntegrationTest.java +++ b/core/control-plane/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/transfer/TransferProcessManagerImplIntegrationTest.java @@ -17,7 +17,7 @@ package org.eclipse.dataspaceconnector.transfer.core.transfer; import org.eclipse.dataspaceconnector.common.util.junit.annotations.ComponentTest; -import org.eclipse.dataspaceconnector.core.defaults.transferprocessstore.InMemoryTransferProcessStore; +import org.eclipse.dataspaceconnector.core.controlplane.defaults.transferprocessstore.InMemoryTransferProcessStore; import org.eclipse.dataspaceconnector.policy.model.Policy; import org.eclipse.dataspaceconnector.spi.asset.DataAddressResolver; import org.eclipse.dataspaceconnector.spi.command.CommandQueue; diff --git a/core/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/transfer/TransferProcessManagerImplTest.java b/core/control-plane/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/transfer/TransferProcessManagerImplTest.java similarity index 100% rename from core/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/transfer/TransferProcessManagerImplTest.java rename to core/control-plane/transfer/src/test/java/org/eclipse/dataspaceconnector/transfer/core/transfer/TransferProcessManagerImplTest.java diff --git a/extensions/data-plane-selector/selector-core/build.gradle.kts b/core/data-plane-selector/data-plane-selector-core/build.gradle.kts similarity index 83% rename from extensions/data-plane-selector/selector-core/build.gradle.kts rename to core/data-plane-selector/data-plane-selector-core/build.gradle.kts index a5b15adc9a3..3bb810cd36e 100644 --- a/extensions/data-plane-selector/selector-core/build.gradle.kts +++ b/core/data-plane-selector/data-plane-selector-core/build.gradle.kts @@ -19,7 +19,9 @@ plugins { } dependencies { - api(project(":spi:data-plane-selector:selector-spi")) + api(project(":spi:data-plane-selector:data-plane-selector-spi")) + api(project(":core:common:base")) + api(project(":core:common:boot")) implementation(project(":common:util")) } diff --git a/extensions/data-plane-selector/selector-core/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/DataPlaneSelectorServiceImpl.java b/core/data-plane-selector/data-plane-selector-core/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/DataPlaneSelectorServiceImpl.java similarity index 100% rename from extensions/data-plane-selector/selector-core/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/DataPlaneSelectorServiceImpl.java rename to core/data-plane-selector/data-plane-selector-core/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/DataPlaneSelectorServiceImpl.java diff --git a/extensions/data-plane-selector/selector-core/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/core/DataPlaneSelectorExtension.java b/core/data-plane-selector/data-plane-selector-core/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/core/DataPlaneSelectorExtension.java similarity index 87% rename from extensions/data-plane-selector/selector-core/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/core/DataPlaneSelectorExtension.java rename to core/data-plane-selector/data-plane-selector-core/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/core/DataPlaneSelectorExtension.java index 2b822504180..61801e510b6 100644 --- a/extensions/data-plane-selector/selector-core/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/core/DataPlaneSelectorExtension.java +++ b/core/data-plane-selector/data-plane-selector-core/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/core/DataPlaneSelectorExtension.java @@ -18,10 +18,12 @@ import org.eclipse.dataspaceconnector.dataplane.selector.DataPlaneSelectorService; import org.eclipse.dataspaceconnector.dataplane.selector.DataPlaneSelectorServiceImpl; import org.eclipse.dataspaceconnector.dataplane.selector.store.DataPlaneInstanceStore; +import org.eclipse.dataspaceconnector.dataplane.selector.store.DefaultDataPlaneInstanceStore; import org.eclipse.dataspaceconnector.dataplane.selector.strategy.DefaultSelectionStrategyRegistry; import org.eclipse.dataspaceconnector.dataplane.selector.strategy.RandomSelectionStrategy; import org.eclipse.dataspaceconnector.dataplane.selector.strategy.SelectionStrategyRegistry; import org.eclipse.dataspaceconnector.spi.system.Inject; +import org.eclipse.dataspaceconnector.spi.system.Provider; import org.eclipse.dataspaceconnector.spi.system.Provides; import org.eclipse.dataspaceconnector.spi.system.ServiceExtension; import org.eclipse.dataspaceconnector.spi.system.ServiceExtensionContext; @@ -43,4 +45,9 @@ public void initialize(ServiceExtensionContext context) { context.registerService(SelectionStrategyRegistry.class, strategy); context.registerService(DataPlaneSelectorService.class, new DataPlaneSelectorServiceImpl(selector, instanceStore, strategy)); } + + @Provider(isDefault = true) + public DataPlaneInstanceStore instanceStore() { + return new DefaultDataPlaneInstanceStore(); + } } diff --git a/extensions/data-plane-selector/selector-core/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/core/DataPlaneSelectorImpl.java b/core/data-plane-selector/data-plane-selector-core/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/core/DataPlaneSelectorImpl.java similarity index 100% rename from extensions/data-plane-selector/selector-core/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/core/DataPlaneSelectorImpl.java rename to core/data-plane-selector/data-plane-selector-core/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/core/DataPlaneSelectorImpl.java diff --git a/extensions/data-plane-selector/selector-store/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/store/DefaultDataPlaneInstanceStore.java b/core/data-plane-selector/data-plane-selector-core/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/store/DefaultDataPlaneInstanceStore.java similarity index 100% rename from extensions/data-plane-selector/selector-store/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/store/DefaultDataPlaneInstanceStore.java rename to core/data-plane-selector/data-plane-selector-core/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/store/DefaultDataPlaneInstanceStore.java diff --git a/extensions/data-plane-selector/selector-core/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension b/core/data-plane-selector/data-plane-selector-core/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension similarity index 100% rename from extensions/data-plane-selector/selector-core/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension rename to core/data-plane-selector/data-plane-selector-core/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension diff --git a/extensions/data-plane-selector/selector-store/src/test/java/org/eclipse/dataspaceconnector/dataplane/selector/TestFunctions.java b/core/data-plane-selector/data-plane-selector-core/src/test/java/org/eclipse/dataspaceconnector/dataplane/selector/TestFunctions.java similarity index 73% rename from extensions/data-plane-selector/selector-store/src/test/java/org/eclipse/dataspaceconnector/dataplane/selector/TestFunctions.java rename to core/data-plane-selector/data-plane-selector-core/src/test/java/org/eclipse/dataspaceconnector/dataplane/selector/TestFunctions.java index c21cdf40ac5..a32f037d5b8 100644 --- a/extensions/data-plane-selector/selector-store/src/test/java/org/eclipse/dataspaceconnector/dataplane/selector/TestFunctions.java +++ b/core/data-plane-selector/data-plane-selector-core/src/test/java/org/eclipse/dataspaceconnector/dataplane/selector/TestFunctions.java @@ -16,9 +16,18 @@ import org.eclipse.dataspaceconnector.dataplane.selector.instance.DataPlaneInstance; import org.eclipse.dataspaceconnector.dataplane.selector.instance.DataPlaneInstanceImpl; +import org.eclipse.dataspaceconnector.spi.types.domain.DataAddress; public class TestFunctions { + public static DataAddress createAddress(String type) { + return DataAddress.Builder.newInstance() + .type("test-type") + .keyName(type) + .property("someprop", "someval") + .build(); + } + public static DataPlaneInstance createInstance(String id) { return DataPlaneInstanceImpl.Builder.newInstance() .id(id) diff --git a/extensions/data-plane-selector/selector-core/src/test/java/org/eclipse/dataspaceconnector/dataplane/selector/core/DataPlaneSelectorImplTest.java b/core/data-plane-selector/data-plane-selector-core/src/test/java/org/eclipse/dataspaceconnector/dataplane/selector/core/DataPlaneSelectorImplTest.java similarity index 100% rename from extensions/data-plane-selector/selector-core/src/test/java/org/eclipse/dataspaceconnector/dataplane/selector/core/DataPlaneSelectorImplTest.java rename to core/data-plane-selector/data-plane-selector-core/src/test/java/org/eclipse/dataspaceconnector/dataplane/selector/core/DataPlaneSelectorImplTest.java diff --git a/extensions/data-plane-selector/selector-store/src/test/java/org/eclipse/dataspaceconnector/dataplane/selector/store/DefaultDataPlaneInstanceStoreTest.java b/core/data-plane-selector/data-plane-selector-core/src/test/java/org/eclipse/dataspaceconnector/dataplane/selector/store/DefaultDataPlaneInstanceStoreTest.java similarity index 86% rename from extensions/data-plane-selector/selector-store/src/test/java/org/eclipse/dataspaceconnector/dataplane/selector/store/DefaultDataPlaneInstanceStoreTest.java rename to core/data-plane-selector/data-plane-selector-core/src/test/java/org/eclipse/dataspaceconnector/dataplane/selector/store/DefaultDataPlaneInstanceStoreTest.java index a5ad9db1bfa..c13ff528078 100644 --- a/extensions/data-plane-selector/selector-store/src/test/java/org/eclipse/dataspaceconnector/dataplane/selector/store/DefaultDataPlaneInstanceStoreTest.java +++ b/core/data-plane-selector/data-plane-selector-core/src/test/java/org/eclipse/dataspaceconnector/dataplane/selector/store/DefaultDataPlaneInstanceStoreTest.java @@ -14,6 +14,7 @@ package org.eclipse.dataspaceconnector.dataplane.selector.store; +import org.eclipse.dataspaceconnector.dataplane.selector.TestFunctions; import org.eclipse.dataspaceconnector.dataplane.selector.instance.DataPlaneInstance; import org.eclipse.dataspaceconnector.dataplane.selector.instance.DataPlaneInstanceImpl; import org.junit.jupiter.api.BeforeEach; @@ -23,7 +24,6 @@ import java.util.stream.IntStream; import static org.assertj.core.api.Assertions.assertThat; -import static org.eclipse.dataspaceconnector.dataplane.selector.TestFunctions.createInstance; class DefaultDataPlaneInstanceStoreTest { @@ -36,14 +36,14 @@ void setup() { @Test void save() { - var inst = createInstance("test-id"); + var inst = TestFunctions.createInstance("test-id"); store.save(inst); assertThat(store.getAll()).containsExactly(inst); } @Test void save_whenExists_shouldUpsert() { - var inst = createInstance("test-id"); + var inst = TestFunctions.createInstance("test-id"); store.save(inst); var inst2 = DataPlaneInstanceImpl.Builder.newInstance() @@ -58,14 +58,14 @@ void save_whenExists_shouldUpsert() { @Test void saveAll() { - var allInstances = IntStream.range(0, 10).mapToObj(i -> createInstance("test-id" + i)).collect(Collectors.toList()); + var allInstances = IntStream.range(0, 10).mapToObj(i -> TestFunctions.createInstance("test-id" + i)).collect(Collectors.toList()); store.saveAll(allInstances); assertThat(store.getAll()).containsExactlyInAnyOrder(allInstances.toArray(new DataPlaneInstance[]{})); } @Test void findById() { - var inst = createInstance("test-id"); + var inst = TestFunctions.createInstance("test-id"); store.save(inst); assertThat(store.findById("test-id")).isEqualTo(inst); diff --git a/core/data-plane/data-plane-core/build.gradle.kts b/core/data-plane/data-plane-core/build.gradle.kts new file mode 100644 index 00000000000..d4d55849462 --- /dev/null +++ b/core/data-plane/data-plane-core/build.gradle.kts @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2022 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) + * + * 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: + * Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation + * + */ + +plugins { + `java-library` +} + + +dependencies { + api(project(":spi:common:web-spi")) + api(project(":core:common:base")) + api(project(":core:common:boot")) + api(project(":extensions:http")) + api(project(":core:data-plane:data-plane-framework")) +} + +publishing { + publications { + create("data-plane-core") { + artifactId = "data-plane-core" + from(components["java"]) + } + } +} diff --git a/extensions/data-plane/data-plane-framework/README.md b/core/data-plane/data-plane-framework/README.md similarity index 100% rename from extensions/data-plane/data-plane-framework/README.md rename to core/data-plane/data-plane-framework/README.md diff --git a/extensions/data-plane/data-plane-framework/build.gradle.kts b/core/data-plane/data-plane-framework/build.gradle.kts similarity index 100% rename from extensions/data-plane/data-plane-framework/build.gradle.kts rename to core/data-plane/data-plane-framework/build.gradle.kts diff --git a/extensions/data-plane/data-plane-framework/src/main/java/org/eclipse/dataspaceconnector/dataplane/framework/DataPlaneFrameworkExtension.java b/core/data-plane/data-plane-framework/src/main/java/org/eclipse/dataspaceconnector/dataplane/framework/DataPlaneFrameworkExtension.java similarity index 100% rename from extensions/data-plane/data-plane-framework/src/main/java/org/eclipse/dataspaceconnector/dataplane/framework/DataPlaneFrameworkExtension.java rename to core/data-plane/data-plane-framework/src/main/java/org/eclipse/dataspaceconnector/dataplane/framework/DataPlaneFrameworkExtension.java diff --git a/extensions/data-plane/data-plane-framework/src/main/java/org/eclipse/dataspaceconnector/dataplane/framework/manager/DataPlaneManagerImpl.java b/core/data-plane/data-plane-framework/src/main/java/org/eclipse/dataspaceconnector/dataplane/framework/manager/DataPlaneManagerImpl.java similarity index 100% rename from extensions/data-plane/data-plane-framework/src/main/java/org/eclipse/dataspaceconnector/dataplane/framework/manager/DataPlaneManagerImpl.java rename to core/data-plane/data-plane-framework/src/main/java/org/eclipse/dataspaceconnector/dataplane/framework/manager/DataPlaneManagerImpl.java diff --git a/extensions/data-plane/data-plane-framework/src/main/java/org/eclipse/dataspaceconnector/dataplane/framework/pipeline/PipelineServiceImpl.java b/core/data-plane/data-plane-framework/src/main/java/org/eclipse/dataspaceconnector/dataplane/framework/pipeline/PipelineServiceImpl.java similarity index 100% rename from extensions/data-plane/data-plane-framework/src/main/java/org/eclipse/dataspaceconnector/dataplane/framework/pipeline/PipelineServiceImpl.java rename to core/data-plane/data-plane-framework/src/main/java/org/eclipse/dataspaceconnector/dataplane/framework/pipeline/PipelineServiceImpl.java diff --git a/extensions/data-plane/data-plane-framework/src/main/java/org/eclipse/dataspaceconnector/dataplane/framework/pipeline/PipelineServiceTransferServiceImpl.java b/core/data-plane/data-plane-framework/src/main/java/org/eclipse/dataspaceconnector/dataplane/framework/pipeline/PipelineServiceTransferServiceImpl.java similarity index 100% rename from extensions/data-plane/data-plane-framework/src/main/java/org/eclipse/dataspaceconnector/dataplane/framework/pipeline/PipelineServiceTransferServiceImpl.java rename to core/data-plane/data-plane-framework/src/main/java/org/eclipse/dataspaceconnector/dataplane/framework/pipeline/PipelineServiceTransferServiceImpl.java diff --git a/extensions/data-plane/data-plane-framework/src/main/java/org/eclipse/dataspaceconnector/dataplane/framework/registry/TransferServiceRegistryImpl.java b/core/data-plane/data-plane-framework/src/main/java/org/eclipse/dataspaceconnector/dataplane/framework/registry/TransferServiceRegistryImpl.java similarity index 100% rename from extensions/data-plane/data-plane-framework/src/main/java/org/eclipse/dataspaceconnector/dataplane/framework/registry/TransferServiceRegistryImpl.java rename to core/data-plane/data-plane-framework/src/main/java/org/eclipse/dataspaceconnector/dataplane/framework/registry/TransferServiceRegistryImpl.java diff --git a/extensions/data-plane/data-plane-framework/src/main/java/org/eclipse/dataspaceconnector/dataplane/framework/registry/TransferServiceSelectionStrategy.java b/core/data-plane/data-plane-framework/src/main/java/org/eclipse/dataspaceconnector/dataplane/framework/registry/TransferServiceSelectionStrategy.java similarity index 100% rename from extensions/data-plane/data-plane-framework/src/main/java/org/eclipse/dataspaceconnector/dataplane/framework/registry/TransferServiceSelectionStrategy.java rename to core/data-plane/data-plane-framework/src/main/java/org/eclipse/dataspaceconnector/dataplane/framework/registry/TransferServiceSelectionStrategy.java diff --git a/extensions/data-plane/data-plane-framework/src/main/java/org/eclipse/dataspaceconnector/dataplane/framework/store/InMemoryDataPlaneStore.java b/core/data-plane/data-plane-framework/src/main/java/org/eclipse/dataspaceconnector/dataplane/framework/store/InMemoryDataPlaneStore.java similarity index 100% rename from extensions/data-plane/data-plane-framework/src/main/java/org/eclipse/dataspaceconnector/dataplane/framework/store/InMemoryDataPlaneStore.java rename to core/data-plane/data-plane-framework/src/main/java/org/eclipse/dataspaceconnector/dataplane/framework/store/InMemoryDataPlaneStore.java diff --git a/extensions/data-plane/data-plane-framework/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension b/core/data-plane/data-plane-framework/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension similarity index 100% rename from extensions/data-plane/data-plane-framework/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension rename to core/data-plane/data-plane-framework/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension diff --git a/extensions/data-plane/data-plane-framework/src/test/java/org/eclipse/dataspaceconnector/dataplane/framework/DataPlaneFrameworkExtensionTest.java b/core/data-plane/data-plane-framework/src/test/java/org/eclipse/dataspaceconnector/dataplane/framework/DataPlaneFrameworkExtensionTest.java similarity index 100% rename from extensions/data-plane/data-plane-framework/src/test/java/org/eclipse/dataspaceconnector/dataplane/framework/DataPlaneFrameworkExtensionTest.java rename to core/data-plane/data-plane-framework/src/test/java/org/eclipse/dataspaceconnector/dataplane/framework/DataPlaneFrameworkExtensionTest.java diff --git a/extensions/data-plane/data-plane-framework/src/test/java/org/eclipse/dataspaceconnector/dataplane/framework/e2e/EndToEndTest.java b/core/data-plane/data-plane-framework/src/test/java/org/eclipse/dataspaceconnector/dataplane/framework/e2e/EndToEndTest.java similarity index 100% rename from extensions/data-plane/data-plane-framework/src/test/java/org/eclipse/dataspaceconnector/dataplane/framework/e2e/EndToEndTest.java rename to core/data-plane/data-plane-framework/src/test/java/org/eclipse/dataspaceconnector/dataplane/framework/e2e/EndToEndTest.java diff --git a/extensions/data-plane/data-plane-framework/src/test/java/org/eclipse/dataspaceconnector/dataplane/framework/manager/DataPlaneManagerImplTest.java b/core/data-plane/data-plane-framework/src/test/java/org/eclipse/dataspaceconnector/dataplane/framework/manager/DataPlaneManagerImplTest.java similarity index 100% rename from extensions/data-plane/data-plane-framework/src/test/java/org/eclipse/dataspaceconnector/dataplane/framework/manager/DataPlaneManagerImplTest.java rename to core/data-plane/data-plane-framework/src/test/java/org/eclipse/dataspaceconnector/dataplane/framework/manager/DataPlaneManagerImplTest.java diff --git a/extensions/data-plane/data-plane-framework/src/test/java/org/eclipse/dataspaceconnector/dataplane/framework/pipeline/PipelineServiceImplTest.java b/core/data-plane/data-plane-framework/src/test/java/org/eclipse/dataspaceconnector/dataplane/framework/pipeline/PipelineServiceImplTest.java similarity index 100% rename from extensions/data-plane/data-plane-framework/src/test/java/org/eclipse/dataspaceconnector/dataplane/framework/pipeline/PipelineServiceImplTest.java rename to core/data-plane/data-plane-framework/src/test/java/org/eclipse/dataspaceconnector/dataplane/framework/pipeline/PipelineServiceImplTest.java diff --git a/extensions/data-plane/data-plane-framework/src/test/java/org/eclipse/dataspaceconnector/dataplane/framework/registry/TransferServiceRegistryImplTest.java b/core/data-plane/data-plane-framework/src/test/java/org/eclipse/dataspaceconnector/dataplane/framework/registry/TransferServiceRegistryImplTest.java similarity index 100% rename from extensions/data-plane/data-plane-framework/src/test/java/org/eclipse/dataspaceconnector/dataplane/framework/registry/TransferServiceRegistryImplTest.java rename to core/data-plane/data-plane-framework/src/test/java/org/eclipse/dataspaceconnector/dataplane/framework/registry/TransferServiceRegistryImplTest.java diff --git a/extensions/data-plane/data-plane-framework/src/test/java/org/eclipse/dataspaceconnector/dataplane/framework/registry/TransferServiceSelectionStrategyTest.java b/core/data-plane/data-plane-framework/src/test/java/org/eclipse/dataspaceconnector/dataplane/framework/registry/TransferServiceSelectionStrategyTest.java similarity index 100% rename from extensions/data-plane/data-plane-framework/src/test/java/org/eclipse/dataspaceconnector/dataplane/framework/registry/TransferServiceSelectionStrategyTest.java rename to core/data-plane/data-plane-framework/src/test/java/org/eclipse/dataspaceconnector/dataplane/framework/registry/TransferServiceSelectionStrategyTest.java diff --git a/extensions/data-plane/data-plane-framework/src/test/java/org/eclipse/dataspaceconnector/dataplane/framework/store/InMemoryDataPlaneStoreTest.java b/core/data-plane/data-plane-framework/src/test/java/org/eclipse/dataspaceconnector/dataplane/framework/store/InMemoryDataPlaneStoreTest.java similarity index 100% rename from extensions/data-plane/data-plane-framework/src/test/java/org/eclipse/dataspaceconnector/dataplane/framework/store/InMemoryDataPlaneStoreTest.java rename to core/data-plane/data-plane-framework/src/test/java/org/eclipse/dataspaceconnector/dataplane/framework/store/InMemoryDataPlaneStoreTest.java diff --git a/core/defaults/README.md b/core/defaults/README.md deleted file mode 100644 index f54af35160b..00000000000 --- a/core/defaults/README.md +++ /dev/null @@ -1,3 +0,0 @@ -## About this module -This module is intended to provide default implementations for various stores, registries etc. that are based on memory. -All those default implementations are only registered if no other implementation was found on the classpath. \ No newline at end of file diff --git a/core/defaults/build.gradle.kts b/core/defaults/build.gradle.kts deleted file mode 100644 index 57569ccdf9c..00000000000 --- a/core/defaults/build.gradle.kts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2021 - 2022 Fraunhofer Institute for Software and Systems Engineering - * - * 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: - * Fraunhofer Institute for Software and Systems Engineering - initial API and implementation - * Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation - * - */ - -plugins { - `java-library` - `maven-publish` -} - -val awaitility: String by project -val failsafeVersion: String by project -val jupiterVersion: String by project -val okHttpVersion: String by project - -dependencies { - api(project(":spi:common:core-spi")) - implementation(project(":common:util")) - implementation(project(":extensions:dataloading")) - - testImplementation(project(":extensions:junit")) - testImplementation("org.awaitility:awaitility:${awaitility}") - testImplementation("org.junit.jupiter:junit-jupiter-api:${jupiterVersion}") - testImplementation(project(":core:contract")) // for ContractId -} - -publishing { - publications { - create("core-defaults") { - artifactId = "core-defaults" - from(components["java"]) - } - } -} diff --git a/extensions/catalog/docs/Catalog Architecture.pdf b/core/federated-catalog/docs/Catalog Architecture.pdf similarity index 100% rename from extensions/catalog/docs/Catalog Architecture.pdf rename to core/federated-catalog/docs/Catalog Architecture.pdf diff --git a/extensions/catalog/docs/FCC-Modules.draw.io.drawio.png b/core/federated-catalog/docs/FCC-Modules.draw.io.drawio.png similarity index 100% rename from extensions/catalog/docs/FCC-Modules.draw.io.drawio.png rename to core/federated-catalog/docs/FCC-Modules.draw.io.drawio.png diff --git a/extensions/catalog/docs/FCC_Sequence.drawio.png b/core/federated-catalog/docs/FCC_Sequence.drawio.png similarity index 100% rename from extensions/catalog/docs/FCC_Sequence.drawio.png rename to core/federated-catalog/docs/FCC_Sequence.drawio.png diff --git a/extensions/catalog/README.md b/core/federated-catalog/docs/README.md similarity index 100% rename from extensions/catalog/README.md rename to core/federated-catalog/docs/README.md diff --git a/extensions/catalog/docs/federated_catalog.md b/core/federated-catalog/docs/federated_catalog.md similarity index 100% rename from extensions/catalog/docs/federated_catalog.md rename to core/federated-catalog/docs/federated_catalog.md diff --git a/extensions/catalog/federated-catalog-cache/README.md b/core/federated-catalog/federated-catalog-cache/README.md similarity index 100% rename from extensions/catalog/federated-catalog-cache/README.md rename to core/federated-catalog/federated-catalog-cache/README.md diff --git a/extensions/catalog/federated-catalog-cache/build.gradle.kts b/core/federated-catalog/federated-catalog-cache/build.gradle.kts similarity index 96% rename from extensions/catalog/federated-catalog-cache/build.gradle.kts rename to core/federated-catalog/federated-catalog-cache/build.gradle.kts index 490a15ec74f..c9a7ebbf312 100644 --- a/extensions/catalog/federated-catalog-cache/build.gradle.kts +++ b/core/federated-catalog/federated-catalog-cache/build.gradle.kts @@ -29,7 +29,7 @@ dependencies { api(project(":spi:federated-catalog:federated-catalog-spi")) implementation(project(":common:util")) - implementation(project(":core:base")) + implementation(project(":core:common:base")) implementation("com.squareup.okhttp3:okhttp:${okHttpVersion}") diff --git a/extensions/catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/ExecutionManager.java b/core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/ExecutionManager.java similarity index 100% rename from extensions/catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/ExecutionManager.java rename to core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/ExecutionManager.java diff --git a/extensions/catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/FederatedCatalogCacheExtension.java b/core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/FederatedCatalogCacheExtension.java similarity index 100% rename from extensions/catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/FederatedCatalogCacheExtension.java rename to core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/FederatedCatalogCacheExtension.java diff --git a/extensions/catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/controller/FederatedCatalogApiController.java b/core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/controller/FederatedCatalogApiController.java similarity index 100% rename from extensions/catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/controller/FederatedCatalogApiController.java rename to core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/controller/FederatedCatalogApiController.java diff --git a/extensions/catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/crawler/CatalogCrawler.java b/core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/crawler/CatalogCrawler.java similarity index 100% rename from extensions/catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/crawler/CatalogCrawler.java rename to core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/crawler/CatalogCrawler.java diff --git a/extensions/catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/crawler/NodeQueryAdapterRegistryImpl.java b/core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/crawler/NodeQueryAdapterRegistryImpl.java similarity index 100% rename from extensions/catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/crawler/NodeQueryAdapterRegistryImpl.java rename to core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/crawler/NodeQueryAdapterRegistryImpl.java diff --git a/extensions/catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/BatchedRequestFetcher.java b/core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/BatchedRequestFetcher.java similarity index 100% rename from extensions/catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/BatchedRequestFetcher.java rename to core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/BatchedRequestFetcher.java diff --git a/extensions/catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/CacheQueryAdapterImpl.java b/core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/CacheQueryAdapterImpl.java similarity index 100% rename from extensions/catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/CacheQueryAdapterImpl.java rename to core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/CacheQueryAdapterImpl.java diff --git a/extensions/catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/CacheQueryAdapterRegistryImpl.java b/core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/CacheQueryAdapterRegistryImpl.java similarity index 100% rename from extensions/catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/CacheQueryAdapterRegistryImpl.java rename to core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/CacheQueryAdapterRegistryImpl.java diff --git a/extensions/catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/IdsMultipartNodeQueryAdapter.java b/core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/IdsMultipartNodeQueryAdapter.java similarity index 100% rename from extensions/catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/IdsMultipartNodeQueryAdapter.java rename to core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/IdsMultipartNodeQueryAdapter.java diff --git a/extensions/catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/QueryEngineImpl.java b/core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/QueryEngineImpl.java similarity index 100% rename from extensions/catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/QueryEngineImpl.java rename to core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/QueryEngineImpl.java diff --git a/extensions/catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/QueryException.java b/core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/QueryException.java similarity index 100% rename from extensions/catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/QueryException.java rename to core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/QueryException.java diff --git a/extensions/catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/QueryNotAcceptedException.java b/core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/QueryNotAcceptedException.java similarity index 100% rename from extensions/catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/QueryNotAcceptedException.java rename to core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/QueryNotAcceptedException.java diff --git a/extensions/catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/directory/InMemoryNodeDirectory.java b/core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/directory/InMemoryNodeDirectory.java similarity index 100% rename from extensions/catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/directory/InMemoryNodeDirectory.java rename to core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/directory/InMemoryNodeDirectory.java diff --git a/extensions/catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/store/InMemoryFederatedCacheStore.java b/core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/store/InMemoryFederatedCacheStore.java similarity index 100% rename from extensions/catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/store/InMemoryFederatedCacheStore.java rename to core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/store/InMemoryFederatedCacheStore.java diff --git a/extensions/catalog/federated-catalog-cache/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension b/core/federated-catalog/federated-catalog-cache/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension similarity index 100% rename from extensions/catalog/federated-catalog-cache/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension rename to core/federated-catalog/federated-catalog-cache/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension diff --git a/extensions/catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/ExecutionManagerTest.java b/core/federated-catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/ExecutionManagerTest.java similarity index 100% rename from extensions/catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/ExecutionManagerTest.java rename to core/federated-catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/ExecutionManagerTest.java diff --git a/extensions/catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/FccTestExtension.java b/core/federated-catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/FccTestExtension.java similarity index 100% rename from extensions/catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/FccTestExtension.java rename to core/federated-catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/FccTestExtension.java diff --git a/extensions/catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/FederatedCatalogCacheEndToEndTest.java b/core/federated-catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/FederatedCatalogCacheEndToEndTest.java similarity index 100% rename from extensions/catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/FederatedCatalogCacheEndToEndTest.java rename to core/federated-catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/FederatedCatalogCacheEndToEndTest.java diff --git a/extensions/catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/FederatedCatalogCacheExtensionTest.java b/core/federated-catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/FederatedCatalogCacheExtensionTest.java similarity index 100% rename from extensions/catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/FederatedCatalogCacheExtensionTest.java rename to core/federated-catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/FederatedCatalogCacheExtensionTest.java diff --git a/extensions/catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/TestUtil.java b/core/federated-catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/TestUtil.java similarity index 100% rename from extensions/catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/TestUtil.java rename to core/federated-catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/TestUtil.java diff --git a/extensions/catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/crawler/CatalogCrawlerTest.java b/core/federated-catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/crawler/CatalogCrawlerTest.java similarity index 100% rename from extensions/catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/crawler/CatalogCrawlerTest.java rename to core/federated-catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/crawler/CatalogCrawlerTest.java diff --git a/extensions/catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/query/InMemoryFccQueryAdapterRegistryTest.java b/core/federated-catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/query/InMemoryFccQueryAdapterRegistryTest.java similarity index 100% rename from extensions/catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/query/InMemoryFccQueryAdapterRegistryTest.java rename to core/federated-catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/query/InMemoryFccQueryAdapterRegistryTest.java diff --git a/extensions/catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/query/QueryEngineImplTest.java b/core/federated-catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/query/QueryEngineImplTest.java similarity index 100% rename from extensions/catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/query/QueryEngineImplTest.java rename to core/federated-catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/query/QueryEngineImplTest.java diff --git a/extensions/catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/defaults/store/InMemoryFederatedCacheStoreTest.java b/core/federated-catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/defaults/store/InMemoryFederatedCacheStoreTest.java similarity index 100% rename from extensions/catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/defaults/store/InMemoryFederatedCacheStoreTest.java rename to core/federated-catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/defaults/store/InMemoryFederatedCacheStoreTest.java diff --git a/extensions/catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/query/BatchedRequestFetcherTest.java b/core/federated-catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/query/BatchedRequestFetcherTest.java similarity index 100% rename from extensions/catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/query/BatchedRequestFetcherTest.java rename to core/federated-catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/query/BatchedRequestFetcherTest.java diff --git a/extensions/catalog/build.gradle.kts b/core/federated-catalog/federated-catalog-core/build.gradle.kts similarity index 57% rename from extensions/catalog/build.gradle.kts rename to core/federated-catalog/federated-catalog-core/build.gradle.kts index 5493aff5a48..c10d20c5108 100644 --- a/extensions/catalog/build.gradle.kts +++ b/core/federated-catalog/federated-catalog-core/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2021 Microsoft Corporation + * Copyright (c) 2022 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) * * This program and the accompanying materials are made available under the * terms of the Apache License, Version 2.0 which is available at @@ -8,7 +8,7 @@ * SPDX-License-Identifier: Apache-2.0 * * Contributors: - * Microsoft Corporation - initial API and implementation + * Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation * */ @@ -16,16 +16,16 @@ plugins { `java-library` } -//This file serves as BOM for the federated catalog + dependencies { - api(project(":extensions:catalog:federated-catalog-cache")) + api(project(":core:federated-catalog:federated-catalog-cache")) api(project(":spi:federated-catalog:federated-catalog-spi")) } publishing { publications { - create("catalog") { - artifactId = "catalog" + create("federated-catalog-core") { + artifactId = "federated-catalog-core" from(components["java"]) } } diff --git a/core/policy/build.gradle.kts b/core/policy/build.gradle.kts deleted file mode 100644 index aa67cae578b..00000000000 --- a/core/policy/build.gradle.kts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2020, 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 - * https://www.apache.org/licenses/LICENSE-2.0 - * - * SPDX-License-Identifier: Apache-2.0 - * - * Contributors: - * Microsoft Corporation - initial API and implementation - * - */ - -plugins { - `java-library` - `maven-publish` -} - - -dependencies { - api(project(":core:policy:policy-engine")) - api(project(":core:policy:policy-evaluator")) - -} - -publishing { - publications { - create("core-policy") { - artifactId = "core-policy" - from(components["java"]) - } - } -} diff --git a/data-protocols/ids/ids-api-multipart-dispatcher-v1/build.gradle.kts b/data-protocols/ids/ids-api-multipart-dispatcher-v1/build.gradle.kts index c4b378fee01..23c1e854346 100644 --- a/data-protocols/ids/ids-api-multipart-dispatcher-v1/build.gradle.kts +++ b/data-protocols/ids/ids-api-multipart-dispatcher-v1/build.gradle.kts @@ -31,11 +31,8 @@ dependencies { implementation("org.glassfish.jersey.media:jersey-media-multipart:${jerseyVersion}") implementation("com.squareup.okhttp3:okhttp:${okHttpVersion}") - testImplementation(project(":core:transfer")) - testImplementation(project(":core:defaults")) - + testImplementation(project(":core:control-plane:control-plane-core")) testImplementation(project(":data-protocols:ids:ids-api-multipart-endpoint-v1")) - testImplementation(project(":extensions:junit")) testImplementation(testFixtures(project(":common:util"))) } diff --git a/data-protocols/ids/ids-api-multipart-dispatcher-v1/src/test/java/org/eclipse/dataspaceconnector/ids/api/multipart/client/IdsApiMultipartDispatcherV1IntegrationTestServiceExtension.java b/data-protocols/ids/ids-api-multipart-dispatcher-v1/src/test/java/org/eclipse/dataspaceconnector/ids/api/multipart/client/IdsApiMultipartDispatcherV1IntegrationTestServiceExtension.java index 80c4de106c7..e313782c52f 100644 --- a/data-protocols/ids/ids-api-multipart-dispatcher-v1/src/test/java/org/eclipse/dataspaceconnector/ids/api/multipart/client/IdsApiMultipartDispatcherV1IntegrationTestServiceExtension.java +++ b/data-protocols/ids/ids-api-multipart-dispatcher-v1/src/test/java/org/eclipse/dataspaceconnector/ids/api/multipart/client/IdsApiMultipartDispatcherV1IntegrationTestServiceExtension.java @@ -256,7 +256,7 @@ private static class FakeContractDefinitionStore implements ContractDefinitionSt @Override public @NotNull Stream findAll(QuerySpec spec) { - throw new UnsupportedOperationException(); + return contractDefinitions.stream(); } @Override diff --git a/data-protocols/ids/ids-api-multipart-endpoint-v1/build.gradle.kts b/data-protocols/ids/ids-api-multipart-endpoint-v1/build.gradle.kts index 74ea5cc2f51..54d21bd3b3c 100644 --- a/data-protocols/ids/ids-api-multipart-endpoint-v1/build.gradle.kts +++ b/data-protocols/ids/ids-api-multipart-endpoint-v1/build.gradle.kts @@ -39,7 +39,7 @@ dependencies { testImplementation("com.squareup.okhttp3:okhttp:${okHttpVersion}") testImplementation(project(":extensions:junit")) - testImplementation(project(":core:transfer")) + testImplementation(project(":core:control-plane:control-plane-core")) testImplementation(testFixtures(project(":common:util"))) } diff --git a/data-protocols/ids/ids-api-multipart-endpoint-v1/src/test/java/org/eclipse/dataspaceconnector/ids/api/multipart/AbstractMultipartControllerIntegrationTest.java b/data-protocols/ids/ids-api-multipart-endpoint-v1/src/test/java/org/eclipse/dataspaceconnector/ids/api/multipart/AbstractMultipartControllerIntegrationTest.java index 632e09f1869..a6593480b78 100644 --- a/data-protocols/ids/ids-api-multipart-endpoint-v1/src/test/java/org/eclipse/dataspaceconnector/ids/api/multipart/AbstractMultipartControllerIntegrationTest.java +++ b/data-protocols/ids/ids-api-multipart-endpoint-v1/src/test/java/org/eclipse/dataspaceconnector/ids/api/multipart/AbstractMultipartControllerIntegrationTest.java @@ -40,10 +40,12 @@ import okhttp3.RequestBody; import okhttp3.Response; import org.eclipse.dataspaceconnector.ids.api.multipart.controller.MultipartController; -import org.eclipse.dataspaceconnector.ids.api.multipart.message.MultipartResponse; import org.eclipse.dataspaceconnector.ids.core.serialization.IdsTypeManagerUtil; import org.eclipse.dataspaceconnector.ids.spi.types.IdsId; import org.eclipse.dataspaceconnector.junit.extensions.EdcExtension; +import org.eclipse.dataspaceconnector.spi.contract.negotiation.ConsumerContractNegotiationManager; +import org.eclipse.dataspaceconnector.spi.contract.negotiation.ProviderContractNegotiationManager; +import org.eclipse.dataspaceconnector.spi.contract.offer.ContractOfferService; import org.eclipse.dataspaceconnector.spi.system.ServiceExtension; import org.eclipse.dataspaceconnector.spi.types.TypeManager; import org.eclipse.dataspaceconnector.spi.types.domain.asset.Asset; @@ -65,8 +67,6 @@ @ExtendWith(EdcExtension.class) abstract class AbstractMultipartControllerIntegrationTest { - public static final String HEADER = "header"; - public static final String PAYLOAD = "payload"; private static final AtomicReference PORT = new AtomicReference<>(); private static final AtomicReference IDS_PORT = new AtomicReference<>(); private static final List ASSETS = new LinkedList<>(); @@ -95,6 +95,9 @@ protected void before(EdcExtension extension) { objectMapper = getCustomizedObjectMapper(); + extension.registerServiceMock(ProviderContractNegotiationManager.class, new FakeContractNegotiationManager.Provider()); + extension.registerServiceMock(ConsumerContractNegotiationManager.class, new FakeContractNegotiationManager.Consumer()); + extension.registerServiceMock(ContractOfferService.class, new FakeContractOfferService(ASSETS)); extension.registerSystemExtension(ServiceExtension.class, new IdsApiMultipartEndpointV1IntegrationTestServiceExtension(ASSETS)); } @@ -206,40 +209,6 @@ protected Request createRequestWithPayload(Message message, Contract payload) th .build(); } - // extract response to MultipartResponse container object - protected MultipartResponse extractMultipartResponse(Response response) throws Exception { - Message header = null; - byte[] payload = null; - try (MultipartReader multipartReader = new MultipartReader(Objects.requireNonNull(response.body()))) { - MultipartReader.Part part; - while ((part = multipartReader.nextPart()) != null) { - HttpHeaders httpHeaders = HttpHeaders.of( - part.headers().toMultimap(), - (a, b) -> a.equalsIgnoreCase("Content-Disposition") - ); - - String value = httpHeaders.firstValue("Content-Disposition").orElse(null); - if (value == null) { - continue; - } - - ContentDisposition contentDisposition = new ContentDisposition(value); - String multipartName = contentDisposition.getParameters().get("name"); - if (multipartName == null) { - continue; - } - - if (multipartName.equalsIgnoreCase(HEADER)) { - header = objectMapper.readValue(part.body().readUtf8(), Message.class); - } else if (multipartName.equalsIgnoreCase(PAYLOAD)) { - payload = part.body().readByteArray(); - } - } - } - - return MultipartResponse.Builder.newInstance().header(header).payload(payload).build(); - } - // extract response to list of NamedMultipartContent container object protected List extractNamedMultipartContent(Response response) throws Exception { List namedMultipartContentList = new LinkedList<>(); diff --git a/data-protocols/ids/ids-api-multipart-endpoint-v1/src/test/java/org/eclipse/dataspaceconnector/ids/api/multipart/FakeContractNegotiationManager.java b/data-protocols/ids/ids-api-multipart-endpoint-v1/src/test/java/org/eclipse/dataspaceconnector/ids/api/multipart/FakeContractNegotiationManager.java new file mode 100644 index 00000000000..41e28a68b9b --- /dev/null +++ b/data-protocols/ids/ids-api-multipart-endpoint-v1/src/test/java/org/eclipse/dataspaceconnector/ids/api/multipart/FakeContractNegotiationManager.java @@ -0,0 +1,109 @@ +/* + * Copyright (c) 2022 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) + * + * 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: + * Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation + * + */ + +package org.eclipse.dataspaceconnector.ids.api.multipart; + +import org.eclipse.dataspaceconnector.policy.model.Policy; +import org.eclipse.dataspaceconnector.spi.contract.negotiation.ConsumerContractNegotiationManager; +import org.eclipse.dataspaceconnector.spi.contract.negotiation.ProviderContractNegotiationManager; +import org.eclipse.dataspaceconnector.spi.iam.ClaimToken; +import org.eclipse.dataspaceconnector.spi.response.StatusResult; +import org.eclipse.dataspaceconnector.spi.types.domain.contract.agreement.ContractAgreement; +import org.eclipse.dataspaceconnector.spi.types.domain.contract.negotiation.ContractNegotiation; +import org.eclipse.dataspaceconnector.spi.types.domain.contract.negotiation.ContractNegotiationStates; +import org.eclipse.dataspaceconnector.spi.types.domain.contract.negotiation.ContractOfferRequest; +import org.eclipse.dataspaceconnector.spi.types.domain.contract.negotiation.command.ContractNegotiationCommand; +import org.eclipse.dataspaceconnector.spi.types.domain.contract.offer.ContractOffer; + +import java.time.Instant; +import java.time.temporal.ChronoUnit; +import java.util.UUID; + +public class FakeContractNegotiationManager { + + static ContractNegotiation fakeContractNegotiation() { + return ContractNegotiation.Builder.newInstance() + .id(UUID.randomUUID().toString()) + .correlationId(UUID.randomUUID().toString()) + .counterPartyId("test-counterparty-1") + .counterPartyAddress("test-counterparty-address") + .protocol("test-protocol") + .stateCount(1) + .contractAgreement(ContractAgreement.Builder.newInstance().id("1") + .providerAgentId("provider") + .consumerAgentId("consumer") + .assetId(UUID.randomUUID().toString()) + .policy(Policy.Builder.newInstance().build()) + .contractStartDate(Instant.now().getEpochSecond()) + .contractEndDate(Instant.now().plus(1, ChronoUnit.DAYS).getEpochSecond()) + .contractSigningDate(Instant.now().getEpochSecond()) + .id("1:2").build()) + .state(ContractNegotiationStates.CONFIRMED.code()) + .build(); + } + + static class Provider implements ProviderContractNegotiationManager { + + @Override + public StatusResult declined(ClaimToken token, String negotiationId) { + return StatusResult.success(fakeContractNegotiation()); + } + + @Override + public void enqueueCommand(ContractNegotiationCommand command) { + } + + @Override + public StatusResult requested(ClaimToken token, ContractOfferRequest request) { + return StatusResult.success(fakeContractNegotiation()); + } + + @Override + public StatusResult offerReceived(ClaimToken token, String correlationId, ContractOffer offer, String hash) { + return StatusResult.success(fakeContractNegotiation()); + } + + @Override + public StatusResult consumerApproved(ClaimToken token, String correlationId, ContractAgreement agreement, String hash) { + return StatusResult.success(fakeContractNegotiation()); + } + } + + static class Consumer implements ConsumerContractNegotiationManager { + + @Override + public StatusResult initiate(ContractOfferRequest contractOffer) { + return StatusResult.success(fakeContractNegotiation()); + } + + @Override + public StatusResult offerReceived(ClaimToken token, String negotiationId, ContractOffer contractOffer, String hash) { + return StatusResult.success(fakeContractNegotiation()); + } + + @Override + public StatusResult confirmed(ClaimToken token, String negotiationId, ContractAgreement agreement, Policy policy) { + return StatusResult.success(fakeContractNegotiation()); + } + + @Override + public StatusResult declined(ClaimToken token, String negotiationId) { + return StatusResult.success(fakeContractNegotiation()); + } + + @Override + public void enqueueCommand(ContractNegotiationCommand command) { + } + } +} diff --git a/data-protocols/ids/ids-api-multipart-endpoint-v1/src/test/java/org/eclipse/dataspaceconnector/ids/api/multipart/FakeContractOfferService.java b/data-protocols/ids/ids-api-multipart-endpoint-v1/src/test/java/org/eclipse/dataspaceconnector/ids/api/multipart/FakeContractOfferService.java new file mode 100644 index 00000000000..9d2af2bdd0d --- /dev/null +++ b/data-protocols/ids/ids-api-multipart-endpoint-v1/src/test/java/org/eclipse/dataspaceconnector/ids/api/multipart/FakeContractOfferService.java @@ -0,0 +1,51 @@ +package org.eclipse.dataspaceconnector.ids.api.multipart; + +import org.eclipse.dataspaceconnector.policy.model.Action; +import org.eclipse.dataspaceconnector.policy.model.Permission; +import org.eclipse.dataspaceconnector.policy.model.Policy; +import org.eclipse.dataspaceconnector.policy.model.PolicyType; +import org.eclipse.dataspaceconnector.spi.contract.offer.ContractOfferQuery; +import org.eclipse.dataspaceconnector.spi.contract.offer.ContractOfferService; +import org.eclipse.dataspaceconnector.spi.message.Range; +import org.eclipse.dataspaceconnector.spi.types.domain.asset.Asset; +import org.eclipse.dataspaceconnector.spi.types.domain.contract.offer.ContractOffer; +import org.jetbrains.annotations.NotNull; + +import java.util.List; +import java.util.stream.Stream; + +class FakeContractOfferService implements ContractOfferService { + private final List assets; + + FakeContractOfferService(List assets) { + this.assets = assets; + } + + @Override + @NotNull + public Stream queryContractOffers(ContractOfferQuery query, Range range) { + return assets.stream().map(asset -> + ContractOffer.Builder.newInstance() + .id("1") + .policy(createEverythingAllowedPolicy()) + .asset(asset) + .build() + ); + } + + private Policy createEverythingAllowedPolicy() { + var policyBuilder = Policy.Builder.newInstance(); + var permissionBuilder = Permission.Builder.newInstance(); + var actionBuilder = Action.Builder.newInstance(); + + policyBuilder.type(PolicyType.CONTRACT); + actionBuilder.type("USE"); + permissionBuilder.target("1"); + + permissionBuilder.action(actionBuilder.build()); + policyBuilder.permission(permissionBuilder.build()); + + policyBuilder.target("1"); + return policyBuilder.build(); + } +} diff --git a/data-protocols/ids/ids-api-multipart-endpoint-v1/src/test/java/org/eclipse/dataspaceconnector/ids/api/multipart/IdsApiMultipartEndpointV1IntegrationTestServiceExtension.java b/data-protocols/ids/ids-api-multipart-endpoint-v1/src/test/java/org/eclipse/dataspaceconnector/ids/api/multipart/IdsApiMultipartEndpointV1IntegrationTestServiceExtension.java index c73d170431a..9a8736e89d6 100644 --- a/data-protocols/ids/ids-api-multipart-endpoint-v1/src/test/java/org/eclipse/dataspaceconnector/ids/api/multipart/IdsApiMultipartEndpointV1IntegrationTestServiceExtension.java +++ b/data-protocols/ids/ids-api-multipart-endpoint-v1/src/test/java/org/eclipse/dataspaceconnector/ids/api/multipart/IdsApiMultipartEndpointV1IntegrationTestServiceExtension.java @@ -20,17 +20,9 @@ import kotlin.NotImplementedError; import org.eclipse.dataspaceconnector.common.util.junit.annotations.ComponentTest; -import org.eclipse.dataspaceconnector.policy.model.Action; -import org.eclipse.dataspaceconnector.policy.model.Permission; -import org.eclipse.dataspaceconnector.policy.model.Policy; -import org.eclipse.dataspaceconnector.policy.model.PolicyType; import org.eclipse.dataspaceconnector.spi.asset.AssetIndex; import org.eclipse.dataspaceconnector.spi.asset.AssetSelectorExpression; import org.eclipse.dataspaceconnector.spi.asset.DataAddressResolver; -import org.eclipse.dataspaceconnector.spi.contract.negotiation.ConsumerContractNegotiationManager; -import org.eclipse.dataspaceconnector.spi.contract.negotiation.ProviderContractNegotiationManager; -import org.eclipse.dataspaceconnector.spi.contract.negotiation.store.ContractNegotiationStore; -import org.eclipse.dataspaceconnector.spi.contract.offer.ContractOfferQuery; import org.eclipse.dataspaceconnector.spi.contract.offer.ContractOfferService; import org.eclipse.dataspaceconnector.spi.contract.offer.store.ContractDefinitionStore; import org.eclipse.dataspaceconnector.spi.contract.validation.ContractValidationService; @@ -39,12 +31,10 @@ import org.eclipse.dataspaceconnector.spi.iam.TokenParameters; import org.eclipse.dataspaceconnector.spi.iam.TokenRepresentation; import org.eclipse.dataspaceconnector.spi.message.MessageContext; -import org.eclipse.dataspaceconnector.spi.message.Range; import org.eclipse.dataspaceconnector.spi.message.RemoteMessageDispatcher; import org.eclipse.dataspaceconnector.spi.message.RemoteMessageDispatcherRegistry; import org.eclipse.dataspaceconnector.spi.policy.store.PolicyArchive; import org.eclipse.dataspaceconnector.spi.query.QuerySpec; -import org.eclipse.dataspaceconnector.spi.response.StatusResult; import org.eclipse.dataspaceconnector.spi.result.Result; import org.eclipse.dataspaceconnector.spi.system.Provides; import org.eclipse.dataspaceconnector.spi.system.ServiceExtension; @@ -53,10 +43,6 @@ import org.eclipse.dataspaceconnector.spi.types.domain.DataAddress; import org.eclipse.dataspaceconnector.spi.types.domain.asset.Asset; import org.eclipse.dataspaceconnector.spi.types.domain.contract.agreement.ContractAgreement; -import org.eclipse.dataspaceconnector.spi.types.domain.contract.negotiation.ContractNegotiation; -import org.eclipse.dataspaceconnector.spi.types.domain.contract.negotiation.ContractNegotiationStates; -import org.eclipse.dataspaceconnector.spi.types.domain.contract.negotiation.ContractOfferRequest; -import org.eclipse.dataspaceconnector.spi.types.domain.contract.negotiation.command.ContractNegotiationCommand; import org.eclipse.dataspaceconnector.spi.types.domain.contract.offer.ContractDefinition; import org.eclipse.dataspaceconnector.spi.types.domain.contract.offer.ContractOffer; import org.eclipse.dataspaceconnector.spi.types.domain.message.RemoteMessage; @@ -64,13 +50,10 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import java.time.Instant; -import java.time.temporal.ChronoUnit; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Objects; -import java.util.UUID; import java.util.concurrent.CompletableFuture; import java.util.stream.Stream; @@ -84,8 +67,6 @@ ContractDefinitionStore.class, IdentityService.class, TransferProcessStore.class, - ConsumerContractNegotiationManager.class, - ProviderContractNegotiationManager.class, ContractOfferService.class, ContractValidationService.class, PolicyArchive.class @@ -97,27 +78,6 @@ class IdsApiMultipartEndpointV1IntegrationTestServiceExtension implements Servic this.assets = Objects.requireNonNull(assets); } - private static ContractNegotiation fakeContractNegotiation() { - return ContractNegotiation.Builder.newInstance() - .id(UUID.randomUUID().toString()) - .correlationId(UUID.randomUUID().toString()) - .counterPartyId("test-counterparty-1") - .counterPartyAddress("test-counterparty-address") - .protocol("test-protocol") - .stateCount(1) - .contractAgreement(ContractAgreement.Builder.newInstance().id("1") - .providerAgentId("provider") - .consumerAgentId("consumer") - .assetId(UUID.randomUUID().toString()) - .policy(Policy.Builder.newInstance().build()) - .contractStartDate(Instant.now().getEpochSecond()) - .contractEndDate(Instant.now().plus(1, ChronoUnit.DAYS).getEpochSecond()) - .contractSigningDate(Instant.now().getEpochSecond()) - .id("1:2").build()) - .state(ContractNegotiationStates.CONFIRMED.code()) - .build(); - } - @Override public void initialize(ServiceExtensionContext context) { context.registerService(IdentityService.class, new FakeIdentityService()); @@ -126,12 +86,8 @@ public void initialize(ServiceExtensionContext context) { var assetIndex = new FakeAssetIndex(assets); context.registerService(AssetIndex.class, assetIndex); context.registerService(DataAddressResolver.class, assetIndex); - context.registerService(ContractOfferService.class, new FakeContractOfferService(assets)); context.registerService(ContractDefinitionStore.class, new FakeContractDefinitionStore()); context.registerService(ContractValidationService.class, new FakeContractValidationService()); - context.registerService(ContractNegotiationStore.class, mock(ContractNegotiationStore.class)); - context.registerService(ProviderContractNegotiationManager.class, new FakeProviderContractNegotiationManager()); - context.registerService(ConsumerContractNegotiationManager.class, new FakeConsumerContractNegotiationManager()); context.registerService(PolicyArchive.class, mock(PolicyArchive.class)); } @@ -179,42 +135,6 @@ public DataAddress resolveForAsset(String assetId) { } } - private static class FakeContractOfferService implements ContractOfferService { - private final List assets; - - private FakeContractOfferService(List assets) { - this.assets = assets; - } - - @Override - @NotNull - public Stream queryContractOffers(ContractOfferQuery query, Range range) { - return assets.stream().map(asset -> - ContractOffer.Builder.newInstance() - .id("1") - .policy(createEverythingAllowedPolicy()) - .asset(asset) - .build() - ); - } - - private Policy createEverythingAllowedPolicy() { - var policyBuilder = Policy.Builder.newInstance(); - var permissionBuilder = Permission.Builder.newInstance(); - var actionBuilder = Action.Builder.newInstance(); - - policyBuilder.type(PolicyType.CONTRACT); - actionBuilder.type("USE"); - permissionBuilder.target("1"); - - permissionBuilder.action(actionBuilder.build()); - policyBuilder.permission(permissionBuilder.build()); - - policyBuilder.target("1"); - return policyBuilder.build(); - } - } - private static class FakeTransferProcessStore implements TransferProcessStore { @Override public TransferProcess find(String id) { @@ -268,7 +188,7 @@ private static class FakeContractDefinitionStore implements ContractDefinitionSt @Override public @NotNull Stream findAll(QuerySpec spec) { - throw new UnsupportedOperationException(); + return contractDefinitions.stream(); } @Override @@ -325,57 +245,4 @@ public boolean validate(ClaimToken token, ContractAgreement agreement, ContractO } } - private static class FakeProviderContractNegotiationManager implements ProviderContractNegotiationManager { - - @Override - public StatusResult declined(ClaimToken token, String negotiationId) { - return StatusResult.success(fakeContractNegotiation()); - } - - @Override - public void enqueueCommand(ContractNegotiationCommand command) { - } - - @Override - public StatusResult requested(ClaimToken token, ContractOfferRequest request) { - return StatusResult.success(fakeContractNegotiation()); - } - - @Override - public StatusResult offerReceived(ClaimToken token, String correlationId, ContractOffer offer, String hash) { - return StatusResult.success(fakeContractNegotiation()); - } - - @Override - public StatusResult consumerApproved(ClaimToken token, String correlationId, ContractAgreement agreement, String hash) { - return StatusResult.success(fakeContractNegotiation()); - } - } - - private static class FakeConsumerContractNegotiationManager implements ConsumerContractNegotiationManager { - - @Override - public StatusResult initiate(ContractOfferRequest contractOffer) { - return StatusResult.success(fakeContractNegotiation()); - } - - @Override - public StatusResult offerReceived(ClaimToken token, String negotiationId, ContractOffer contractOffer, String hash) { - return StatusResult.success(fakeContractNegotiation()); - } - - @Override - public StatusResult confirmed(ClaimToken token, String negotiationId, ContractAgreement agreement, Policy policy) { - return StatusResult.success(fakeContractNegotiation()); - } - - @Override - public StatusResult declined(ClaimToken token, String negotiationId) { - return StatusResult.success(fakeContractNegotiation()); - } - - @Override - public void enqueueCommand(ContractNegotiationCommand command) { - } - } } diff --git a/data-protocols/ids/ids-core/build.gradle.kts b/data-protocols/ids/ids-core/build.gradle.kts index eb8a93bc7d1..d3f2691f4ff 100644 --- a/data-protocols/ids/ids-core/build.gradle.kts +++ b/data-protocols/ids/ids-core/build.gradle.kts @@ -31,8 +31,6 @@ dependencies { implementation("jakarta.ws.rs:jakarta.ws.rs-api:${rsApi}") implementation("com.squareup.okhttp3:okhttp:${okHttpVersion}") implementation(project(":data-protocols:ids:ids-jsonld-serdes-lib")) - - implementation(project(":core:policy:policy-engine")) } diff --git a/data-protocols/ids/ids-spi/build.gradle.kts b/data-protocols/ids/ids-spi/build.gradle.kts index 3154711ba82..8e2e3921f29 100644 --- a/data-protocols/ids/ids-spi/build.gradle.kts +++ b/data-protocols/ids/ids-spi/build.gradle.kts @@ -23,7 +23,7 @@ plugins { dependencies { api(project(":spi:control-plane:control-plane-spi")) - api(project(":core:policy:policy-engine")) + api(project(":core:common:policy-engine")) api("de.fraunhofer.iais.eis.ids.infomodel:java:${infoModelVersion}") diff --git a/data-protocols/ids/ids-token-validation/build.gradle.kts b/data-protocols/ids/ids-token-validation/build.gradle.kts index 4d1b859dcd2..941dd7fbe4e 100644 --- a/data-protocols/ids/ids-token-validation/build.gradle.kts +++ b/data-protocols/ids/ids-token-validation/build.gradle.kts @@ -21,7 +21,6 @@ plugins { dependencies { api(project(":spi:control-plane:control-plane-spi")) - api(project(":core:base")) api(project(":common:util")) api(project(":data-protocols:ids:ids-spi")) api(project(":spi:common:oauth2-spi")) diff --git a/docs/developer/modules.md b/docs/developer/modules.md index 83f8b88ba5a..b6b85a33769 100644 --- a/docs/developer/modules.md +++ b/docs/developer/modules.md @@ -1,19 +1,10 @@ -org.eclipse.dataspaceconnector:core:0.0.1-SNAPSHOT org.eclipse.dataspaceconnector:state-machine-lib:0.0.1-SNAPSHOT org.eclipse.dataspaceconnector:token-generation-lib:0.0.1-SNAPSHOT org.eclipse.dataspaceconnector:token-validation-lib:0.0.1-SNAPSHOT org.eclipse.dataspaceconnector:common-util:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:core-base:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:core-boot:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:contract:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:core-defaults:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:core-micrometer:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:core-policy:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:transfer:0.0.1-SNAPSHOT org.eclipse.dataspaceconnector:ids:0.0.1-SNAPSHOT org.eclipse.dataspaceconnector:aws-s3:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:catalog:0.0.1-SNAPSHOT org.eclipse.dataspaceconnector:data-plane-transfer:0.0.1-SNAPSHOT org.eclipse.dataspaceconnector:dataloading:0.0.1-SNAPSHOT org.eclipse.dataspaceconnector:hashicorp-vault:0.0.1-SNAPSHOT @@ -22,13 +13,23 @@ org.eclipse.dataspaceconnector:http-provisioner:0.0.1-SNAPSHOT org.eclipse.dataspaceconnector:http-receiver:0.0.1-SNAPSHOT org.eclipse.dataspaceconnector:jdk-logger-monitor:0.0.1-SNAPSHOT org.eclipse.dataspaceconnector:junit:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:core-micrometer:0.0.1-SNAPSHOT org.eclipse.dataspaceconnector:sql:0.0.1-SNAPSHOT org.eclipse.dataspaceconnector:dataloader-cli:0.0.1-SNAPSHOT org.eclipse.dataspaceconnector:data-plane-server:0.0.1-SNAPSHOT org.eclipse.dataspaceconnector:module-domain:0.0.1-SNAPSHOT org.eclipse.dataspaceconnector:module-processor:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:core-base:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:core-boot:0.0.1-SNAPSHOT org.eclipse.dataspaceconnector:policy-engine:0.0.1-SNAPSHOT org.eclipse.dataspaceconnector:policy-evaluator:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:contract:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:control-plane-core:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:transfer:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:data-plane-core:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:data-plane-framework:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:data-plane-selector-core:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:catalog-cache:0.0.1-SNAPSHOT org.eclipse.dataspaceconnector:ids-api-configuration:0.0.1-SNAPSHOT org.eclipse.dataspaceconnector:ids-api-multipart-dispatcher-v1:0.0.1-SNAPSHOT org.eclipse.dataspaceconnector:ids-api-multipart-endpoint-v1:0.0.1-SNAPSHOT @@ -51,14 +52,10 @@ org.eclipse.dataspaceconnector:azure-eventgrid:0.0.1-SNAPSHOT org.eclipse.dataspaceconnector:azure-eventgrid-config:0.0.1-SNAPSHOT org.eclipse.dataspaceconnector:azure-resource-manager:0.0.1-SNAPSHOT org.eclipse.dataspaceconnector:azure-vault:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:catalog-cache:0.0.1-SNAPSHOT org.eclipse.dataspaceconnector:data-plane-api:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:data-plane-framework:0.0.1-SNAPSHOT org.eclipse.dataspaceconnector:data-plane-http:0.0.1-SNAPSHOT org.eclipse.dataspaceconnector:data-plane-selector-api:0.0.1-SNAPSHOT org.eclipse.dataspaceconnector:data-plane-selector-client:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:data-plane-selector-core:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:data-plane-selector-store:0.0.1-SNAPSHOT org.eclipse.dataspaceconnector:data-plane-transfer-client:0.0.1-SNAPSHOT org.eclipse.dataspaceconnector:data-plane-transfer-sync:0.0.1-SNAPSHOT org.eclipse.dataspaceconnector:cloudevents-http:0.0.1-SNAPSHOT @@ -70,59 +67,4 @@ org.eclipse.dataspaceconnector:jetty:0.0.1-SNAPSHOT org.eclipse.dataspaceconnector:jetty-micrometer:0.0.1-SNAPSHOT org.eclipse.dataspaceconnector:iam-daps:0.0.1-SNAPSHOT org.eclipse.dataspaceconnector:decentralized-identity:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:iam-mock:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:asset-index-sql:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:common-sql:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:contractdefinition-store-sql:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:contractnegotiation-store-sql:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:lease-sql:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:policy-store-sql:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:transfer-process-store-sql:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:transaction-atomikos:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:transaction-local:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:auth-spi:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:catalog-spi:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:core-spi:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:identity-did-spi:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:oauth2-spi:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:transaction-datasource-spi:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:transaction-spi:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:transport-spi:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:web-spi:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:contract-spi:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:control-plane-spi:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:data-plane-transfer-spi:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:policy-spi:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:transfer-spi:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:data-plane-spi:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:data-plane-selector-spi:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:federated-catalog-spi:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:api-configuration:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:asset-api:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:catalog-api:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:contractagreement-api:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:contractdefinition-api:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:contractnegotiation-api:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:policydefinition-api:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:transferprocess-api:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:s3-core:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:s3-provision:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:blob-core:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:blob-provision:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:assetindex-cosmos:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:contract-definition-store-cosmos:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:contract-negotiation-store-cosmos:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:cosmos-common:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:fcc-node-directory-cosmos:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:policy-store-cosmos:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:transfer-process-store-cosmos:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:data-plane-azure-data-factory:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:data-plane-azure-storage:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:dummy-credentials-verifier:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:identity-common-test:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:identity-did-core:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:identity-did-crypto:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:identity-did-service:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:identity-did-web:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:oauth2-core:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:apache-commons-pool-sql:0.0.1-SNAPSHOT \ No newline at end of file +org.eclipse.dataspaceconnector:iam-mock:0.0.1-SNAPSHOT \ No newline at end of file diff --git a/docs/overview/extensions.md b/docs/overview/extensions.md index 6599d4c0b37..1e2a4fc644d 100644 --- a/docs/overview/extensions.md +++ b/docs/overview/extensions.md @@ -79,7 +79,6 @@ | :selector-client | contains implementations for running a DPF Selector embedded in the Control Plane, or as remote instance, accessing it's REST API | [link]({{extensions}}data-plane-selector/selector-client) | | :selector-core | | [link]({{extensions}}data-plane-selector/selector-core) | | :selector-spi | | [link]({{extensions}}data-plane-selector/selector-spi) | -| :selector-store | | [link]({{extensions}}data-plane-selector/selector-store) | ## :extensions:data-plane-transfer diff --git a/extensions/api/data-management/asset/build.gradle.kts b/extensions/api/data-management/asset/build.gradle.kts index e010fd54452..304382b8a2a 100644 --- a/extensions/api/data-management/asset/build.gradle.kts +++ b/extensions/api/data-management/asset/build.gradle.kts @@ -32,7 +32,7 @@ dependencies { implementation("jakarta.ws.rs:jakarta.ws.rs-api:${rsApi}") - testImplementation(project(":core:defaults")) + testImplementation(project(":core:control-plane:control-plane-core")) testImplementation(project(":extensions:http")) testImplementation(project(":extensions:junit")) testImplementation("io.rest-assured:rest-assured:${restAssured}") diff --git a/extensions/api/data-management/contractagreement/build.gradle.kts b/extensions/api/data-management/contractagreement/build.gradle.kts index cfb04358afd..5e8bbd13aad 100644 --- a/extensions/api/data-management/contractagreement/build.gradle.kts +++ b/extensions/api/data-management/contractagreement/build.gradle.kts @@ -31,8 +31,8 @@ dependencies { implementation("jakarta.ws.rs:jakarta.ws.rs-api:${rsApi}") + testImplementation(project(":core:control-plane:control-plane-core")) testImplementation(project(":extensions:http")) - testImplementation(project(":extensions:junit")) testImplementation("io.rest-assured:rest-assured:${restAssured}") } diff --git a/extensions/api/data-management/contractdefinition/build.gradle.kts b/extensions/api/data-management/contractdefinition/build.gradle.kts index 62a0ebed730..5511a677c67 100644 --- a/extensions/api/data-management/contractdefinition/build.gradle.kts +++ b/extensions/api/data-management/contractdefinition/build.gradle.kts @@ -32,8 +32,8 @@ dependencies { implementation("jakarta.ws.rs:jakarta.ws.rs-api:${rsApi}") + testImplementation(project(":core:control-plane:control-plane-core")) testImplementation(project(":extensions:http")) - testImplementation(project(":extensions:junit")) testImplementation("io.rest-assured:rest-assured:${restAssured}") testImplementation("org.awaitility:awaitility:${awaitility}") diff --git a/extensions/api/data-management/contractnegotiation/build.gradle.kts b/extensions/api/data-management/contractnegotiation/build.gradle.kts index 58d28abe50a..24306acff37 100644 --- a/extensions/api/data-management/contractnegotiation/build.gradle.kts +++ b/extensions/api/data-management/contractnegotiation/build.gradle.kts @@ -25,14 +25,13 @@ dependencies { api(project(":spi:control-plane:contract-spi")) api(project(":spi:control-plane:transfer-spi")) api(project(":spi:common:transaction-spi")) - implementation(project(":core:contract")) implementation(project(":extensions:api:api-core")) implementation(project(":extensions:api:data-management:api-configuration")) implementation("jakarta.ws.rs:jakarta.ws.rs-api:${rsApi}") testImplementation(project(":common:util")) - testImplementation(project(":core:defaults")) + testImplementation(project(":core:control-plane:control-plane-core")) testImplementation(project(":extensions:dataloading")) testImplementation(project(":extensions:http")) testImplementation(project(":extensions:junit")) diff --git a/extensions/api/data-management/contractnegotiation/src/main/java/org/eclipse/dataspaceconnector/api/datamanagement/contractnegotiation/service/ContractNegotiationServiceImpl.java b/extensions/api/data-management/contractnegotiation/src/main/java/org/eclipse/dataspaceconnector/api/datamanagement/contractnegotiation/service/ContractNegotiationServiceImpl.java index 52ec7c35b16..a3cdf88ae5d 100644 --- a/extensions/api/data-management/contractnegotiation/src/main/java/org/eclipse/dataspaceconnector/api/datamanagement/contractnegotiation/service/ContractNegotiationServiceImpl.java +++ b/extensions/api/data-management/contractnegotiation/src/main/java/org/eclipse/dataspaceconnector/api/datamanagement/contractnegotiation/service/ContractNegotiationServiceImpl.java @@ -15,7 +15,6 @@ package org.eclipse.dataspaceconnector.api.datamanagement.contractnegotiation.service; import org.eclipse.dataspaceconnector.api.result.ServiceResult; -import org.eclipse.dataspaceconnector.contract.negotiation.command.commands.CancelNegotiationCommand; import org.eclipse.dataspaceconnector.spi.contract.negotiation.ConsumerContractNegotiationManager; import org.eclipse.dataspaceconnector.spi.contract.negotiation.store.ContractNegotiationStore; import org.eclipse.dataspaceconnector.spi.iam.ClaimToken; @@ -23,6 +22,7 @@ import org.eclipse.dataspaceconnector.spi.query.QueryValidator; import org.eclipse.dataspaceconnector.spi.transaction.TransactionContext; import org.eclipse.dataspaceconnector.spi.types.domain.contract.agreement.ContractAgreement; +import org.eclipse.dataspaceconnector.spi.types.domain.contract.command.CancelNegotiationCommand; import org.eclipse.dataspaceconnector.spi.types.domain.contract.negotiation.ContractNegotiation; import org.eclipse.dataspaceconnector.spi.types.domain.contract.negotiation.ContractNegotiationStates; import org.eclipse.dataspaceconnector.spi.types.domain.contract.negotiation.ContractOfferRequest; diff --git a/extensions/api/data-management/contractnegotiation/src/test/java/org/eclipse/dataspaceconnector/api/datamanagement/contractnegotiation/service/ContractNegotiationEventDispatchTest.java b/extensions/api/data-management/contractnegotiation/src/test/java/org/eclipse/dataspaceconnector/api/datamanagement/contractnegotiation/service/ContractNegotiationEventDispatchTest.java index 0067305a867..bad247f6f72 100644 --- a/extensions/api/data-management/contractnegotiation/src/test/java/org/eclipse/dataspaceconnector/api/datamanagement/contractnegotiation/service/ContractNegotiationEventDispatchTest.java +++ b/extensions/api/data-management/contractnegotiation/src/test/java/org/eclipse/dataspaceconnector/api/datamanagement/contractnegotiation/service/ContractNegotiationEventDispatchTest.java @@ -14,12 +14,12 @@ package org.eclipse.dataspaceconnector.api.datamanagement.contractnegotiation.service; -import org.eclipse.dataspaceconnector.contract.common.ContractId; import org.eclipse.dataspaceconnector.dataloading.AssetLoader; import org.eclipse.dataspaceconnector.junit.extensions.EdcExtension; import org.eclipse.dataspaceconnector.policy.model.Policy; import org.eclipse.dataspaceconnector.spi.asset.AssetIndex; import org.eclipse.dataspaceconnector.spi.asset.AssetSelectorExpression; +import org.eclipse.dataspaceconnector.spi.contract.ContractId; import org.eclipse.dataspaceconnector.spi.contract.negotiation.ConsumerContractNegotiationManager; import org.eclipse.dataspaceconnector.spi.contract.negotiation.NegotiationWaitStrategy; import org.eclipse.dataspaceconnector.spi.contract.negotiation.ProviderContractNegotiationManager; diff --git a/extensions/api/data-management/contractnegotiation/src/test/java/org/eclipse/dataspaceconnector/api/datamanagement/contractnegotiation/service/ContractNegotiationServiceImplTest.java b/extensions/api/data-management/contractnegotiation/src/test/java/org/eclipse/dataspaceconnector/api/datamanagement/contractnegotiation/service/ContractNegotiationServiceImplTest.java index 684ab337326..db4b46a5c5f 100644 --- a/extensions/api/data-management/contractnegotiation/src/test/java/org/eclipse/dataspaceconnector/api/datamanagement/contractnegotiation/service/ContractNegotiationServiceImplTest.java +++ b/extensions/api/data-management/contractnegotiation/src/test/java/org/eclipse/dataspaceconnector/api/datamanagement/contractnegotiation/service/ContractNegotiationServiceImplTest.java @@ -14,7 +14,6 @@ package org.eclipse.dataspaceconnector.api.datamanagement.contractnegotiation.service; -import org.eclipse.dataspaceconnector.contract.negotiation.command.commands.CancelNegotiationCommand; import org.eclipse.dataspaceconnector.policy.model.Policy; import org.eclipse.dataspaceconnector.spi.contract.negotiation.ConsumerContractNegotiationManager; import org.eclipse.dataspaceconnector.spi.contract.negotiation.store.ContractNegotiationStore; @@ -24,6 +23,7 @@ import org.eclipse.dataspaceconnector.spi.transaction.NoopTransactionContext; import org.eclipse.dataspaceconnector.spi.transaction.TransactionContext; import org.eclipse.dataspaceconnector.spi.types.domain.contract.agreement.ContractAgreement; +import org.eclipse.dataspaceconnector.spi.types.domain.contract.command.CancelNegotiationCommand; import org.eclipse.dataspaceconnector.spi.types.domain.contract.negotiation.ContractNegotiation; import org.eclipse.dataspaceconnector.spi.types.domain.contract.negotiation.ContractOfferRequest; import org.eclipse.dataspaceconnector.spi.types.domain.contract.negotiation.command.ContractNegotiationCommand; diff --git a/extensions/api/data-management/policydefinition/build.gradle.kts b/extensions/api/data-management/policydefinition/build.gradle.kts index cdcea10f507..3fc4412372f 100644 --- a/extensions/api/data-management/policydefinition/build.gradle.kts +++ b/extensions/api/data-management/policydefinition/build.gradle.kts @@ -28,16 +28,15 @@ dependencies { api(project(":spi:control-plane:policy-spi")) api(project(":spi:common:transaction-spi")) implementation(project(":common:util")) - implementation(project(":core:policy:policy-evaluator")) + implementation(project(":core:common:policy-evaluator")) implementation(project(":extensions:api:api-core")) implementation(project(":extensions:api:data-management:api-configuration")) implementation("jakarta.ws.rs:jakarta.ws.rs-api:${rsApi}") + testImplementation(project(":core:control-plane:control-plane-core")) testImplementation(project(":extensions:http")) - testImplementation(project(":extensions:transaction:transaction-local")) - testImplementation(project(":extensions:junit")) testImplementation("io.rest-assured:rest-assured:${restAssured}") } diff --git a/extensions/api/data-management/transferprocess/build.gradle.kts b/extensions/api/data-management/transferprocess/build.gradle.kts index f8678700768..11e2b322b04 100644 --- a/extensions/api/data-management/transferprocess/build.gradle.kts +++ b/extensions/api/data-management/transferprocess/build.gradle.kts @@ -32,11 +32,8 @@ dependencies { implementation("jakarta.ws.rs:jakarta.ws.rs-api:${rsApi}") - testImplementation(project(":core:contract")) - testImplementation(project(":core:transfer")) + testImplementation(project(":core:control-plane:control-plane-core")) testImplementation(project(":extensions:http")) - testImplementation(project(":core:defaults")) - testImplementation(project(":extensions:junit")) testImplementation("io.rest-assured:rest-assured:${restAssured}") diff --git a/extensions/aws/data-plane-s3/build.gradle.kts b/extensions/aws/data-plane-s3/build.gradle.kts index 5e99f4658fd..57627fc7b75 100644 --- a/extensions/aws/data-plane-s3/build.gradle.kts +++ b/extensions/aws/data-plane-s3/build.gradle.kts @@ -27,7 +27,7 @@ dependencies { implementation("dev.failsafe:failsafe:${failsafeVersion}") - testImplementation(project(":extensions:data-plane:data-plane-framework")) + testImplementation(project(":core:data-plane:data-plane-core")) testImplementation(testFixtures(project(":extensions:aws:aws-test"))) testImplementation(project(":extensions:junit")) diff --git a/extensions/azure/cosmos/contract-negotiation-store-cosmos/build.gradle.kts b/extensions/azure/cosmos/contract-negotiation-store-cosmos/build.gradle.kts index 8634c695380..2385379db1e 100644 --- a/extensions/azure/cosmos/contract-negotiation-store-cosmos/build.gradle.kts +++ b/extensions/azure/cosmos/contract-negotiation-store-cosmos/build.gradle.kts @@ -29,8 +29,6 @@ dependencies { implementation("com.azure:azure-cosmos:${cosmosSdkVersion}") implementation("dev.failsafe:failsafe:${failsafeVersion}") - testImplementation(project(":core:contract")) - testImplementation(testFixtures(project(":extensions:azure:azure-test"))) testImplementation(testFixtures(project(":extensions:azure:cosmos:cosmos-common"))) testImplementation("org.awaitility:awaitility:${awaitility}") diff --git a/extensions/azure/cosmos/contract-negotiation-store-cosmos/src/test/java/org/eclipse/dataspaceconnector/contract/negotiation/store/CosmosContractNegotiationStoreIntegrationTest.java b/extensions/azure/cosmos/contract-negotiation-store-cosmos/src/test/java/org/eclipse/dataspaceconnector/contract/negotiation/store/CosmosContractNegotiationStoreIntegrationTest.java index aae4ae6a89b..6fbfa5d8198 100644 --- a/extensions/azure/cosmos/contract-negotiation-store-cosmos/src/test/java/org/eclipse/dataspaceconnector/contract/negotiation/store/CosmosContractNegotiationStoreIntegrationTest.java +++ b/extensions/azure/cosmos/contract-negotiation-store-cosmos/src/test/java/org/eclipse/dataspaceconnector/contract/negotiation/store/CosmosContractNegotiationStoreIntegrationTest.java @@ -24,10 +24,10 @@ import org.eclipse.dataspaceconnector.azure.cosmos.CosmosDbApiImpl; import org.eclipse.dataspaceconnector.azure.testfixtures.CosmosTestClient; import org.eclipse.dataspaceconnector.azure.testfixtures.annotations.AzureCosmosDbIntegrationTest; -import org.eclipse.dataspaceconnector.contract.common.ContractId; import org.eclipse.dataspaceconnector.contract.negotiation.store.model.ContractNegotiationDocument; import org.eclipse.dataspaceconnector.policy.model.Policy; import org.eclipse.dataspaceconnector.spi.EdcException; +import org.eclipse.dataspaceconnector.spi.contract.ContractId; import org.eclipse.dataspaceconnector.spi.query.Criterion; import org.eclipse.dataspaceconnector.spi.query.QuerySpec; import org.eclipse.dataspaceconnector.spi.query.SortOrder; diff --git a/extensions/azure/data-plane/data-factory/build.gradle.kts b/extensions/azure/data-plane/data-factory/build.gradle.kts index 23445ffff53..b346523eac0 100644 --- a/extensions/azure/data-plane/data-factory/build.gradle.kts +++ b/extensions/azure/data-plane/data-factory/build.gradle.kts @@ -34,7 +34,7 @@ dependencies { implementation("com.azure.resourcemanager:azure-resourcemanager-authorization:${azureResourceManagerVersion}") testImplementation(project(":extensions:filesystem:configuration-fs")) - testImplementation(project(":extensions:data-plane:data-plane-framework")) + testImplementation(project(":core:data-plane:data-plane-core")) testImplementation(project(":extensions:azure:resource-manager")) testImplementation(testFixtures(project(":extensions:azure:azure-test"))) testImplementation(testFixtures(project(":extensions:azure:blobstorage:blob-core"))) diff --git a/extensions/azure/vault/src/main/java/org/eclipse/dataspaceconnector/core/security/azure/AzureVaultExtension.java b/extensions/azure/vault/src/main/java/org/eclipse/dataspaceconnector/core/security/azure/AzureVaultExtension.java index 31e53dcadf1..50ab36f70f9 100644 --- a/extensions/azure/vault/src/main/java/org/eclipse/dataspaceconnector/core/security/azure/AzureVaultExtension.java +++ b/extensions/azure/vault/src/main/java/org/eclipse/dataspaceconnector/core/security/azure/AzureVaultExtension.java @@ -15,8 +15,10 @@ package org.eclipse.dataspaceconnector.core.security.azure; import org.eclipse.dataspaceconnector.spi.EdcSetting; +import org.eclipse.dataspaceconnector.spi.security.CertificateResolver; import org.eclipse.dataspaceconnector.spi.security.PrivateKeyResolver; import org.eclipse.dataspaceconnector.spi.security.Vault; +import org.eclipse.dataspaceconnector.spi.security.VaultCertificateResolver; import org.eclipse.dataspaceconnector.spi.security.VaultPrivateKeyResolver; import org.eclipse.dataspaceconnector.spi.system.Provides; import org.eclipse.dataspaceconnector.spi.system.ServiceExtension; @@ -24,7 +26,7 @@ import static org.eclipse.dataspaceconnector.common.string.StringUtils.isNullOrEmpty; -@Provides({ Vault.class, PrivateKeyResolver.class }) +@Provides({ Vault.class, PrivateKeyResolver.class, CertificateResolver.class }) public class AzureVaultExtension implements ServiceExtension { @EdcSetting @@ -65,6 +67,7 @@ public void initialize(ServiceExtensionContext context) { context.registerService(Vault.class, vault); context.registerService(PrivateKeyResolver.class, new VaultPrivateKeyResolver(vault)); + context.registerService(CertificateResolver.class, new VaultCertificateResolver(vault)); } private String getMandatorySetting(ServiceExtensionContext context, String setting) { diff --git a/extensions/data-plane-selector/build.gradle.kts b/extensions/data-plane-selector/build.gradle.kts index 0ed2f39a174..55ccb4b3ced 100644 --- a/extensions/data-plane-selector/build.gradle.kts +++ b/extensions/data-plane-selector/build.gradle.kts @@ -18,9 +18,7 @@ plugins { dependencies { + api(project(":core:data-plane-selector:data-plane-selector-core")) api(project(":extensions:data-plane-selector:selector-api")) - api(project(":spi:data-plane-selector:selector-spi")) - api(project(":extensions:data-plane-selector:selector-core")) - api(project(":extensions:data-plane-selector:selector-store")) api(project(":extensions:data-plane-selector:selector-client")) } \ No newline at end of file diff --git a/extensions/data-plane-selector/selector-api/build.gradle.kts b/extensions/data-plane-selector/selector-api/build.gradle.kts index 7b5dd877900..bc3799da24f 100644 --- a/extensions/data-plane-selector/selector-api/build.gradle.kts +++ b/extensions/data-plane-selector/selector-api/build.gradle.kts @@ -27,14 +27,13 @@ dependencies { api(project(":spi:common:core-spi")) api(project(":extensions:http")) api(project(":extensions:filesystem:configuration-fs")) - api(project(":spi:data-plane-selector:selector-spi")) + api(project(":spi:data-plane-selector:data-plane-selector-spi")) implementation(project(":common:util")) implementation("jakarta.ws.rs:jakarta.ws.rs-api:${rsApi}") implementation(project(":extensions:api:api-core")) //for the exception mapper - testImplementation(project(":extensions:data-plane-selector:selector-core")) //for the selector impl - testImplementation(project(":extensions:data-plane-selector:selector-store")) + testImplementation(project(":core:data-plane-selector:data-plane-selector-core")) testImplementation("com.squareup.okhttp3:okhttp:${okHttpVersion}") testImplementation(project(":extensions:http")) diff --git a/extensions/data-plane-selector/selector-client/build.gradle.kts b/extensions/data-plane-selector/selector-client/build.gradle.kts index 22195caf65c..0bcae9dff04 100644 --- a/extensions/data-plane-selector/selector-client/build.gradle.kts +++ b/extensions/data-plane-selector/selector-client/build.gradle.kts @@ -21,7 +21,7 @@ plugins { } dependencies { - api(project(":spi:data-plane-selector:selector-spi")) + api(project(":spi:data-plane-selector:data-plane-selector-spi")) implementation(project(":common:util")) implementation("dev.failsafe:failsafe:${failsafeVersion}") implementation("com.squareup.okhttp3:okhttp:${okHttpVersion}") diff --git a/extensions/data-plane-selector/selector-core/src/test/java/org/eclipse/dataspaceconnector/dataplane/selector/TestFunctions.java b/extensions/data-plane-selector/selector-core/src/test/java/org/eclipse/dataspaceconnector/dataplane/selector/TestFunctions.java deleted file mode 100644 index 49b0194117c..00000000000 --- a/extensions/data-plane-selector/selector-core/src/test/java/org/eclipse/dataspaceconnector/dataplane/selector/TestFunctions.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2020 - 2022 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 - * https://www.apache.org/licenses/LICENSE-2.0 - * - * SPDX-License-Identifier: Apache-2.0 - * - * Contributors: - * Microsoft Corporation - initial API and implementation - * - */ - -package org.eclipse.dataspaceconnector.dataplane.selector; - -import org.eclipse.dataspaceconnector.spi.types.domain.DataAddress; - -public class TestFunctions { - - public static DataAddress createAddress(String type) { - return DataAddress.Builder.newInstance() - .type("test-type") - .keyName(type) - .property("someprop", "someval") - .build(); - } - -} diff --git a/extensions/data-plane-selector/selector-store/build.gradle.kts b/extensions/data-plane-selector/selector-store/build.gradle.kts deleted file mode 100644 index e2538b23a4c..00000000000 --- a/extensions/data-plane-selector/selector-store/build.gradle.kts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2020-2022 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 - * https://www.apache.org/licenses/LICENSE-2.0 - * - * SPDX-License-Identifier: Apache-2.0 - * - * Contributors: - * Microsoft Corporation - initial API and implementation - * - */ - -val mockitoVersion: String by project - -plugins { - `java-library` -} - -dependencies { - api(project(":spi:data-plane-selector:selector-spi")) - implementation(project(":common:util")) -} - -publishing { - publications { - create("data-plane-selector-store") { - artifactId = "data-plane-selector-store" - from(components["java"]) - } - } -} diff --git a/extensions/data-plane-selector/selector-store/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/store/DataPlaneInstanceStoreExtension.java b/extensions/data-plane-selector/selector-store/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/store/DataPlaneInstanceStoreExtension.java deleted file mode 100644 index a77800ca6e8..00000000000 --- a/extensions/data-plane-selector/selector-store/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/store/DataPlaneInstanceStoreExtension.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2020 - 2022 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 - * https://www.apache.org/licenses/LICENSE-2.0 - * - * SPDX-License-Identifier: Apache-2.0 - * - * Contributors: - * Microsoft Corporation - initial API and implementation - * - */ - -package org.eclipse.dataspaceconnector.dataplane.selector.store; - -import org.eclipse.dataspaceconnector.spi.system.Provides; -import org.eclipse.dataspaceconnector.spi.system.ServiceExtension; -import org.eclipse.dataspaceconnector.spi.system.ServiceExtensionContext; - -@Provides(DataPlaneInstanceStore.class) -public class DataPlaneInstanceStoreExtension implements ServiceExtension { - - @Override - public void initialize(ServiceExtensionContext context) { - context.registerService(DataPlaneInstanceStore.class, new DefaultDataPlaneInstanceStore()); - } -} diff --git a/extensions/data-plane-transfer/data-plane-transfer-client/build.gradle.kts b/extensions/data-plane-transfer/data-plane-transfer-client/build.gradle.kts index 68194651922..f16a63ff1ff 100644 --- a/extensions/data-plane-transfer/data-plane-transfer-client/build.gradle.kts +++ b/extensions/data-plane-transfer/data-plane-transfer-client/build.gradle.kts @@ -26,7 +26,7 @@ dependencies { api(project(":spi:control-plane:transfer-spi")) api(project(":spi:data-plane:data-plane-spi")) api(project(":spi:control-plane:data-plane-transfer-spi")) - api(project(":spi:data-plane-selector:selector-spi")) + api(project(":spi:data-plane-selector:data-plane-selector-spi")) implementation(project(":common:util")) implementation("dev.failsafe:failsafe:${failsafeVersion}") diff --git a/extensions/data-plane-transfer/data-plane-transfer-sync/build.gradle.kts b/extensions/data-plane-transfer/data-plane-transfer-sync/build.gradle.kts index fcc7f359993..c7dcfd36f97 100644 --- a/extensions/data-plane-transfer/data-plane-transfer-sync/build.gradle.kts +++ b/extensions/data-plane-transfer/data-plane-transfer-sync/build.gradle.kts @@ -30,7 +30,7 @@ dependencies { api(project(":spi:control-plane:data-plane-transfer-spi")) api(project(":spi:data-plane:data-plane-spi")) - api(project(":spi:data-plane-selector:selector-spi")) + api(project(":spi:data-plane-selector:data-plane-selector-spi")) implementation(project(":common:token-validation-lib")) implementation(project(":common:token-generation-lib")) diff --git a/extensions/hashicorp-vault/build.gradle.kts b/extensions/hashicorp-vault/build.gradle.kts index fcf84382fc8..3821abcb6a5 100644 --- a/extensions/hashicorp-vault/build.gradle.kts +++ b/extensions/hashicorp-vault/build.gradle.kts @@ -12,8 +12,8 @@ * */ -val okHttpVersion: String by project val failsafeVersion: String by project +val okHttpVersion: String by project plugins { `java-library` @@ -21,10 +21,11 @@ plugins { dependencies { api(project(":spi:common:core-spi")) - api(project(":core:base")) implementation(project(":common:util")) + implementation("com.squareup.okhttp3:okhttp:${okHttpVersion}") + api("dev.failsafe:failsafe:${failsafeVersion}") testImplementation(project(":extensions:junit")) testImplementation(testFixtures(project(":common:util"))) diff --git a/extensions/hashicorp-vault/src/main/java/org/eclipse/dataspaceconnector/core/security/hashicorpvault/HashicorpVaultExtension.java b/extensions/hashicorp-vault/src/main/java/org/eclipse/dataspaceconnector/core/security/hashicorpvault/HashicorpVaultExtension.java index c984ad3e6be..e99cb17137c 100644 --- a/extensions/hashicorp-vault/src/main/java/org/eclipse/dataspaceconnector/core/security/hashicorpvault/HashicorpVaultExtension.java +++ b/extensions/hashicorp-vault/src/main/java/org/eclipse/dataspaceconnector/core/security/hashicorpvault/HashicorpVaultExtension.java @@ -18,8 +18,10 @@ import okhttp3.OkHttpClient; import org.eclipse.dataspaceconnector.spi.EdcException; import org.eclipse.dataspaceconnector.spi.EdcSetting; +import org.eclipse.dataspaceconnector.spi.security.CertificateResolver; import org.eclipse.dataspaceconnector.spi.security.PrivateKeyResolver; import org.eclipse.dataspaceconnector.spi.security.Vault; +import org.eclipse.dataspaceconnector.spi.security.VaultCertificateResolver; import org.eclipse.dataspaceconnector.spi.security.VaultPrivateKeyResolver; import org.eclipse.dataspaceconnector.spi.system.Inject; import org.eclipse.dataspaceconnector.spi.system.Provider; @@ -27,7 +29,7 @@ import org.eclipse.dataspaceconnector.spi.system.ServiceExtension; import org.eclipse.dataspaceconnector.spi.system.ServiceExtensionContext; -@Provides({ Vault.class, PrivateKeyResolver.class }) +@Provides({ Vault.class, PrivateKeyResolver.class, CertificateResolver.class }) public class HashicorpVaultExtension implements ServiceExtension { @EdcSetting(value = "The URL of the Hashicorp Vault", required = true) @@ -69,6 +71,8 @@ public void initialize(ServiceExtensionContext context) { vault = new HashicorpVault(client, context.getMonitor()); privateKeyResolver = new VaultPrivateKeyResolver(vault); + + context.registerService(CertificateResolver.class, new VaultCertificateResolver(vault)); } private HashicorpVaultConfig loadHashicorpVaultClientConfig( diff --git a/extensions/http-provisioner/build.gradle.kts b/extensions/http-provisioner/build.gradle.kts index ab8e04adfe2..d5a682384b2 100644 --- a/extensions/http-provisioner/build.gradle.kts +++ b/extensions/http-provisioner/build.gradle.kts @@ -30,14 +30,12 @@ dependencies { api(project(":spi:common:web-spi")) implementation(project(":spi:common:auth-spi")) implementation(project(":extensions:api:api-core")) - implementation(project(":core:transfer")) // needs the AddProvisionedResourceCommand implementation("com.squareup.okhttp3:okhttp:${okHttpVersion}") implementation("dev.failsafe:failsafe:${failsafeVersion}") implementation("jakarta.ws.rs:jakarta.ws.rs-api:${rsApi}") - testImplementation(project(":core:contract")) - testImplementation(project(":core:defaults")) + testImplementation(project(":core:control-plane:control-plane-core")) testImplementation(project(":extensions:dataloading")) testImplementation(project(":extensions:http")) testImplementation(project(":extensions:junit")) diff --git a/extensions/http-provisioner/src/main/java/org/eclipse/dataspaceconnector/transfer/provision/http/webhook/HttpProvisionerWebhookApiController.java b/extensions/http-provisioner/src/main/java/org/eclipse/dataspaceconnector/transfer/provision/http/webhook/HttpProvisionerWebhookApiController.java index 1530d71a352..d647004bddb 100644 --- a/extensions/http-provisioner/src/main/java/org/eclipse/dataspaceconnector/transfer/provision/http/webhook/HttpProvisionerWebhookApiController.java +++ b/extensions/http-provisioner/src/main/java/org/eclipse/dataspaceconnector/transfer/provision/http/webhook/HttpProvisionerWebhookApiController.java @@ -26,7 +26,7 @@ import org.eclipse.dataspaceconnector.spi.types.domain.transfer.DeprovisionedResource; import org.eclipse.dataspaceconnector.spi.types.domain.transfer.ProvisionResponse; import org.eclipse.dataspaceconnector.spi.types.domain.transfer.command.AddProvisionedResourceCommand; -import org.eclipse.dataspaceconnector.transfer.core.command.handlers.DeprovisionCompleteCommand; +import org.eclipse.dataspaceconnector.spi.types.domain.transfer.command.DeprovisionCompleteCommand; import org.eclipse.dataspaceconnector.transfer.provision.http.impl.HttpProvisionedContentResource; import java.util.UUID; diff --git a/extensions/junit/build.gradle.kts b/extensions/junit/build.gradle.kts index 7d4b369faad..d143857b441 100644 --- a/extensions/junit/build.gradle.kts +++ b/extensions/junit/build.gradle.kts @@ -25,8 +25,8 @@ val assertj: String by project dependencies { api(project(":spi:common:core-spi")) - api(project(":core:boot")) - api(project(":core:base")) + api(project(":core:common:boot")) + api(project(":core:common:base")) api(project(":common:util")) implementation("org.mockito:mockito-core:${mockitoVersion}") implementation("org.assertj:assertj-core:${assertj}") diff --git a/core/micrometer/README.md b/extensions/micrometer/README.md similarity index 100% rename from core/micrometer/README.md rename to extensions/micrometer/README.md diff --git a/core/micrometer/build.gradle.kts b/extensions/micrometer/build.gradle.kts similarity index 97% rename from core/micrometer/build.gradle.kts rename to extensions/micrometer/build.gradle.kts index 30bc4d3ebea..92f59637a47 100644 --- a/core/micrometer/build.gradle.kts +++ b/extensions/micrometer/build.gradle.kts @@ -21,7 +21,7 @@ val okHttpVersion: String by project val micrometerVersion: String by project dependencies { - api(project(":core:base")) + api(project(":spi:common:core-spi")) api("com.squareup.okhttp3:okhttp:${okHttpVersion}") api("io.micrometer:micrometer-core:${micrometerVersion}") @@ -30,7 +30,6 @@ dependencies { testImplementation(project(":extensions:junit")) testImplementation(testFixtures(project(":common:util"))) - testRuntimeOnly(project(":extensions:http:jersey-micrometer")) testRuntimeOnly(project(":extensions:http:jetty-micrometer")) } diff --git a/core/micrometer/src/main/java/org/eclipse/dataspaceconnector/metrics/micrometer/MicrometerExecutorInstrumentation.java b/extensions/micrometer/src/main/java/org/eclipse/dataspaceconnector/metrics/micrometer/MicrometerExecutorInstrumentation.java similarity index 100% rename from core/micrometer/src/main/java/org/eclipse/dataspaceconnector/metrics/micrometer/MicrometerExecutorInstrumentation.java rename to extensions/micrometer/src/main/java/org/eclipse/dataspaceconnector/metrics/micrometer/MicrometerExecutorInstrumentation.java diff --git a/core/micrometer/src/main/java/org/eclipse/dataspaceconnector/metrics/micrometer/MicrometerExtension.java b/extensions/micrometer/src/main/java/org/eclipse/dataspaceconnector/metrics/micrometer/MicrometerExtension.java similarity index 100% rename from core/micrometer/src/main/java/org/eclipse/dataspaceconnector/metrics/micrometer/MicrometerExtension.java rename to extensions/micrometer/src/main/java/org/eclipse/dataspaceconnector/metrics/micrometer/MicrometerExtension.java diff --git a/core/micrometer/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension b/extensions/micrometer/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension similarity index 100% rename from core/micrometer/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension rename to extensions/micrometer/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension diff --git a/core/micrometer/src/test/java/org/eclipse/dataspaceconnector/metrics/micrometer/MicrometerExtensionIntegrationTest.java b/extensions/micrometer/src/test/java/org/eclipse/dataspaceconnector/metrics/micrometer/MicrometerExtensionIntegrationTest.java similarity index 100% rename from core/micrometer/src/test/java/org/eclipse/dataspaceconnector/metrics/micrometer/MicrometerExtensionIntegrationTest.java rename to extensions/micrometer/src/test/java/org/eclipse/dataspaceconnector/metrics/micrometer/MicrometerExtensionIntegrationTest.java diff --git a/extensions/sql/contract-negotiation-store-sql/build.gradle.kts b/extensions/sql/contract-negotiation-store-sql/build.gradle.kts index c93972aa528..8f4f2b02e7f 100644 --- a/extensions/sql/contract-negotiation-store-sql/build.gradle.kts +++ b/extensions/sql/contract-negotiation-store-sql/build.gradle.kts @@ -31,8 +31,6 @@ dependencies { testImplementation(project(":extensions:junit")) - testImplementation(project(":core:base")) - testImplementation(project(":core:contract")) testImplementation(testFixtures(project(":extensions:sql:lease-sql"))) testImplementation("org.assertj:assertj-core:${assertj}") testImplementation(testFixtures(project(":common:util"))) diff --git a/extensions/sql/contract-negotiation-store-sql/src/test/java/org/eclipse/dataspaceconnector/sql/contractnegotiation/store/ContractNegotiationStoreTest.java b/extensions/sql/contract-negotiation-store-sql/src/test/java/org/eclipse/dataspaceconnector/sql/contractnegotiation/store/ContractNegotiationStoreTest.java index 6223bb545d4..a1ed46dc70a 100644 --- a/extensions/sql/contract-negotiation-store-sql/src/test/java/org/eclipse/dataspaceconnector/sql/contractnegotiation/store/ContractNegotiationStoreTest.java +++ b/extensions/sql/contract-negotiation-store-sql/src/test/java/org/eclipse/dataspaceconnector/sql/contractnegotiation/store/ContractNegotiationStoreTest.java @@ -15,7 +15,7 @@ package org.eclipse.dataspaceconnector.sql.contractnegotiation.store; -import org.eclipse.dataspaceconnector.contract.common.ContractId; +import org.eclipse.dataspaceconnector.spi.contract.ContractId; import org.eclipse.dataspaceconnector.spi.query.Criterion; import org.eclipse.dataspaceconnector.spi.query.QuerySpec; import org.eclipse.dataspaceconnector.spi.types.domain.contract.negotiation.ContractNegotiation; diff --git a/extensions/sql/contract-negotiation-store-sql/src/test/java/org/eclipse/dataspaceconnector/sql/contractnegotiation/store/PostgresContractNegotiationStoreTest.java b/extensions/sql/contract-negotiation-store-sql/src/test/java/org/eclipse/dataspaceconnector/sql/contractnegotiation/store/PostgresContractNegotiationStoreTest.java index 230732bb146..0331749f2a8 100644 --- a/extensions/sql/contract-negotiation-store-sql/src/test/java/org/eclipse/dataspaceconnector/sql/contractnegotiation/store/PostgresContractNegotiationStoreTest.java +++ b/extensions/sql/contract-negotiation-store-sql/src/test/java/org/eclipse/dataspaceconnector/sql/contractnegotiation/store/PostgresContractNegotiationStoreTest.java @@ -15,7 +15,6 @@ package org.eclipse.dataspaceconnector.sql.contractnegotiation.store; import org.eclipse.dataspaceconnector.common.util.junit.annotations.PostgresqlDbIntegrationTest; -import org.eclipse.dataspaceconnector.contract.common.ContractId; import org.eclipse.dataspaceconnector.policy.model.Action; import org.eclipse.dataspaceconnector.policy.model.AtomicConstraint; import org.eclipse.dataspaceconnector.policy.model.LiteralExpression; @@ -23,6 +22,7 @@ import org.eclipse.dataspaceconnector.policy.model.Permission; import org.eclipse.dataspaceconnector.policy.model.Policy; import org.eclipse.dataspaceconnector.policy.model.PolicyRegistrationTypes; +import org.eclipse.dataspaceconnector.spi.contract.ContractId; import org.eclipse.dataspaceconnector.spi.query.QuerySpec; import org.eclipse.dataspaceconnector.spi.transaction.NoopTransactionContext; import org.eclipse.dataspaceconnector.spi.transaction.TransactionContext; diff --git a/extensions/sql/lease-sql/build.gradle.kts b/extensions/sql/lease-sql/build.gradle.kts index 8d8a049d357..be25e93699a 100644 --- a/extensions/sql/lease-sql/build.gradle.kts +++ b/extensions/sql/lease-sql/build.gradle.kts @@ -30,7 +30,6 @@ dependencies { implementation(project(":extensions:sql:common-sql")) testImplementation(project(":extensions:junit")) - testImplementation(project(":core:base")) testImplementation(project(":extensions:transaction:transaction-local")) testImplementation(testFixtures(project(":extensions:sql:lease-sql"))) testImplementation(testFixtures(project(":common:util"))) diff --git a/extensions/sql/pool/apache-commons-pool-sql/build.gradle.kts b/extensions/sql/pool/apache-commons-pool-sql/build.gradle.kts index 34c0392f9e1..62cfe8d852a 100644 --- a/extensions/sql/pool/apache-commons-pool-sql/build.gradle.kts +++ b/extensions/sql/pool/apache-commons-pool-sql/build.gradle.kts @@ -28,7 +28,6 @@ dependencies { implementation("org.apache.commons:commons-pool2:${apacheCommonsPool2Version}") testImplementation(project(":extensions:junit")) - testImplementation(project(":core:base")) testImplementation(project(":extensions:transaction:transaction-local")) // required for statically mocking the JDBC DriverManager diff --git a/extensions/sql/transfer-process-store-sql/build.gradle.kts b/extensions/sql/transfer-process-store-sql/build.gradle.kts index 2c0b584c4be..842c9a5dc95 100644 --- a/extensions/sql/transfer-process-store-sql/build.gradle.kts +++ b/extensions/sql/transfer-process-store-sql/build.gradle.kts @@ -33,7 +33,11 @@ dependencies { testImplementation(project(":extensions:junit")) testImplementation(testFixtures(project(":extensions:sql:lease-sql"))) +<<<<<<< HEAD testImplementation(project(":core:base")) +======= + testImplementation("com.h2database:h2:${h2Version}") +>>>>>>> 89c78f663 (Move contract and transfer core modules into control-plane) testImplementation("org.assertj:assertj-core:${assertj}") testImplementation("org.awaitility:awaitility:${awaitility}") testImplementation(testFixtures(project(":common:util"))) diff --git a/launchers/data-loader-cli/build.gradle.kts b/launchers/data-loader-cli/build.gradle.kts index 467b5cea0c7..7d4bb2c61c7 100644 --- a/launchers/data-loader-cli/build.gradle.kts +++ b/launchers/data-loader-cli/build.gradle.kts @@ -21,7 +21,7 @@ plugins { val jupiterVersion: String by project dependencies { - implementation(project(":core:boot")) + implementation(project(":core:common:boot")) implementation(project(":extensions:dataloading")) // the following lines enable the CosmosDB-based AssetIndex diff --git a/launchers/data-plane-server/build.gradle.kts b/launchers/data-plane-server/build.gradle.kts index 40f795d82c1..bf4796f7f7c 100644 --- a/launchers/data-plane-server/build.gradle.kts +++ b/launchers/data-plane-server/build.gradle.kts @@ -23,13 +23,10 @@ plugins { dependencies { api(project(":spi:common:web-spi")) - implementation(project(":core:base")) - implementation(project(":core:boot")) - implementation(project(":core:micrometer")) + implementation(project(":extensions:micrometer")) + implementation(project(":core:data-plane:data-plane-core")) implementation(project(":extensions:http")) implementation(project(":extensions:filesystem:configuration-fs")) - implementation(project(":spi:data-plane:data-plane-spi")) - implementation(project(":extensions:data-plane:data-plane-framework")) implementation(project(":extensions:data-plane:data-plane-http")) implementation(project(":extensions:azure:data-plane:storage")) implementation(project(":extensions:data-plane:data-plane-api")) diff --git a/launchers/dpf-selector/build.gradle.kts b/launchers/dpf-selector/build.gradle.kts index 5cd9da1252c..2a613a829fb 100644 --- a/launchers/dpf-selector/build.gradle.kts +++ b/launchers/dpf-selector/build.gradle.kts @@ -22,10 +22,10 @@ val jupiterVersion: String by project dependencies { - implementation(project(":core:boot")) - implementation(project(":core:base")) implementation(project(":extensions:api:observability")) - implementation(project(":extensions:data-plane-selector")) + api(project(":core:data-plane-selector:data-plane-selector-core")) + api(project(":extensions:data-plane-selector:selector-api")) + api(project(":extensions:data-plane-selector:selector-client")) } application { diff --git a/launchers/ids-connector/README.md b/launchers/ids-connector/README.md index cb03339d590..37121ca3fb4 100644 --- a/launchers/ids-connector/README.md +++ b/launchers/ids-connector/README.md @@ -28,7 +28,6 @@ The following modules are used for this launcher: | Name | Description | |----------------------------------------|------------------------------------------------------------------------------------| -| core:defaults | provides default (in-memory) implementations for various data stores | | extensions:data-protocols:ids | contains all IDS modules, e.g. for dispatching and handling IDS multipart messages | | extensions:filesystem:configuration-fs | reads configuration properties from a file in the file-system | | extensions:filesystem:vault-fs | file-system based vault, required for using a certificate from the file-system | diff --git a/launchers/ids-connector/build.gradle.kts b/launchers/ids-connector/build.gradle.kts index 7fc1491e644..bdd2fb3d33c 100644 --- a/launchers/ids-connector/build.gradle.kts +++ b/launchers/ids-connector/build.gradle.kts @@ -22,7 +22,7 @@ plugins { val jupiterVersion: String by project dependencies { - api(project(":core")) + implementation(project(":core:control-plane:control-plane-core")) implementation(project(":data-protocols:ids")) diff --git a/samples/01-basic-connector/README.md b/samples/01-basic-connector/README.md index 3d6e3675798..502f91a139d 100644 --- a/samples/01-basic-connector/README.md +++ b/samples/01-basic-connector/README.md @@ -11,7 +11,7 @@ that contains the essential dependencies. We'll need at least the following thin ```kotlin dependencies { - implementation(project(":core")) + implementation(project(":core:control-plane:control-plane-core")) } ``` diff --git a/samples/01-basic-connector/build.gradle.kts b/samples/01-basic-connector/build.gradle.kts index b110ac237a6..a4b264c50e6 100644 --- a/samples/01-basic-connector/build.gradle.kts +++ b/samples/01-basic-connector/build.gradle.kts @@ -20,7 +20,7 @@ plugins { } dependencies { - implementation(project(":core")) + implementation(project(":core:control-plane:control-plane-core")) } application { diff --git a/samples/02-health-endpoint/build.gradle.kts b/samples/02-health-endpoint/build.gradle.kts index ad73338095b..57f5319ab43 100644 --- a/samples/02-health-endpoint/build.gradle.kts +++ b/samples/02-health-endpoint/build.gradle.kts @@ -22,7 +22,7 @@ plugins { val rsApi: String by project dependencies { - implementation(project(":core")) + implementation(project(":core:control-plane:control-plane-core")) implementation(project(":extensions:http")) diff --git a/samples/03-configuration/build.gradle.kts b/samples/03-configuration/build.gradle.kts index 70ee217043f..82aaa597d23 100644 --- a/samples/03-configuration/build.gradle.kts +++ b/samples/03-configuration/build.gradle.kts @@ -23,8 +23,8 @@ plugins { val rsApi: String by project dependencies { - api(project(":core")) - api(project(":extensions:http")) + implementation(project(":core:control-plane:control-plane-core")) + implementation(project(":extensions:http")) implementation(project(":extensions:api:data-management")) diff --git a/samples/04.0-file-transfer/consumer/build.gradle.kts b/samples/04.0-file-transfer/consumer/build.gradle.kts index f5339f28f1b..7f2c84f1ec9 100644 --- a/samples/04.0-file-transfer/consumer/build.gradle.kts +++ b/samples/04.0-file-transfer/consumer/build.gradle.kts @@ -24,7 +24,7 @@ val jupiterVersion: String by project val rsApi: String by project dependencies { - implementation(project(":core")) + implementation(project(":core:control-plane:control-plane-core")) implementation(project(":extensions:api:observability")) diff --git a/samples/04.0-file-transfer/provider/build.gradle.kts b/samples/04.0-file-transfer/provider/build.gradle.kts index 0dd4080c004..42334baff35 100644 --- a/samples/04.0-file-transfer/provider/build.gradle.kts +++ b/samples/04.0-file-transfer/provider/build.gradle.kts @@ -24,7 +24,7 @@ val jupiterVersion: String by project val rsApi: String by project dependencies { - implementation(project(":core")) + implementation(project(":core:control-plane:control-plane-core")) implementation(project(":extensions:api:observability")) diff --git a/samples/04.0-file-transfer/transfer-file/build.gradle.kts b/samples/04.0-file-transfer/transfer-file/build.gradle.kts index 9f7f8766275..5233e714449 100644 --- a/samples/04.0-file-transfer/transfer-file/build.gradle.kts +++ b/samples/04.0-file-transfer/transfer-file/build.gradle.kts @@ -22,12 +22,11 @@ val openTelemetryVersion: String by project dependencies { api(project(":spi:data-plane:data-plane-spi")) - implementation(project(":core:transfer")) + implementation(project(":core:control-plane:control-plane-core")) + implementation(project(":core:data-plane:data-plane-core")) implementation(project(":extensions:data-plane-transfer:data-plane-transfer-client")) implementation(project(":extensions:data-plane-selector:selector-client")) - implementation(project(":extensions:data-plane-selector:selector-core")) - implementation(project(":extensions:data-plane-selector:selector-store")) - implementation(project(":extensions:data-plane:data-plane-framework")) + implementation(project(":core:data-plane-selector:data-plane-selector-core")) implementation("io.opentelemetry:opentelemetry-extension-annotations:${openTelemetryVersion}") implementation(project(":spi:data-plane:data-plane-spi")) diff --git a/samples/04.1-file-transfer-listener/consumer/build.gradle.kts b/samples/04.1-file-transfer-listener/consumer/build.gradle.kts index cdb36b625c6..70392f817ab 100644 --- a/samples/04.1-file-transfer-listener/consumer/build.gradle.kts +++ b/samples/04.1-file-transfer-listener/consumer/build.gradle.kts @@ -24,7 +24,7 @@ val jupiterVersion: String by project val rsApi: String by project dependencies { - implementation(project(":core")) + implementation(project(":core:control-plane:control-plane-core")) implementation(project(":extensions:http")) diff --git a/samples/04.2-modify-transferprocess/consumer/build.gradle.kts b/samples/04.2-modify-transferprocess/consumer/build.gradle.kts index 3ca6245556f..7e182daefb0 100644 --- a/samples/04.2-modify-transferprocess/consumer/build.gradle.kts +++ b/samples/04.2-modify-transferprocess/consumer/build.gradle.kts @@ -24,7 +24,7 @@ val jupiterVersion: String by project val rsApi: String by project dependencies { - implementation(project(":core")) + implementation(project(":core:control-plane:control-plane-core")) implementation(project(":samples:04.2-modify-transferprocess:watchdog")) implementation(project(":samples:04.2-modify-transferprocess:simulator")) diff --git a/samples/04.2-modify-transferprocess/simulator/build.gradle.kts b/samples/04.2-modify-transferprocess/simulator/build.gradle.kts index 6ead5dde161..e4ca0f989af 100644 --- a/samples/04.2-modify-transferprocess/simulator/build.gradle.kts +++ b/samples/04.2-modify-transferprocess/simulator/build.gradle.kts @@ -21,5 +21,5 @@ val jupiterVersion: String by project val rsApi: String by project dependencies { - implementation(project(":core")) + implementation(project(":core:control-plane:control-plane-core")) } diff --git a/samples/04.2-modify-transferprocess/watchdog/build.gradle.kts b/samples/04.2-modify-transferprocess/watchdog/build.gradle.kts index 6ead5dde161..e4ca0f989af 100644 --- a/samples/04.2-modify-transferprocess/watchdog/build.gradle.kts +++ b/samples/04.2-modify-transferprocess/watchdog/build.gradle.kts @@ -21,5 +21,5 @@ val jupiterVersion: String by project val rsApi: String by project dependencies { - implementation(project(":core")) + implementation(project(":core:control-plane:control-plane-core")) } diff --git a/samples/04.3-open-telemetry/consumer/build.gradle.kts b/samples/04.3-open-telemetry/consumer/build.gradle.kts index 2d506d3e9a0..a15d505e67f 100644 --- a/samples/04.3-open-telemetry/consumer/build.gradle.kts +++ b/samples/04.3-open-telemetry/consumer/build.gradle.kts @@ -23,8 +23,8 @@ val jupiterVersion: String by project val rsApi: String by project dependencies { - implementation(project(":core")) - implementation(project(":core:micrometer")) + implementation(project(":core:control-plane:control-plane-core")) + implementation(project(":extensions:micrometer")) implementation(project(":extensions:filesystem:configuration-fs")) implementation(project(":extensions:iam:iam-mock")) diff --git a/samples/04.3-open-telemetry/provider/build.gradle.kts b/samples/04.3-open-telemetry/provider/build.gradle.kts index 11f9f90e010..9ccb7347693 100644 --- a/samples/04.3-open-telemetry/provider/build.gradle.kts +++ b/samples/04.3-open-telemetry/provider/build.gradle.kts @@ -22,7 +22,7 @@ val jupiterVersion: String by project val rsApi: String by project dependencies { - implementation(project(":core")) + implementation(project(":core:control-plane:control-plane-core")) implementation(project(":extensions:api:observability")) diff --git a/samples/05-file-transfer-cloud/consumer/build.gradle.kts b/samples/05-file-transfer-cloud/consumer/build.gradle.kts index 0cb87220040..14fa77689a6 100644 --- a/samples/05-file-transfer-cloud/consumer/build.gradle.kts +++ b/samples/05-file-transfer-cloud/consumer/build.gradle.kts @@ -21,7 +21,7 @@ plugins { } dependencies { - implementation(project(":core")) + implementation(project(":core:control-plane:control-plane-core")) implementation(project(":extensions:api:observability")) diff --git a/samples/05-file-transfer-cloud/provider/build.gradle.kts b/samples/05-file-transfer-cloud/provider/build.gradle.kts index abecc5c8ec4..8e0473e5eb2 100644 --- a/samples/05-file-transfer-cloud/provider/build.gradle.kts +++ b/samples/05-file-transfer-cloud/provider/build.gradle.kts @@ -21,7 +21,7 @@ plugins { } dependencies { - implementation(project(":core")) + implementation(project(":core:control-plane:control-plane-core")) implementation(project(":extensions:api:observability")) diff --git a/samples/05-file-transfer-cloud/transfer-file/build.gradle.kts b/samples/05-file-transfer-cloud/transfer-file/build.gradle.kts index d032a022071..562ee44c28c 100644 --- a/samples/05-file-transfer-cloud/transfer-file/build.gradle.kts +++ b/samples/05-file-transfer-cloud/transfer-file/build.gradle.kts @@ -19,18 +19,14 @@ plugins { val openTelemetryVersion: String by project dependencies { - api(project(":spi:control-plane:contract-spi")) - api(project(":spi:control-plane:policy-spi")) - implementation(project(":spi:data-plane:data-plane-spi")) - implementation(project(":core:transfer")) + implementation(project(":core:control-plane:control-plane-core")) + implementation(project(":core:data-plane:data-plane-core")) implementation(project(":extensions:azure:data-plane:storage")) implementation(project(":extensions:aws:data-plane-s3")) implementation(project(":extensions:dataloading")) implementation(project(":extensions:data-plane-transfer:data-plane-transfer-client")) implementation(project(":extensions:data-plane-selector:selector-client")) - implementation(project(":extensions:data-plane-selector:selector-core")) - implementation(project(":extensions:data-plane-selector:selector-store")) - implementation(project(":extensions:data-plane:data-plane-framework")) + implementation(project(":core:data-plane-selector:data-plane-selector-core")) implementation("io.opentelemetry:opentelemetry-extension-annotations:${openTelemetryVersion}") } \ No newline at end of file diff --git a/samples/other/custom-runtime/build.gradle.kts b/samples/other/custom-runtime/build.gradle.kts index ed964ed6e66..16410e92959 100644 --- a/samples/other/custom-runtime/build.gradle.kts +++ b/samples/other/custom-runtime/build.gradle.kts @@ -21,7 +21,7 @@ plugins { val jupiterVersion: String by project dependencies { - api(project(":core:boot")) + api(project(":core:common:boot")) implementation(project(":data-protocols:ids")) implementation(project(":extensions:iam:iam-mock")) diff --git a/settings.gradle.kts b/settings.gradle.kts index 7d0a1cb8c83..35dd72253fa 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -24,17 +24,16 @@ include(":common:state-machine-lib") include(":common:token-generation-lib") include(":common:token-validation-lib") - // EDC core modules -include(":core") -include(":core:policy:policy-engine") -include(":core:policy:policy-evaluator") -include(":core:transfer") -include(":core:contract") -include(":core:base") -include(":core:defaults") -include(":core:boot") -include(":core:micrometer") +include(":core:common:base") +include(":core:common:boot") +include(":extensions:micrometer") +include(":core:common:policy-engine") +include(":core:common:policy-evaluator") +include(":core:control-plane:control-plane-core") +include(":core:control-plane:transfer") +include(":core:control-plane:contract") +include(":core:data-plane:data-plane-core") // modules that provide implementations for data ingress/egress include(":data-protocols:ids:ids-api-multipart-endpoint-v1") @@ -95,7 +94,7 @@ include(":extensions:iam:decentralized-identity:identity-did-web") include(":extensions:iam:decentralized-identity:identity-did-crypto") include(":extensions:iam:decentralized-identity:identity-common-test") include(":extensions:iam:decentralized-identity:dummy-credentials-verifier") -include(":extensions:catalog:federated-catalog-cache") +include(":core:federated-catalog:federated-catalog-cache") include(":extensions:dataloading") include(":extensions:jdk-logger-monitor") include(":extensions:http") @@ -108,12 +107,11 @@ include(":extensions:transaction:transaction-atomikos") include(":extensions:transaction:transaction-local") include(":extensions:data-plane-transfer:data-plane-transfer-sync") include(":extensions:data-plane-transfer:data-plane-transfer-client") -include(":extensions:data-plane:data-plane-framework") +include(":core:data-plane:data-plane-framework") include(":extensions:data-plane:data-plane-http") include(":extensions:data-plane-selector") include(":extensions:data-plane-selector:selector-api") -include(":extensions:data-plane-selector:selector-core") -include(":extensions:data-plane-selector:selector-store") +include(":core:data-plane-selector:data-plane-selector-core") include(":extensions:data-plane-selector:selector-client") include(":extensions:azure:data-plane:storage") include(":extensions:azure:data-plane:data-factory") @@ -162,7 +160,7 @@ include(":spi:control-plane:data-plane-transfer-spi") include(":spi:control-plane:policy-spi") include(":spi:control-plane:transfer-spi") include(":spi:data-plane:data-plane-spi") -include(":spi:data-plane-selector:selector-spi") +include(":spi:data-plane-selector:data-plane-selector-spi") include(":spi:federated-catalog:federated-catalog-spi") // numbered samples for the onboarding experience diff --git a/spi/common/core-spi/build.gradle.kts b/spi/common/core-spi/build.gradle.kts index 0e711f30a3b..bbe36156e3b 100644 --- a/spi/common/core-spi/build.gradle.kts +++ b/spi/common/core-spi/build.gradle.kts @@ -26,7 +26,7 @@ dependencies { api("com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}") api("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:${jacksonVersion}") - api(project(":core:policy:policy-evaluator")) + api(project(":core:common:policy-evaluator")) implementation("io.opentelemetry:opentelemetry-api:${openTelemetryVersion}") diff --git a/core/defaults/src/main/java/org/eclipse/dataspaceconnector/core/defaults/certificateresolver/DefaultCertificateResolver.java b/spi/common/core-spi/src/main/java/org/eclipse/dataspaceconnector/spi/security/VaultCertificateResolver.java similarity index 84% rename from core/defaults/src/main/java/org/eclipse/dataspaceconnector/core/defaults/certificateresolver/DefaultCertificateResolver.java rename to spi/common/core-spi/src/main/java/org/eclipse/dataspaceconnector/spi/security/VaultCertificateResolver.java index 6a272ad24a4..cb5cfc76a60 100644 --- a/core/defaults/src/main/java/org/eclipse/dataspaceconnector/core/defaults/certificateresolver/DefaultCertificateResolver.java +++ b/spi/common/core-spi/src/main/java/org/eclipse/dataspaceconnector/spi/security/VaultCertificateResolver.java @@ -13,11 +13,9 @@ * */ -package org.eclipse.dataspaceconnector.core.defaults.certificateresolver; +package org.eclipse.dataspaceconnector.spi.security; import org.eclipse.dataspaceconnector.spi.EdcException; -import org.eclipse.dataspaceconnector.spi.security.CertificateResolver; -import org.eclipse.dataspaceconnector.spi.security.Vault; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -27,7 +25,7 @@ import java.security.cert.X509Certificate; import java.util.Base64; -public class DefaultCertificateResolver implements CertificateResolver { +public class VaultCertificateResolver implements CertificateResolver { public static final String HEADER = "-----BEGIN CERTIFICATE-----"; public static final String FOOTER = "-----END CERTIFICATE-----"; public static final String EDC_EXCEPTION_MESSAGE = "Found certificate with id [%s], but failed to convert it"; @@ -35,7 +33,7 @@ public class DefaultCertificateResolver implements CertificateResolver { @NotNull private final Vault vault; - public DefaultCertificateResolver(@NotNull Vault vault) { + public VaultCertificateResolver(@NotNull Vault vault) { this.vault = vault; } diff --git a/core/defaults/src/test/java/org/eclipse/dataspaceconnector/core/defaults/certificateresolver/DefaultCertificateResolverTest.java b/spi/common/core-spi/src/test/java/org/eclipse/dataspaceconnector/spi/security/VaultCertificateResolverTest.java similarity index 84% rename from core/defaults/src/test/java/org/eclipse/dataspaceconnector/core/defaults/certificateresolver/DefaultCertificateResolverTest.java rename to spi/common/core-spi/src/test/java/org/eclipse/dataspaceconnector/spi/security/VaultCertificateResolverTest.java index e4f90035064..62264644125 100644 --- a/core/defaults/src/test/java/org/eclipse/dataspaceconnector/core/defaults/certificateresolver/DefaultCertificateResolverTest.java +++ b/spi/common/core-spi/src/test/java/org/eclipse/dataspaceconnector/spi/security/VaultCertificateResolverTest.java @@ -12,10 +12,9 @@ * */ -package org.eclipse.dataspaceconnector.core.defaults.certificateresolver; +package org.eclipse.dataspaceconnector.spi.security; import org.eclipse.dataspaceconnector.spi.EdcException; -import org.eclipse.dataspaceconnector.spi.security.Vault; import org.jetbrains.annotations.NotNull; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -35,17 +34,17 @@ import static org.mockito.Mockito.when; -class DefaultCertificateResolverTest { +class VaultCertificateResolverTest { private static final String KEY = "key"; private static final String TEST_CERT_FILE = "testCert.pem"; - private DefaultCertificateResolver certificateResolver; + private VaultCertificateResolver certificateResolver; private Vault vault; @BeforeEach void setup() { vault = mock(Vault.class); - certificateResolver = new DefaultCertificateResolver(vault); + certificateResolver = new VaultCertificateResolver(vault); } @Test @@ -77,19 +76,19 @@ void resolveCertificate_conversionError() { Exception exception = assertThrows(EdcException.class, () -> certificateResolver.resolveCertificate(KEY)); - assertThat(exception.getMessage()).isEqualTo(String.format(DefaultCertificateResolver.EDC_EXCEPTION_MESSAGE, KEY)); + assertThat(exception.getMessage()).isEqualTo(String.format(VaultCertificateResolver.EDC_EXCEPTION_MESSAGE, KEY)); } - private static String convertCertificateToPem(@NotNull X509Certificate certificate) { + private String convertCertificateToPem(@NotNull X509Certificate certificate) { var base64Encoder = Base64.getMimeEncoder(64, System.lineSeparator().getBytes(StandardCharsets.UTF_8)); try { var encodedCert = new String(base64Encoder.encode(certificate.getEncoded())); return String.format("%s%s%s%s%s", - DefaultCertificateResolver.HEADER, + VaultCertificateResolver.HEADER, System.lineSeparator(), encodedCert, System.lineSeparator(), - DefaultCertificateResolver.FOOTER); + VaultCertificateResolver.FOOTER); } catch (CertificateEncodingException e) { throw new RuntimeException(e.getMessage(), e); } diff --git a/core/defaults/src/test/resources/testCert.pem b/spi/common/core-spi/src/test/resources/testCert.pem similarity index 100% rename from core/defaults/src/test/resources/testCert.pem rename to spi/common/core-spi/src/test/resources/testCert.pem diff --git a/core/contract/src/main/java/org/eclipse/dataspaceconnector/contract/common/ContractId.java b/spi/control-plane/contract-spi/src/main/java/org/eclipse/dataspaceconnector/spi/contract/ContractId.java similarity index 96% rename from core/contract/src/main/java/org/eclipse/dataspaceconnector/contract/common/ContractId.java rename to spi/control-plane/contract-spi/src/main/java/org/eclipse/dataspaceconnector/spi/contract/ContractId.java index 25ee2d69abf..f32da20f65c 100644 --- a/core/contract/src/main/java/org/eclipse/dataspaceconnector/contract/common/ContractId.java +++ b/spi/control-plane/contract-spi/src/main/java/org/eclipse/dataspaceconnector/spi/contract/ContractId.java @@ -12,7 +12,7 @@ * */ -package org.eclipse.dataspaceconnector.contract.common; +package org.eclipse.dataspaceconnector.spi.contract; import org.jetbrains.annotations.NotNull; diff --git a/core/contract/src/main/java/org/eclipse/dataspaceconnector/contract/negotiation/command/commands/CancelNegotiationCommand.java b/spi/control-plane/contract-spi/src/main/java/org/eclipse/dataspaceconnector/spi/types/domain/contract/command/CancelNegotiationCommand.java similarity index 90% rename from core/contract/src/main/java/org/eclipse/dataspaceconnector/contract/negotiation/command/commands/CancelNegotiationCommand.java rename to spi/control-plane/contract-spi/src/main/java/org/eclipse/dataspaceconnector/spi/types/domain/contract/command/CancelNegotiationCommand.java index daa209df957..41e67a79cfb 100644 --- a/core/contract/src/main/java/org/eclipse/dataspaceconnector/contract/negotiation/command/commands/CancelNegotiationCommand.java +++ b/spi/control-plane/contract-spi/src/main/java/org/eclipse/dataspaceconnector/spi/types/domain/contract/command/CancelNegotiationCommand.java @@ -12,7 +12,7 @@ * */ -package org.eclipse.dataspaceconnector.contract.negotiation.command.commands; +package org.eclipse.dataspaceconnector.spi.types.domain.contract.command; /** * Command for cancelling a specific ContractNegotiation. diff --git a/core/contract/src/main/java/org/eclipse/dataspaceconnector/contract/negotiation/command/commands/SingleContractNegotiationCommand.java b/spi/control-plane/contract-spi/src/main/java/org/eclipse/dataspaceconnector/spi/types/domain/contract/command/SingleContractNegotiationCommand.java similarity index 93% rename from core/contract/src/main/java/org/eclipse/dataspaceconnector/contract/negotiation/command/commands/SingleContractNegotiationCommand.java rename to spi/control-plane/contract-spi/src/main/java/org/eclipse/dataspaceconnector/spi/types/domain/contract/command/SingleContractNegotiationCommand.java index de9c2470295..2764b54a75c 100644 --- a/core/contract/src/main/java/org/eclipse/dataspaceconnector/contract/negotiation/command/commands/SingleContractNegotiationCommand.java +++ b/spi/control-plane/contract-spi/src/main/java/org/eclipse/dataspaceconnector/spi/types/domain/contract/command/SingleContractNegotiationCommand.java @@ -12,7 +12,7 @@ * */ -package org.eclipse.dataspaceconnector.contract.negotiation.command.commands; +package org.eclipse.dataspaceconnector.spi.types.domain.contract.command; import org.eclipse.dataspaceconnector.spi.types.domain.contract.negotiation.command.ContractNegotiationCommand; diff --git a/core/contract/src/test/java/org/eclipse/dataspaceconnector/contract/common/ContractIdTest.java b/spi/control-plane/contract-spi/src/test/java/org/eclipse/dataspaceconnector/spi/types/domain/contract/ContractIdTest.java similarity index 84% rename from core/contract/src/test/java/org/eclipse/dataspaceconnector/contract/common/ContractIdTest.java rename to spi/control-plane/contract-spi/src/test/java/org/eclipse/dataspaceconnector/spi/types/domain/contract/ContractIdTest.java index c2d3480143d..eda98fa6b20 100644 --- a/core/contract/src/test/java/org/eclipse/dataspaceconnector/contract/common/ContractIdTest.java +++ b/spi/control-plane/contract-spi/src/test/java/org/eclipse/dataspaceconnector/spi/types/domain/contract/ContractIdTest.java @@ -12,8 +12,9 @@ * */ -package org.eclipse.dataspaceconnector.contract.common; +package org.eclipse.dataspaceconnector.spi.types.domain.contract; +import org.eclipse.dataspaceconnector.spi.contract.ContractId; import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spi/control-plane/transfer-spi/build.gradle.kts b/spi/control-plane/transfer-spi/build.gradle.kts index 98eeaecbf34..fee5f085d4f 100644 --- a/spi/control-plane/transfer-spi/build.gradle.kts +++ b/spi/control-plane/transfer-spi/build.gradle.kts @@ -19,7 +19,7 @@ plugins { dependencies { api(project(":spi:common:core-spi")) - api(project(":core:policy:policy-evaluator")) + api(project(":core:common:policy-evaluator")) } publishing { diff --git a/core/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/command/handlers/DeprovisionCompleteCommand.java b/spi/control-plane/transfer-spi/src/main/java/org/eclipse/dataspaceconnector/spi/types/domain/transfer/command/DeprovisionCompleteCommand.java similarity index 84% rename from core/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/command/handlers/DeprovisionCompleteCommand.java rename to spi/control-plane/transfer-spi/src/main/java/org/eclipse/dataspaceconnector/spi/types/domain/transfer/command/DeprovisionCompleteCommand.java index 367c4f761b0..a896a02fccf 100644 --- a/core/transfer/src/main/java/org/eclipse/dataspaceconnector/transfer/core/command/handlers/DeprovisionCompleteCommand.java +++ b/spi/control-plane/transfer-spi/src/main/java/org/eclipse/dataspaceconnector/spi/types/domain/transfer/command/DeprovisionCompleteCommand.java @@ -12,10 +12,9 @@ * */ -package org.eclipse.dataspaceconnector.transfer.core.command.handlers; +package org.eclipse.dataspaceconnector.spi.types.domain.transfer.command; import org.eclipse.dataspaceconnector.spi.types.domain.transfer.DeprovisionedResource; -import org.eclipse.dataspaceconnector.spi.types.domain.transfer.command.SingleTransferProcessCommand; /** * Informs the system that deprovisioning a resource has indeed completed. diff --git a/spi/data-plane-selector/selector-spi/build.gradle.kts b/spi/data-plane-selector/data-plane-selector-spi/build.gradle.kts similarity index 100% rename from spi/data-plane-selector/selector-spi/build.gradle.kts rename to spi/data-plane-selector/data-plane-selector-spi/build.gradle.kts diff --git a/spi/data-plane-selector/selector-spi/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/DataPlaneSelector.java b/spi/data-plane-selector/data-plane-selector-spi/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/DataPlaneSelector.java similarity index 100% rename from spi/data-plane-selector/selector-spi/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/DataPlaneSelector.java rename to spi/data-plane-selector/data-plane-selector-spi/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/DataPlaneSelector.java diff --git a/spi/data-plane-selector/selector-spi/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/DataPlaneSelectorService.java b/spi/data-plane-selector/data-plane-selector-spi/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/DataPlaneSelectorService.java similarity index 100% rename from spi/data-plane-selector/selector-spi/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/DataPlaneSelectorService.java rename to spi/data-plane-selector/data-plane-selector-spi/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/DataPlaneSelectorService.java diff --git a/spi/data-plane-selector/selector-spi/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/client/DataPlaneSelectorClient.java b/spi/data-plane-selector/data-plane-selector-spi/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/client/DataPlaneSelectorClient.java similarity index 100% rename from spi/data-plane-selector/selector-spi/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/client/DataPlaneSelectorClient.java rename to spi/data-plane-selector/data-plane-selector-spi/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/client/DataPlaneSelectorClient.java diff --git a/spi/data-plane-selector/selector-spi/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/instance/DataPlaneInstance.java b/spi/data-plane-selector/data-plane-selector-spi/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/instance/DataPlaneInstance.java similarity index 100% rename from spi/data-plane-selector/selector-spi/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/instance/DataPlaneInstance.java rename to spi/data-plane-selector/data-plane-selector-spi/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/instance/DataPlaneInstance.java diff --git a/spi/data-plane-selector/selector-spi/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/instance/DataPlaneInstanceImpl.java b/spi/data-plane-selector/data-plane-selector-spi/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/instance/DataPlaneInstanceImpl.java similarity index 100% rename from spi/data-plane-selector/selector-spi/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/instance/DataPlaneInstanceImpl.java rename to spi/data-plane-selector/data-plane-selector-spi/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/instance/DataPlaneInstanceImpl.java diff --git a/spi/data-plane-selector/selector-spi/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/store/DataPlaneInstanceStore.java b/spi/data-plane-selector/data-plane-selector-spi/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/store/DataPlaneInstanceStore.java similarity index 100% rename from spi/data-plane-selector/selector-spi/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/store/DataPlaneInstanceStore.java rename to spi/data-plane-selector/data-plane-selector-spi/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/store/DataPlaneInstanceStore.java diff --git a/spi/data-plane-selector/selector-spi/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/strategy/DefaultSelectionStrategyRegistry.java b/spi/data-plane-selector/data-plane-selector-spi/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/strategy/DefaultSelectionStrategyRegistry.java similarity index 100% rename from spi/data-plane-selector/selector-spi/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/strategy/DefaultSelectionStrategyRegistry.java rename to spi/data-plane-selector/data-plane-selector-spi/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/strategy/DefaultSelectionStrategyRegistry.java diff --git a/spi/data-plane-selector/selector-spi/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/strategy/RandomSelectionStrategy.java b/spi/data-plane-selector/data-plane-selector-spi/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/strategy/RandomSelectionStrategy.java similarity index 100% rename from spi/data-plane-selector/selector-spi/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/strategy/RandomSelectionStrategy.java rename to spi/data-plane-selector/data-plane-selector-spi/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/strategy/RandomSelectionStrategy.java diff --git a/spi/data-plane-selector/selector-spi/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/strategy/SelectionStrategy.java b/spi/data-plane-selector/data-plane-selector-spi/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/strategy/SelectionStrategy.java similarity index 100% rename from spi/data-plane-selector/selector-spi/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/strategy/SelectionStrategy.java rename to spi/data-plane-selector/data-plane-selector-spi/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/strategy/SelectionStrategy.java diff --git a/spi/data-plane-selector/selector-spi/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/strategy/SelectionStrategyRegistry.java b/spi/data-plane-selector/data-plane-selector-spi/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/strategy/SelectionStrategyRegistry.java similarity index 100% rename from spi/data-plane-selector/selector-spi/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/strategy/SelectionStrategyRegistry.java rename to spi/data-plane-selector/data-plane-selector-spi/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/strategy/SelectionStrategyRegistry.java diff --git a/spi/data-plane-selector/selector-spi/src/test/java/org/eclipse/dataspaceconnector/dataplane/selector/instance/DataPlaneInstanceImplTest.java b/spi/data-plane-selector/data-plane-selector-spi/src/test/java/org/eclipse/dataspaceconnector/dataplane/selector/instance/DataPlaneInstanceImplTest.java similarity index 100% rename from spi/data-plane-selector/selector-spi/src/test/java/org/eclipse/dataspaceconnector/dataplane/selector/instance/DataPlaneInstanceImplTest.java rename to spi/data-plane-selector/data-plane-selector-spi/src/test/java/org/eclipse/dataspaceconnector/dataplane/selector/instance/DataPlaneInstanceImplTest.java diff --git a/spi/data-plane-selector/selector-spi/src/test/java/org/eclipse/dataspaceconnector/dataplane/selector/strategy/RandomSelectionStrategyTest.java b/spi/data-plane-selector/data-plane-selector-spi/src/test/java/org/eclipse/dataspaceconnector/dataplane/selector/strategy/RandomSelectionStrategyTest.java similarity index 100% rename from spi/data-plane-selector/selector-spi/src/test/java/org/eclipse/dataspaceconnector/dataplane/selector/strategy/RandomSelectionStrategyTest.java rename to spi/data-plane-selector/data-plane-selector-spi/src/test/java/org/eclipse/dataspaceconnector/dataplane/selector/strategy/RandomSelectionStrategyTest.java diff --git a/system-tests/e2e-transfer-test/backend-service/build.gradle.kts b/system-tests/e2e-transfer-test/backend-service/build.gradle.kts index fbcf61b4bd1..05fa4e7f4a8 100644 --- a/system-tests/e2e-transfer-test/backend-service/build.gradle.kts +++ b/system-tests/e2e-transfer-test/backend-service/build.gradle.kts @@ -21,8 +21,8 @@ val rsApi: String by project dependencies { implementation(project(":extensions:http")) - implementation(project(":core:boot")) - implementation(project(":core:base")) + implementation(project(":core:common:boot")) + implementation(project(":core:common:base")) implementation("com.squareup.okhttp3:okhttp:${okHttpVersion}") diff --git a/system-tests/e2e-transfer-test/control-plane/build.gradle.kts b/system-tests/e2e-transfer-test/control-plane/build.gradle.kts index f69ed302362..2b5c86f0205 100644 --- a/system-tests/e2e-transfer-test/control-plane/build.gradle.kts +++ b/system-tests/e2e-transfer-test/control-plane/build.gradle.kts @@ -18,7 +18,7 @@ plugins { dependencies { implementation(project(":common:token-generation-lib")) - implementation(project(":core")) + implementation(project(":core:control-plane:control-plane-core")) implementation(project(":data-protocols:ids")) implementation(project(":extensions:filesystem:vault-fs")) implementation(project(":extensions:http")) @@ -26,7 +26,11 @@ dependencies { implementation(project(":extensions:api:data-management")) implementation(project(":extensions:data-plane-transfer:data-plane-transfer-client")) implementation(project(":extensions:data-plane-transfer:data-plane-transfer-sync")) - implementation(project(":extensions:data-plane-selector")) + + implementation(project(":core:data-plane-selector:data-plane-selector-core")) + implementation(project(":extensions:data-plane-selector:selector-api")) + implementation(project(":extensions:data-plane-selector:selector-client")) + implementation(project(":extensions:http-provisioner")) implementation(project(":extensions:http-receiver")) } diff --git a/system-tests/e2e-transfer-test/data-plane/build.gradle.kts b/system-tests/e2e-transfer-test/data-plane/build.gradle.kts index c54b65aa0a1..ed5990a4021 100644 --- a/system-tests/e2e-transfer-test/data-plane/build.gradle.kts +++ b/system-tests/e2e-transfer-test/data-plane/build.gradle.kts @@ -17,13 +17,7 @@ plugins { } dependencies { - api(project(":spi:common:web-spi")) - api(project(":core:base")) - api(project(":core:boot")) - api(project(":extensions:http")) - - api(project(":spi:data-plane:data-plane-spi")) - api(project(":extensions:data-plane:data-plane-framework")) + api(project(":core:data-plane:data-plane-core")) api(project(":extensions:data-plane:data-plane-http")) api(project(":extensions:data-plane:data-plane-api")) } diff --git a/system-tests/runtimes/azure-data-factory-transfer-consumer/build.gradle.kts b/system-tests/runtimes/azure-data-factory-transfer-consumer/build.gradle.kts index f2c59f87fc8..d256d9a2db3 100644 --- a/system-tests/runtimes/azure-data-factory-transfer-consumer/build.gradle.kts +++ b/system-tests/runtimes/azure-data-factory-transfer-consumer/build.gradle.kts @@ -21,7 +21,7 @@ plugins { val rsApi: String by project dependencies { - implementation(project(":core")) + implementation(project(":core:control-plane:control-plane-core")) implementation(project(":extensions:api:observability")) diff --git a/system-tests/runtimes/azure-data-factory-transfer-provider/build.gradle.kts b/system-tests/runtimes/azure-data-factory-transfer-provider/build.gradle.kts index ee4d7635a57..32dc8e924c0 100644 --- a/system-tests/runtimes/azure-data-factory-transfer-provider/build.gradle.kts +++ b/system-tests/runtimes/azure-data-factory-transfer-provider/build.gradle.kts @@ -26,38 +26,30 @@ val azureResourceManagerVersion: String by project dependencies { + implementation(project(":spi:data-plane:data-plane-spi")) implementation(project(":common:util")) - - implementation(project(":core:transfer")) + implementation(project(":core:control-plane:control-plane-core")) + implementation(project(":core:data-plane:data-plane-core")) implementation(project(":extensions:data-plane-transfer:data-plane-transfer-client")) implementation(project(":extensions:data-plane-selector:selector-client")) - implementation(project(":extensions:data-plane-selector:selector-core")) - implementation(project(":extensions:data-plane-selector:selector-store")) - implementation(project(":extensions:data-plane:data-plane-framework")) + implementation(project(":core:data-plane-selector:data-plane-selector-core")) implementation(project(":extensions:azure:data-plane:data-factory")) implementation(project(":extensions:azure:resource-manager")) - implementation("com.azure:azure-identity:${azureIdentityVersion}") - implementation("com.azure.resourcemanager:azure-resourcemanager-datafactory:${azureResourceManagerDataFactory}") - implementation("com.azure.resourcemanager:azure-resourcemanager-storage:${azureResourceManagerVersion}") - implementation("com.azure.resourcemanager:azure-resourcemanager-keyvault:${azureResourceManagerVersion}") - implementation("com.azure.resourcemanager:azure-resourcemanager:${azureResourceManagerVersion}") - implementation("com.azure.resourcemanager:azure-resourcemanager-authorization:${azureResourceManagerVersion}") - - implementation(project(":spi:data-plane:data-plane-spi")) - - implementation("jakarta.ws.rs:jakarta.ws.rs-api:${rsApi}") - - implementation(project(":core")) - implementation(project(":extensions:api:observability")) - implementation(project(":extensions:filesystem:configuration-fs")) implementation(project(":extensions:iam:iam-mock")) implementation(project(":extensions:api:data-management")) implementation(project(":extensions:azure:blobstorage")) implementation(project(":extensions:azure:vault")) - implementation(project(":data-protocols:ids")) + + implementation("jakarta.ws.rs:jakarta.ws.rs-api:${rsApi}") + implementation("com.azure:azure-identity:${azureIdentityVersion}") + implementation("com.azure.resourcemanager:azure-resourcemanager-datafactory:${azureResourceManagerDataFactory}") + implementation("com.azure.resourcemanager:azure-resourcemanager-storage:${azureResourceManagerVersion}") + implementation("com.azure.resourcemanager:azure-resourcemanager-keyvault:${azureResourceManagerVersion}") + implementation("com.azure.resourcemanager:azure-resourcemanager:${azureResourceManagerVersion}") + implementation("com.azure.resourcemanager:azure-resourcemanager-authorization:${azureResourceManagerVersion}") } application { diff --git a/system-tests/runtimes/azure-storage-transfer-consumer/build.gradle.kts b/system-tests/runtimes/azure-storage-transfer-consumer/build.gradle.kts index f61c8d76c57..b1869c765f0 100644 --- a/system-tests/runtimes/azure-storage-transfer-consumer/build.gradle.kts +++ b/system-tests/runtimes/azure-storage-transfer-consumer/build.gradle.kts @@ -22,7 +22,7 @@ plugins { val rsApi: String by project dependencies { - implementation(project(":core")) + implementation(project(":core:control-plane:control-plane-core")) implementation(project(":extensions:api:observability")) diff --git a/system-tests/runtimes/azure-storage-transfer-provider/build.gradle.kts b/system-tests/runtimes/azure-storage-transfer-provider/build.gradle.kts index 4cd6ac6dc2f..53e4f4d9d39 100644 --- a/system-tests/runtimes/azure-storage-transfer-provider/build.gradle.kts +++ b/system-tests/runtimes/azure-storage-transfer-provider/build.gradle.kts @@ -24,20 +24,16 @@ val rsApi: String by project dependencies { implementation(project(":common:util")) - implementation(project(":core:transfer")) + implementation(project(":core:control-plane:control-plane-core")) + implementation(project(":core:data-plane:data-plane-core")) + implementation(project(":extensions:data-plane-transfer:data-plane-transfer-client")) implementation(project(":extensions:data-plane-selector:selector-client")) - implementation(project(":extensions:data-plane-selector:selector-core")) - implementation(project(":extensions:data-plane-selector:selector-store")) - implementation(project(":extensions:data-plane:data-plane-framework")) + implementation(project(":core:data-plane-selector:data-plane-selector-core")) implementation(project(":extensions:azure:data-plane:storage")) implementation(project(":spi:data-plane:data-plane-spi")) - implementation("jakarta.ws.rs:jakarta.ws.rs-api:${rsApi}") - - implementation(project(":core")) - implementation(project(":extensions:api:observability")) implementation(project(":extensions:filesystem:configuration-fs")) @@ -45,6 +41,8 @@ dependencies { implementation(project(":extensions:api:data-management")) implementation(project(":data-protocols:ids")) + + implementation("jakarta.ws.rs:jakarta.ws.rs-api:${rsApi}") } application { diff --git a/system-tests/runtimes/file-transfer-consumer/build.gradle.kts b/system-tests/runtimes/file-transfer-consumer/build.gradle.kts index 30b1553180c..1f9cd02d560 100644 --- a/system-tests/runtimes/file-transfer-consumer/build.gradle.kts +++ b/system-tests/runtimes/file-transfer-consumer/build.gradle.kts @@ -22,7 +22,7 @@ plugins { val rsApi: String by project dependencies { - implementation(project(":core")) + implementation(project(":core:control-plane:control-plane-core")) implementation(project(":common:util")) implementation(project(":data-protocols:ids")) diff --git a/system-tests/runtimes/file-transfer-provider/build.gradle.kts b/system-tests/runtimes/file-transfer-provider/build.gradle.kts index d6557e65fef..fe1ad54fcd9 100644 --- a/system-tests/runtimes/file-transfer-provider/build.gradle.kts +++ b/system-tests/runtimes/file-transfer-provider/build.gradle.kts @@ -24,17 +24,13 @@ plugins { val rsApi: String by project dependencies { - implementation(project(":core")) implementation(project(":common:util")) - implementation(project(":core:transfer")) + implementation(project(":core:control-plane:control-plane-core")) + implementation(project(":core:data-plane:data-plane-core")) implementation(project(":extensions:data-plane-transfer:data-plane-transfer-client")) implementation(project(":extensions:data-plane-selector:selector-client")) - implementation(project(":extensions:data-plane-selector:selector-core")) - implementation(project(":extensions:data-plane-selector:selector-store")) - implementation(project(":extensions:data-plane:data-plane-framework")) - - implementation(project(":spi:data-plane:data-plane-spi")) + implementation(project(":core:data-plane-selector:data-plane-selector-core")) api(project(":extensions:dataloading")) From 65075f2503ff3a4dcd60bccf5752ae10dbcd06fc Mon Sep 17 00:00:00 2001 From: ndr_brt Date: Fri, 19 Aug 2022 09:57:21 +0200 Subject: [PATCH 2/5] PR remarks --- ...org.eclipse.dataspaceconnector.spi.system.ServiceExtension | 4 ++-- .../federated-catalog/federated-catalog-core/build.gradle.kts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/control-plane/control-plane-core/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension b/core/control-plane/control-plane-core/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension index 7eb1e93eb5d..863e14a981d 100644 --- a/core/control-plane/control-plane-core/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension +++ b/core/control-plane/control-plane-core/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (c) 2022 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,7 +8,7 @@ # SPDX-License-Identifier: Apache-2.0 # # Contributors: -# Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation +# Microsoft Corporation - initial API and implementation # # diff --git a/core/federated-catalog/federated-catalog-core/build.gradle.kts b/core/federated-catalog/federated-catalog-core/build.gradle.kts index c10d20c5108..eba12126826 100644 --- a/core/federated-catalog/federated-catalog-core/build.gradle.kts +++ b/core/federated-catalog/federated-catalog-core/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) + * Copyright (c) 2022 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,7 +8,7 @@ * SPDX-License-Identifier: Apache-2.0 * * Contributors: - * Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation + * Microsoft Corporation - initial API and implementation * */ From f8953ceac01f0a5b131124dc70786725201301a4 Mon Sep 17 00:00:00 2001 From: ndr_brt Date: Fri, 19 Aug 2022 10:48:49 +0200 Subject: [PATCH 3/5] Fix CI --- docs/developer/modules.md | 57 ++++++++++++++++++- .../sql/asset-index-sql/build.gradle.kts | 2 +- .../build.gradle.kts | 4 +- .../build.gradle.kts | 6 -- 4 files changed, 58 insertions(+), 11 deletions(-) diff --git a/docs/developer/modules.md b/docs/developer/modules.md index b6b85a33769..6497ff7ad9a 100644 --- a/docs/developer/modules.md +++ b/docs/developer/modules.md @@ -67,4 +67,59 @@ org.eclipse.dataspaceconnector:jetty:0.0.1-SNAPSHOT org.eclipse.dataspaceconnector:jetty-micrometer:0.0.1-SNAPSHOT org.eclipse.dataspaceconnector:iam-daps:0.0.1-SNAPSHOT org.eclipse.dataspaceconnector:decentralized-identity:0.0.1-SNAPSHOT -org.eclipse.dataspaceconnector:iam-mock:0.0.1-SNAPSHOT \ No newline at end of file +org.eclipse.dataspaceconnector:iam-mock:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:asset-index-sql:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:common-sql:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:contractdefinition-store-sql:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:contractnegotiation-store-sql:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:lease-sql:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:policy-store-sql:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:transfer-process-store-sql:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:transaction-atomikos:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:transaction-local:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:auth-spi:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:catalog-spi:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:core-spi:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:identity-did-spi:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:oauth2-spi:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:transaction-datasource-spi:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:transaction-spi:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:transport-spi:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:web-spi:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:contract-spi:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:control-plane-spi:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:data-plane-transfer-spi:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:policy-spi:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:transfer-spi:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:data-plane-spi:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:data-plane-selector-spi:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:federated-catalog-spi:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:api-configuration:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:asset-api:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:catalog-api:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:contractagreement-api:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:contractdefinition-api:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:contractnegotiation-api:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:policydefinition-api:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:transferprocess-api:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:s3-core:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:s3-provision:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:blob-core:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:blob-provision:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:assetindex-cosmos:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:contract-definition-store-cosmos:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:contract-negotiation-store-cosmos:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:cosmos-common:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:fcc-node-directory-cosmos:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:policy-store-cosmos:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:transfer-process-store-cosmos:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:data-plane-azure-data-factory:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:data-plane-azure-storage:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:dummy-credentials-verifier:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:identity-common-test:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:identity-did-core:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:identity-did-crypto:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:identity-did-service:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:identity-did-web:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:oauth2-core:0.0.1-SNAPSHOT +org.eclipse.dataspaceconnector:apache-commons-pool-sql:0.0.1-SNAPSHOT \ No newline at end of file diff --git a/extensions/sql/asset-index-sql/build.gradle.kts b/extensions/sql/asset-index-sql/build.gradle.kts index 5386cb10aee..8664555ee56 100644 --- a/extensions/sql/asset-index-sql/build.gradle.kts +++ b/extensions/sql/asset-index-sql/build.gradle.kts @@ -29,7 +29,7 @@ dependencies { testImplementation(project(":extensions:junit")) - testImplementation(project(":core:base")) + testImplementation(project(":core:common:policy-evaluator")) testImplementation("org.assertj:assertj-core:${assertj}") testImplementation(testFixtures(project(":common:util"))) testImplementation("org.postgresql:postgresql:${postgresVersion}") diff --git a/extensions/sql/contract-definition-store-sql/build.gradle.kts b/extensions/sql/contract-definition-store-sql/build.gradle.kts index e0166f45031..6b9a38c41d9 100644 --- a/extensions/sql/contract-definition-store-sql/build.gradle.kts +++ b/extensions/sql/contract-definition-store-sql/build.gradle.kts @@ -28,13 +28,11 @@ dependencies { implementation(project(":spi:common:transaction-datasource-spi")) implementation(project(":extensions:sql:common-sql")) - testImplementation(project(":extensions:junit")) - testImplementation(project(":core:base")) + testImplementation(project(":core:common:policy-evaluator")) testImplementation("org.assertj:assertj-core:${assertj}") testImplementation(testFixtures(project(":common:util"))) testImplementation("org.postgresql:postgresql:${postgresVersion}") - } publishing { diff --git a/extensions/sql/transfer-process-store-sql/build.gradle.kts b/extensions/sql/transfer-process-store-sql/build.gradle.kts index 842c9a5dc95..eb42628ae81 100644 --- a/extensions/sql/transfer-process-store-sql/build.gradle.kts +++ b/extensions/sql/transfer-process-store-sql/build.gradle.kts @@ -30,14 +30,8 @@ dependencies { implementation(project(":extensions:sql:common-sql")) implementation(project(":extensions:sql:lease-sql")) - testImplementation(project(":extensions:junit")) testImplementation(testFixtures(project(":extensions:sql:lease-sql"))) -<<<<<<< HEAD - testImplementation(project(":core:base")) -======= - testImplementation("com.h2database:h2:${h2Version}") ->>>>>>> 89c78f663 (Move contract and transfer core modules into control-plane) testImplementation("org.assertj:assertj-core:${assertj}") testImplementation("org.awaitility:awaitility:${awaitility}") testImplementation(testFixtures(project(":common:util"))) From f9277c3173636dc57667f765e0ac9684a25d3b42 Mon Sep 17 00:00:00 2001 From: ndr_brt Date: Mon, 22 Aug 2022 08:12:30 +0200 Subject: [PATCH 4/5] Extract instance store provision to a specific extension --- .../DataPlaneSelectorDefaultsExtension.java | 33 +++++++++++++++++++ .../core/DataPlaneSelectorExtension.java | 6 ---- ...spaceconnector.spi.system.ServiceExtension | 1 + 3 files changed, 34 insertions(+), 6 deletions(-) create mode 100644 core/data-plane-selector/data-plane-selector-core/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/core/DataPlaneSelectorDefaultsExtension.java diff --git a/core/data-plane-selector/data-plane-selector-core/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/core/DataPlaneSelectorDefaultsExtension.java b/core/data-plane-selector/data-plane-selector-core/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/core/DataPlaneSelectorDefaultsExtension.java new file mode 100644 index 00000000000..44641f7fa11 --- /dev/null +++ b/core/data-plane-selector/data-plane-selector-core/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/core/DataPlaneSelectorDefaultsExtension.java @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2022 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) + * + * 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: + * Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - Initial implementation + * + */ + +package org.eclipse.dataspaceconnector.dataplane.selector.core; + +import org.eclipse.dataspaceconnector.dataplane.selector.store.DataPlaneInstanceStore; +import org.eclipse.dataspaceconnector.dataplane.selector.store.DefaultDataPlaneInstanceStore; +import org.eclipse.dataspaceconnector.spi.system.Provider; +import org.eclipse.dataspaceconnector.spi.system.ServiceExtension; + +public class DataPlaneSelectorDefaultsExtension implements ServiceExtension { + + @Override + public String name() { + return "Data Plane Selector Defaults"; + } + + @Provider + public DataPlaneInstanceStore instanceStore() { + return new DefaultDataPlaneInstanceStore(); + } +} diff --git a/core/data-plane-selector/data-plane-selector-core/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/core/DataPlaneSelectorExtension.java b/core/data-plane-selector/data-plane-selector-core/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/core/DataPlaneSelectorExtension.java index 61801e510b6..78ac68fd0c6 100644 --- a/core/data-plane-selector/data-plane-selector-core/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/core/DataPlaneSelectorExtension.java +++ b/core/data-plane-selector/data-plane-selector-core/src/main/java/org/eclipse/dataspaceconnector/dataplane/selector/core/DataPlaneSelectorExtension.java @@ -18,12 +18,10 @@ import org.eclipse.dataspaceconnector.dataplane.selector.DataPlaneSelectorService; import org.eclipse.dataspaceconnector.dataplane.selector.DataPlaneSelectorServiceImpl; import org.eclipse.dataspaceconnector.dataplane.selector.store.DataPlaneInstanceStore; -import org.eclipse.dataspaceconnector.dataplane.selector.store.DefaultDataPlaneInstanceStore; import org.eclipse.dataspaceconnector.dataplane.selector.strategy.DefaultSelectionStrategyRegistry; import org.eclipse.dataspaceconnector.dataplane.selector.strategy.RandomSelectionStrategy; import org.eclipse.dataspaceconnector.dataplane.selector.strategy.SelectionStrategyRegistry; import org.eclipse.dataspaceconnector.spi.system.Inject; -import org.eclipse.dataspaceconnector.spi.system.Provider; import org.eclipse.dataspaceconnector.spi.system.Provides; import org.eclipse.dataspaceconnector.spi.system.ServiceExtension; import org.eclipse.dataspaceconnector.spi.system.ServiceExtensionContext; @@ -46,8 +44,4 @@ public void initialize(ServiceExtensionContext context) { context.registerService(DataPlaneSelectorService.class, new DataPlaneSelectorServiceImpl(selector, instanceStore, strategy)); } - @Provider(isDefault = true) - public DataPlaneInstanceStore instanceStore() { - return new DefaultDataPlaneInstanceStore(); - } } diff --git a/core/data-plane-selector/data-plane-selector-core/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension b/core/data-plane-selector/data-plane-selector-core/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension index 1e80b79c3d8..a4e4d9c4487 100644 --- a/core/data-plane-selector/data-plane-selector-core/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension +++ b/core/data-plane-selector/data-plane-selector-core/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension @@ -13,3 +13,4 @@ # org.eclipse.dataspaceconnector.dataplane.selector.core.DataPlaneSelectorExtension +org.eclipse.dataspaceconnector.dataplane.selector.core.DataPlaneSelectorDefaultsExtension \ No newline at end of file From 8042c90c1be4e8c3f33e5254c5620372849289cb Mon Sep 17 00:00:00 2001 From: ndr_brt Date: Mon, 22 Aug 2022 08:14:37 +0200 Subject: [PATCH 5/5] Rename federated-catalog-cache to federated-catalog-core --- .../federated-catalog-cache/build.gradle.kts | 55 ------------------- .../README.md | 0 .../federated-catalog-core/build.gradle.kts | 31 +++++++++-- .../catalog/cache/ExecutionManager.java | 0 .../cache/FederatedCatalogCacheExtension.java | 0 .../FederatedCatalogApiController.java | 0 .../catalog/cache/crawler/CatalogCrawler.java | 0 .../crawler/NodeQueryAdapterRegistryImpl.java | 0 .../cache/query/BatchedRequestFetcher.java | 0 .../cache/query/CacheQueryAdapterImpl.java | 0 .../query/CacheQueryAdapterRegistryImpl.java | 0 .../query/IdsMultipartNodeQueryAdapter.java | 0 .../catalog/cache/query/QueryEngineImpl.java | 0 .../catalog/cache/query/QueryException.java | 0 .../query/QueryNotAcceptedException.java | 0 .../directory/InMemoryNodeDirectory.java | 0 .../store/InMemoryFederatedCacheStore.java | 0 ...spaceconnector.spi.system.ServiceExtension | 0 .../catalog/cache/ExecutionManagerTest.java | 0 .../catalog/cache/FccTestExtension.java | 0 .../FederatedCatalogCacheEndToEndTest.java | 0 .../FederatedCatalogCacheExtensionTest.java | 0 .../catalog/cache/TestUtil.java | 0 .../cache/crawler/CatalogCrawlerTest.java | 0 .../InMemoryFccQueryAdapterRegistryTest.java | 0 .../cache/query/QueryEngineImplTest.java | 0 .../InMemoryFederatedCacheStoreTest.java | 0 .../query/BatchedRequestFetcherTest.java | 0 docs/overview/extensions.md | 8 +-- settings.gradle.kts | 2 +- 30 files changed, 32 insertions(+), 64 deletions(-) delete mode 100644 core/federated-catalog/federated-catalog-cache/build.gradle.kts rename core/federated-catalog/{federated-catalog-cache => federated-catalog-core}/README.md (100%) rename core/federated-catalog/{federated-catalog-cache => federated-catalog-core}/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/ExecutionManager.java (100%) rename core/federated-catalog/{federated-catalog-cache => federated-catalog-core}/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/FederatedCatalogCacheExtension.java (100%) rename core/federated-catalog/{federated-catalog-cache => federated-catalog-core}/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/controller/FederatedCatalogApiController.java (100%) rename core/federated-catalog/{federated-catalog-cache => federated-catalog-core}/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/crawler/CatalogCrawler.java (100%) rename core/federated-catalog/{federated-catalog-cache => federated-catalog-core}/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/crawler/NodeQueryAdapterRegistryImpl.java (100%) rename core/federated-catalog/{federated-catalog-cache => federated-catalog-core}/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/BatchedRequestFetcher.java (100%) rename core/federated-catalog/{federated-catalog-cache => federated-catalog-core}/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/CacheQueryAdapterImpl.java (100%) rename core/federated-catalog/{federated-catalog-cache => federated-catalog-core}/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/CacheQueryAdapterRegistryImpl.java (100%) rename core/federated-catalog/{federated-catalog-cache => federated-catalog-core}/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/IdsMultipartNodeQueryAdapter.java (100%) rename core/federated-catalog/{federated-catalog-cache => federated-catalog-core}/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/QueryEngineImpl.java (100%) rename core/federated-catalog/{federated-catalog-cache => federated-catalog-core}/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/QueryException.java (100%) rename core/federated-catalog/{federated-catalog-cache => federated-catalog-core}/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/QueryNotAcceptedException.java (100%) rename core/federated-catalog/{federated-catalog-cache => federated-catalog-core}/src/main/java/org/eclipse/dataspaceconnector/catalog/directory/InMemoryNodeDirectory.java (100%) rename core/federated-catalog/{federated-catalog-cache => federated-catalog-core}/src/main/java/org/eclipse/dataspaceconnector/catalog/store/InMemoryFederatedCacheStore.java (100%) rename core/federated-catalog/{federated-catalog-cache => federated-catalog-core}/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension (100%) rename core/federated-catalog/{federated-catalog-cache => federated-catalog-core}/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/ExecutionManagerTest.java (100%) rename core/federated-catalog/{federated-catalog-cache => federated-catalog-core}/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/FccTestExtension.java (100%) rename core/federated-catalog/{federated-catalog-cache => federated-catalog-core}/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/FederatedCatalogCacheEndToEndTest.java (100%) rename core/federated-catalog/{federated-catalog-cache => federated-catalog-core}/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/FederatedCatalogCacheExtensionTest.java (100%) rename core/federated-catalog/{federated-catalog-cache => federated-catalog-core}/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/TestUtil.java (100%) rename core/federated-catalog/{federated-catalog-cache => federated-catalog-core}/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/crawler/CatalogCrawlerTest.java (100%) rename core/federated-catalog/{federated-catalog-cache => federated-catalog-core}/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/query/InMemoryFccQueryAdapterRegistryTest.java (100%) rename core/federated-catalog/{federated-catalog-cache => federated-catalog-core}/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/query/QueryEngineImplTest.java (100%) rename core/federated-catalog/{federated-catalog-cache => federated-catalog-core}/src/test/java/org/eclipse/dataspaceconnector/catalog/defaults/store/InMemoryFederatedCacheStoreTest.java (100%) rename core/federated-catalog/{federated-catalog-cache => federated-catalog-core}/src/test/java/org/eclipse/dataspaceconnector/catalog/query/BatchedRequestFetcherTest.java (100%) diff --git a/core/federated-catalog/federated-catalog-cache/build.gradle.kts b/core/federated-catalog/federated-catalog-cache/build.gradle.kts deleted file mode 100644 index c9a7ebbf312..00000000000 --- a/core/federated-catalog/federated-catalog-cache/build.gradle.kts +++ /dev/null @@ -1,55 +0,0 @@ -/* - * 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 - * https://www.apache.org/licenses/LICENSE-2.0 - * - * SPDX-License-Identifier: Apache-2.0 - * - * Contributors: - * Microsoft Corporation - initial API and implementation - * - */ - -plugins { - `java-library` - id("io.swagger.core.v3.swagger-gradle-plugin") -} - -val rsApi: String by project -val failsafeVersion: String by project -val okHttpVersion: String by project -val awaitility: String by project - - -dependencies { - api(project(":spi:common:core-spi")) - api(project(":spi:common:web-spi")) - api(project(":spi:federated-catalog:federated-catalog-spi")) - - implementation(project(":common:util")) - implementation(project(":core:common:base")) - - implementation("com.squareup.okhttp3:okhttp:${okHttpVersion}") - - implementation("jakarta.ws.rs:jakarta.ws.rs-api:${rsApi}") - implementation("dev.failsafe:failsafe:${failsafeVersion}") - - // required for integration test - testImplementation(project(":extensions:junit")) - - testImplementation(project(":extensions:http")) - testImplementation(project(":data-protocols:ids:ids-spi")) - testImplementation("org.awaitility:awaitility:${awaitility}") - -} - -publishing { - publications { - create("catalog-cache") { - artifactId = "catalog-cache" - from(components["java"]) - } - } -} diff --git a/core/federated-catalog/federated-catalog-cache/README.md b/core/federated-catalog/federated-catalog-core/README.md similarity index 100% rename from core/federated-catalog/federated-catalog-cache/README.md rename to core/federated-catalog/federated-catalog-core/README.md diff --git a/core/federated-catalog/federated-catalog-core/build.gradle.kts b/core/federated-catalog/federated-catalog-core/build.gradle.kts index eba12126826..c9a7ebbf312 100644 --- a/core/federated-catalog/federated-catalog-core/build.gradle.kts +++ b/core/federated-catalog/federated-catalog-core/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Microsoft Corporation + * 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 @@ -14,18 +14,41 @@ plugins { `java-library` + id("io.swagger.core.v3.swagger-gradle-plugin") } +val rsApi: String by project +val failsafeVersion: String by project +val okHttpVersion: String by project +val awaitility: String by project + dependencies { - api(project(":core:federated-catalog:federated-catalog-cache")) + api(project(":spi:common:core-spi")) + api(project(":spi:common:web-spi")) api(project(":spi:federated-catalog:federated-catalog-spi")) + + implementation(project(":common:util")) + implementation(project(":core:common:base")) + + implementation("com.squareup.okhttp3:okhttp:${okHttpVersion}") + + implementation("jakarta.ws.rs:jakarta.ws.rs-api:${rsApi}") + implementation("dev.failsafe:failsafe:${failsafeVersion}") + + // required for integration test + testImplementation(project(":extensions:junit")) + + testImplementation(project(":extensions:http")) + testImplementation(project(":data-protocols:ids:ids-spi")) + testImplementation("org.awaitility:awaitility:${awaitility}") + } publishing { publications { - create("federated-catalog-core") { - artifactId = "federated-catalog-core" + create("catalog-cache") { + artifactId = "catalog-cache" from(components["java"]) } } diff --git a/core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/ExecutionManager.java b/core/federated-catalog/federated-catalog-core/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/ExecutionManager.java similarity index 100% rename from core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/ExecutionManager.java rename to core/federated-catalog/federated-catalog-core/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/ExecutionManager.java diff --git a/core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/FederatedCatalogCacheExtension.java b/core/federated-catalog/federated-catalog-core/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/FederatedCatalogCacheExtension.java similarity index 100% rename from core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/FederatedCatalogCacheExtension.java rename to core/federated-catalog/federated-catalog-core/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/FederatedCatalogCacheExtension.java diff --git a/core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/controller/FederatedCatalogApiController.java b/core/federated-catalog/federated-catalog-core/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/controller/FederatedCatalogApiController.java similarity index 100% rename from core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/controller/FederatedCatalogApiController.java rename to core/federated-catalog/federated-catalog-core/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/controller/FederatedCatalogApiController.java diff --git a/core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/crawler/CatalogCrawler.java b/core/federated-catalog/federated-catalog-core/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/crawler/CatalogCrawler.java similarity index 100% rename from core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/crawler/CatalogCrawler.java rename to core/federated-catalog/federated-catalog-core/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/crawler/CatalogCrawler.java diff --git a/core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/crawler/NodeQueryAdapterRegistryImpl.java b/core/federated-catalog/federated-catalog-core/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/crawler/NodeQueryAdapterRegistryImpl.java similarity index 100% rename from core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/crawler/NodeQueryAdapterRegistryImpl.java rename to core/federated-catalog/federated-catalog-core/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/crawler/NodeQueryAdapterRegistryImpl.java diff --git a/core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/BatchedRequestFetcher.java b/core/federated-catalog/federated-catalog-core/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/BatchedRequestFetcher.java similarity index 100% rename from core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/BatchedRequestFetcher.java rename to core/federated-catalog/federated-catalog-core/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/BatchedRequestFetcher.java diff --git a/core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/CacheQueryAdapterImpl.java b/core/federated-catalog/federated-catalog-core/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/CacheQueryAdapterImpl.java similarity index 100% rename from core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/CacheQueryAdapterImpl.java rename to core/federated-catalog/federated-catalog-core/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/CacheQueryAdapterImpl.java diff --git a/core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/CacheQueryAdapterRegistryImpl.java b/core/federated-catalog/federated-catalog-core/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/CacheQueryAdapterRegistryImpl.java similarity index 100% rename from core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/CacheQueryAdapterRegistryImpl.java rename to core/federated-catalog/federated-catalog-core/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/CacheQueryAdapterRegistryImpl.java diff --git a/core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/IdsMultipartNodeQueryAdapter.java b/core/federated-catalog/federated-catalog-core/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/IdsMultipartNodeQueryAdapter.java similarity index 100% rename from core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/IdsMultipartNodeQueryAdapter.java rename to core/federated-catalog/federated-catalog-core/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/IdsMultipartNodeQueryAdapter.java diff --git a/core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/QueryEngineImpl.java b/core/federated-catalog/federated-catalog-core/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/QueryEngineImpl.java similarity index 100% rename from core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/QueryEngineImpl.java rename to core/federated-catalog/federated-catalog-core/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/QueryEngineImpl.java diff --git a/core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/QueryException.java b/core/federated-catalog/federated-catalog-core/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/QueryException.java similarity index 100% rename from core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/QueryException.java rename to core/federated-catalog/federated-catalog-core/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/QueryException.java diff --git a/core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/QueryNotAcceptedException.java b/core/federated-catalog/federated-catalog-core/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/QueryNotAcceptedException.java similarity index 100% rename from core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/QueryNotAcceptedException.java rename to core/federated-catalog/federated-catalog-core/src/main/java/org/eclipse/dataspaceconnector/catalog/cache/query/QueryNotAcceptedException.java diff --git a/core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/directory/InMemoryNodeDirectory.java b/core/federated-catalog/federated-catalog-core/src/main/java/org/eclipse/dataspaceconnector/catalog/directory/InMemoryNodeDirectory.java similarity index 100% rename from core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/directory/InMemoryNodeDirectory.java rename to core/federated-catalog/federated-catalog-core/src/main/java/org/eclipse/dataspaceconnector/catalog/directory/InMemoryNodeDirectory.java diff --git a/core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/store/InMemoryFederatedCacheStore.java b/core/federated-catalog/federated-catalog-core/src/main/java/org/eclipse/dataspaceconnector/catalog/store/InMemoryFederatedCacheStore.java similarity index 100% rename from core/federated-catalog/federated-catalog-cache/src/main/java/org/eclipse/dataspaceconnector/catalog/store/InMemoryFederatedCacheStore.java rename to core/federated-catalog/federated-catalog-core/src/main/java/org/eclipse/dataspaceconnector/catalog/store/InMemoryFederatedCacheStore.java diff --git a/core/federated-catalog/federated-catalog-cache/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension b/core/federated-catalog/federated-catalog-core/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension similarity index 100% rename from core/federated-catalog/federated-catalog-cache/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension rename to core/federated-catalog/federated-catalog-core/src/main/resources/META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension diff --git a/core/federated-catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/ExecutionManagerTest.java b/core/federated-catalog/federated-catalog-core/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/ExecutionManagerTest.java similarity index 100% rename from core/federated-catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/ExecutionManagerTest.java rename to core/federated-catalog/federated-catalog-core/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/ExecutionManagerTest.java diff --git a/core/federated-catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/FccTestExtension.java b/core/federated-catalog/federated-catalog-core/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/FccTestExtension.java similarity index 100% rename from core/federated-catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/FccTestExtension.java rename to core/federated-catalog/federated-catalog-core/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/FccTestExtension.java diff --git a/core/federated-catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/FederatedCatalogCacheEndToEndTest.java b/core/federated-catalog/federated-catalog-core/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/FederatedCatalogCacheEndToEndTest.java similarity index 100% rename from core/federated-catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/FederatedCatalogCacheEndToEndTest.java rename to core/federated-catalog/federated-catalog-core/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/FederatedCatalogCacheEndToEndTest.java diff --git a/core/federated-catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/FederatedCatalogCacheExtensionTest.java b/core/federated-catalog/federated-catalog-core/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/FederatedCatalogCacheExtensionTest.java similarity index 100% rename from core/federated-catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/FederatedCatalogCacheExtensionTest.java rename to core/federated-catalog/federated-catalog-core/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/FederatedCatalogCacheExtensionTest.java diff --git a/core/federated-catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/TestUtil.java b/core/federated-catalog/federated-catalog-core/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/TestUtil.java similarity index 100% rename from core/federated-catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/TestUtil.java rename to core/federated-catalog/federated-catalog-core/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/TestUtil.java diff --git a/core/federated-catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/crawler/CatalogCrawlerTest.java b/core/federated-catalog/federated-catalog-core/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/crawler/CatalogCrawlerTest.java similarity index 100% rename from core/federated-catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/crawler/CatalogCrawlerTest.java rename to core/federated-catalog/federated-catalog-core/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/crawler/CatalogCrawlerTest.java diff --git a/core/federated-catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/query/InMemoryFccQueryAdapterRegistryTest.java b/core/federated-catalog/federated-catalog-core/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/query/InMemoryFccQueryAdapterRegistryTest.java similarity index 100% rename from core/federated-catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/query/InMemoryFccQueryAdapterRegistryTest.java rename to core/federated-catalog/federated-catalog-core/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/query/InMemoryFccQueryAdapterRegistryTest.java diff --git a/core/federated-catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/query/QueryEngineImplTest.java b/core/federated-catalog/federated-catalog-core/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/query/QueryEngineImplTest.java similarity index 100% rename from core/federated-catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/query/QueryEngineImplTest.java rename to core/federated-catalog/federated-catalog-core/src/test/java/org/eclipse/dataspaceconnector/catalog/cache/query/QueryEngineImplTest.java diff --git a/core/federated-catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/defaults/store/InMemoryFederatedCacheStoreTest.java b/core/federated-catalog/federated-catalog-core/src/test/java/org/eclipse/dataspaceconnector/catalog/defaults/store/InMemoryFederatedCacheStoreTest.java similarity index 100% rename from core/federated-catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/defaults/store/InMemoryFederatedCacheStoreTest.java rename to core/federated-catalog/federated-catalog-core/src/test/java/org/eclipse/dataspaceconnector/catalog/defaults/store/InMemoryFederatedCacheStoreTest.java diff --git a/core/federated-catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/query/BatchedRequestFetcherTest.java b/core/federated-catalog/federated-catalog-core/src/test/java/org/eclipse/dataspaceconnector/catalog/query/BatchedRequestFetcherTest.java similarity index 100% rename from core/federated-catalog/federated-catalog-cache/src/test/java/org/eclipse/dataspaceconnector/catalog/query/BatchedRequestFetcherTest.java rename to core/federated-catalog/federated-catalog-core/src/test/java/org/eclipse/dataspaceconnector/catalog/query/BatchedRequestFetcherTest.java diff --git a/docs/overview/extensions.md b/docs/overview/extensions.md index 1e2a4fc644d..6af3d32541e 100644 --- a/docs/overview/extensions.md +++ b/docs/overview/extensions.md @@ -56,10 +56,10 @@ ## :extensions:catalog -| Module | Description | Details -| :----- | :---------- | :------ | -| :federated-catalog-cache | Contains implementations for the Federated Catalog Cache, which is a database that contains a snapshot of all the catalogs offered by all the connectors in a dataspace | [link]({{extensions}}catalog/federated-catalog-cache) | -| :federated-catalog-spi | This module contains extension points and interfaces specifically for the Federated Catalog feature. | [link]({{extensions}}catalog/federated-catalog-spi) | +| Module | Description | Details +|:------------------------| :---------- |:--------------------------------------------------------| +| :federated-catalog-core | Contains implementations for the Federated Catalog Cache, which is a database that contains a snapshot of all the catalogs offered by all the connectors in a dataspace | [link]({{core}}federate-catalog/federated-catalog-core) | +| :federated-catalog-spi | This module contains extension points and interfaces specifically for the Federated Catalog feature. | [link]({{extensions}}catalog/federated-catalog-spi) | ## :extensions:data-plane diff --git a/settings.gradle.kts b/settings.gradle.kts index 35dd72253fa..06a7283427d 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -94,7 +94,7 @@ include(":extensions:iam:decentralized-identity:identity-did-web") include(":extensions:iam:decentralized-identity:identity-did-crypto") include(":extensions:iam:decentralized-identity:identity-common-test") include(":extensions:iam:decentralized-identity:dummy-credentials-verifier") -include(":core:federated-catalog:federated-catalog-cache") +include(":core:federated-catalog:federated-catalog-core") include(":extensions:dataloading") include(":extensions:jdk-logger-monitor") include(":extensions:http")