java.lang.Object
ch.tocco.nice2.templating.impl.freemarker.methods.MapLineMethod
All Implemented Interfaces:
freemarker.template.TemplateMethodModel, freemarker.template.TemplateMethodModelEx, freemarker.template.TemplateModel

public class MapLineMethod extends Object implements freemarker.template.TemplateMethodModelEx
Splits a string by the new line chracter, filters empty lines and maps the remaining lines to a simple template. This is not a real freemarker template. The only thing that is parsed / replaced is $(line) Example usage: ```
    ${mapLine(singleBase.relEvent.contents, '
  • $(line)
  • ')}
```
  • Constructor Details

    • MapLineMethod

      public MapLineMethod()
  • Method Details

    • exec

      public Object exec(List arguments) throws freemarker.template.TemplateModelException
      Specified by:
      exec in interface freemarker.template.TemplateMethodModel
      Specified by:
      exec in interface freemarker.template.TemplateMethodModelEx
      Throws:
      freemarker.template.TemplateModelException