Package com.fizzed.rocker
Interface RockerModel
- All Known Implementing Classes:
BindableRockerModel,DefaultRockerModel
public interface RockerModel
Represents a model for a template.
-
Method Summary
Modifier and TypeMethodDescriptionrender()Executes a template model and renders content to output.<O extends RockerOutput>
Orender(RockerOutputFactory<O> outputFactory) Executes a template model and renders content to output.<O extends RockerOutput>
Orender(RockerOutputFactory<O> outputFactory, RockerTemplateCustomizer templateCustomizer) Executes a template model and renders content to output.
-
Method Details
-
render
Executes a template model and renders content to output. Single use only.- Returns:
- The output of rendering process
- Throws:
RenderingException- Thrown if any error encountered while rendering template. Exception will include underlying cause as well as line and position of original template source that triggered exception.
-
render
Executes a template model and renders content to output. Single use only.- Type Parameters:
O- The output type- Parameters:
outputFactory- A factory to create a new RockerOutput. If null then the a default defined by the template will be used instead.- Returns:
- The output of rendering process
- Throws:
RenderingException- Thrown if any error encountered while rendering template. Exception will include underlying cause as well as line and position of original template source that triggered exception.
-
render
<O extends RockerOutput> O render(RockerOutputFactory<O> outputFactory, RockerTemplateCustomizer templateCustomizer) throws RenderingException Executes a template model and renders content to output. Single use only.- Type Parameters:
O- The output type- Parameters:
outputFactory- A factory to create a new RockerOutput. If null then the a default defined by the template will be used instead.templateCustomizer- A customizer for last second changes to template between the time its built and the time it actually is rendered. Useful for injecting implicit variables in frameworks. If null then no customization will be done.- Returns:
- The output of rendering process
- Throws:
RenderingException- Thrown if any error encountered while rendering template. Exception will include underlying cause as well as line and position of original template source that triggered exception.
-