Class AbstractMustacheTemplate
- java.lang.Object
-
- com.github.mjeanroy.springmvc.view.mustache.core.AbstractMustacheTemplate
-
- All Implemented Interfaces:
MustacheTemplate
public abstract class AbstractMustacheTemplate extends Object implements MustacheTemplate
Abstract that define commons code to template implementation.
-
-
Constructor Summary
Constructors Constructor Description AbstractMustacheTemplate()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
doExecute(Map<String,Object> model, Writer writer)
Process template execution.void
execute(Map<String,Object> model, Writer writer)
Render template and print output to given writer.
-
-
-
Method Detail
-
execute
public void execute(Map<String,Object> model, Writer writer)
Description copied from interface:MustacheTemplate
Render template and print output to given writer.- Specified by:
execute
in interfaceMustacheTemplate
- Parameters:
model
- Model object that will be rendered into template.writer
- Writer output.
-
doExecute
protected abstract void doExecute(Map<String,Object> model, Writer writer) throws Exception
Process template execution. This methods should rethrows exception since it will be catches later (and a newMustacheExecutionException
will be thrown).- Parameters:
model
- Data model.writer
- Target writer.- Throws:
Exception
- If something bad happens (will be catched an rethrows).
-
-