Package org.jusecase.jte
Class TemplateEngine
- java.lang.Object
-
- org.jusecase.jte.TemplateEngine
-
public final class TemplateEngine extends Object
-
-
Constructor Summary
Constructors Constructor Description TemplateEngine(CodeResolver codeResolver)TemplateEngine(CodeResolver codeResolver, Path classDirectory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcleanAll()List<String>invalidate(String name)Notify the template engine, that the given code has changed and needs to be invalidated.voidprecompileAll()voidprecompileAll(List<String> compilePath)voidprepareForRendering(String name)Prepares the template with the given name for renderingvoidrender(String name, Object model, TemplateOutput output)voidsetNullSafeTemplateCode(boolean value)
-
-
-
Constructor Detail
-
TemplateEngine
public TemplateEngine(CodeResolver codeResolver)
-
TemplateEngine
public TemplateEngine(CodeResolver codeResolver, Path classDirectory)
-
-
Method Detail
-
render
public void render(String name, Object model, TemplateOutput output)
-
invalidate
public List<String> invalidate(String name)
Notify the template engine, that the given code has changed and needs to be invalidated.- Parameters:
name- Template, Tag or Layout name- Returns:
- List of templates that have been invalidated
-
prepareForRendering
public void prepareForRendering(String name)
Prepares the template with the given name for rendering- Parameters:
name- template name
-
cleanAll
public void cleanAll()
-
precompileAll
public void precompileAll()
-
setNullSafeTemplateCode
public void setNullSafeTemplateCode(boolean value)
-
-