Package liqp
Class TemplateParser.Builder
java.lang.Object
liqp.TemplateParser.Builder
- Enclosing class:
- TemplateParser
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()withDateParser(BasicDateParser dateParser) withDefaultTimeZone(ZoneId defaultTimeZone) Set default timezone for showing timezone of date/time types that does not have own timezone information.withEnvironmentMapConfigurator(Consumer<Map<String, Object>> configurator) Sets the configurator of theTemplateContext's environment map (TemplateContext.getEnvironmentMap()) instance.withErrorMode(TemplateParser.ErrorMode errorMode) withEvaluateInOutputTag(boolean evaluateInOutputTag) withEvaluateMode(TemplateParser.EvaluateMode evaluateMode) withFilter(Filter filter) withFlavor(Flavor flavor) withLiquidStyleInclude(boolean liquidStyleInclude) withLocale(Locale locale) withMaxIterations(int maxIterations) withMaxRenderTimeMillis(long maxRenderTimeMillis) withMaxSizeRenderedString(int maxSizeRenderedString) withMaxTemplateSizeBytes(long maxTemplateSizeBytes) withNameResolver(NameResolver nameResolver) withObjectMapper(com.fasterxml.jackson.databind.ObjectMapper mapper) withRenderTransformer(RenderTransformer renderTransformer) Sets theRenderTransformer.withShowExceptionsFromInclude(boolean showExceptionsFromInclude) withSnippetsFolderName(String snippetsFolderName) withStrictTypedExpressions(boolean strictTypedExpressions) withStrictVariables(boolean strictVariables) withStripSingleLine(boolean stripSingleLine) withStripSpaceAroundTags(boolean stripSpacesAroundTags) withStripSpaceAroundTags(boolean stripSpacesAroundTags, boolean stripSingleLine)
-
Constructor Details
-
Builder
public Builder() -
Builder
-
-
Method Details
-
withFlavor
-
withStripSpaceAroundTags
public TemplateParser.Builder withStripSpaceAroundTags(boolean stripSpacesAroundTags, boolean stripSingleLine) -
withStripSpaceAroundTags
-
withStripSingleLine
-
withObjectMapper
-
withBlock
-
withTag
-
withFilter
-
withEvaluateInOutputTag
-
withStrictTypedExpressions
-
withLiquidStyleInclude
-
withStrictVariables
-
withShowExceptionsFromInclude
-
withEvaluateMode
-
withRenderTransformer
Sets theRenderTransformer.- Parameters:
renderTransformer- The transformer, ornullto use the default.- Returns:
- This builder.
-
withLocale
-
withDefaultTimeZone
Set default timezone for showing timezone of date/time types that does not have own timezone information. May be null, so the timezone pattern will be omitted in formatted strings.- Parameters:
defaultTimeZone- - value ornull- Returns:
- this builder
-
withEnvironmentMapConfigurator
public TemplateParser.Builder withEnvironmentMapConfigurator(Consumer<Map<String, Object>> configurator) Sets the configurator of theTemplateContext's environment map (TemplateContext.getEnvironmentMap()) instance. The configurator is called upon the creation of a new root context. Typically, this allows the addition of certain parameters to the context environment.- Parameters:
configurator- The configurator, ornull.- Returns:
- This builder.
-
withSnippetsFolderName
-
withNameResolver
-
withMaxIterations
-
withMaxSizeRenderedString
-
withMaxRenderTimeMillis
-
withMaxTemplateSizeBytes
-
withErrorMode
-
withDateParser
-
build
-