com.atlassian.confluence.pages.templates
Class XhtmlTemplateHandler

java.lang.Object
  extended by com.atlassian.confluence.pages.templates.XhtmlTemplateHandler
All Implemented Interfaces:
TemplateHandler

public class XhtmlTemplateHandler
extends Object
implements TemplateHandler

Processes XHTML templates.


Constructor Summary
XhtmlTemplateHandler(XmlOutputFactory xmlFragmentOutputFactory, XmlEventReaderFactory xmlEventReaderFactory, FormatConverter formatConverter, XMLEventFactory xmlEventFactory, TemplateI18nHandler templateI18nHandler)
           
 
Method Summary
 String generateEditorFormat(PageTemplate template, List<? extends Variable> variables, String spaceKey)
           
 PageContext getRenderContext(String spaceKey)
           
 List<Variable> getTemplateVariables(PageTemplate template)
           
 String insertVariables(Reader templateXml, List<? extends Variable> variables)
          Insert specified variables into the template XML before returning it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XhtmlTemplateHandler

public XhtmlTemplateHandler(@Qualifier(value="xmlFragmentOutputFactory")
                            XmlOutputFactory xmlFragmentOutputFactory,
                            XmlEventReaderFactory xmlEventReaderFactory,
                            FormatConverter formatConverter,
                            XMLEventFactory xmlEventFactory,
                            TemplateI18nHandler templateI18nHandler)
Method Detail

getTemplateVariables

public List<Variable> getTemplateVariables(PageTemplate template)
                                    throws XhtmlException
Specified by:
getTemplateVariables in interface TemplateHandler
Throws:
XhtmlException

insertVariables

public String insertVariables(Reader templateXml,
                              List<? extends Variable> variables)
Description copied from interface: TemplateHandler
Insert 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:
insertVariables in interface TemplateHandler
Parameters:
templateXml - template XML
variables - 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:
generateEditorFormat in interface TemplateHandler
Throws:
XhtmlException

getRenderContext

public PageContext getRenderContext(String spaceKey)


Copyright © 2003–2015 Atlassian. All rights reserved.