public abstract class JacksonBasedContract
extends java.lang.Object
| Constructor and Description |
|---|
JacksonBasedContract() |
| Modifier and Type | Method and Description |
|---|---|
CertificateEntry.Key |
getCertificateKey()
Deprecated.
|
ClientIdentityKey |
getClientIdentityKey() |
protected com.fasterxml.jackson.databind.ObjectMapper |
getObjectMapper() |
abstract T |
invoke(Ledger<T> ledger,
T argument,
T properties)
Invokes the contract to
Ledger with the specified argument and the pre-registered
contract properties. |
protected T |
invoke(java.lang.String contractId,
Ledger<T> ledger,
T argument)
Invokes the specified contract to
Ledger with the specified argument. |
boolean |
isRoot() |
protected void |
setContext(T context)
Sets a contract runtime context to pass it to functions.
|
protected com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
public boolean isRoot()
@Deprecated public CertificateEntry.Key getCertificateKey()
CertificateEntry.Key, but it returns the entity ID and key version of a certificate or HMAC
secret key tied to the contract.public ClientIdentityKey getClientIdentityKey()
protected void setContext(@Nullable
T context)
context - a contract runtime context@Nullable public abstract T invoke(Ledger<T> ledger, T argument, @Nullable T properties)
Ledger with the specified argument and the pre-registered
contract properties. An implementation of the ContractBase should throw ContractContextException if it faces application-level contextual error (such as lack of
balance in payment application).ledger - tamper-evident ledgerargument - contract argumentproperties - pre-registered contract properties@Nullable
protected T invoke(java.lang.String contractId,
Ledger<T> ledger,
T argument)
Ledger with the specified argument.contractId - another contract ID to invokeledger - tamper-evident ledgerargument - contract argument