Restore ContractState and TransactionState to docs. (#1495)

This commit is contained in:
Andrzej Cichocki 2017-09-13 11:49:05 +01:00 committed by GitHub
parent 15aa4036b6
commit 93101f7c7d
3 changed files with 10 additions and 6 deletions

View File

@ -4,6 +4,7 @@ import net.corda.core.identity.AbstractParty
import net.corda.core.identity.Party
import net.corda.core.serialization.CordaSerializable
// DOCSTART 1
/**
* A contract state (or just "state") contains opaque data used by a contract program. It can be thought of as a disk
* file that the program can use to persist data across transactions. States are immutable: once created they are never
@ -24,4 +25,5 @@ interface ContractState {
* The participants list should normally be derived from the contents of the state.
*/
val participants: List<AbstractParty>
}
}
// DOCEND 1

View File

@ -3,6 +3,7 @@ package net.corda.core.contracts
import net.corda.core.identity.Party
import net.corda.core.serialization.CordaSerializable
// DOCSTART 1
typealias ContractClassName = String
/**
@ -75,4 +76,5 @@ data class TransactionState<out T : ContractState> @JvmOverloads constructor(
/**
* A validator for the contract attachments on the transaction.
*/
val constraint: AttachmentConstraint = AlwaysAcceptAttachmentConstraint)
val constraint: AttachmentConstraint = AlwaysAcceptAttachmentConstraint)
// DOCEND 1

View File

@ -9,7 +9,7 @@ In Corda, states are classes that implement ``ContractState``. The ``ContractSta
.. container:: codeset
.. literalinclude:: ../../core/src/main/kotlin/net/corda/core/contracts/Structures.kt
.. literalinclude:: ../../core/src/main/kotlin/net/corda/core/contracts/ContractState.kt
:language: kotlin
:start-after: DOCSTART 1
:end-before: DOCEND 1
@ -140,10 +140,10 @@ When a ``ContractState`` is added to a ``TransactionBuilder``, it is wrapped in
.. container:: codeset
.. literalinclude:: ../../core/src/main/kotlin/net/corda/core/contracts/Structures.kt
.. literalinclude:: ../../core/src/main/kotlin/net/corda/core/contracts/TransactionState.kt
:language: kotlin
:start-after: DOCSTART 4
:end-before: DOCEND 4
:start-after: DOCSTART 1
:end-before: DOCEND 1
Where: