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 -
Method Summary
Modifier and TypeMethodDescriptionvoidcopyResources(SiteRenderingContext siteRenderingContext, File outputDirectory) Copy resource files from skin, template, and site resources.voidcopyResources(SiteRenderingContext siteRenderingContext, File resourcesDirectory, File outputDirectory) Deprecated.since 1.7, use copyResources without resourcesDirectory parametercreateContextForSkin(org.apache.maven.artifact.Artifact skin, Map<String, ?> attributes, DecorationModel decoration, String defaultWindowTitle, Locale locale) Create a Site Rendering Context for a site using a skin.createContextForTemplate(File templateFile, Map<String, ?> attributes, DecorationModel decoration, String defaultWindowTitle, Locale locale) Deprecated.Deprecated without replacement, use skins only.voidgenerateDocument(Writer writer, SiteRendererSink sink, SiteRenderingContext siteRenderingContext) Deprecated.since 1.8, use mergeDocumentIntoSitelocateDocumentFiles(SiteRenderingContext siteRenderingContext) Deprecated.since 1.8, use locateDocumentFiles with editable parameterlocateDocumentFiles(SiteRenderingContext siteRenderingContext, boolean editable) Locate Doxia document source files in the site source context.voidmergeDocumentIntoSite(Writer writer, DocumentContent content, SiteRenderingContext siteRenderingContext) Generate a document output integrated in a site from a document content, i.e.voidrender(Collection<DocumentRenderer> documents, SiteRenderingContext siteRenderingContext, File outputDirectory) Render a collection of documents into a site.voidrenderDocument(Writer writer, RenderingContext docRenderingContext, SiteRenderingContext siteContext) Render a document written in a Doxia markup language.
-
Field Details
-
ROLE
Plexus lookup role.
-
-
Method Details
-
render
void render(Collection<DocumentRenderer> documents, SiteRenderingContext siteRenderingContext, File outputDirectory) throws RendererException, 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.IOException- if it bombs.
-
generateDocument
void generateDocument(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(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 merged.siteRenderingContext- the SiteRenderingContext to use.- Throws:
RendererException- if it bombs.- Since:
- 1.8
-
createContextForSkin
SiteRenderingContext createContextForSkin(org.apache.maven.artifact.Artifact skin, Map<String, ?> attributes, DecorationModel decoration, String defaultWindowTitle, Locale locale) throws RendererException, IOExceptionCreate a Site Rendering Context for a site using a skin.- Parameters:
skin- a skinattributes- attributes to usedecoration- a decoration modeldefaultWindowTitle- default window titlelocale- locale to use- Returns:
- a SiteRenderingContext.
- Throws:
RendererException- if it bombs.IOException- if it bombs.- Since:
- 1.7.3 was previously with skin as File instead of Artifact
-
createContextForTemplate
@Deprecated SiteRenderingContext createContextForTemplate(File templateFile, Map<String, ?> attributes, DecorationModel decoration, String defaultWindowTitle, Locale locale) throws MalformedURLExceptionDeprecated.Deprecated without replacement, use skins only.Create a Site Rendering Context for a site using a local template.- Parameters:
templateFile- template fileattributes- attributes to usedecoration- a decoration modeldefaultWindowTitle- default window titlelocale- locale to use- Returns:
- a SiteRenderingContext.
- Throws:
MalformedURLException- if it bombs.- Since:
- 1.7, had an additional skinFile parameter before
- See Also:
-
copyResources
void copyResources(SiteRenderingContext siteRenderingContext, File resourcesDirectory, File outputDirectory) throws IOException Deprecated.since 1.7, use copyResources without resourcesDirectory parameterCopy resource files.- Parameters:
siteRenderingContext- the SiteRenderingContext to useresourcesDirectory- resources directory as fileoutputDirectory- output directory as file- Throws:
IOException- if it bombs.
-
copyResources
void copyResources(SiteRenderingContext siteRenderingContext, File outputDirectory) throws IOException Copy resource files from skin, template, and site resources.- Parameters:
siteRenderingContext- the SiteRenderingContext to use.outputDirectory- output directory as file- Throws:
IOException- if it bombs.- Since:
- 1.7
-
locateDocumentFiles
Map<String,DocumentRenderer> locateDocumentFiles(SiteRenderingContext siteRenderingContext) throws IOException, RendererException Deprecated.since 1.8, use locateDocumentFiles with editable parameterLocate 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 name.
- Throws:
IOException- if it bombs.RendererException- if it bombs.
-
locateDocumentFiles
Map<String,DocumentRenderer> locateDocumentFiles(SiteRenderingContext siteRenderingContext, boolean editable) throws IOException, RendererException Locate Doxia document source files in the site source context.- Parameters:
siteRenderingContext- the SiteRenderingContext to useeditable- Doxia document renderer as editable? (should not set editable if generated Doxia source)- Returns:
- the Doxia document renderers in a Map keyed by output file name.
- Throws:
IOException- if it bombs.RendererException- if it bombs.- Since:
- 1.8
-
renderDocument
void renderDocument(Writer writer, RenderingContext docRenderingContext, SiteRenderingContext siteContext) throws RendererException, FileNotFoundException, 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.FileNotFoundException- if it bombs.UnsupportedEncodingException- if it bombs.
-