Interface DataTemplating.ParameterSet

Enclosing interface:
DataTemplating<D>

@ForUseOnly public static interface DataTemplating.ParameterSet
Set of parameters to be used with the given template. This set offers several methods to add different types of parameters, as each of those needs a different handling to be added into HTML.
Since:
5.2.5
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addAttribute(@NotNull String name, @NotNull String text)
    Adds text as parameter for attribute use.
    void
    addHtml(@NotNull String name, @NotNull String html)
    Adds HTML as parameter.
    void
    addImage(@NotNull String name, @NotNull Image<?> image, @NotNull String altText)
    Adds an image as parameter.
    void
    addMedium(@NotNull String name, @NotNull Media media, @Nullable Resolution resolution)
    Adds a medium as parameter.
    void
    addText(@NotNull String name, @NotNull String text)
    Adds text as parameter.
  • Method Details

    • addText

      void addText(@NotNull @NotNull String name, @NotNull @NotNull String text)
      Adds text as parameter. The text will be normalized before it is applied to the template.
      Parameters:
      name - The parameter name.
      text - The text to set.
      Since:
      5.2.5
    • addHtml

      void addHtml(@NotNull @NotNull String name, @NotNull @NotNull String html)
      Adds HTML as parameter. The given text will be applied as is to the template.
      Parameters:
      name - The parameter name.
      html - The HTML to set.
      Since:
      5.2.5
    • addAttribute

      void addAttribute(@NotNull @NotNull String name, @NotNull @NotNull String text)
      Adds text as parameter for attribute use. The text will be encoded to be valid for attribute use before it is applied to the template.
      Parameters:
      name - The parameter name.
      text - The text to set.
      Since:
      5.2.5
    • addImage

      void addImage(@NotNull @NotNull String name, @NotNull @NotNull Image<?> image, @NotNull @NotNull String altText)
      Adds an image as parameter. An img-tag will be created from the image and then applied to the template.
      Parameters:
      name - The parameter name.
      image - The image to set.
      altText - The text to set the images alternative text.
      Since:
      5.2.5
    • addMedium

      void addMedium(@NotNull @NotNull String name, @NotNull @NotNull Media media, @Nullable @Nullable Resolution resolution)
      Adds a medium as parameter. If the given media is of type Picture, a valid img-tag will be created from it and then applied to the template. If a resolution is given, the picture's image will be of the according resolution. If no resolution is given, the default resolution will be used.
      If the given media is of type File, its file type based image will be used to create an img-tag then applied to the template. In this case, a given resolution will be ignored.
      Parameters:
      name - The parameter name.
      media - The media to set.
      resolution - The resolution to use (pictures only).
      Since:
      5.2.5