Class FreeMarkerVariableExtractor


  • public class FreeMarkerVariableExtractor
    extends Object
    Helper class used to extract variable names from a FreeMarker template. This is used to initialize the TemplateInput parameters. Extraction is for now simple and system may not detect all the cases, but user is able to add parameters from the UI.
    Author:
    Tiry ([email protected])
    • Field Detail

      • simpleVariableMatcher

        protected static final Pattern simpleVariableMatcher
      • spliters

        protected static final String[] spliters
      • directiveMatchers

        protected static final Pattern[] directiveMatchers
      • assignMatchers

        protected static final Pattern[] assignMatchers
      • reservedContextKeywords

        protected static final List<String> reservedContextKeywords
      • freeMarkerVariableSuffix

        protected static final String[] freeMarkerVariableSuffix
    • Constructor Detail

      • FreeMarkerVariableExtractor

        public FreeMarkerVariableExtractor()
    • Method Detail

      • extractVariableName

        protected static String extractVariableName​(String match)
      • resetReservedContextKeywords

        public static void resetReservedContextKeywords()
      • getreservedContextKeywords

        protected static List<String> getreservedContextKeywords()
      • extractVariables

        public static List<String> extractVariables​(String content)