P
- the type of the parent builder (when calling AbstractParent.and()
method)public class ThymeleafV2EngineConfigBuilder<P> extends AbstractThymeleafEngineConfigBuilder<ThymeleafV2EngineConfigBuilder<P>,P>
buildContext, cacheManager, dialects, dialectsByPrefix, messageResolvers, myself, templateResolvers
parent
Constructor and Description |
---|
ThymeleafV2EngineConfigBuilder(P parent,
BuildContext buildContext)
Initializes the builder with a parent builder.
|
Modifier and Type | Method and Description |
---|---|
ThymeleafV2EngineConfigBuilder<P> |
addTemplateModeHandler(org.thymeleaf.templatemode.ITemplateModeHandler templateModeHandler)
Adds a Template Mode Handler to the set of Template Mode Handlers to be
used by the template engine.
|
org.thymeleaf.TemplateEngine |
build()
Instantiate and configures the instance.
|
protected void |
configureMessageResolvers(org.thymeleaf.TemplateEngine engine) |
ThymeleafV2EngineConfigBuilder<P> |
setDefaultMessageResolvers(Set<? extends org.thymeleaf.messageresolver.IMessageResolver> defaultMessageResolvers)
Sets the default message resolvers.
|
ThymeleafV2EngineConfigBuilder<P> |
setDefaultTemplateModeHandlers(Set<? extends org.thymeleaf.templatemode.ITemplateModeHandler> defaultTemplateModeHandlers)
Sets the default Template Mode Handlers.
|
ThymeleafV2EngineConfigBuilder<P> |
setTemplateModeHandlers(Set<? extends org.thymeleaf.templatemode.ITemplateModeHandler> templateModeHandlers)
Sets the Template Mode Handlers to be used by this template engine.
|
addDialect, addDialect, addMessageResolver, addTemplateResolver, clearDialects, configureCacheManager, configureDialects, configureTemplateResolvers, dialects, dialectsByPrefix, messageResolvers, setAdditionalDialects, setCacheManager, setDialect, setDialects, setDialectsByPrefix, setMessageResolver, setMessageResolvers, setTemplateResolver, setTemplateResolvers, templateResolvers
and
public ThymeleafV2EngineConfigBuilder(P parent, BuildContext buildContext)
AbstractParent.and()
method.parent
- the parent builderbuildContext
- for registering instances and property evaluationpublic ThymeleafV2EngineConfigBuilder<P> setTemplateModeHandlers(Set<? extends org.thymeleaf.templatemode.ITemplateModeHandler> templateModeHandlers)
Sets the Template Mode Handlers to be used by this template engine. Every available template mode must have its corresponding handler.
By default, template mode handlers set are
StandardTemplateModeHandlers.ALL_TEMPLATE_MODE_HANDLERS
This operation can only be executed before processing templates for the first time. Once a template is processed, the template engine is considered to be initialized, and from then on any attempt to change its configuration will result in an exception.
templateModeHandlers
- the Set of Template Mode Handlers.public ThymeleafV2EngineConfigBuilder<P> addTemplateModeHandler(org.thymeleaf.templatemode.ITemplateModeHandler templateModeHandler)
Adds a Template Mode Handler to the set of Template Mode Handlers to be used by the template engine. Every available template mode must have its corresponding handler.
By default, template mode handlers set are
StandardTemplateModeHandlers.ALL_TEMPLATE_MODE_HANDLERS
This operation can only be executed before processing templates for the first time. Once a template is processed, the template engine is considered to be initialized, and from then on any attempt to change its configuration will result in an exception.
templateModeHandler
- the new Template Mode Handler to be added.public ThymeleafV2EngineConfigBuilder<P> setDefaultTemplateModeHandlers(Set<? extends org.thymeleaf.templatemode.ITemplateModeHandler> defaultTemplateModeHandlers)
Sets the default Template Mode Handlers. These are used when no Template
Mode Handlers are set via the setTemplateModeHandlers(Set)
or
addTemplateModeHandler(ITemplateModeHandler)
methods.
This method is useful for creating subclasses of TemplateEngine that establish default configurations for Template Mode Handlers.
By default, template mode handlers set are
StandardTemplateModeHandlers.ALL_TEMPLATE_MODE_HANDLERS
This operation can only be executed before processing templates for the first time. Once a template is processed, the template engine is considered to be initialized, and from then on any attempt to change its configuration will result in an exception.
defaultTemplateModeHandlers
- the default Template Mode Handlers.public ThymeleafV2EngineConfigBuilder<P> setDefaultMessageResolvers(Set<? extends org.thymeleaf.messageresolver.IMessageResolver> defaultMessageResolvers)
Sets the default message resolvers. These are used when no message
resolvers are set via the AbstractThymeleafEngineConfigBuilder.setMessageResolver(IMessageResolver)
,
AbstractThymeleafEngineConfigBuilder.setMessageResolvers(Set)
or
AbstractThymeleafEngineConfigBuilder.addMessageResolver(IMessageResolver)
methods.
This method is useful for creating subclasses of TemplateEngine
that establish default configurations for message resolvers.
This operation can only be executed before processing templates for the first time. Once a template is processed, the template engine is considered to be initialized, and from then on any attempt to change its configuration will result in an exception.
defaultMessageResolvers
- the default message resolvers.public org.thymeleaf.TemplateEngine build()
Builder
build
in interface Builder<org.thymeleaf.TemplateEngine>
build
in class AbstractThymeleafEngineConfigBuilder<ThymeleafV2EngineConfigBuilder<P>,P>
protected void configureMessageResolvers(org.thymeleaf.TemplateEngine engine)
configureMessageResolvers
in class AbstractThymeleafEngineConfigBuilder<ThymeleafV2EngineConfigBuilder<P>,P>
Copyright © 2021. All rights reserved.