org.apache.maven.doxia.docrenderer
Interface DocumentRenderer

All Known Subinterfaces:
PdfRenderer
All Known Implementing Classes:
AbstractDocumentRenderer, AbstractPdfRenderer

public interface DocumentRenderer

Base interface for rendering documents from a set of input files.

Since:
1.1
Version:
$Id: DocumentRenderer.java 782388 2009-06-07 13:32:11Z vsiveton $
Author:
Vincent Siveton, ltheussl

Field Summary
static String ROLE
          Plexus lookup role.
 
Method Summary
 String getOutputExtension()
          Get the output extension associated with this DocumentRenderer.
 org.apache.maven.doxia.document.DocumentModel readDocumentModel(File documentDescriptor)
          Read a document model from a file.
 void render(Collection files, File outputDirectory, org.apache.maven.doxia.document.DocumentModel documentModel)
          Render a document from a set of files, depending on a rendering context.
 void render(File baseDirectory, File outputDirectory, org.apache.maven.doxia.document.DocumentModel documentModel)
          Render a document from the files found in a source directory, depending on a rendering context.
 

Field Detail

ROLE

public static final String ROLE
Plexus lookup role.

Method Detail

render

public void render(Collection files,
                   File outputDirectory,
                   org.apache.maven.doxia.document.DocumentModel documentModel)
            throws DocumentRendererException,
                   IOException
Render a document from a set of files, depending on a rendering context.

Parameters:
files - the path name Strings (relative to a common base directory) of files to include in the document generation.
outputDirectory - the output directory where the document should be generated.
documentModel - the document model, containing all the metadata, etc. If the model contains a TOC, only the files found in this TOC are rendered, otherwise all files from the Collection of files will be processed. If the model is null, render all files individually.
Throws:
DocumentRendererException - if any.
IOException - if any.

render

public void render(File baseDirectory,
                   File outputDirectory,
                   org.apache.maven.doxia.document.DocumentModel documentModel)
            throws DocumentRendererException,
                   IOException
Render a document from the files found in a source directory, depending on a rendering context.

Parameters:
baseDirectory - the directory containing the source files. This should follow the standard Maven convention, ie containing all the site modules.
outputDirectory - the output directory where the document should be generated.
documentModel - the document model, containing all the metadata, etc. If the model contains a TOC, only the files found in this TOC are rendered, otherwise all files found under baseDirectory will be processed. If the model is null, render all files from baseDirectory individually.
Throws:
DocumentRendererException - if any
IOException - if any

readDocumentModel

public org.apache.maven.doxia.document.DocumentModel readDocumentModel(File documentDescriptor)
                                                                throws DocumentRendererException,
                                                                       IOException
Read a document model from a file.

Parameters:
documentDescriptor - a document descriptor file that contains the document model.
Returns:
the document model, containing all the metadata, etc.
Throws:
DocumentRendererException - if any
IOException - if any

getOutputExtension

public String getOutputExtension()
Get the output extension associated with this DocumentRenderer.

Returns:
the ouput extension.


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