diff --git a/application/src/main/java/net/corda/v5/application/interop/InteropIdentityLookUp.java b/application/src/main/java/net/corda/v5/application/interop/InteropIdentityLookUp.java new file mode 100644 index 0000000000..882df7cbce --- /dev/null +++ b/application/src/main/java/net/corda/v5/application/interop/InteropIdentityLookUp.java @@ -0,0 +1,37 @@ +package net.corda.v5.application.interop; + +import net.corda.v5.application.interop.facade.FacadeId; +import net.corda.v5.application.membership.MemberLookup; +import net.corda.v5.base.annotations.DoNotImplement; +import net.corda.v5.base.annotations.Suspendable; +import net.corda.v5.interop.InterOpIdentityInfo; +import net.corda.v5.membership.MemberInfo; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.List; + +/** + * {@link InteropIdentityLookUp} allows flows to retrieve the {@link InterOpIdentityInfo} for any registered InterOp Alias Identity, including it's own Alias Identity. + *

+ * The platform will provide an instance of {@link InteropIdentityLookUp} to flows via property injection. + */ +@DoNotImplement +public interface InteropIdentityLookUp { + + /** + * @param applicationName {@link String} The application name for InterOp Identity which is set during InterOp Alias Identity Registration. + * @return The {@link InterOpIdentityInfo} representing the alias member info for given alias x500name and host network. + */ + @Suspendable + @Nullable + InterOpIdentityInfo lookup(String applicationName); + + /** + * @param facadeId The facadeId of the facade. + * @return The {@link List} for any registered InterOp Alias Identity that implement the given FacadeId. + */ + @Suspendable + @NotNull + List lookup(FacadeId facadeId); +} diff --git a/application/src/main/java/net/corda/v5/application/interop/RemoteAliasLookUp.java b/application/src/main/java/net/corda/v5/application/interop/RemoteAliasLookUp.java deleted file mode 100644 index 3698610195..0000000000 --- a/application/src/main/java/net/corda/v5/application/interop/RemoteAliasLookUp.java +++ /dev/null @@ -1,26 +0,0 @@ -package net.corda.v5.application.interop; - -import net.corda.v5.base.annotations.DoNotImplement; -import net.corda.v5.interop.AliasMemberInfo; -import java.util.List; - -/** - *

This interface represents the injectable service for client corDapp to look up the remote alias identity. - * - */ -@DoNotImplement -public interface RemoteAliasLookUp { - - /** - * @param x500Name The x500Name of alias identity. - * @param hostNetwork The host network of alias identity. - * @return The {@link AliasMemberInfo} representing the alias member info for given alias x500name and host network. - */ - AliasMemberInfo lookup(String x500Name, String hostNetwork); - - /** - * @param facadeId The facadeId of the facade. - * @return The {@link List} representing the alias member info for given facadeId. - */ - List lookup(String facadeId); -} diff --git a/gradle.properties b/gradle.properties index 2995b3647b..358fbc95be 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,7 +13,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: 2 -cordaApiRevision = 6 +cordaApiRevision = 8 # Main kotlinVersion = 1.8.21 diff --git a/interop/src/main/java/net/corda/v5/interop/AliasMemberInfo.java b/interop/src/main/java/net/corda/v5/interop/AliasMemberInfo.java deleted file mode 100644 index 4b785e34a4..0000000000 --- a/interop/src/main/java/net/corda/v5/interop/AliasMemberInfo.java +++ /dev/null @@ -1,35 +0,0 @@ -package net.corda.v5.interop; - -import net.corda.v5.base.annotations.CordaSerializable; -import org.jetbrains.annotations.NotNull; -import java.util.List; - -/** - *

This interface represents the alias member details like x500name, facadeIds etc. - * - */ -@CordaSerializable -public interface AliasMemberInfo { - /** - * @return The {@link String} representing the X500Name of the alias member. - */ - @NotNull - String getX500Name(); - - /** - * @return The {@link String} representing the cpi name. - */ - @NotNull - String getHostNetwork(); - - /** - * @return The {@link String} representing the unique identifier for the alias member. - */ - String getIdentifier(); - - /** - * @return The {@link List} representing the list of facade ids. - */ - @NotNull - List getFacadeIds(); -} diff --git a/interop/src/main/java/net/corda/v5/interop/HoldingIdAliasGroupInfo.java b/interop/src/main/java/net/corda/v5/interop/HoldingIdAliasGroupInfo.java deleted file mode 100644 index f3d0edb6db..0000000000 --- a/interop/src/main/java/net/corda/v5/interop/HoldingIdAliasGroupInfo.java +++ /dev/null @@ -1,21 +0,0 @@ -package net.corda.v5.interop; - -import net.corda.v5.base.annotations.CordaSerializable; -import java.util.List; - -/** - *

This interface represents a set of alias groups created for specific holding identity across the network. - * - */ -@CordaSerializable -public interface HoldingIdAliasGroupInfo { - /** - * @return The {@link String} representing the short hash of the holding identity. - */ - String getShortHash(); - - /** - * @return The {@link List} representing list of interop groups for the holding identity. - */ - List getGroups(); -} \ No newline at end of file diff --git a/interop/src/main/java/net/corda/v5/interop/InterOpIdentityInfo.java b/interop/src/main/java/net/corda/v5/interop/InterOpIdentityInfo.java new file mode 100644 index 0000000000..f3bbbb7f02 --- /dev/null +++ b/interop/src/main/java/net/corda/v5/interop/InterOpIdentityInfo.java @@ -0,0 +1,32 @@ +package net.corda.v5.interop; + +import net.corda.v5.base.annotations.CordaSerializable; +import org.jetbrains.annotations.NotNull; +import java.util.List; + +/** + * This interface represents the InterOp Identity Info that have been registered with the User. + *

InterOpIdentityInfo details like Application Name, implemented facadeIds and X500 name. + * + * + */ +@CordaSerializable +public interface InterOpIdentityInfo { + /** + * @return The {@link String} identifier for the InterOp Identity. This is the Common Name (CN) from the X500 and is set during Interop Registration. + */ + @NotNull + String applicationName(); + + /** + * @return The {@link String} of the Identity's X500. + */ + @NotNull + String getX500Name(); + + /** + * @return The {@link List} representing the list of facade ids. + */ + @NotNull + List getFacadeIds(); +} diff --git a/interop/src/main/java/net/corda/v5/interop/InteropGroupInfo.java b/interop/src/main/java/net/corda/v5/interop/InteropGroupInfo.java deleted file mode 100644 index 975cb17915..0000000000 --- a/interop/src/main/java/net/corda/v5/interop/InteropGroupInfo.java +++ /dev/null @@ -1,31 +0,0 @@ -package net.corda.v5.interop; - -import net.corda.v5.base.annotations.CordaSerializable; -import org.jetbrains.annotations.NotNull; -import java.util.List; -import java.util.UUID; - -/** - *

This interface represents the group details and alias members within that group. - * - */ -@CordaSerializable -public interface InteropGroupInfo { - /** - * @return The {@link UUID} representing the group id. - */ - @NotNull - UUID getGroupId(); - - /** - * @return The {@link String} representing the group name. - */ - @NotNull - String getGroupName(); - - /** - * @return The {@link List} representing the list of alias member within a group. - */ - @NotNull - List getMembers(); -}