public abstract class AbstractElementModelProcessor extends AbstractProcessor implements IElementModelProcessor
Basic abstract implementation of IElementModelProcessor for processors that match element
events by their element name (i.e. without looking at any attributes).
| Constructor and Description |
|---|
AbstractElementModelProcessor(TemplateMode templateMode,
String dialectPrefix,
String elementName,
boolean prefixElementName,
String attributeName,
boolean prefixAttributeName,
int precedence) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
doProcess(ITemplateContext context,
IModel model,
IElementModelStructureHandler structureHandler) |
protected String |
getDialectPrefix() |
MatchingAttributeName |
getMatchingAttributeName()
Returns the attribute name that would make this processor match (if any).
|
MatchingElementName |
getMatchingElementName()
Returns the element name that would make this processor match (if any).
|
void |
process(ITemplateContext context,
IModel model,
IElementModelStructureHandler structureHandler)
Execute the processor.
|
getPrecedence, getTemplateModeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetPrecedence, getTemplateModepublic AbstractElementModelProcessor(TemplateMode templateMode, String dialectPrefix, String elementName, boolean prefixElementName, String attributeName, boolean prefixAttributeName, int precedence)
protected final String getDialectPrefix()
public final MatchingElementName getMatchingElementName()
IElementProcessorReturns the element name that would make this processor match (if any).
getMatchingElementName in interface IElementProcessorpublic final MatchingAttributeName getMatchingAttributeName()
IElementProcessorReturns the attribute name that would make this processor match (if any).
getMatchingAttributeName in interface IElementProcessorpublic final void process(ITemplateContext context, IModel model, IElementModelStructureHandler structureHandler)
IElementModelProcessorExecute the processor.
The IModel object represents the section of template (a fragment) on which the processor
is executing, and can be directly modified. Instructions to be given to the template engine such as
local variable creation, inlining etc. should be done via the IElementModelStructureHandler handler.
process in interface IElementModelProcessorcontext - the execution context.model - the model this processor is executing on.structureHandler - the handler that will centralise modifications and commands to the engine.protected abstract void doProcess(ITemplateContext context, IModel model, IElementModelStructureHandler structureHandler)
Copyright © 2017 The THYMELEAF team. All rights reserved.