Class SkipFirstMethodModel
java.lang.Object
org.gorpipe.querydialogs.templating.SkipFirstMethodModel
- All Implemented Interfaces:
freemarker.template.TemplateMethodModel,freemarker.template.TemplateModel
public class SkipFirstMethodModel
extends java.lang.Object
implements freemarker.template.TemplateMethodModel
Template model that enables template writer to skip first occurence of a given argument.
Example:
The first time the method is called, nothing is output, the next call will output 'AND' (without quotes). In this case that means that 'AND' will only be output if the condition is true, resulting in either: "something AND something more" or just "something more".
Calls to skip can optionally be scoped to provide more control. Example:
This effectively separates concerns for the first two calls and the last two calls, resulting in the possible outcomes:
- something AND something more OR something else AND more something else
- something more OR something else AND more something else
- something AND something more OR more something else
- something more OR more something else
-
Field Summary
-
Constructor Summary
Constructors Constructor Description SkipFirstMethodModel() -
Method Summary
-
Constructor Details
-
SkipFirstMethodModel
public SkipFirstMethodModel()
-
-
Method Details