Stores and retrieves the HTML and plain text body of an EmailItem, decoupled from where that content is actually kept. A tenant may have its content held directly in the database or in a blob store, and this interface lets callers read and write the content without knowing which backend is in use for a given EmailItem. The active implementation is registered in the root context and reached with the static helper methods on this interface, or by resolving EmailContentService.class from the request context for the instance methods.


Methods

getContent(Long emailItemId)

Returns: EmailContent

Retrieves the stored content for an email item by its ID.

ParameterDescription
emailItemIdthe ID of the email item to read content for

getContent(EmailItem emailItem)

Returns: EmailContent

Retrieves the stored content for an email item.

ParameterDescription
emailItemthe email item to read content for

setContent(EmailItem emailItem, String html, String text)

Returns: void

Stores the HTML and text content for an email item in this backend.

ParameterDescription
emailItemthe email item whose content is being set
htmlthe HTML body to store, or null to leave it unchanged
textthe plain text body to store, or null to leave it unchanged
To get full access to the Kademi Hub existing customers can login here, or new customers can register here.