org.thymeleaf.extras.tiles2.renderer
Class TilesFragment

Object
  extended by org.thymeleaf.extras.tiles2.renderer.TilesFragment

public final class TilesFragment
extends Object

Object modelling the result of resolving a fragment specification as allowed by the features implemented by Tiles integration.

Depending on whether the Standard Dialect has been enabled or not, the specification of fragments in Tiles definitions will allow the execution of stadard expressions (e.g. for determining the name of the template to be inserted) or not.

Note that, as a difference with Standard fragment specifications, Tiles fragment specifications do not allow the presence of fragment parameters.

Since:
2.1.0
Author:
Daniel Fernández

Constructor Summary
TilesFragment(org.thymeleaf.standard.fragment.StandardFragment standardFragment)
           Create a new instance of this class from an already-created StandardFragment object
TilesFragment(String templateName, org.thymeleaf.fragment.IFragmentSpec fragmentSpec)
           Create a new instance of this class.
 
Method Summary
 List<org.thymeleaf.dom.Node> extractFragment(org.thymeleaf.Configuration configuration, org.thymeleaf.context.IProcessingContext context, org.thymeleaf.TemplateRepository templateRepository)
           Read the specified template from TemplateRepository, and then apply the IFragmentSpec to the result of parsing it (the template).
 org.thymeleaf.fragment.IFragmentSpec getFragmentSpec()
           Returns the IFragmentSpec that will be applied to the template.
 String getTemplateName()
           Returns the name of the template that will be resolved and parsed.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TilesFragment

public TilesFragment(String templateName,
                     org.thymeleaf.fragment.IFragmentSpec fragmentSpec)

Create a new instance of this class.

Parameters:
templateName - the name of the template that will be resolved and parsed, null if fragment is to be executed on the current template.
fragmentSpec - the fragment spec that will be applied to the template, once parsed.

TilesFragment

public TilesFragment(org.thymeleaf.standard.fragment.StandardFragment standardFragment)

Create a new instance of this class from an already-created StandardFragment object

Parameters:
standardFragment - the standard fragment object to be used as a base.
Method Detail

getTemplateName

public String getTemplateName()

Returns the name of the template that will be resolved and parsed.

Returns:
the template name.

getFragmentSpec

public org.thymeleaf.fragment.IFragmentSpec getFragmentSpec()

Returns the IFragmentSpec that will be applied to the template.

Returns:
the fragment spec.

extractFragment

public List<org.thymeleaf.dom.Node> extractFragment(org.thymeleaf.Configuration configuration,
                                                    org.thymeleaf.context.IProcessingContext context,
                                                    org.thymeleaf.TemplateRepository templateRepository)

Read the specified template from TemplateRepository, and then apply the IFragmentSpec to the result of parsing it (the template).

Parameters:
configuration - the configuration to be used for resolving the template and processing the fragment spec.
context - the processing context to be used for resolving and parsing the template.
templateRepository - the template repository to be asked for the template.
Returns:
the result of parsing + applying the fragment spec.


Copyright © 2014 The THYMELEAF team. All rights reserved.