Interface SiteRenderer
-
- All Known Subinterfaces:
Renderer
- All Known Implementing Classes:
DefaultSiteRenderer
public interface SiteRenderer
Site Renderer interface: render a collection of documents into a site, ie decorated with a site template.- Author:
- Emmanuel Venisse
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description void
copyResources(SiteRenderingContext siteRenderingContext, java.io.File outputDirectory)
Copy resource files from skin, template, and site resources.SiteRenderingContext
createContextForSkin(org.apache.maven.artifact.Artifact skin, java.util.Map<java.lang.String,?> attributes, org.apache.maven.doxia.site.SiteModel siteModel, java.lang.String defaultTitle, java.util.Locale locale)
Create a Site Rendering Context for a site using a skin.java.util.Map<java.lang.String,DocumentRenderer>
locateDocumentFiles(SiteRenderingContext siteRenderingContext)
Locate Doxia document source files in the site source context.default java.util.Map<java.lang.String,DocumentRenderer>
locateDocumentFiles(SiteRenderingContext siteRenderingContext, boolean editable)
Deprecated.editable
parameter is ignored sinceSiteRenderingContext.getSiteDirectories()
contain this information on a per-directory basis now.void
mergeDocumentIntoSite(java.io.Writer writer, DocumentContent content, SiteRenderingContext siteRenderingContext)
Generate a document output integrated in a site from a document content, i.e.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, DocumentRenderingContext docRenderingContext, SiteRenderingContext siteContext)
Render a document written in a Doxia markup language.
-
-
-
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.
-
mergeDocumentIntoSite
void mergeDocumentIntoSite(java.io.Writer writer, DocumentContent content, SiteRenderingContext siteRenderingContext) throws java.io.IOException, RendererException
Generate a document output integrated in a site from a document content, i.e. merge the document content into the site template.- Parameters:
writer
- the Writer to use.content
- the document content to be merged.siteRenderingContext
- the SiteRenderingContext to use.- Throws:
java.io.IOException
- if it bombs.RendererException
- if it bombs.- Since:
- 1.8
-
createContextForSkin
SiteRenderingContext createContextForSkin(org.apache.maven.artifact.Artifact skin, java.util.Map<java.lang.String,?> attributes, org.apache.maven.doxia.site.SiteModel siteModel, java.lang.String defaultTitle, java.util.Locale locale) throws RendererException, java.io.IOException
Create a Site Rendering Context for a site using a skin.- Parameters:
skin
- a skinattributes
- attributes to usesiteModel
- a site modeldefaultTitle
- default titlelocale
- locale to use- Returns:
- a SiteRenderingContext.
- Throws:
RendererException
- if it bombs.java.io.IOException
- if it bombs.- Since:
- 1.7.3 was previously with skin as File instead of Artifact
-
copyResources
void copyResources(SiteRenderingContext siteRenderingContext, java.io.File outputDirectory) throws java.io.IOException
Copy resource files from skin, template, and site resources.- Parameters:
siteRenderingContext
- the SiteRenderingContext to use.outputDirectory
- output directory as file- 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
- the SiteRenderingContext to use- Returns:
- the Doxia document renderers in a Map keyed by output file path.
- Throws:
java.io.IOException
- if it bombs.RendererException
- if it bombs.- Since:
- 2.0.0
-
locateDocumentFiles
@Deprecated default java.util.Map<java.lang.String,DocumentRenderer> locateDocumentFiles(SiteRenderingContext siteRenderingContext, boolean editable) throws java.io.IOException, RendererException
Deprecated.editable
parameter is ignored sinceSiteRenderingContext.getSiteDirectories()
contain this information on a per-directory basis now.- Throws:
java.io.IOException
RendererException
- Since:
- 1.8
- See Also:
locateDocumentFiles(SiteRenderingContext)
-
renderDocument
void renderDocument(java.io.Writer writer, DocumentRenderingContext docRenderingContext, SiteRenderingContext siteContext) throws java.io.IOException, RendererException
Render a document written in a Doxia markup language. This method is an internal method, used byDoxiaDocumentRenderer
.- Parameters:
writer
- the writer to render the document to.docRenderingContext
- the document's rendering context, which is expected to have a non-null parser id.siteContext
- the site's rendering context- Throws:
java.io.IOException
- if it bombs.RendererException
- if it bombs.
-
-