org.apache.maven.doxia.siterenderer
Interface Renderer

All Known Implementing Classes:
DefaultSiteRenderer

public interface Renderer

Renderer interface.

Version:
$Id: Renderer.java 746999 2009-02-23 12:56:04Z vsiveton $
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 attributes, DecorationModel decoration, String defaultWindowTitle, Locale locale)
          Return a SiteRenderingContext.
 SiteRenderingContext createContextForTemplate(File templateFile, File skinFile, Map attributes, DecorationModel decoration, String defaultWindowTitle, Locale locale)
          Return a SiteRenderingContext.
 void generateDocument(Writer writer, SiteRendererSink sink, SiteRenderingContext siteRenderingContext)
          Generate a document.
 Map locateDocumentFiles(SiteRenderingContext siteRenderingContext)
          Return the document files in a Map.
 void render(Collection documents, SiteRenderingContext siteRenderingContext, File outputDirectory)
          Render a collection of documents.
 void renderDocument(Writer writer, org.apache.maven.doxia.sink.render.RenderingContext renderingContext, SiteRenderingContext context)
          Render a document.
 

Field Detail

ROLE

public static final String ROLE
Plexus lookup role.

Method Detail

render

public void render(Collection 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

public 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

public SiteRenderingContext createContextForSkin(File skinFile,
                                                 Map 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

public SiteRenderingContext createContextForTemplate(File templateFile,
                                                     File skinFile,
                                                     Map 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

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

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

locateDocumentFiles

public Map 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

public void renderDocument(Writer writer,
                           org.apache.maven.doxia.sink.render.RenderingContext renderingContext,
                           SiteRenderingContext context)
                    throws RendererException,
                           FileNotFoundException,
                           UnsupportedEncodingException
Render a document.

Parameters:
writer -
renderingContext -
context -
Throws:
RendererException - if it bombs.
FileNotFoundException - if it bombs.
UnsupportedEncodingException - if it bombs.


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