mirror of
https://github.com/corda/corda.git
synced 2025-05-29 13:44:25 +00:00
Add CordaRPCOps.notaryPartyFromX500Name (#1786)
This commit is contained in:
parent
dd3d8ba626
commit
5b79def791
@ -256,6 +256,14 @@ interface CordaRPCOps : RPCOps {
|
|||||||
/** Returns the [Party] with the X.500 principal as it's [Party.name]. */
|
/** Returns the [Party] with the X.500 principal as it's [Party.name]. */
|
||||||
fun wellKnownPartyFromX500Name(x500Name: CordaX500Name): Party?
|
fun wellKnownPartyFromX500Name(x500Name: CordaX500Name): Party?
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a notary identity by name.
|
||||||
|
*
|
||||||
|
* @return the notary identity, or null if there is no notary by that name. Note that this will return null if there
|
||||||
|
* is a peer with that name but they are not a recognised notary service.
|
||||||
|
*/
|
||||||
|
fun notaryPartyFromX500Name(x500Name: CordaX500Name): Party?
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a list of candidate matches for a given string, with optional fuzzy(ish) matching. Fuzzy matching may
|
* Returns a list of candidate matches for a given string, with optional fuzzy(ish) matching. Fuzzy matching may
|
||||||
* get smarter with time e.g. to correct spelling errors, so you should not hard-code indexes into the results
|
* get smarter with time e.g. to correct spelling errors, so you should not hard-code indexes into the results
|
||||||
|
@ -200,6 +200,8 @@ class CordaRPCOpsImpl(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun notaryPartyFromX500Name(x500Name: CordaX500Name): Party? = services.networkMapCache.getNotary(x500Name)
|
||||||
|
|
||||||
override fun partiesFromName(query: String, exactMatch: Boolean): Set<Party> {
|
override fun partiesFromName(query: String, exactMatch: Boolean): Set<Party> {
|
||||||
return database.transaction {
|
return database.transaction {
|
||||||
services.identityService.partiesFromName(query, exactMatch)
|
services.identityService.partiesFromName(query, exactMatch)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user