Interface NotificationBanner
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
通知內文橫幅 SPI(標記 / 裝飾通知內文)
由 BannerNotificationTemplateResolver 在範本渲染後,於 RenderedTemplate.body 前置一段橫幅。
channel-aware:實作依通道回傳對應格式的橫幅(EMAIL 回 HTML、SMS / LINE 回純文字、不需橫幅的通道回 null)。
典型用途——標記非正式環境通知(「這是測試,請勿當真」)。與 framework Mailer 的
「主旨前綴 + 自訂標頭」chokepoint 互補:橫幅給人看(收件人直接看到),主旨 / 標頭在 Mailer
層全攔(含繞過通知子系統的路徑,供基礎設施過濾)。
回 null / 空白=該通道不加橫幅(no-op)。
- Since:
- 4.0.0
-
Method Summary
Modifier and TypeMethodDescriptionbannerFor(ChannelType channel, Locale locale) 取得某通道、某語系要前置於內文的橫幅(null / 空白=不加)
-
Method Details
-
bannerFor
取得某通道、某語系要前置於內文的橫幅(null / 空白=不加)- Parameters:
channel- 遞送通道(橫幅格式依此決定:EMAIL→HTML、SMS/LINE→純文字)locale- 目標語系(可為 null;供 i18n 橫幅文案)- Returns:
- 要前置於內文的橫幅內容,或 null
-