com.r3corda.core.contracts.clauses / CompositeClause

CompositeClause

abstract class CompositeClause<in S : ContractState, C : CommandData, in K : Any> : Clause<S, C, K>

Abstract supertype for clauses which compose other clauses together in some logical manner.



Constructors

<init> CompositeClause()

Abstract supertype for clauses which compose other clauses together in some logical manner.

Properties

clauses abstract val clauses: List<Clause<S, C, K>>

List of clauses under this composite clause

Inherited Properties

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

Determine whether this clause runs or not

Functions

getExecutionPath open fun getExecutionPath(commands: List<AuthenticatedObject<C>>): List<Clause<*, *, *>>

Determine the subclauses which will be verified as a result of verifying this clause.

matchedClauses abstract fun matchedClauses(commands: List<AuthenticatedObject<C>>): List<Clause<S, C, K>>

Determine which clauses are matched by the supplied commands

Extension Functions

matches fun <C : CommandData> Clause<*, C, *>.matches(commands: List<AuthenticatedObject<C>>): Boolean

Determine if the given list of commands matches the required commands for a clause to trigger.

Inheritors

AllComposition class AllComposition<S : ContractState, C : CommandData, K : Any> : CompositeClause<S, C, K>

Compose a number of clauses, such that all of the clauses must run for verification to pass.

AnyComposition class AnyComposition<in S : ContractState, C : CommandData, in K : Any> : CompositeClause<S, C, K>

Compose a number of clauses, such that any number of the clauses can run.

FirstComposition class FirstComposition<S : ContractState, C : CommandData, K : Any> : CompositeClause<S, C, K>

Compose a number of clauses, such that the first match is run, and it errors if none is run.