Package org.thymeleaf.engine
Class ProcessorTemplateHandler
java.lang.Object
org.thymeleaf.engine.ProcessorTemplateHandler
- All Implemented Interfaces:
ITemplateHandler
Basic, most fundamental processor in the chain of ITemplateHandlers applied to a template for
processing it.
This handler actually executes all applicable IProcessors to each of the
template events, resulting in the processing of the template.
All pre-processors apply before this handler, and all post-processors apply afterwards.
- Since:
- 3.0.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate AttributeDefinitionsprivate ICDATASectionProcessor[]private final CDATASectionStructureHandlerprivate ICommentProcessor[]private final CommentStructureHandlerprivate IEngineConfigurationprivate ITemplateContextprivate IGatheringModelProcessableprivate DecreaseContextLevelProcessableprivate IDocTypeProcessor[]private final DocTypeStructureHandlerprivate final ElementModelStructureHandlerprivate final ElementTagStructureHandlerprivate static final ICDATASectionProcessor[]private static final ICommentProcessor[]private static final IDocTypeProcessor[]private static final IProcessingInstructionProcessor[]private static final ITemplateBoundariesProcessor[]private static final ITextProcessor[]private static final IXMLDeclarationProcessor[]private IEngineContextprivate TemplateFlowControllerprivate Integerprivate static final org.slf4j.Loggerprivate TemplateModelControllerprivate ITemplateHandlerprivate IEngineProcessable[]private intprivate IProcessingInstructionProcessor[]private final ProcessingInstructionStructureHandlerprivate ITemplateBoundariesProcessor[]private final TemplateBoundariesStructureHandlerprivate TemplateModeprivate ITextProcessor[]private final TextStructureHandlerprivate booleanprivate IXMLDeclarationProcessor[]private final XMLDeclarationStructureHandler -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidvoidhandleCDATASection(ICDATASection icdataSection) voidhandleCloseElement(ICloseElementTag icloseElementTag) voidhandleComment(IComment icomment) voidhandleDocType(IDocType idocType) voidhandleOpenElement(IOpenElementTag iopenElementTag) voidHandle any processing that might have been left pending during its execution because of the process having been stopped during throttling.voidhandleProcessingInstruction(IProcessingInstruction iprocessingInstruction) voidhandleStandaloneElement(IStandaloneElementTag istandaloneElementTag) voidhandleTemplateEnd(ITemplateEnd itemplateEnd) voidhandleTemplateStart(ITemplateStart itemplateStart) voidhandleText(IText itext) private voidhandleUnmatchedCloseElement(ICloseElementTag icloseElementTag) voidhandleXMLDeclaration(IXMLDeclaration ixmlDeclaration) private IGatheringModelProcessable(package private) voidperformTearDownChecks(ITemplateEnd itemplateEnd) private voidqueueEvent(ITemplateEvent event) private voidqueueProcessable(IEngineProcessable processableModel) private ModelresetModel(Model model, boolean createIfNull) voidsetContext(ITemplateContext context) (package private) voidsetCurrentGatheringModel(IGatheringModelProcessable gatheringModel) voidsetFlowController(TemplateFlowController flowController) voidsetNext(ITemplateHandler next)
-
Field Details
-
logger
private static final org.slf4j.Logger logger -
EMPTY_TEMPLATE_BOUNDARIES_PROCESSORS
-
EMPTY_CDATA_SECTION_PROCESSORS
-
EMPTY_COMMENT_PROCESSORS
-
EMPTY_DOCTYPE_PROCESSORS
-
EMPTY_PROCESSING_INSTRUCTION_PROCESSORS
-
EMPTY_TEXT_PROCESSORS
-
EMPTY_XML_DECLARATION_PROCESSORS
-
elementTagStructureHandler
-
elementModelStructureHandler
-
templateBoundariesStructureHandler
-
cdataSectionStructureHandler
-
commentStructureHandler
-
docTypeStructureHandler
-
processingInstructionStructureHandler
-
textStructureHandler
-
xmlDeclarationStructureHandler
-
next
-
configuration
-
attributeDefinitions
-
templateMode
-
context
-
engineContext
-
flowController
-
templateBoundariesProcessors
-
cdataSectionProcessors
-
commentProcessors
-
docTypeProcessors
-
processingInstructionProcessors
-
textProcessors
-
xmlDeclarationProcessors
-
initialContextLevel
-
modelController
-
currentGatheringModel
-
throttleEngine
private boolean throttleEngine -
pendingProcessings
-
pendingProcessingsSize
private int pendingProcessingsSize -
decreaseContextLevelProcessable
-
-
Constructor Details
-
ProcessorTemplateHandler
public ProcessorTemplateHandler()Creates a new instance of this handler.
-
-
Method Details
-
setNext
- Specified by:
setNextin interfaceITemplateHandler
-
setContext
- Specified by:
setContextin interfaceITemplateHandler
-
setFlowController
-
handleTemplateStart
- Specified by:
handleTemplateStartin interfaceITemplateHandler
-
handleTemplateEnd
- Specified by:
handleTemplateEndin interfaceITemplateHandler
-
performTearDownChecks
-
handleText
- Specified by:
handleTextin interfaceITemplateHandler
-
handleComment
- Specified by:
handleCommentin interfaceITemplateHandler
-
handleCDATASection
- Specified by:
handleCDATASectionin interfaceITemplateHandler
-
handleStandaloneElement
- Specified by:
handleStandaloneElementin interfaceITemplateHandler
-
handleOpenElement
- Specified by:
handleOpenElementin interfaceITemplateHandler
-
handleCloseElement
- Specified by:
handleCloseElementin interfaceITemplateHandler
-
handleUnmatchedCloseElement
-
handleDocType
- Specified by:
handleDocTypein interfaceITemplateHandler
-
handleXMLDeclaration
- Specified by:
handleXMLDeclarationin interfaceITemplateHandler
-
handleProcessingInstruction
- Specified by:
handleProcessingInstructionin interfaceITemplateHandler
-
handlePending
public void handlePending()Handle any processing that might have been left pending during its execution because of the process having been stopped during throttling.
This method is only for internal use, and will be called by the
IThrottledTemplateProcessorimplementations before actually letting any new events flow in from the parser or cache. -
ensurePendingCapacity
private void ensurePendingCapacity() -
queueProcessable
-
queueEvent
-
obtainCurrentGatheringModel
-
setCurrentGatheringModel
-
resetModel
-