Package com.collibra.workflow.notifications.api.notification

# Interface TextContentBuilder

public interface TextContentBuilder
Builder for configuring text content inside a notification block.

Exactly one of `text(String)` or `textKey(String, String...)` must be called. If neither is called, the notification will fail to build. If both are called, the last one wins.

### Guardrails

- Literal text values (`text(String)`) are trimmed to 250 characters (with `...`).
- Translation key param values are trimmed to 250 characters each (with `...`).
- Translation key params are limited to 10; params beyond the limit are silently dropped.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `TextContentBuilder`
  `text(String value)`
  Sets a literal text value for this content block.
  `TextContentBuilder`
  `textKey(String key, String... params)`
  Sets a translation key (with optional parameters) for this content block.

- ## Method Details

  - ### text

    TextContentBuilder text(String value)
    Sets a literal text value for this content block.

    Exactly one of `text(String)` or `textKey(String, String...)` must be called. If both are called, the last one wins.

    Calling this method more than once replaces the previously set value.

    Parameters:
      `value` - the literal text to display; must not be `null`. Trimmed to 250 characters (with `...`) if it exceeds the limit.
    Returns:
      this builder

  - ### textKey

    TextContentBuilder textKey(String key, String... params)
    Sets a translation key (with optional parameters) for this content block. The key is resolved at render time based on the recipient's locale.

    Exactly one of `text(String)` or `textKey(String, String...)` must be called. If both are called, the last one wins.

    Calling this method more than once replaces the previously set key and params.

    Parameters:
      `key` - the translation key to resolve; must not be `null`
      `params` - positional parameters substituted into the translated template. Each param is trimmed to 250 characters; at most 10 params are accepted — extras are silently dropped.
    Returns:
      this builder