org.apache.maven.doxia.siterenderer
Interface Renderer

All Known Implementing Classes:
DefaultSiteRenderer

public interface Renderer

Renderer interface.

Version:
$Id: Renderer.java 1294330 2012-02-27 21:13:51Z hboutemy $
Author:
Emmanuel Venisse

Field Summary
static String ROLE
          Plexus lookup role.
 
Method Summary
 void copyResources(SiteRenderingContext siteRenderingContext, File resourcesDirectory, File outputDirectory)
          Copy resource files.
 SiteRenderingContext createContextForSkin(File skinFile, Map<String,?> attributes, DecorationModel decoration, String defaultWindowTitle, Locale locale)
          Return a SiteRenderingContext.
 SiteRenderingContext createContextForTemplate(File templateFile, File skinFile, Map<String,?> attributes, DecorationModel decoration, String defaultWindowTitle, Locale locale)
          Return a SiteRenderingContext.
 void generateDocument(Writer writer, SiteRendererSink sink, SiteRenderingContext siteRenderingContext)
          Generate a document.
 Map<String,DocumentRenderer> locateDocumentFiles(SiteRenderingContext siteRenderingContext)
          Return the document files in a Map.
 void render(Collection<DocumentRenderer> documents, SiteRenderingContext siteRenderingContext, File outputDirectory)
          Render a collection of documents.
 void renderDocument(Writer writer, RenderingContext renderingContext, SiteRenderingContext siteContext)
          Render a document.
 

Field Detail

ROLE

static final String ROLE
Plexus lookup role.

Method Detail

render

void render(Collection<DocumentRenderer> documents,
            SiteRenderingContext siteRenderingContext,
            File outputDirectory)
            throws RendererException,
                   IOException
Render a collection of documents.

Parameters:
documents - the documents to render.
siteRenderingContext - the SiteRenderingContext to use.
outputDirectory - the output directory to write results.
Throws:
RendererException - if it bombs.
IOException - if it bombs.

generateDocument

void generateDocument(Writer writer,
                      SiteRendererSink sink,
                      SiteRenderingContext siteRenderingContext)
                      throws RendererException
Generate a document.

Parameters:
writer - the Writer to use.
sink - the Sink to receive the events.
siteRenderingContext - the SiteRenderingContext to use.
Throws:
RendererException - if it bombs.

createContextForSkin

SiteRenderingContext createContextForSkin(File skinFile,
                                          Map<String,?> attributes,
                                          DecorationModel decoration,
                                          String defaultWindowTitle,
                                          Locale locale)
                                          throws IOException
Return a SiteRenderingContext.

Parameters:
skinFile -
attributes -
decoration -
defaultWindowTitle -
locale -
Returns:
a SiteRenderingContext.
Throws:
IOException - if it bombs.

createContextForTemplate

SiteRenderingContext createContextForTemplate(File templateFile,
                                              File skinFile,
                                              Map<String,?> attributes,
                                              DecorationModel decoration,
                                              String defaultWindowTitle,
                                              Locale locale)
                                              throws MalformedURLException
Return a SiteRenderingContext.

Parameters:
templateFile -
skinFile -
attributes -
decoration -
defaultWindowTitle -
locale -
Returns:
a SiteRenderingContext.
Throws:
MalformedURLException - if it bombs.

copyResources

void copyResources(SiteRenderingContext siteRenderingContext,
                   File resourcesDirectory,
                   File outputDirectory)
                   throws IOException
Copy resource files.

Parameters:
siteRenderingContext -
resourcesDirectory -
outputDirectory -
Throws:
IOException - if it bombs.

locateDocumentFiles

Map<String,DocumentRenderer> locateDocumentFiles(SiteRenderingContext siteRenderingContext)
                                                 throws IOException,
                                                        RendererException
Return the document files in a Map.

Parameters:
siteRenderingContext -
Returns:
the document files in a Map.
Throws:
IOException - if it bombs.
RendererException - if it bombs.

renderDocument

void renderDocument(Writer writer,
                    RenderingContext renderingContext,
                    SiteRenderingContext siteContext)
                    throws RendererException,
                           FileNotFoundException,
                           UnsupportedEncodingException
Render a document.

Parameters:
writer - the writer to render the document to.
renderingContext - the document's rendering context
siteContext - the site's rendering context
Throws:
RendererException - if it bombs.
FileNotFoundException - if it bombs.
UnsupportedEncodingException - if it bombs.


Copyright © 2005-2012 The Apache Software Foundation. All Rights Reserved.