Class TelegramTemplateEngine

java.lang.Object
io.github.yvasyliev.telegramforwarderbot.service.TelegramTemplateEngine

@Service public class TelegramTemplateEngine extends Object
Service for processing Telegram templates using Thymeleaf.
  • Constructor Details

    • TelegramTemplateEngine

      public TelegramTemplateEngine()
  • Method Details

    • process

      public String process(String template)
      Processes the given template with the empty context.
      Parameters:
      template - the template to process
      Returns:
      the processed template as a String
    • process

      public String process(String template, org.thymeleaf.context.AbstractContext context)
      Processes the given template with the provided context. This method sets the Telegram properties and appender properties as variables in the context.
      Parameters:
      template - the template to process
      context - the context to use for processing
      Returns:
      the processed template as a String