org.thymeleaf.processor.tag
Interface ITagProcessor

All Known Implementing Classes:
AbstractConditionalVisibilityTagProcessor, AbstractFragmentTagProcessor, AbstractIterationTagProcessor, AbstractLocalVariableDefinitionTagProcessor, AbstractMarkupSubstitutionTagProcessor, AbstractNoOpTagProcessor, AbstractRemovalTagProcessor, AbstractSelectionTargetTagProcessor, AbstractTagProcessor, AbstractTextChildModifierTagProcessor, AbstractTextInlinerTagProcessor, AbstractUnescapedTextChildModifierTagProcessor

public interface ITagProcessor

Common interface for all Tag Processors.

Every tag processor must declare:

When developing new processors, in order to save code, it is recommended to extend an abstract class like AbstractTagProcessor (or any of its subclasses) instead of directly implementing this interface.

Since:
1.0
Author:
Daniel Fernández

Method Summary
 Set<TagApplicability> getTagApplicabilities()
           Return the tag applicabilities.
 TagProcessResult process(Arguments arguments, TemplateResolution templateResolution, Document document, Element element)
           Execute this attribute processor.
 

Method Detail

getTagApplicabilities

Set<TagApplicability> getTagApplicabilities()

Return the tag applicabilities.

These applicabilities (a set of TagApplicability objects) specify the cases in which this tag processor would be executed. This must at least include a tag name (execute if tag name is T) and can also include attributes with values (execute if tag name is T has an attribute A with value V), etc.

Refer to the TagApplicability API for more details.

Returns:
the tag applicabilities.

process

TagProcessResult process(Arguments arguments,
                         TemplateResolution templateResolution,
                         Document document,
                         Element element)

Execute this attribute processor.

This execution logic will receive as parameters the execution argument (an Arguments object), the result of resolving the processed template by the Template Resolver (a TemplateResolution object), the complete DOM node tree of the template being processed (the Document) and the DOM element representing the tag currently being processed (Element object).

Parameters:
arguments - the execution arguments, containing Template Engine configuration and execution context.
templateResolution - the result of resolving the template by the Template Resolvers.
document - the DOM node tree (document) of the template being executed.
element - the DOM element representing the tag currently being processed.
Returns:
a TagProcessResult with the result of the execution.


Copyright © 2012 The THYMELEAF team. All Rights Reserved.