|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Objectorg.thymeleaf.fragment.FragmentAndTarget
public final class FragmentAndTarget
Container class for a pair of template name + fragment spec,
capable of executing the fragment spec on the specified template, after
obtaining the template from TemplateRepository
.
Constructor Summary | |
---|---|
FragmentAndTarget(String templateName,
IFragmentSpec fragmentSpec)
Create a new instance of this class. |
Method Summary | |
---|---|
List<Node> |
extractFragment(Configuration configuration,
IContext context,
TemplateRepository templateRepository)
Read the specified template from TemplateRepository , and then apply
the IFragmentSpec to the result of parsing it (the template). |
List<Node> |
extractFragment(Configuration configuration,
IProcessingContext context,
TemplateRepository templateRepository)
Read the specified template from TemplateRepository , and then apply
the IFragmentSpec to the result of parsing it (the template). |
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 |
---|
public FragmentAndTarget(String templateName, IFragmentSpec fragmentSpec)
Create a new instance of this class.
templateName
- the name of the template that will be resolved and parsed.fragmentSpec
- the fragment spec that will be applied to the template, once parsed.Method Detail |
---|
public String getTemplateName()
Returns the name of the template that will be resolved and parsed.
public IFragmentSpec getFragmentSpec()
Returns the IFragmentSpec
that will be applied to the template.
public final List<Node> extractFragment(Configuration configuration, IContext context, TemplateRepository templateRepository)
Read the specified template from TemplateRepository
, and then apply
the IFragmentSpec
to the result of parsing it (the template).
If an IProcessingContext
instance is available, using
extractFragment(Configuration, IProcessingContext, TemplateRepository)
should be preferred to using this method. If this one is used, the
specified IContext
object will be converted into a
DialectAwareProcessingContext
instance.
configuration
- the configuration to be used for resolving the template and
processing the fragment spec.context
- the context to be used for resolving and parsing the template (
after being converted to an IProcessingContext
implementation.templateRepository
- the template repository to be asked for the template.
public final List<Node> extractFragment(Configuration configuration, IProcessingContext context, TemplateRepository templateRepository)
Read the specified template from TemplateRepository
, and then apply
the IFragmentSpec
to the result of parsing it (the template).
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |