Package io.quarkus.qute
Class EngineBuilder
java.lang.Object
io.quarkus.qute.EngineBuilder
-
Method Summary
Modifier and TypeMethodDescriptionAdd the default set of value resolvers and section helpers.Add the default set of value resolvers.addLocator(TemplateLocator locator) AReaderinstance produced by a locator is immediately closed right after the template content is parsed.addNamespaceResolver(NamespaceResolver resolver) addParserHook(ParserHook parserHook) addResultMapper(ResultMapper mapper) addSectionHelper(SectionHelperFactory<?> factory) Register the factory for all default aliases.addSectionHelper(String name, SectionHelperFactory<?> factory) Register the factory for all default aliases and the specified name.addSectionHelpers(SectionHelperFactory<?>... factories) Register the factories for all default aliases.addValueResolver(ValueResolver resolver) addValueResolver(Supplier<ValueResolver> resolverSupplier) addValueResolvers(ValueResolver... resolvers) build()The function is used if no section helper registered viaaddSectionHelper(SectionHelperFactory)matches a section name.iterationMetadataPrefix(String prefix) This prefix is used to access the iteration metadata inside a loop section.removeStandaloneLines(boolean value) Specify whether the parser should remove standalone lines from the output.strictRendering(boolean value) If set totruethen any expression that is evaluated to aResults.NotFoundwill always result in aTemplateExceptionand the rendering is aborted.timeout(long value) The global rendering timeout.useAsyncTimeout(boolean value) If set totruethe timeout (either global or set via thetimeoutinstance attribute) is also used for asynchronous rendering methods, such asTemplateInstance.createUni()andTemplateInstance.renderAsync().
-
Method Details
-
addSectionHelper
Register the factory for all default aliases.- Parameters:
factory-- Returns:
- self
- See Also:
-
addSectionHelpers
Register the factories for all default aliases.- Parameters:
factory-- Returns:
- self
- See Also:
-
addSectionHelper
Register the factory for all default aliases and the specified name.- Parameters:
factory-- Returns:
- self
- See Also:
-
addDefaultSectionHelpers
-
addValueResolver
-
addValueResolvers
-
addValueResolver
-
addDefaultValueResolvers
Add the default set of value resolvers.- Returns:
- self
- See Also:
-
addDefaults
Add the default set of value resolvers and section helpers.- Returns:
- self
- See Also:
-
addNamespaceResolver
- Parameters:
resolver-- Returns:
- self
- Throws:
IllegalArgumentException- if there is a resolver of the same priority for the given namespace
-
addLocator
AReaderinstance produced by a locator is immediately closed right after the template content is parsed.- Parameters:
locator-- Returns:
- self
- See Also:
-
addParserHook
- Parameters:
parserHook-- Returns:
- self
- See Also:
-
addResultMapper
- Parameters:
resultMapper-- Returns:
- self
-
addTemplateInstanceInitializer
- Parameters:
initializer-- Returns:
- self
-
computeSectionHelper
The function is used if no section helper registered viaaddSectionHelper(SectionHelperFactory)matches a section name.- Parameters:
func-- Returns:
- self
-
removeStandaloneLines
Specify whether the parser should remove standalone lines from the output.A standalone line is a line that contains at least one section tag, parameter declaration, or comment but no expression and no non-whitespace character.
- Parameters:
value-- Returns:
- self
-
strictRendering
If set totruethen any expression that is evaluated to aResults.NotFoundwill always result in aTemplateExceptionand the rendering is aborted.Strict rendering is enabled by default.
- Parameters:
value-- Returns:
- self
-
iterationMetadataPrefix
This prefix is used to access the iteration metadata inside a loop section. This method must be called before aLoopSectionHelper.Factoryis registered, i.e. beforeaddDefaultSectionHelpers()or beforeaddSectionHelper(SectionHelperFactory).A valid prefix consists of alphanumeric characters and underscores.
Keep in mind that the prefix must be set before the
LoopSectionHelper.Factoryis registered, for example before theaddDefaultSectionHelpers()method is called. In other words, theLoopSectionHelper.Factorymust be re-registered after the prefix is set.- Parameters:
prefix-- Returns:
- self
- See Also:
-
timeout
The global rendering timeout.- Parameters:
value- Timeout in milliseconds- Returns:
- self
-
useAsyncTimeout
If set totruethe timeout (either global or set via thetimeoutinstance attribute) is also used for asynchronous rendering methods, such asTemplateInstance.createUni()andTemplateInstance.renderAsync().- Parameters:
value-- Returns:
- self
-
build
- Returns:
- a new engine instance
-