org.thymeleaf.fragment
Interface IFragmentSpec

All Known Implementing Classes:
ChainedFragmentSpec, DOMSelectorFragmentSpec, ElementAndAttributeNameFragmentSpec, WholeFragmentSpec

public interface IFragmentSpec

Common interface for all fragment specifications.

Fragment specifications are able of extracting specific sections or subtrees from a DOM node tree, according to the logic defined at the specific implementation.

Fragment specs have multiple uses. One of them is allowing the TemplateEngine to select a fragment of a template to be processed (once read and parsed), discarding the rest of the template and reducing the processing effort to executing just the wanted parts. See TemplateEngine.process(String, org.thymeleaf.context.IContext, IFragmentSpec) for more info.

Since:
2.0.9
Author:
Daniel Fernández

Method Summary
 List<Node> extractFragment(Configuration configuration, List<Node> nodes)
           Executes the fragment specification against a list of nodes representing a DOM tree (or a set of trees), returning the extracted nodes.
 

Method Detail

extractFragment

List<Node> extractFragment(Configuration configuration,
                           List<Node> nodes)

Executes the fragment specification against a list of nodes representing a DOM tree (or a set of trees), returning the extracted nodes.

Parameters:
configuration - the configuration object.
nodes - the list of nodes on which to apply extraction.
Returns:
the extracted nodes.


Copyright © 2013 The THYMELEAF team. All Rights Reserved.