@Autowired private ITemplateEngineFactory factory;
// instantiate template definition...
factory.render(templateInstance);
public interface ITemplateEngineFactory extends IEngineRender
The factory for template engine instances.
Exposes access to available template engines.
Can be used as:
@Autowired private ITemplateEngineFactory factory;
// instantiate template definition...
factory.render(templateInstance);
Modifier and Type | Method and Description |
---|---|
List<String> |
getRegisteredTemplateLanguages()
Return an immutable list of registered template engine languages.
|
Optional<ITemplateEngine> |
getTemplateEngine(@NotBlank String templateLanguage)
Get the
template engine associated with the indicated templateLanguage . |
renderTemplate
Optional<ITemplateEngine> getTemplateEngine(@NotBlank @NotBlank String templateLanguage)
Get the template engine
associated with the indicated templateLanguage
.
templateLanguage
- The template language, is a text literal that identify uniquely a template engine, by example: thymeleaf, velocity, mustache, etc.Optional.empty()
if no template engine was found for the indicated templateLanguage
Copyright © 2021 Albirar. All rights reserved.