public class ObligationKt
Modifier and Type | Method and Description |
---|---|
static <T> Obligation.State<T> |
at(Obligation.State<T> $receiver,
java.time.Instant dueBefore) |
static <T> Obligation.State<T> |
between(Obligation.State<T> $receiver,
kotlin.Pair<? extends net.corda.core.identity.AbstractParty,? extends net.corda.core.identity.AbstractParty> parties) |
static <P> java.util.Map<kotlin.Pair,net.corda.core.contracts.Amount> |
extractAmountsDue(Obligation.Terms<P> product,
java.lang.Iterable<net.corda.contracts.asset.Obligation.State> states)
Convert a list of settlement states into total from each obligor to a beneficiary.
|
static Party |
getDUMMY_OBLIGATION_ISSUER()
A dummy, randomly generated issuer party by the name of "Snake Oil Issuer"
|
static java.security.KeyPair |
getDUMMY_OBLIGATION_ISSUER_KEY()
A randomly generated key.
|
static Obligation<java.util.Currency> |
getOBLIGATION_PROGRAM_ID() |
static <T> Obligation.State<T> |
issued by(Obligation.State<T> $receiver,
AbstractParty party) |
static <T> Obligation.State<T> |
issuedBy(Obligation.State<T> $receiver,
AnonymousParty party) |
static <P extends AbstractParty,T> |
netAmountsDue(java.util.Map<kotlin.Pair,net.corda.core.contracts.Amount> balances)
Net off the amounts due between parties.
|
static <T> Obligation.State<T> |
owned by(Obligation.State<T> $receiver,
AbstractParty owner) |
static <T> Obligation.State<T> |
ownedBy(Obligation.State<T> $receiver,
AbstractParty owner) |
static <P extends AbstractParty,T> |
sumAmountsDue(java.util.Map<kotlin.Pair,net.corda.core.contracts.Amount> balances)
Calculate the total balance movement for each party in the transaction, based off a summary of balances between
each obligor and beneficiary.
|
static <P> Amount<net.corda.core.contracts.Issued> |
sumObligations(java.lang.Iterable<? extends net.corda.core.contracts.ContractState> $receiver)
Sums the obligation states in the list, throwing an exception if there are none. All state objects in the list are presumed to be nettable.
|
static <P> Amount<net.corda.core.contracts.Issued> |
sumObligationsOrNull(java.lang.Iterable<? extends net.corda.core.contracts.ContractState> $receiver)
Sums the obligation states in the list, returning null if there are none.
|
static <P> Amount<net.corda.core.contracts.Issued> |
sumObligationsOrZero(java.lang.Iterable<? extends net.corda.core.contracts.ContractState> $receiver,
Issued<net.corda.contracts.asset.Obligation.Terms> issuanceDef)
Sums the obligation states in the list, returning zero of the given product if there are none.
|
public static Obligation<java.util.Currency> getOBLIGATION_PROGRAM_ID()
public static <P> java.util.Map<kotlin.Pair,net.corda.core.contracts.Amount> extractAmountsDue(Obligation.Terms<P> product, java.lang.Iterable<net.corda.contracts.asset.Obligation.State> states)
Convert a list of settlement states into total from each obligor to a beneficiary.
public static <P extends AbstractParty,T> java.util.Map<kotlin.Pair,net.corda.core.contracts.Amount> netAmountsDue(java.util.Map<kotlin.Pair,net.corda.core.contracts.Amount> balances)
Net off the amounts due between parties.
public static <P extends AbstractParty,T> java.util.Map<P,java.lang.Long> sumAmountsDue(java.util.Map<kotlin.Pair,net.corda.core.contracts.Amount> balances)
Calculate the total balance movement for each party in the transaction, based off a summary of balances between each obligor and beneficiary.
P
- type of party to operate on.T
- token that balances representbalances
- payments due, indexed by obligor and beneficiary. Zero balances are stripped from the map before being
returned.public static <P> Amount<net.corda.core.contracts.Issued> sumObligations(java.lang.Iterable<? extends net.corda.core.contracts.ContractState> $receiver)
Sums the obligation states in the list, throwing an exception if there are none. All state objects in the list are presumed to be nettable.
public static <P> Amount<net.corda.core.contracts.Issued> sumObligationsOrNull(java.lang.Iterable<? extends net.corda.core.contracts.ContractState> $receiver)
Sums the obligation states in the list, returning null if there are none.
public static <P> Amount<net.corda.core.contracts.Issued> sumObligationsOrZero(java.lang.Iterable<? extends net.corda.core.contracts.ContractState> $receiver, Issued<net.corda.contracts.asset.Obligation.Terms> issuanceDef)
Sums the obligation states in the list, returning zero of the given product if there are none.
public static <T> Obligation.State<T> at(Obligation.State<T> $receiver, java.time.Instant dueBefore)
public static <T> Obligation.State<T> between(Obligation.State<T> $receiver, kotlin.Pair<? extends net.corda.core.identity.AbstractParty,? extends net.corda.core.identity.AbstractParty> parties)
public static <T> Obligation.State<T> owned by(Obligation.State<T> $receiver, AbstractParty owner)
public static <T> Obligation.State<T> issued by(Obligation.State<T> $receiver, AbstractParty party)
public static <T> Obligation.State<T> ownedBy(Obligation.State<T> $receiver, AbstractParty owner)
public static <T> Obligation.State<T> issuedBy(Obligation.State<T> $receiver, AnonymousParty party)
public static java.security.KeyPair getDUMMY_OBLIGATION_ISSUER_KEY()
A randomly generated key.
public static Party getDUMMY_OBLIGATION_ISSUER()
A dummy, randomly generated issuer party by the name of "Snake Oil Issuer"