Class SafeFunctions

java.lang.Object
org.apache.juneau.commons.template.SafeFunctions

public final class SafeFunctions extends Object
The default function allowlist of a TemplateResolver.

Pure, bounded string and collection helpers, the structure functions and the operators. Deliberately left out:

  • Functions that read arbitrary data (jsonPath, get, extract, keys, values).
  • Regex functions (match, replaceRegex), which can backtrack catastrophically on author-chosen patterns.
  • Non-deterministic functions (rand*, uuid, now) and date parsing.
  • Functions that can allocate large results from small input (repeat) or that reach the platform (switch, the encoding functions).
TemplateResolver.Builder.allowFunctions(String...) replaces this list.