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).
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ROLE
Plexus lookup role.
-
Method Summary
All Methods Instance Methods Abstract 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.void
copyResources(SiteRenderingContext siteRenderingContext, java.io.File resourcesDirectory, java.io.File outputDirectory)
Deprecated.since 1.7, use copyResources without resourcesDirectory parameterSiteRenderingContext
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)
Deprecated.since 1.8, use mergeDocumentIntoSitejava.util.Map<java.lang.String,DocumentRenderer>
locateDocumentFiles(SiteRenderingContext siteRenderingContext)
Deprecated.since 1.8, use locateDocumentFiles with editable parameterjava.util.Map<java.lang.String,DocumentRenderer>
locateDocumentFiles(SiteRenderingContext siteRenderingContext, boolean editable)
Locate Doxia document source files in the site source context.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, RenderingContext 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.
-
generateDocument
void generateDocument(java.io.Writer writer, SiteRendererSink sink, SiteRenderingContext siteRenderingContext) throws RendererException
Deprecated.since 1.8, use mergeDocumentIntoSiteGenerate a document output from a Doxia SiteRenderer Sink, i.e. merge the document content into the site template.- Parameters:
writer
- the Writer to use.sink
- the Site Renderer Sink that received the Doxia events during document content rendering.siteRenderingContext
- the SiteRenderingContext to use.- Throws:
RendererException
- if it bombs.
-
mergeDocumentIntoSite
void mergeDocumentIntoSite(java.io.Writer writer, DocumentContent content, SiteRenderingContext siteRenderingContext) throws 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 mergedsiteRenderingContext
- the SiteRenderingContext to use.- Throws:
RendererException
- if it bombs.- Since:
- 1.8
-
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 parameterCopy 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
Deprecated.since 1.8, use locateDocumentFiles with editable parameterLocate 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.
-
locateDocumentFiles
java.util.Map<java.lang.String,DocumentRenderer> locateDocumentFiles(SiteRenderingContext siteRenderingContext, boolean editable) throws java.io.IOException, RendererException
Locate Doxia document source files in the site source context.- Parameters:
siteRenderingContext
-mark
- Doxia document renderer as editable? (should not mark editable if generated Doxia source)- Returns:
- the Doxia document renderers in a Map keyed by output file name.
- Throws:
java.io.IOException
- if it bombs.RendererException
- if it bombs.- Since:
- 1.8
-
renderDocument
void renderDocument(java.io.Writer writer, RenderingContext docRenderingContext, 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 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:
RendererException
- if it bombs.java.io.FileNotFoundException
- if it bombs.java.io.UnsupportedEncodingException
- if it bombs.
-
-