Simple Attachment Storage implementation using Requery/H2 database

This commit is contained in:
Karel Hajek
2017-02-15 18:32:23 +00:00
committed by Mike Hearn
parent 0600bfa061
commit 1e78d6a3a7
16 changed files with 343 additions and 117 deletions

View File

@ -14,7 +14,6 @@ import net.corda.core.utilities.Emoji
import net.corda.core.utilities.ProgressTracker
import net.corda.core.utilities.unwrap
import net.corda.flows.TwoPartyTradeFlow
import net.corda.node.services.persistence.NodeAttachmentService
import java.nio.file.Path
import java.util.*
@ -28,7 +27,7 @@ class BuyerFlow(val otherParty: Party,
init {
// Buyer will fetch the attachment from the seller automatically when it resolves the transaction.
// For demo purposes just extract attachment jars when saved to disk, so the user can explore them.
val attachmentsPath = (services.storageService.attachments as NodeAttachmentService).let {
val attachmentsPath = (services.storageService.attachments).let {
it.automaticallyExtractAttachments = true
it.storePath
}