public class ApiUtils
Utility functions to reduce boilerplate when developing HTTP APIs
Constructor and Description |
---|
ApiUtils(CordaRPCOps rpc)
Utility functions to reduce boilerplate when developing HTTP APIs
|
Modifier and Type | Method and Description |
---|---|
CordaRPCOps |
getRpc() |
javax.ws.rs.core.Response |
withParty(java.lang.String partyKeyStr,
kotlin.jvm.functions.Function1<? super java.lang.String,? extends javax.ws.rs.core.Response> notFound,
kotlin.jvm.functions.Function1<? super net.corda.core.crypto.Party,? extends javax.ws.rs.core.Response> found)
Get a party and then execute the passed function with the party public key as a parameter.
Usage: withParty(key) { doSomethingWith(it) }
|
public ApiUtils(CordaRPCOps rpc)
Utility functions to reduce boilerplate when developing HTTP APIs
public javax.ws.rs.core.Response withParty(java.lang.String partyKeyStr, kotlin.jvm.functions.Function1<? super java.lang.String,? extends javax.ws.rs.core.Response> notFound, kotlin.jvm.functions.Function1<? super net.corda.core.crypto.Party,? extends javax.ws.rs.core.Response> found)
Get a party and then execute the passed function with the party public key as a parameter. Usage: withParty(key) { doSomethingWith(it) }
public CordaRPCOps getRpc()