Class TemplateBoundariesStructureHandler
- All Implemented Interfaces:
ITemplateBoundariesStructureHandler
Structure handler implementation, internally used by the engine.
This class should not be directly used from outside the engine.
- Since:
- 3.0.0
- Author:
- Daniel Fernández
-
Method Summary
Modifier and TypeMethodDescriptionvoidInstructs the engine to insert the specified text.voidInstructs the engine to insert the specified model.voidremoveLocalVariable(String name) Instructs the engine to remove a local variable.voidreset()Resets all actions specified so far for the current processor execution.voidsetInliner(IInliner inliner) Instructs the engine to set a new inliner.voidsetLocalVariable(String name, Object value) Instructs the engine to set a new local variable.voidsetSelectionTarget(Object selectionTarget) Instructs the engine to set a new selection target.
-
Method Details
-
insert
Description copied from interface:ITemplateBoundariesStructureHandlerInstructs the engine to insert the specified text.
If the processed event is a
ITemplateStartevent, then the text will be inserted at the beginning of the template (just after the template start event). On the other hand, if the processed event is aITemplateEndevent, then the text will be inserted at the end of the template (just before the template end event).- Specified by:
insertin interfaceITemplateBoundariesStructureHandler- Parameters:
text- the text to be inserted.processable- whether the inserted text should be considered processable or not.
-
insert
Description copied from interface:ITemplateBoundariesStructureHandlerInstructs the engine to insert the specified model.
If the processed event is a
ITemplateStartevent, then the model will be inserted at the beginning of the template (just after the template start event). On the other hand, if the processed event is aITemplateEndevent, then the model will be inserted at the end of the template (just before the template end event).- Specified by:
insertin interfaceITemplateBoundariesStructureHandler- Parameters:
model- the model to be inserted.processable- whether the inserted text should be considered processable or not.
-
removeLocalVariable
Description copied from interface:ITemplateBoundariesStructureHandlerInstructs the engine to remove a local variable.
- Specified by:
removeLocalVariablein interfaceITemplateBoundariesStructureHandler- Parameters:
name- the name of the variable.
-
setLocalVariable
Description copied from interface:ITemplateBoundariesStructureHandlerInstructs the engine to set a new local variable.
- Specified by:
setLocalVariablein interfaceITemplateBoundariesStructureHandler- Parameters:
name- the name of the variable.value- the value of the variable.
-
setSelectionTarget
Description copied from interface:ITemplateBoundariesStructureHandlerInstructs the engine to set a new selection target.
The selection target is the object on which selection expressions
(*{...})are executed. In the Standard Dialect, this selection target is usually modified by means of theth:objectattribute, but custom processors can do it too. Note the selection target has the same scope as a local variable, and will therefore be accessible only inside the body of the element being processed.- Specified by:
setSelectionTargetin interfaceITemplateBoundariesStructureHandler- Parameters:
selectionTarget- the selection target to be set.
-
setInliner
Description copied from interface:ITemplateBoundariesStructureHandlerInstructs the engine to set a new inliner.
Inliners are used for processing all text nodes (
ITextevents) appearing in the body of the element being processed. This is the mechanism used by the th:inline attribute to enable inlining in any of the specified modes (text, javascript, etc).- Specified by:
setInlinerin interfaceITemplateBoundariesStructureHandler- Parameters:
inliner- the inliner.
-
reset
public void reset()Description copied from interface:ITemplateBoundariesStructureHandlerResets all actions specified so far for the current processor execution.
- Specified by:
resetin interfaceITemplateBoundariesStructureHandler
-