|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.codehaus.plexus.logging.AbstractLogEnabled org.apache.maven.doxia.docrenderer.AbstractDocumentRenderer
public abstract class AbstractDocumentRenderer
Abstract document
renderer.
Field Summary | |
---|---|
protected Doxia |
doxia
|
protected SiteModuleManager |
siteModuleManager
|
Fields inherited from interface org.apache.maven.doxia.docrenderer.DocumentRenderer |
---|
ROLE |
Constructor Summary | |
---|---|
AbstractDocumentRenderer()
|
Method Summary | |
---|---|
protected void |
copyDirectory(File source,
File destination)
Copy content of a directory, excluding scm-specific files. |
protected void |
copyResources(File outputDirectory)
Copies the contents of the resource directory to an output folder. |
String |
getBaseDir()
Return the current base directory. |
Map<String,SiteModule> |
getFilesToProcess(Collection<String> files)
Returns a Map of files to process. |
Map<String,SiteModule> |
getFilesToProcess(File baseDirectory)
Returns a Map of files to process. |
protected String |
getOutputName(DocumentModel documentModel)
|
protected void |
parse(String fullDocPath,
String parserId,
Sink sink)
Deprecated. since 1.1.2, use parse(String, String, Sink, DocumentRendererContext) |
protected void |
parse(String fullDocPath,
String parserId,
Sink sink,
DocumentRendererContext context)
Parse a source document into a sink. |
DocumentModel |
readDocumentModel(File documentDescriptor)
Read a document model from a file. |
void |
render(Collection<String> files,
File outputDirectory,
DocumentModel documentModel)
Render a document from a set of files, depending on a rendering context. |
void |
render(File baseDirectory,
File outputDirectory)
Render a document from the files found in baseDirectory. |
void |
render(File baseDirectory,
File outputDirectory,
DocumentModel documentModel)
Render a document from the files found in a source directory, depending on a rendering context. |
void |
render(File baseDirectory,
File outputDirectory,
DocumentModel documentModel,
DocumentRendererContext context)
Render a document from the files found in a source directory, depending on a rendering context. |
void |
render(File baseDirectory,
File outputDirectory,
File documentDescriptor)
Render a document from the files found in baseDirectory. |
abstract void |
render(Map<String,SiteModule> filesToProcess,
File outputDirectory,
DocumentModel documentModel)
Deprecated. since 1.1.2, use render(Map, File, DocumentModel, DocumentRendererContext) |
void |
render(Map<String,SiteModule> filesToProcess,
File outputDirectory,
DocumentModel documentModel,
DocumentRendererContext context)
Render an aggregate document from the files found in a Map. |
void |
renderIndividual(Map<String,SiteModule> filesToProcess,
File outputDirectory)
Deprecated. since 1.1.2, use renderIndividual(Map, File, DocumentRendererContext) |
void |
renderIndividual(Map<String,SiteModule> filesToProcess,
File outputDirectory,
DocumentRendererContext context)
Render documents separately for each file found in a Map. |
void |
setBaseDir(String newDir)
Sets the current base directory. |
Methods inherited from class org.codehaus.plexus.logging.AbstractLogEnabled |
---|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.maven.doxia.docrenderer.DocumentRenderer |
---|
getOutputExtension |
Field Detail |
---|
protected SiteModuleManager siteModuleManager
protected Doxia doxia
Constructor Detail |
---|
public AbstractDocumentRenderer()
Method Detail |
---|
public abstract void render(Map<String,SiteModule> filesToProcess, File outputDirectory, DocumentModel documentModel) throws DocumentRendererException, IOException
render(Map, File, DocumentModel, DocumentRendererContext)
filesToProcess
- the Map of Files to process. The Map should contain as keys the paths of the
source files (relative to baseDir
), and the corresponding SiteModule as values.outputDirectory
- the output directory where the aggregate document should be generated.documentModel
- the document model, containing all the metadata, etc.
DocumentRendererException
- if any
IOException
- if anypublic void render(Collection<String> files, File outputDirectory, DocumentModel documentModel) throws DocumentRendererException, IOException
render
in interface DocumentRenderer
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.
DocumentRendererException
- if any.
IOException
- if any.public void render(File baseDirectory, File outputDirectory, DocumentModel documentModel) throws DocumentRendererException, IOException
render
in interface DocumentRenderer
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.
DocumentRendererException
- if any
IOException
- if any
// * @deprecated since 1.1.2, use #render(File, File, DocumentModel, DocumentRendererContext)
public void render(Map<String,SiteModule> filesToProcess, File outputDirectory, DocumentModel documentModel, DocumentRendererContext context) throws DocumentRendererException, IOException
filesToProcess
- the Map of Files to process. The Map should contain as keys the paths of the
source files (relative to baseDir
), and the corresponding SiteModule as values.outputDirectory
- the output directory where the aggregate document should be generated.documentModel
- the document model, containing all the metadata, etc.context
- the rendering context when processing files.
DocumentRendererException
- if any
IOException
- if anypublic void render(File baseDirectory, File outputDirectory, DocumentModel documentModel, DocumentRendererContext context) throws DocumentRendererException, IOException
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.context
- the rendering context when processing files.
DocumentRendererException
- if any
IOException
- if anypublic void render(File baseDirectory, File outputDirectory) throws DocumentRendererException, IOException
render(File,File,DocumentModel)
with a new DocumentModel.
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.
DocumentRendererException
- if any
IOException
- if anyrender(File, File, DocumentModel)
public void render(File baseDirectory, File outputDirectory, File documentDescriptor) throws DocumentRendererException, IOException
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.documentDescriptor
- a file containing the document model.
If this file does not exist or is null, some default settings will be used.
DocumentRendererException
- if any
IOException
- if anyif documentDescriptor does not exist or is null
,
otherwise
public void renderIndividual(Map<String,SiteModule> filesToProcess, File outputDirectory) throws DocumentRendererException, IOException
renderIndividual(Map, File, DocumentRendererContext)
filesToProcess
- the Map of Files to process. The Map should contain as keys the paths of the
source files (relative to baseDir
), and the corresponding SiteModule as values.outputDirectory
- the output directory where the documents should be generated.
DocumentRendererException
- if any
IOException
- if anypublic void renderIndividual(Map<String,SiteModule> filesToProcess, File outputDirectory, DocumentRendererContext context) throws DocumentRendererException, IOException
filesToProcess
- the Map of Files to process. The Map should contain as keys the paths of the
source files (relative to baseDir
), and the corresponding SiteModule as values.outputDirectory
- the output directory where the documents should be generated.context
- the rendering context.
DocumentRendererException
- if any
IOException
- if anypublic Map<String,SiteModule> getFilesToProcess(File baseDirectory) throws IOException, DocumentRendererException
baseDir
), and the corresponding SiteModule as values.
baseDirectory
- the directory containing the source files.
This should follow the standard Maven convention, ie containing all the site modules.
IOException
- in case of a problem reading the files under baseDirectory.
DocumentRendererException
- if anypublic Map<String,SiteModule> getFilesToProcess(Collection<String> files)
baseDir
), and the corresponding SiteModule as values.
files
- The Collection of source files.
public DocumentModel readDocumentModel(File documentDescriptor) throws DocumentRendererException, IOException
readDocumentModel
in interface DocumentRenderer
documentDescriptor
- a document descriptor file that contains the document model.
DocumentRendererException
- if any
IOException
- if anypublic void setBaseDir(String newDir)
newDir
- the absolute path to the base directory to set.public String getBaseDir()
protected void parse(String fullDocPath, String parserId, Sink sink) throws DocumentRendererException, IOException
parse(String, String, Sink, DocumentRendererContext)
fullDocPath
- absolute path to the source document.parserId
- determines the parser to use.sink
- the sink to receive the events.
DocumentRendererException
- in case of a parsing error.
IOException
- if the source document cannot be opened.protected void parse(String fullDocPath, String parserId, Sink sink, DocumentRendererContext context) throws DocumentRendererException, IOException
fullDocPath
- absolute path to the source document.parserId
- determines the parser to use.sink
- the sink to receive the events.context
- the rendering context.
DocumentRendererException
- in case of a parsing error.
IOException
- if the source document cannot be opened.protected void copyResources(File outputDirectory) throws IOException
outputDirectory
- the destination folder.
IOException
- if any.protected void copyDirectory(File source, File destination) throws IOException
source
- directory that contains the files and sub-directories to be copied.destination
- destination folder.
IOException
- if any.protected String getOutputName(DocumentModel documentModel)
documentModel
- not null
DocumentModel.getOutputName()
,
DocumentRenderer.getOutputExtension()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |