Interface OutboxView

All Known Implementing Classes:
NotificationOutboxBase

public interface OutboxView

Outbox 列的唯讀視圖(SPI 契約)

NotificationDeliveryListener 等已發布 SPI 以本介面(而非具體 entity)暴露 Outbox 列——依 ADR-017(ADR-014 規範一:SPI 不得洩漏 entity),jar 不擁有具體 @Entity,SPI 簽章遂不能再綁 舊 NotificationOutbox 具體類。NotificationOutboxBase 直接實作本介面(getter 同名), 應用宣告的具體 entity 自動滿足。

刻意不含租戶:租戶欄位由應用 entity 以 @TenantId 宣告(ownership 專案無此欄位); 需要時以 instanceof io.leandev.appfuse.jpa.tenant.TenantAware 探詢(決策三)。

Since:
4.0.0
  • Method Details

    • getId

      UUID getId()
      Outbox 列 ID
    • getType

      String getType()
      通知型別鍵(如 product.low-stock
    • getChannel

      ChannelType getChannel()
      遞送通道
    • getRecipientUserId

      String getRecipientUserId()
      收件人識別(可為 null)
    • getRecipientAddress

      String getRecipientAddress()
      收件人遞送位址
    • getCcRecipientAddresses

      default List<String> getCcRecipientAddresses()
      EMAIL 通道同一封郵件的 CC 位址;其他通道為空
    • getSubject

      String getSubject()
      已渲染主旨
    • getBody

      String getBody()
      已渲染內文
    • getDeepLink

      String getDeepLink()
      附帶的深連結 URL(可為 null)
    • getDedupeKey

      String getDedupeKey()
      冪等去重鍵
    • getStatus

      OutboxStatus getStatus()
      遞送狀態
    • getAttempts

      int getAttempts()
      已嘗試遞送次數
    • getMaxAttempts

      int getMaxAttempts()
      重試上限
    • getLastError

      String getLastError()
      最後一次失敗的錯誤訊息(可為 null)
    • getNextAttemptAt

      Instant getNextAttemptAt()
      下次嘗試時間(可為 null)
    • getDeliveryExpiresAt

      default Instant getDeliveryExpiresAt()
      遞送截止時間(可為 null,表示不設截止);到期後 dispatcher 直接抑制且不呼叫通道。
    • getCreatedDate

      Instant getCreatedDate()
      建立時間
    • getLastModifiedDate

      Instant getLastModifiedDate()
      最後更新時間
    • getSentAt

      Instant getSentAt()
      遞送成功時間(可為 null)