Class CommandsSubmission


  • public final class CommandsSubmission
    extends java.lang.Object
    This class can be used to build a valid submission. It provides create(String, String, List) for initial creation and methods to set optional parameters e.g withActAs(List), withWorkflowId(String) etc. Usage:
       var submission = CommandsSubmission.create(applicationId, commandId, commands)
                                       .withAccessToken(token)
                                       .withParty(party)
                                       .with...
     
    • Constructor Detail

      • CommandsSubmission

        protected CommandsSubmission​(java.lang.String applicationId,
                                     java.lang.String commandId,
                                     java.util.List<? extends HasCommands> commands,
                                     java.util.List<@NonNull java.lang.String> actAs,
                                     java.util.List<@NonNull java.lang.String> readAs,
                                     java.util.Optional<java.lang.String> workflowId,
                                     java.util.Optional<java.time.Instant> minLedgerTimeAbs,
                                     java.util.Optional<java.time.Duration> minLedgerTimeRel,
                                     java.util.Optional<java.time.Duration> deduplicationTime,
                                     java.util.Optional<java.lang.String> accessToken,
                                     java.util.List<@NonNull DisclosedContract> disclosedContracts)
    • Method Detail

      • create

        public static CommandsSubmission create​(java.lang.String applicationId,
                                                java.lang.String commandId,
                                                java.util.List<? extends HasCommands> commands)
      • getWorkflowId

        public java.util.Optional<java.lang.String> getWorkflowId()
      • getApplicationId

        public java.lang.String getApplicationId()
      • getCommandId

        public java.lang.String getCommandId()
      • getActAs

        public java.util.List<java.lang.String> getActAs()
      • getReadAs

        public java.util.List<java.lang.String> getReadAs()
      • getMinLedgerTimeAbs

        public java.util.Optional<java.time.Instant> getMinLedgerTimeAbs()
      • getMinLedgerTimeRel

        public java.util.Optional<java.time.Duration> getMinLedgerTimeRel()
      • getDeduplicationTime

        public java.util.Optional<java.time.Duration> getDeduplicationTime()
      • getCommands

        public java.util.List<? extends HasCommands> getCommands()
      • getAccessToken

        public java.util.Optional<java.lang.String> getAccessToken()
      • getDisclosedContracts

        public java.util.List<DisclosedContract> getDisclosedContracts()
      • withWorkflowId

        public CommandsSubmission withWorkflowId​(java.lang.String workflowId)
      • withActAs

        public CommandsSubmission withActAs​(java.util.List<@NonNull java.lang.String> actAs)
      • withReadAs

        public CommandsSubmission withReadAs​(java.util.List<@NonNull java.lang.String> readAs)
      • withMinLedgerTimeAbs

        public CommandsSubmission withMinLedgerTimeAbs​(java.util.Optional<java.time.Instant> minLedgerTimeAbs)
      • withMinLedgerTimeRel

        public CommandsSubmission withMinLedgerTimeRel​(java.util.Optional<java.time.Duration> minLedgerTimeRel)
      • withDeduplicationTime

        public CommandsSubmission withDeduplicationTime​(java.util.Optional<java.time.Duration> deduplicationTime)
      • withAccessToken

        public CommandsSubmission withAccessToken​(java.util.Optional<java.lang.String> accessToken)