【问题标题】:Retrieving the Legal prose attached with a contract检索合同附带的法律散文
【发布时间】:2020-09-05 04:25:53
【问题描述】:

如何从接收节点端获取合同附带的法律散文

【问题讨论】:

    标签: corda


    【解决方案1】:

    假设您已将文件附加到要在接收节点一侧打开的事务,您可以使用以下代码:

    val ids: List<AttachmentId> = serviceHub.attachments.queryAttachments(
      AttachmentQueryCriteria.AttachmentsQueryCriteria(
        filenameCondition = Builder.equal("some name")
      )
    )
    val attachments: List<Attachment?> = ids.map { id -> serviceHub.attachments.openAttachment(id) }
    

    【讨论】:

    • 我使用注释而不是交易附件添加了法律散文 @LegalProseReference(uri = "sample.com/test.html") public class IOUContract implements Contract { }
    • 仅与文档相关* All code contracts should include a ``LegalProseReference`` link to the legal document describing the contract's intended behavior
    • 感谢@dan-newton 的回复.....请澄清列表 中的 AttachmentId 和 Buider.equal() 中提到的“某些名称”
    • "some name" 只是您要查询的任何保险库的占位符。
    • 这意味着我们必须手动指定文件名。我们如何能够自动从接收节点 RPC 客户端@dan-newton 读取交易附件哈希
    猜你喜欢
    • 1970-01-01
    • 2018-08-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-08-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多