Class BpmMessageTemplateRendererImpl

java.lang.Object
io.jmix.bpm.notification.impl.BpmMessageTemplateRendererImpl
All Implemented Interfaces:
BpmMessageTemplateRenderer

public class BpmMessageTemplateRendererImpl extends Object implements BpmMessageTemplateRenderer
Default BpmMessageTemplateRenderer implementation, delegating rendering to the Message Templates add-on's MessageTemplatesGenerator.

It is conditional bean, see BpmMessageTemplatesAutoConfiguration.

  • Field Details

  • Constructor Details

    • BpmMessageTemplateRendererImpl

      public BpmMessageTemplateRendererImpl()
  • Method Details

    • render

      public String render(String templateCode, Map<String,Object> parameters)
      Description copied from interface: BpmMessageTemplateRenderer
      Renders the template with the given code, substituting the passed parameters.
      Specified by:
      render in interface BpmMessageTemplateRenderer
      Parameters:
      templateCode - message template code
      parameters - parameters available to the template
      Returns:
      rendered message text
    • getContentType

      public @Nullable String getContentType(String templateCode)
      Description copied from interface: BpmMessageTemplateRenderer
      Resolves the content type declared by the template with the given code.
      Specified by:
      getContentType in interface BpmMessageTemplateRenderer
      Parameters:
      templateCode - message template code
      Returns:
      "html" or "plain" per the template's type, or null if the template is not found