Interface MessageTemplateDataSource

All Superinterfaces:
MessageDataSource
All Known Implementing Classes:
ClasspathResourceMessageTemplateDataSource

public interface MessageTemplateDataSource extends MessageDataSource
API for data required to generate a template based mail message.
  • Field Details

    • STANDARD_WORD_WRAP_COLUMN

      static final int STANDARD_WORD_WRAP_COLUMN
      A sensible standard column width to use for word-wrapping.
      Since:
      1.1
      See Also:
  • Method Details

    • getModel

      Map<String,?> getModel()
      Get a message template model to merge into the message.
      Returns:
      Map of model objects
    • getLocale

      Locale getLocale()
      Get a Locale for the message.
      Returns:
      a Locale
    • getMessageTemplate

      org.springframework.core.io.Resource getMessageTemplate()
      Get the message template.
      Returns:
      message template
    • getSubject

      String getSubject()
      Get the message subject.
      Specified by:
      getSubject in interface MessageDataSource
      Returns:
      message subject
    • getWordWrapCharacterIndex

      Integer getWordWrapCharacterIndex()
      Get a character column index at which to hard-wrap message text at. Return 0 to indicate no wrapping should occur.
      Returns:
      The word wrap character column index, or null if unspecified.
      Since:
      1.1