Class AbstractDocumentRenderer

java.lang.Object
org.codehaus.plexus.logging.AbstractLogEnabled
org.apache.maven.doxia.docrenderer.AbstractDocumentRenderer
All Implemented Interfaces:
DocumentRenderer, org.codehaus.plexus.logging.LogEnabled
Direct Known Subclasses:
AbstractPdfRenderer

@Deprecated public abstract class AbstractDocumentRenderer extends org.codehaus.plexus.logging.AbstractLogEnabled implements DocumentRenderer
Deprecated.
Abstract document renderer.
Since:
1.1
Author:
Vincent Siveton, ltheussl
  • Field Details

    • parserModuleManager

      @Requirement protected org.apache.maven.doxia.parser.module.ParserModuleManager parserModuleManager
      Deprecated.
    • doxia

      @Requirement protected org.apache.maven.doxia.Doxia doxia
      Deprecated.
  • Constructor Details

    • AbstractDocumentRenderer

      public AbstractDocumentRenderer()
      Deprecated.
  • Method Details

    • render

      public abstract void render(Map<String,org.apache.maven.doxia.parser.module.ParserModule> filesToProcess, File outputDirectory, org.apache.maven.doxia.document.DocumentModel documentModel) throws DocumentRendererException, IOException
      Render an aggregate document from the files found in a Map.
      Parameters:
      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 ParserModule as values.
      outputDirectory - the output directory where the aggregate document should be generated.
      documentModel - the document model, containing all the metadata, etc.
      Throws:
      DocumentRendererException - if any
      IOException - if any
    • render

      public void render(Collection<String> files, File outputDirectory, org.apache.maven.doxia.document.DocumentModel documentModel) throws DocumentRendererException, IOException
      Deprecated.
      Render a document from a set of files, depending on a rendering context.
      Specified by:
      render in interface DocumentRenderer
      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
      Deprecated.
      Render a document from the files found in a source directory, depending on a rendering context.
      Specified by:
      render in interface DocumentRenderer
      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
    • render

      public void render(Map<String,org.apache.maven.doxia.parser.module.ParserModule> filesToProcess, File outputDirectory, org.apache.maven.doxia.document.DocumentModel documentModel, DocumentRendererContext context) throws DocumentRendererException, IOException
      Deprecated.
      Render an aggregate document from the files found in a Map.
      Parameters:
      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 ParserModule 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.
      Throws:
      DocumentRendererException - if any
      IOException - if any
    • render

      public void render(File baseDirectory, File outputDirectory, org.apache.maven.doxia.document.DocumentModel documentModel, DocumentRendererContext context) throws DocumentRendererException, IOException
      Deprecated.
      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.
      context - the rendering context when processing files.
      Throws:
      DocumentRendererException - if any
      IOException - if any
      Since:
      1.1.2
    • render

      public void render(File baseDirectory, File outputDirectory) throws DocumentRendererException, IOException
      Deprecated.
      Render a document from the files found in baseDirectory. This just forwards to render(File,File,DocumentModel) with a new DocumentModel.
      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.
      Throws:
      DocumentRendererException - if any
      IOException - if any
      See Also:
    • render

      public void render(File baseDirectory, File outputDirectory, File documentDescriptor) throws DocumentRendererException, IOException
      Deprecated.
      Render a document from the files found in baseDirectory.
      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.
      documentDescriptor - a file containing the document model. If this file does not exist or is null, some default settings will be used.
      Throws:
      DocumentRendererException - if any
      IOException - if any
      See Also:
    • renderIndividual

      public void renderIndividual(Map<String,org.apache.maven.doxia.parser.module.ParserModule> filesToProcess, File outputDirectory) throws DocumentRendererException, IOException
      Render documents separately for each file found in a Map.
      Parameters:
      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 ParserModule as values.
      outputDirectory - the output directory where the documents should be generated.
      Throws:
      DocumentRendererException - if any
      IOException - if any
      Since:
      1.1.1
    • renderIndividual

      public void renderIndividual(Map<String,org.apache.maven.doxia.parser.module.ParserModule> filesToProcess, File outputDirectory, DocumentRendererContext context) throws DocumentRendererException, IOException
      Deprecated.
      Render documents separately for each file found in a Map.
      Parameters:
      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 ParserModule as values.
      outputDirectory - the output directory where the documents should be generated.
      context - the rendering context.
      Throws:
      DocumentRendererException - if any
      IOException - if any
      Since:
      1.1.2
    • getFilesToProcess

      public Map<String,org.apache.maven.doxia.parser.module.ParserModule> getFilesToProcess(File baseDirectory) throws IOException, DocumentRendererException
      Deprecated.
      Returns a Map of files to process. The Map contains as keys the paths of the source files (relative to baseDir), and the corresponding ParserModule as values.
      Parameters:
      baseDirectory - the directory containing the source files. This should follow the standard Maven convention, ie containing all the site modules.
      Returns:
      a Map of files to process.
      Throws:
      IOException - in case of a problem reading the files under baseDirectory.
      DocumentRendererException - if any
    • getExtensions

      protected static String[] getExtensions(org.apache.maven.doxia.parser.module.ParserModule module)
      Deprecated.
    • endsWithIgnoreCase

      protected static boolean endsWithIgnoreCase(String str, String searchStr)
      Deprecated.
    • endsWithIgnoreCase

      protected static boolean endsWithIgnoreCase(String str, String[] searchStrs)
      Deprecated.
    • getFilesToProcess

      public Map<String,org.apache.maven.doxia.parser.module.ParserModule> getFilesToProcess(Collection<String> files)
      Deprecated.
      Returns a Map of files to process. The Map contains as keys the paths of the source files (relative to baseDir), and the corresponding ParserModule as values.
      Parameters:
      files - The Collection of source files.
      Returns:
      a Map of files to process.
    • readDocumentModel

      public org.apache.maven.doxia.document.DocumentModel readDocumentModel(File documentDescriptor) throws DocumentRendererException, IOException
      Deprecated.
      Read a document model from a file.
      Specified by:
      readDocumentModel in interface DocumentRenderer
      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
    • setBaseDir

      public void setBaseDir(String newDir)
      Deprecated.
      Sets the current base directory.
      Parameters:
      newDir - the absolute path to the base directory to set.
    • getBaseDir

      public String getBaseDir()
      Deprecated.
      Return the current base directory.
      Returns:
      the current base directory.
    • parse

      protected void parse(String fullDocPath, String parserId, org.apache.maven.doxia.sink.Sink sink) throws DocumentRendererException, IOException
      Parse a source document into a sink.
      Parameters:
      fullDocPath - absolute path to the source document.
      parserId - determines the parser to use.
      sink - the sink to receive the events.
      Throws:
      DocumentRendererException - in case of a parsing error.
      IOException - if the source document cannot be opened.
    • parse

      protected void parse(String fullDocPath, String parserId, org.apache.maven.doxia.sink.Sink sink, DocumentRendererContext context) throws DocumentRendererException, IOException
      Deprecated.
      Parse a source document into a sink.
      Parameters:
      fullDocPath - absolute path to the source document.
      parserId - determines the parser to use.
      sink - the sink to receive the events.
      context - the rendering context.
      Throws:
      DocumentRendererException - in case of a parsing error.
      IOException - if the source document cannot be opened.
    • copyResources

      protected void copyResources(File outputDirectory) throws IOException
      Deprecated.
      Copies the contents of the resource directory to an output folder.
      Parameters:
      outputDirectory - the destination folder.
      Throws:
      IOException - if any.
    • copyDirectory

      protected void copyDirectory(File source, File destination) throws IOException
      Deprecated.
      Copy content of a directory, excluding scm-specific files.
      Parameters:
      source - directory that contains the files and sub-directories to be copied.
      destination - destination folder.
      Throws:
      IOException - if any.
    • getOutputName

      protected String getOutputName(org.apache.maven.doxia.document.DocumentModel documentModel)
      Deprecated.
      Parameters:
      documentModel - not null
      Returns:
      the output name defined in the documentModel without the output extension. If the output name is not defined, return target by default.
      Since:
      1.1.1
      See Also: