Class TextTemplatePart

java.lang.Object
io.aiven.commons.kafka.connector.common.templating.TextTemplatePart
All Implemented Interfaces:
TemplatePart

public final class TextTemplatePart extends Object implements TemplatePart
A piece of static text extracted by the parser.
  • Method Details

    • render

      public String render(Map<String,Function<Parameter,String>> bindings)
      Description copied from interface: TemplatePart
      Renders the template part using the bindings as necessary.
      Specified by:
      render in interface TemplatePart
      Parameters:
      bindings - the binding to map parameters with.
      Returns:
      the rendered string.
    • extract

      public String extract(Map<String,String> captureGroup)
      Description copied from interface: TemplatePart
      Extracts the original template string from the rendered text.
      Specified by:
      extract in interface TemplatePart
      Parameters:
      captureGroup - the capture group to use for extraction.
      Returns:
      the original string for this template.