Search in sources :

Example 1 with WriterWikiPrinter

use of org.xwiki.rendering.renderer.printer.WriterWikiPrinter in project xwiki-platform by xwiki.

the class InternalTemplateManager method render.

private void render(XDOM xdom, Writer writer) {
    WikiPrinter printer = new WriterWikiPrinter(writer);
    BlockRenderer blockRenderer;
    try {
        blockRenderer = this.componentManagerProvider.get().getInstance(BlockRenderer.class, getTargetSyntax().toIdString());
    } catch (ComponentLookupException e) {
        blockRenderer = this.plainRenderer;
    }
    blockRenderer.render(xdom, printer);
}
Also used : WriterWikiPrinter(org.xwiki.rendering.renderer.printer.WriterWikiPrinter) ComponentLookupException(org.xwiki.component.manager.ComponentLookupException) WriterWikiPrinter(org.xwiki.rendering.renderer.printer.WriterWikiPrinter) WikiPrinter(org.xwiki.rendering.renderer.printer.WikiPrinter) BlockRenderer(org.xwiki.rendering.renderer.BlockRenderer)

Aggregations

ComponentLookupException (org.xwiki.component.manager.ComponentLookupException)1 BlockRenderer (org.xwiki.rendering.renderer.BlockRenderer)1 WikiPrinter (org.xwiki.rendering.renderer.printer.WikiPrinter)1 WriterWikiPrinter (org.xwiki.rendering.renderer.printer.WriterWikiPrinter)1