Package ch.tocco.nice2.templating.api
Interface TemplateEngine
- All Known Implementing Classes:
FreemarkerEngine
public interface TemplateEngine
-
Method Summary
Modifier and TypeMethodDescriptionprocess
(Nice2Template template) process a Nice2Templatecom.google.common.io.FileBackedOutputStream
stream
(Nice2Template nice2Template) stream the output of a processed Nice2Template into a new FileBackedOutputStreamvoid
stream
(Nice2Template nice2Template, OutputStream stream) Stream the output of a processed Nice2Template into a provided OutputStream
-
Method Details
-
process
process a Nice2Template- Parameters:
template
- a fully configured Nice2Template- Returns:
- a String containing the processed template.
- Throws:
TemplateException
-
createTemplate
Nice2Template createTemplate()- Returns:
- create a new Template for the Template Engine
-
stream
com.google.common.io.FileBackedOutputStream stream(Nice2Template nice2Template) throws TemplateException stream the output of a processed Nice2Template into a new FileBackedOutputStream- Parameters:
nice2Template
- a fully configured Nice2Template- Throws:
TemplateException
-
stream
Stream the output of a processed Nice2Template into a provided OutputStream- Parameters:
nice2Template
- a fully configured Nice2Templatestream
- an OutputStream to write to- Throws:
TemplateException
-