public interface IElementTagProcessor extends IElementProcessor
Interface to be implemented by all element tag processors.
This kind of processors, the most common in most scenarios, are executed on the single
open element or standalone element tag that matches their matching configuration
(see IElementProcessor
.
Using the structureHandler
For any actions involving modifications to the tag being processed or the markup structure, processors will
use the IElementTagStructureHandler
objects passed as argument to the
process(ITemplateContext, IProcessableElementTag, IElementTagStructureHandler)
method.
See the documentation for IElementTagStructureHandler
for more info.
Abstract implementations
Two basic abstract implementations of this interface are offered:
AbstractElementTagProcessor
, meant for processors that match element events by their element
name (i.e. without looking at any attributes).AbstractAttributeTagProcessor
, meant for processors that match element events by one of their
attributes (and optionally also the element name).AbstractElementTagProcessor
,
AbstractAttributeTagProcessor
,
IElementTagStructureHandler
Modifier and Type | Method and Description |
---|---|
void |
process(ITemplateContext context,
IProcessableElementTag tag,
IElementTagStructureHandler structureHandler)
Execute the processor.
|
getMatchingAttributeName, getMatchingElementName
getPrecedence, getTemplateMode
void process(ITemplateContext context, IProcessableElementTag tag, IElementTagStructureHandler structureHandler)
Execute the processor.
The IProcessableElementTag
object argument is immutable, so all modifications to this object or any
instructions to be given to the engine should be done through the specified
IElementTagStructureHandler
handler.
context
- the execution context.tag
- the event this processor is executing on.structureHandler
- the handler that will centralise modifications and commands to the engine.Copyright © 2016 The THYMELEAF team. All rights reserved.