public TransactionDSLInterpreter extends Verifies, OutputStateLookup
This interface defines the bare bone functionality that a Transaction DSL interpreter should implement.
Verifies.DefaultImpls
Modifier and Type | Method and Description |
---|---|
void |
_attachment(java.lang.String contractClassName)
Attaches an attachment containing the named contract to the transaction
|
void |
_attachment(java.lang.String contractClassName,
SecureHash attachmentId,
java.util.List<? extends java.security.PublicKey> signers)
Attaches an attachment containing the named contract to the transaction
|
void |
_attachment(java.lang.String contractClassName,
SecureHash attachmentId,
java.util.List<? extends java.security.PublicKey> signers,
java.util.Map<java.lang.String,java.lang.String> jarManifestAttributes)
Attaches an attachment containing the named contract to the transaction.
|
EnforceVerifyOrFail |
_tweak(Function1<? super net.corda.testing.dsl.TransactionDSLInterpreter,? extends net.corda.testing.dsl.EnforceVerifyOrFail> dsl)
Creates a local scoped copy of the transaction.
|
void |
attachment(SecureHash attachmentId)
Adds an
interface Attachment reference to the transaction. |
void |
command(java.util.List<? extends java.security.PublicKey> signers,
CommandData commandData)
Adds a command to the transaction.
|
LedgerDSLInterpreter<net.corda.testing.dsl.TransactionDSLInterpreter> |
getLedgerInterpreter()
A reference to the enclosing ledger{..}'s interpreter.
|
void |
input(StateRef stateRef)
Adds an input reference to the transaction. Note that
Verifies.verifies will resolve this reference. |
void |
output(java.lang.String contractClassName,
java.lang.String label,
Party notary,
java.lang.Integer encumbrance,
AttachmentConstraint attachmentConstraint,
ContractState contractState)
Adds an output to the transaction.
|
void |
reference(StateRef stateRef)
Add a reference input state to the transaction. Note that
Verifies.verifies will resolve this reference. |
void |
timeWindow(TimeWindow data)
Sets the time-window of the transaction.
|
fails, fails with, failsWith, verifies
retrieveOutputStateAndRef
LedgerDSLInterpreter<net.corda.testing.dsl.TransactionDSLInterpreter> getLedgerInterpreter()
A reference to the enclosing ledger{..}'s interpreter.
void input(StateRef stateRef)
Adds an input reference to the transaction. Note that Verifies.verifies
will resolve this reference.
stateRef
- The input class StateRef
.Verifies.verifies
void reference(StateRef stateRef)
Add a reference input state to the transaction. Note that Verifies.verifies
will resolve this reference.
stateRef
- The input class StateRef
.Verifies.verifies
void output(java.lang.String contractClassName, java.lang.String label, Party notary, java.lang.Integer encumbrance, AttachmentConstraint attachmentConstraint, ContractState contractState)
Adds an output to the transaction.
label
- An optional label that may be later used to retrieve the output probably in other transactions.notary
- The associated notary.encumbrance
- The position of the encumbrance state.attachmentConstraint
- The attachment constraintcontractState
- The state itself.contractClassName
- The class name of the contract that verifies this state.void attachment(SecureHash attachmentId)
Adds an interface Attachment
reference to the transaction.
attachmentId
- The hash of the attachment, possibly returned by LedgerDSLInterpreter.attachment
.interface Attachment
void command(java.util.List<? extends java.security.PublicKey> signers, CommandData commandData)
Adds a command to the transaction.
signers
- The signer public keys.commandData
- The contents of the command.void timeWindow(TimeWindow data)
Sets the time-window of the transaction.
data
- the class TimeWindow
(validation window).EnforceVerifyOrFail _tweak(Function1<? super net.corda.testing.dsl.TransactionDSLInterpreter,? extends net.corda.testing.dsl.EnforceVerifyOrFail> dsl)
Creates a local scoped copy of the transaction.
dsl
- The transaction DSL to be interpreted using the copy.void _attachment(java.lang.String contractClassName)
Attaches an attachment containing the named contract to the transaction
contractClassName
- The contract class to attachvoid _attachment(java.lang.String contractClassName, SecureHash attachmentId, java.util.List<? extends java.security.PublicKey> signers)
Attaches an attachment containing the named contract to the transaction
contractClassName
- The contract class to attachattachmentId
- The attachmentvoid _attachment(java.lang.String contractClassName, SecureHash attachmentId, java.util.List<? extends java.security.PublicKey> signers, java.util.Map<java.lang.String,java.lang.String> jarManifestAttributes)
Attaches an attachment containing the named contract to the transaction.
contractClassName
- The contract class to attach.attachmentId
- The attachment.signers
- The signers.jarManifestAttributes
- The JAR manifest file attributes.