java.lang.Object
ch.tocco.nice2.templating.impl.freemarker.directives.QrCodeDirective
All Implemented Interfaces:
Nice2TemplateDirective, TemplateIdentifiers, freemarker.template.TemplateDirectiveModel, freemarker.template.TemplateModel

public class QrCodeDirective extends Object implements Nice2TemplateDirective, TemplateIdentifiers
Generates a qr code from the given data with the provided size. The generated qr code image is encoded in base64. Parameters: * data (required): data as text which should be included in the qr code. * size (required): size of the qr code image generated.
  • Constructor Details

    • QrCodeDirective

      public QrCodeDirective(QrCodeService qrCodeService)
  • Method Details

    • execute

      public void execute(freemarker.core.Environment environment, Map map, freemarker.template.TemplateModel[] templateModels, freemarker.template.TemplateDirectiveBody templateDirectiveBody) throws freemarker.template.TemplateException, IOException
      Specified by:
      execute in interface freemarker.template.TemplateDirectiveModel
      Throws:
      freemarker.template.TemplateException
      IOException