Skip to content

Commit

Permalink
CORE-10453: Replace RemoteAliasLookUp with InteropIdentityLookup (#1136)
Browse files Browse the repository at this point in the history
An alternative more simplistic implementation of the InterOp equivalent of the MemberLookup.

What's noteworthy about this new API is that the Application name is the sole identifier an the flow level.
  • Loading branch information
jmacmahonr3 authored May 31, 2023
1 parent 9f09992 commit 8d06e36
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 114 deletions.
Original file line number Diff line number Diff line change
@@ -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.
* <p>
* 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<InterOpIdentityInfo>} for any registered InterOp Alias Identity that implement the given FacadeId.
*/
@Suspendable
@NotNull
List<InterOpIdentityInfo> lookup(FacadeId facadeId);
}

This file was deleted.

2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
35 changes: 0 additions & 35 deletions interop/src/main/java/net/corda/v5/interop/AliasMemberInfo.java

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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.
* <p> 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<String>} representing the list of facade ids.
*/
@NotNull
List<String> getFacadeIds();
}
31 changes: 0 additions & 31 deletions interop/src/main/java/net/corda/v5/interop/InteropGroupInfo.java

This file was deleted.

0 comments on commit 8d06e36

Please sign in to comment.