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 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 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 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 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 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