Package liqp
Class TemplateParser
java.lang.Object
liqp.TemplateParser
The new main entrance point of this library.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enumEquivalent ofLiquid::Template.error_mode = :strict # Raises a SyntaxError when invalid syntax is used Liquid::Template.error_mode = :warn # Adds strict errors to template.errors but continues as normal Liquid::Template.error_mode = :lax # The default mode, accepts almost anything.static enum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TemplateParserReturns aTemplateParserconfigured with all default settings for "Liqp" flavor.static final Flavorstatic final TemplateParserstatic final Localefinal ZoneIdNever null, if empty - system default timezone is used.final TemplateParser.ErrorModefinal booleanfinal Filtersfinal Flavorfinal Insertionsfinal booleanfinal booleanfinal Localefinal com.fasterxml.jackson.databind.ObjectMapperfinal NameResolverfinal booleanThis field doesn't have equivalent in ruby.final booleanfinal booleanThe same astemplate.render!({}, strict_variables: true)in rubyfinal booleanfinal boolean -
Method Summary
Modifier and TypeMethodDescriptionIf template context is not available yet - it's ok to create new.If template context is not available yet - it's ok to create new.intlongintlongcom.fasterxml.jackson.databind.ObjectMapperbooleanbooleanparse(InputStream input) parse(org.antlr.v4.runtime.CharStream input)
-
Field Details
-
DEFAULT_LOCALE
-
DEFAULT_FLAVOR
-
DEFAULT
Returns aTemplateParserconfigured with all default settings for "Liqp" flavor. -
DEFAULT_JEKYLL
-
flavor
-
stripSpacesAroundTags
public final boolean stripSpacesAroundTags -
stripSingleLine
public final boolean stripSingleLine -
mapper
public final com.fasterxml.jackson.databind.ObjectMapper mapper -
insertions
-
filters
-
evaluateInOutputTag
public final boolean evaluateInOutputTag -
strictTypedExpressions
public final boolean strictTypedExpressions -
errorMode
-
liquidStyleInclude
public final boolean liquidStyleInclude -
liquidStyleWhere
public final boolean liquidStyleWhere -
strictVariables
public final boolean strictVariablesThe same astemplate.render!({}, strict_variables: true)in ruby -
showExceptionsFromInclude
public final boolean showExceptionsFromIncludeThis field doesn't have equivalent in ruby. -
evaluateMode
-
locale
-
defaultTimeZone
Never null, if empty - system default timezone is used. -
nameResolver
-
-
Method Details
-
evaluate
public Map<String,Object> evaluate(com.fasterxml.jackson.databind.ObjectMapper mapper, Map<String, Object> variables) If template context is not available yet - it's ok to create new. This function don't need access to local context variables, as it operates with parameters. -
evaluate
If template context is not available yet - it's ok to create new. This function don't need access to local context variables, as it operates with parameters. -
parse
- Throws:
IOException
-
parse
- Throws:
IOException
-
parse
-
parse
- Throws:
IOException
-
parse
- Throws:
IOException
-
parse
-
getLimitMaxIterations
public int getLimitMaxIterations() -
getLimitMaxSizeRenderedString
public int getLimitMaxSizeRenderedString() -
getLimitMaxRenderTimeMillis
public long getLimitMaxRenderTimeMillis() -
getLimitMaxTemplateSizeBytes
public long getLimitMaxTemplateSizeBytes() -
isRenderTimeLimited
-
getErrorMode
-
isStripSingleLine
public boolean isStripSingleLine() -
isStripSpacesAroundTags
public boolean isStripSpacesAroundTags() -
getMapper
public com.fasterxml.jackson.databind.ObjectMapper getMapper() -
getRenderTransformer
-
getEnvironmentMapConfigurator
-
getDateParser
-