Package co.mastermindcms.framework.util
Class TemplateParseHelper
- java.lang.Object
-
- co.mastermindcms.framework.util.TemplateParseHelper
-
public class TemplateParseHelper extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
IDX_PLACEHOLDER
static java.lang.String
IGNORE_LINKS_REGEX
private static org.slf4j.Logger
logger
static java.lang.String
THIS_PLACEHOLDER
-
Constructor Summary
Constructors Modifier Constructor Description private
TemplateParseHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
compile(java.lang.String htmlTemplate, java.lang.Object data, java.lang.String itemPrefix)
static void
compileTree(org.jsoup.nodes.Element resultElement, org.jsoup.nodes.Element templateElement, java.util.Collection<java.lang.Object> docs, java.lang.String itemPrefix, java.lang.String nestedKey)
static <T> void
compileTreeFromBean(org.jsoup.nodes.Element resultElement, org.jsoup.nodes.Element templateElement, java.util.Collection<T> docs, java.lang.String itemPrefix, java.lang.String nestedKey)
static java.lang.String
getTemplateFromResources(java.lang.String path)
static boolean
isMsmElementExists(java.lang.String html)
static boolean
isMsmElementParentExists(org.jsoup.nodes.Element element)
static boolean
isSvgElementParentExists(org.jsoup.nodes.Element element)
-
-
-
Field Detail
-
logger
private static final org.slf4j.Logger logger
-
IDX_PLACEHOLDER
public static final java.lang.String IDX_PLACEHOLDER
- See Also:
- Constant Field Values
-
THIS_PLACEHOLDER
public static final java.lang.String THIS_PLACEHOLDER
- See Also:
- Constant Field Values
-
IGNORE_LINKS_REGEX
public static final java.lang.String IGNORE_LINKS_REGEX
- See Also:
- Constant Field Values
-
-
Method Detail
-
compile
public static java.lang.String compile(java.lang.String htmlTemplate, java.lang.Object data, java.lang.String itemPrefix)
-
compileTree
public static void compileTree(org.jsoup.nodes.Element resultElement, org.jsoup.nodes.Element templateElement, java.util.Collection<java.lang.Object> docs, java.lang.String itemPrefix, java.lang.String nestedKey)
-
compileTreeFromBean
public static <T> void compileTreeFromBean(org.jsoup.nodes.Element resultElement, org.jsoup.nodes.Element templateElement, java.util.Collection<T> docs, java.lang.String itemPrefix, java.lang.String nestedKey)
-
getTemplateFromResources
public static java.lang.String getTemplateFromResources(java.lang.String path)
-
isMsmElementExists
public static boolean isMsmElementExists(java.lang.String html)
-
isMsmElementParentExists
public static boolean isMsmElementParentExists(org.jsoup.nodes.Element element)
-
isSvgElementParentExists
public static boolean isSvgElementParentExists(org.jsoup.nodes.Element element)
-
-