Class XhtmlTemplateHandler
- java.lang.Object
-
- com.atlassian.confluence.pages.templates.XhtmlTemplateHandler
-
- All Implemented Interfaces:
TemplateHandler
public class XhtmlTemplateHandler extends Object implements TemplateHandler
Processes XHTML templates.
-
-
Constructor Summary
Constructors Constructor Description XhtmlTemplateHandler(XmlOutputFactory xmlFragmentOutputFactory, XmlEventReaderFactory xmlEventReaderFactory, FormatConverter formatConverter, XMLEventFactory xmlEventFactory, TemplateI18nHandler templateI18nHandler, StorageFormatCleaner storageFormatCleaner, SpaceManager spaceManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgenerateEditorFormat(PageTemplate template, List<? extends Variable> variables, String spaceKey)PageTemplateContextgetRenderContext(String spaceKey)List<Variable>getTemplateVariables(PageTemplate template)StringinsertVariables(Reader templateXml, List<? extends Variable> variables)Insert specified variables into the template XML before returning it.
-
-
-
Constructor Detail
-
XhtmlTemplateHandler
public XhtmlTemplateHandler(@Qualifier("xmlFragmentOutputFactory") XmlOutputFactory xmlFragmentOutputFactory, XmlEventReaderFactory xmlEventReaderFactory, FormatConverter formatConverter, XMLEventFactory xmlEventFactory, TemplateI18nHandler templateI18nHandler, StorageFormatCleaner storageFormatCleaner, SpaceManager spaceManager)
-
-
Method Detail
-
getTemplateVariables
public List<Variable> getTemplateVariables(PageTemplate template) throws XhtmlException
- Specified by:
getTemplateVariablesin interfaceTemplateHandler- Throws:
XhtmlException
-
insertVariables
public String insertVariables(Reader templateXml, List<? extends Variable> variables)
Description copied from interface:TemplateHandlerInsert specified variables into the template XML before returning it. If an <at:var> is encountered in the XML that doesn't have a value specified, it will be replaced with empty string.- Specified by:
insertVariablesin interfaceTemplateHandler- Parameters:
templateXml- template XMLvariables- the template variables- Returns:
- the updated template XML with variables replaced with actual values
-
generateEditorFormat
public String generateEditorFormat(PageTemplate template, List<? extends Variable> variables, String spaceKey) throws XhtmlException
- Specified by:
generateEditorFormatin interfaceTemplateHandler- Throws:
XhtmlException
-
getRenderContext
public PageTemplateContext getRenderContext(String spaceKey)
-
-