Package org.apache.maven.doxia.siterenderer

## Interface Renderer

All Known Implementing Classes:
  `DefaultSiteRenderer`

    public interface Renderer

Site Renderer interface: render a collection of documents into a site, ie decored with a site template (eventually packaged as skin).

Version:
  $Id: Renderer.java 1767162 2016-10-30 14:48:28Z hboutemy $
Author:
  Emmanuel Venisse

### Field Summary

Fields
`static java.lang.String` `ROLE` Plexus lookup role.

### Method Summary

All Methods Instance Methods Abstract Methods Deprecated Methods
`void` `copyResources​(SiteRenderingContext siteRenderingContext, java.io.File outputDirectory)` Copy resource files from skin, template, and site resources.
`void` `copyResources​(SiteRenderingContext siteRenderingContext, java.io.File resourcesDirectory, java.io.File outputDirectory)` Deprecated. since 1.7, use copyResources without resourcesDirectory parameter
`SiteRenderingContext` `createContextForSkin​(org.apache.maven.artifact.Artifact skin, java.util.Map<java.lang.String,​?> attributes, DecorationModel decoration, java.lang.String defaultWindowTitle, java.util.Locale locale)` Create a Site Rendering Context for a site using a skin.
`SiteRenderingContext` `createContextForTemplate​(java.io.File templateFile, java.util.Map<java.lang.String,​?> attributes, DecorationModel decoration, java.lang.String defaultWindowTitle, java.util.Locale locale)` Deprecated. Deprecated without replacement, use skins only.
`void` `generateDocument​(java.io.Writer writer, SiteRendererSink sink, SiteRenderingContext siteRenderingContext)` Generate a document output from a Doxia SiteRenderer Sink.
`java.util.Map<java.lang.String,​DocumentRenderer>` `locateDocumentFiles​(SiteRenderingContext siteRenderingContext)` Locate Doxia document source files in the site source context.
`void` `render​(java.util.Collection<DocumentRenderer> documents, SiteRenderingContext siteRenderingContext, java.io.File outputDirectory)` Render a collection of documents into a site.
`void` `renderDocument​(java.io.Writer writer, RenderingContext renderingContext, SiteRenderingContext siteContext)` Render a document written in a Doxia markup language.

### Field Detail

#### ROLE

    static final java.lang.String ROLE

Plexus lookup role.

### Method Detail

#### render

    void render​(java.util.Collection<DocumentRenderer> documents,
                SiteRenderingContext siteRenderingContext,
                java.io.File outputDirectory)
         throws RendererException,
                java.io.IOException

Render a collection of documents into a site.

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

#### generateDocument

    void generateDocument​(java.io.Writer writer,
                          SiteRendererSink sink,
                          SiteRenderingContext siteRenderingContext)
                   throws RendererException

Generate a document output from a Doxia SiteRenderer Sink.

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

#### createContextForSkin

    SiteRenderingContext createContextForSkin​(org.apache.maven.artifact.Artifact skin,
                                              java.util.Map<java.lang.String,​?> attributes,
                                              DecorationModel decoration,
                                              java.lang.String defaultWindowTitle,
                                              java.util.Locale locale)
                                       throws RendererException,
                                              java.io.IOException

Create a Site Rendering Context for a site using a skin.

Parameters:
  `skin` -
  `attributes` -
  `decoration` -
  `defaultWindowTitle` -
  `locale` -
Returns:
  a SiteRenderingContext.
Throws:
  `java.io.IOException` - if it bombs.
  `RendererException`
Since:
  1.7.3 was previously with skin as File instead of Artifact

#### createContextForTemplate

    @Deprecated
    SiteRenderingContext createContextForTemplate​(java.io.File templateFile,
                                                  java.util.Map<java.lang.String,​?> attributes,
                                                  DecorationModel decoration,
                                                  java.lang.String defaultWindowTitle,
                                                  java.util.Locale locale)
                                           throws java.net.MalformedURLException

Deprecated.
Deprecated without replacement, use skins only.
Create a Site Rendering Context for a site using a local template.

Parameters:
  `templateFile` -
  `attributes` -
  `decoration` -
  `defaultWindowTitle` -
  `locale` -
Returns:
  a SiteRenderingContext.
Throws:
  `java.net.MalformedURLException` - if it bombs.
Since:
  1.7, had an additional skinFile parameter before
See Also:
  `#createContextForSkin(File, Map, DecorationModel, String, Locale)`

#### copyResources

    void copyResources​(SiteRenderingContext siteRenderingContext,
                       java.io.File resourcesDirectory,
                       java.io.File outputDirectory)
                throws java.io.IOException

Deprecated.
since 1.7, use copyResources without resourcesDirectory parameter
Copy resource files.

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

#### copyResources

    void copyResources​(SiteRenderingContext siteRenderingContext,
                       java.io.File outputDirectory)
                throws java.io.IOException

Copy resource files from skin, template, and site resources.

Parameters:
  `siteRenderingContext` -
  `outputDirectory` -
Throws:
  `java.io.IOException` - if it bombs.
Since:
  1.7

#### locateDocumentFiles

    java.util.Map<java.lang.String,​DocumentRenderer> locateDocumentFiles​(SiteRenderingContext siteRenderingContext)
                                                                        throws java.io.IOException,
                                                                               RendererException

Locate Doxia document source files in the site source context.

Parameters:
  `siteRenderingContext` -
Returns:
  the Doxia document renderers in a Map keyed by output file name.
Throws:
  `java.io.IOException` - if it bombs.
  `RendererException` - if it bombs.

#### renderDocument

    void renderDocument​(java.io.Writer writer,
                        RenderingContext renderingContext,
                        SiteRenderingContext siteContext)
                 throws RendererException,
                        java.io.FileNotFoundException,
                        java.io.UnsupportedEncodingException

Render a document written in a Doxia markup language. This method is an internal method, used by `DoxiaDocumentRenderer`.

Parameters:
  `writer` - the writer to render the document to.
  `renderingContext` - the document's rendering context, which is expected to have a non-null parser id.
  `siteContext` - the site's rendering context
Throws:
  `RendererException` - if it bombs.
  `java.io.FileNotFoundException` - if it bombs.
  `java.io.UnsupportedEncodingException` - if it bombs.