Package com.fizzed.rocker.runtime
Class DefaultRockerTemplate
java.lang.Object
com.fizzed.rocker.RockerTemplate
com.fizzed.rocker.runtime.DefaultRockerTemplate
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classInternal state of a template. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void__associate(RockerTemplate context) Associates this template for processing within the context of another template.protected abstract voidprotected RockerOutputCreates a new RockerOutput that the template will render to.final RockerOutput__render(DefaultRockerTemplate context, RockerOutputFactory outputFactory) Executes template and renders content to output.Methods inherited from class com.fizzed.rocker.RockerTemplate
toString
-
Field Details
-
__internal
-
-
Constructor Details
-
DefaultRockerTemplate
-
-
Method Details
-
__associate
Description copied from class:RockerTemplateAssociates this template for processing within the context of another template. This happens when TemplateA calls/includes TemplateB. TemplateB needs to share variables from TemplateA before itself is rendered.- Specified by:
__associatein classRockerTemplate- Parameters:
context- The template calling this template during a render
-
__newOutput
Description copied from class:RockerTemplateCreates a new RockerOutput that the template will render to.- Specified by:
__newOutputin classRockerTemplate- Returns:
- A new RockerOutput
-
__render
public final RockerOutput __render(DefaultRockerTemplate context, RockerOutputFactory outputFactory) throws RenderingException Executes template and renders content to output.- Parameters:
context- The optional context if this template is being rendered within another templateoutputFactory- Factory for creating output if necessary- 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.
-
__doRender
- Throws:
IOExceptionRenderingException
-
raw
- Throws:
IOException
-
raw
- Throws:
IOException
-