com.r3corda.contracts.asset / CommodityContract / Clauses / Group

Group

class Group : GroupClauseVerifier<State, Issued<Commodity>>

Grouping clause to extract input and output states into matched groups and then run a set of clauses over each group.



Constructors

<init> Group()

Grouping clause to extract input and output states into matched groups and then run a set of clauses over each group.

Properties

clauses val clauses: <ERROR CLASS>
ifMatched val ifMatched: MatchBehaviour

The group clause is the only top level clause, so end after processing it. If there are any commands left after this clause has run, the clause verifier will trigger an error.

ifNotMatched val ifNotMatched: MatchBehaviour

The group clause does not depend on any commands being present, so something has gone terribly wrong if it doesnt match.

Inherited Properties

requiredCommands open val requiredCommands: Set<Class<out CommandData>>

Classes for commands which must ALL be present in transaction for this clause to be triggered

Functions

extractGroups fun extractGroups(tx: TransactionForContract): List<InOutGroup<State, Issued<Commodity>>>

Group commodity states by issuance definition (issuer and underlying commodity).

Inherited Functions

verify open fun verify(tx: TransactionForContract, commands: Collection<AuthenticatedObject<CommandData>>): Set<CommandData>

Verify the transaction matches the conditions from this clause. For example, a "no zero amount output" clause would check each of the output states that it applies to, looking for a zero amount, and throw IllegalStateException if any matched.