All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.thymeleaf.fragment.IFragmentSpec Maven / Gradle / Ivy

The newest version!
/*
 * =============================================================================
 * 
 *   Copyright (c) 2011-2013, The THYMELEAF team (http://www.thymeleaf.org)
 * 
 *   Licensed under the Apache License, Version 2.0 (the "License");
 *   you may not use this file except in compliance with the License.
 *   You may obtain a copy of the License at
 * 
 *       http://www.apache.org/licenses/LICENSE-2.0
 * 
 *   Unless required by applicable law or agreed to in writing, software
 *   distributed under the License is distributed on an "AS IS" BASIS,
 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *   See the License for the specific language governing permissions and
 *   limitations under the License.
 * 
 * =============================================================================
 */
package org.thymeleaf.fragment;

import java.util.List;

import org.thymeleaf.Configuration;
import org.thymeleaf.dom.Node;




/**
 * 

* 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 * {@link org.thymeleaf.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 * {@link org.thymeleaf.TemplateEngine#process(String, org.thymeleaf.context.IContext, IFragmentSpec)} * for more info. *

* * @author Daniel Fernández * * @since 2.0.9 * */ public interface IFragmentSpec { /** *

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

* * @param configuration the configuration object. * @param nodes the list of nodes on which to apply extraction. * @return the extracted nodes. */ public List extractFragment(final Configuration configuration, final List nodes); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy