Interface Proposal.Builder

All Superinterfaces:
Builder<Proposal>
Enclosing interface:
Proposal

public static interface Proposal.Builder extends Builder<Proposal>
Builder used to create a new transaction proposal.
  • Method Details

    • addArguments

      Proposal.Builder addArguments(byte[]... args)
      Add transactions arguments to the proposal. These extend any previously added arguments.
      Parameters:
      args - Transaction arguments.
      Returns:
      This builder.
    • addArguments

      Proposal.Builder addArguments(String... args)
      Add transactions arguments to the proposal. These extend any previously added arguments.
      Parameters:
      args - Transaction arguments.
      Returns:
      This builder.
    • putAllTransient

      Proposal.Builder putAllTransient(Map<String,byte[]> transientData)
      Associates all of the specified transient data keys and values with the proposal.
      Parameters:
      transientData - Transient data keys and values.
      Returns:
      This builder.
    • putTransient

      Proposal.Builder putTransient(String key, byte[] value)
      Associates the specified transient data key and value with the proposal.
      Parameters:
      key - Key with which the specified value is to be associated.
      value - Value to be associated with the specified key.
      Returns:
      This builder.
    • putTransient

      Proposal.Builder putTransient(String key, String value)
      Associates the specified transient data key and value with the proposal.
      Parameters:
      key - Key with which the specified value is to be associated.
      value - Value to be associated with the specified key.
      Returns:
      This builder.
    • setEndorsingOrganizations

      Proposal.Builder setEndorsingOrganizations(String... mspids)
      Specifies the set of organizations that will attempt to endorse the proposal. No other organizations' peers will be sent this proposal. This is usually used in conjunction with putTransient(String, byte[]) or putAllTransient(Map) for private data scenarios.
      Parameters:
      mspids - The Member Services Provider IDs of the endorsing organizations.
      Returns:
      This builder.
    • build

      Proposal build()
      Build the proposal from the configuration state of this builder. A new transaction ID will be generated on each invocation of this method.
      Specified by:
      build in interface Builder<Proposal>
      Returns:
      A proposal.