ContractsDSL
Keywords: net.corda.core.contracts.ContractsDSL class
Date: 2023-09-18

net.corda.core.contracts

## Class ContractsDSL

- net.corda.core.contracts.ContractsDSL

-     public class ContractsDSL

- - ### Constructor Detail

    - #### ContractsDSL

          public ContractsDSL()

  - ### Method Detail

    - #### requireThat

          public static <R> R requireThat(@NotNull
                                          kotlin.jvm.functions.Function1<? super net.corda.core.contracts.Requirements,? extends R> body)

    - #### select

          @NotNull
          public static <C extends CommandData> java.util.List<net.corda.core.contracts.CommandWithParties> select(@NotNull
                                                                                                                            java.util.Collection<? extends net.corda.core.contracts.CommandWithParties<? extends net.corda.core.contracts.CommandData>> $this$select,
                                                                                                                            @NotNull
                                                                                                                            java.lang.Class<C> klass,
                                                                                                                            @Nullable
                                                                                                                            java.security.PublicKey signer,
                                                                                                                            @Nullable
                                                                                                                            AbstractParty party)

      Filters the command list by type, party and public key all at once.

    - #### select

          @NotNull
          public static <C extends CommandData> java.util.List<net.corda.core.contracts.CommandWithParties> select(@NotNull
                                                                                                                            java.util.Collection<? extends net.corda.core.contracts.CommandWithParties<? extends net.corda.core.contracts.CommandData>> $this$select,
                                                                                                                            @NotNull
                                                                                                                            java.lang.Class<C> klass,
                                                                                                                            @Nullable
                                                                                                                            java.util.Collection<? extends java.security.PublicKey> signers,
                                                                                                                            @Nullable
                                                                                                                            java.util.Collection<net.corda.core.identity.Party> parties)

      Filters the command list by type, parties and public keys all at once.

    - #### requireSingleCommand

          @NotNull
          public static <C extends CommandData> CommandWithParties<C> requireSingleCommand(@NotNull
                                                                                                    java.util.Collection<? extends net.corda.core.contracts.CommandWithParties<? extends net.corda.core.contracts.CommandData>> $this$requireSingleCommand,
                                                                                                    @NotNull
                                                                                                    java.lang.Class<C> klass)

      Ensures that a transaction has only one command that is of the given type, otherwise throws an exception.