Package org.nuxeo.template.fm
Class FreeMarkerVariableExtractor
- java.lang.Object
-
- org.nuxeo.template.fm.FreeMarkerVariableExtractor
-
public class FreeMarkerVariableExtractor extends Object
Helper class used to extract variable names from a FreeMarker template. This is used to initialize theTemplateInput
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 (tdelprat@nuxeo.com)
-
-
Field Summary
Fields Modifier and Type Field Description protected static Pattern[]
assignMatchers
protected static Pattern[]
directiveMatchers
protected static String[]
freeMarkerVariableSuffix
protected static List<String>
reservedContextKeywords
protected static Pattern
simpleVariableMatcher
protected static String[]
spliters
-
Constructor Summary
Constructors Constructor Description FreeMarkerVariableExtractor()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static String
extractVariableName(String match)
static List<String>
extractVariables(String content)
protected static List<String>
getreservedContextKeywords()
static void
resetReservedContextKeywords()
-
-
-
Field Detail
-
simpleVariableMatcher
protected static final Pattern simpleVariableMatcher
-
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)
-
-