From b97f8f80e3b63bd5064bdf8a8aea8ae2a97aae40 Mon Sep 17 00:00:00 2001 From: jmacmahonr3 Date: Mon, 25 Sep 2023 16:02:16 +0100 Subject: [PATCH 1/4] New Label --- .../application/interop/parameters/ParameterTypeLabel.java | 5 ++++- gradle.properties | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/application/src/main/java/net/corda/v5/application/interop/parameters/ParameterTypeLabel.java b/application/src/main/java/net/corda/v5/application/interop/parameters/ParameterTypeLabel.java index 57830c4562..aa2a408d76 100644 --- a/application/src/main/java/net/corda/v5/application/interop/parameters/ParameterTypeLabel.java +++ b/application/src/main/java/net/corda/v5/application/interop/parameters/ParameterTypeLabel.java @@ -1,5 +1,6 @@ package net.corda.v5.application.interop.parameters; +import net.corda.v5.application.crypto.DigitalSignatureAndMetadata; import org.jetbrains.annotations.NotNull; import java.math.BigDecimal; import java.nio.ByteBuffer; @@ -16,7 +17,9 @@ public enum ParameterTypeLabel { UUID(java.util.UUID.class), TIMESTAMP(ZonedDateTime.class), BYTES(ByteBuffer.class), - JSON(String.class); + JSON(String.class), + + SIGNED_TX(DigitalSignatureAndMetadata.class); @NotNull private final Class expectedClass; diff --git a/gradle.properties b/gradle.properties index 4da34aa1ed..5e0259e192 100644 --- a/gradle.properties +++ b/gradle.properties @@ -12,7 +12,7 @@ cordaProductVersion = 5.1.0-INTEROP ## IMPORTANT: ## The interop feature branches track api revisions separately to the mainline branch. ## API version of last merge from corda mainline: 19 -cordaApiRevision = 20 +cordaApiRevision = 20.Jim # Main kotlinVersion = 1.8.21 From 7047874758e1e43f8a0a8a9b06dc16404b52810c Mon Sep 17 00:00:00 2001 From: Szymon Sztuka Date: Fri, 6 Oct 2023 14:37:21 +0100 Subject: [PATCH 2/4] Update API version --- .../v5/application/interop/parameters/ParameterTypeLabel.java | 1 - gradle.properties | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/application/src/main/java/net/corda/v5/application/interop/parameters/ParameterTypeLabel.java b/application/src/main/java/net/corda/v5/application/interop/parameters/ParameterTypeLabel.java index aa2a408d76..43a23acf6b 100644 --- a/application/src/main/java/net/corda/v5/application/interop/parameters/ParameterTypeLabel.java +++ b/application/src/main/java/net/corda/v5/application/interop/parameters/ParameterTypeLabel.java @@ -18,7 +18,6 @@ public enum ParameterTypeLabel { TIMESTAMP(ZonedDateTime.class), BYTES(ByteBuffer.class), JSON(String.class), - SIGNED_TX(DigitalSignatureAndMetadata.class); @NotNull diff --git a/gradle.properties b/gradle.properties index 5e0259e192..31ad01706d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -12,7 +12,7 @@ cordaProductVersion = 5.1.0-INTEROP ## IMPORTANT: ## The interop feature branches track api revisions separately to the mainline branch. ## API version of last merge from corda mainline: 19 -cordaApiRevision = 20.Jim +cordaApiRevision = 21 # Main kotlinVersion = 1.8.21 From 625bc4d185a93eddd4a18819f9ac7cd697a99ce0 Mon Sep 17 00:00:00 2001 From: Szymon Sztuka Date: Tue, 17 Oct 2023 14:12:49 +0100 Subject: [PATCH 3/4] Update API version after merge from syntax. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 31ad01706d..7ae9d103b1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -12,7 +12,7 @@ cordaProductVersion = 5.1.0-INTEROP ## IMPORTANT: ## The interop feature branches track api revisions separately to the mainline branch. ## API version of last merge from corda mainline: 19 -cordaApiRevision = 21 +cordaApiRevision = 22 # Main kotlinVersion = 1.8.21 From 5b2499901ac410edfab779c3f8ee3aff36c2ecba Mon Sep 17 00:00:00 2001 From: Szymon Sztuka Date: Wed, 25 Oct 2023 17:28:34 +0100 Subject: [PATCH 4/4] New service --- .../InteropJsonMarshallingService.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 application/src/main/java/net/corda/v5/application/marshalling/InteropJsonMarshallingService.java diff --git a/application/src/main/java/net/corda/v5/application/marshalling/InteropJsonMarshallingService.java b/application/src/main/java/net/corda/v5/application/marshalling/InteropJsonMarshallingService.java new file mode 100644 index 0000000000..4a865cdac6 --- /dev/null +++ b/application/src/main/java/net/corda/v5/application/marshalling/InteropJsonMarshallingService.java @@ -0,0 +1,16 @@ +package net.corda.v5.application.marshalling; + +import net.corda.v5.application.flows.ClientStartableFlow; +import net.corda.v5.base.annotations.DoNotImplement; + +/** + * {@link InteropJsonMarshallingService} marshalls to and from JSON using the registered JSON mapper. + *

+ * The platform will provide an instance of {@link InteropJsonMarshallingService} to flows via property injection. + *

+ * Example usage: + * @see ClientStartableFlow + */ +@DoNotImplement +public interface InteropJsonMarshallingService extends MarshallingService { +}