From 0f63780c5b086ebf24310c02cf31c31613137fa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Sch=C3=B6nenberg?= Date: Mon, 5 Feb 2024 13:36:15 +0100 Subject: [PATCH] fix: serializer --- build.gradle.kts | 2 +- .../client/LoggingHouseClientExtension.java | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index b05def5..81bb4d0 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -62,7 +62,7 @@ subprojects { maven { name = "GitHubPackages" url = uri("https://maven.pkg.github.com/truzzt/mds-ap3") - version = "0.2.3" + version = "0.2.4" credentials { username = System.getenv("USERNAME") password = System.getenv("TOKEN") diff --git a/logging-house-client/src/main/java/com/truzzt/extension/logginghouse/client/LoggingHouseClientExtension.java b/logging-house-client/src/main/java/com/truzzt/extension/logginghouse/client/LoggingHouseClientExtension.java index f4d535b..8fdae4f 100644 --- a/logging-house-client/src/main/java/com/truzzt/extension/logginghouse/client/LoggingHouseClientExtension.java +++ b/logging-house-client/src/main/java/com/truzzt/extension/logginghouse/client/LoggingHouseClientExtension.java @@ -15,8 +15,15 @@ import com.truzzt.extension.logginghouse.client.ids.jsonld.JsonLd; import com.truzzt.extension.logginghouse.client.ids.multipart.IdsMultipartSender; +import de.fraunhofer.iais.eis.LogMessage; +import de.fraunhofer.iais.eis.RequestMessage; +import org.eclipse.edc.connector.contract.spi.event.contractnegotiation.ContractNegotiationAccepted; +import org.eclipse.edc.connector.contract.spi.event.contractnegotiation.ContractNegotiationAgreed; import org.eclipse.edc.connector.contract.spi.event.contractnegotiation.ContractNegotiationFinalized; import org.eclipse.edc.connector.contract.spi.negotiation.store.ContractNegotiationStore; +import org.eclipse.edc.connector.transfer.spi.event.TransferProcessCompleted; +import org.eclipse.edc.connector.transfer.spi.event.TransferProcessInitiated; +import org.eclipse.edc.connector.transfer.spi.event.TransferProcessStarted; import org.eclipse.edc.connector.transfer.spi.event.TransferProcessTerminated; import org.eclipse.edc.connector.transfer.spi.store.TransferProcessStore; import org.eclipse.edc.runtime.metamodel.annotation.Inject; @@ -129,7 +136,12 @@ private void registerEventSubscriber(ServiceExtensionContext context) { monitor); eventRouter.registerSync(ContractNegotiationFinalized.class, eventSubscriber); + eventRouter.registerSync(ContractNegotiationAgreed.class, eventSubscriber); + eventRouter.registerSync(ContractNegotiationAccepted.class, eventSubscriber); + eventRouter.registerSync(TransferProcessCompleted.class, eventSubscriber); eventRouter.registerSync(TransferProcessTerminated.class, eventSubscriber); + eventRouter.registerSync(TransferProcessInitiated.class, eventSubscriber); + eventRouter.registerSync(TransferProcessStarted.class, eventSubscriber); context.registerService(IdsClearingHouseServiceImpl.class, eventSubscriber); monitor.debug("Registered event subscriber for LoggingHouseClientExtension"); @@ -149,8 +161,8 @@ private void registerCommonTypes(TypeManager typeManager) { typeManager.registerSerializer(TYPE_MANAGER_SERIALIZER_KEY, LogMessage.class, new MultiContextJsonLdSerializer<>(LogMessage.class, CONTEXT_MAP)); - typeManager.registerSerializer(TYPE_MANAGER_SERIALIZER_KEY, CreateProcessMessage.class, - new MultiContextJsonLdSerializer<>(CreateProcessMessage.class, CONTEXT_MAP)); + typeManager.registerSerializer(TYPE_MANAGER_SERIALIZER_KEY, RequestMessage.class, + new MultiContextJsonLdSerializer<>(RequestMessage.class, CONTEXT_MAP)); monitor.debug("Registered serializers for LoggingHouseClientExtension"); }