@Role
public interface TemplateManager
Modifier and Type | Method and Description |
---|---|
default Template |
createStringTemplate(String content,
DocumentReference author)
Create a new template using a given content and a specific author.
|
org.xwiki.rendering.block.XDOM |
execute(String templateName)
Execute and return the template as
XDOM . |
org.xwiki.rendering.block.XDOM |
execute(Template template)
Execute and return the template as
XDOM . |
org.xwiki.rendering.block.XDOM |
executeNoException(String templateName)
Execute and return the template as
XDOM . |
org.xwiki.rendering.block.XDOM |
executeNoException(Template template)
Execute and return the template as
XDOM . |
Template |
getSkinTemplate(String templateName,
Skin skin)
Search the template with passed name in the passed skin.
|
Template |
getTemplate(String templateName)
Search everywhere for the template with passed name depending on the current context (current skin, etc).
|
Template |
getTemplate(String templateName,
Skin skin)
Search the template with passed name in the passed skin.
|
org.xwiki.rendering.block.XDOM |
getXDOM(String templateName)
Parse the template with the provided name and return it as
XDOM . |
org.xwiki.rendering.block.XDOM |
getXDOM(Template template)
Parse the template with the provided name and return it as
XDOM . |
org.xwiki.rendering.block.XDOM |
getXDOMNoException(String templateName)
Parse the template with the provided name and return it as
XDOM . |
org.xwiki.rendering.block.XDOM |
getXDOMNoException(Template template)
Parse the template with the provided name and return it as
XDOM . |
String |
render(String templateName)
Execute and render the template in current target syntax.
|
void |
render(String templateName,
Writer writer)
Execute and render the template in current target syntax.
|
void |
render(Template template,
Writer writer)
Execute and render the template in current target syntax.
|
String |
renderFromSkin(String templateName,
Skin skin)
Execute and render the template in current target syntax from the passed skin.
|
void |
renderFromSkin(String templateName,
Skin skin,
Writer writer)
Execute and render the template in current target syntax from the passed skin.
|
String |
renderNoException(String templateName)
Execute and render the template in current target syntax.
|
void |
renderNoException(String templateName,
Writer writer)
Execute and render the template in current target syntax.
|
void |
renderNoException(Template template,
Writer writer)
Execute and render the template in current target syntax.
|
org.xwiki.rendering.block.XDOM getXDOMNoException(Template template)
XDOM
.
Any failure is "printed" in the returned XDOM
.
template
- the templateorg.xwiki.rendering.block.XDOM getXDOMNoException(String templateName)
XDOM
.
Any failure is "printed" in the returned XDOM
.
templateName
- the name of the templateorg.xwiki.rendering.block.XDOM getXDOM(Template template) throws Exception
XDOM
.template
- the templateException
- when failing to parse the templateorg.xwiki.rendering.block.XDOM getXDOM(String templateName) throws Exception
XDOM
.templateName
- the name of the templateException
- when failing to parse the templateorg.xwiki.rendering.block.XDOM executeNoException(Template template)
XDOM
.
Any failure is "printed" in the returned XDOM
.
template
- the templateXDOM
result of the template executionorg.xwiki.rendering.block.XDOM executeNoException(String templateName)
XDOM
.
Any failure is "printed" in the returned XDOM
.
templateName
- the name of the templateXDOM
result of the template executionorg.xwiki.rendering.block.XDOM execute(Template template) throws Exception
XDOM
.template
- the templateXDOM
result of the template executionException
- when failing to parse the templateorg.xwiki.rendering.block.XDOM execute(String templateName) throws Exception
XDOM
.templateName
- the name of the templateXDOM
result of the template executionException
- when failing to parse the templateString renderNoException(String templateName)
Any failure is "printed" in the returned result.
templateName
- the name of the templateString render(String templateName) throws Exception
templateName
- the name of the templateException
- when failing to render the templatevoid renderNoException(Template template, Writer writer)
template
- the templatewriter
- the writer containing the result of the execution and renderingvoid renderNoException(String templateName, Writer writer)
templateName
- the name of the templatewriter
- the writer containing the result of the execution and renderingvoid render(Template template, Writer writer) throws Exception
template
- the name of the templatewriter
- the writer containing the result of the execution and renderingException
- when failing to render the templatevoid render(String templateName, Writer writer) throws Exception
templateName
- the name of the templatewriter
- the writer containing the result of the execution and renderingException
- when failing to render the templateString renderFromSkin(String templateName, Skin skin) throws Exception
templateName
- the name of the templateskin
- the skinException
- when failing to render the templatevoid renderFromSkin(String templateName, Skin skin, Writer writer) throws Exception
templateName
- the name of the templateskin
- the skinwriter
- the writer containing the result of the execution and renderingException
- when failing to render the templateTemplate getSkinTemplate(String templateName, Skin skin)
Does not fallback on parent skin.
templateName
- the name of the templateskin
- the skinTemplate getTemplate(String templateName, Skin skin)
Fallback on parent skin.
templateName
- the name of the templateskin
- the skinTemplate getTemplate(String templateName)
templateName
- the name of the templatedefault Template createStringTemplate(String content, DocumentReference author) throws Exception
content
- the template contentauthor
- the template authorException
- if an error occurred during template instanciationCopyright © 2004–2021 XWiki. All rights reserved.