Class SiteRenderingContext.SiteDirectory

java.lang.Object
org.apache.maven.doxia.siterenderer.SiteRenderingContext.SiteDirectory
Enclosing class:
SiteRenderingContext

public static class SiteRenderingContext.SiteDirectory extends Object
Author:
Brett Porter
  • Constructor Details

    • SiteDirectory

      public SiteDirectory(File path, boolean editable)
    • SiteDirectory

      public SiteDirectory(File path, boolean editable, boolean skipDuplicates)
      Parameters:
      path - path to the site directory containing Doxia sources files, expected to have a Doxia Site layout, i.e. one directory per Doxia parser module
      editable - true if the site directory is expected to be editable
      skipDuplicates - flag indicating if duplicates in this directory should be skipped (true) or lead to an exception (false)
      Since:
      2.1
  • Method Details

    • getPath

      public File getPath()
    • isEditable

      public boolean isEditable()
    • isSkipDuplicates

      public boolean isSkipDuplicates()
    • addAlternativeEditableSourceDirectory

      public void addAlternativeEditableSourceDirectory(File sourceDirectory)
      Add an alternative source directory to this site directory. This will implicitly turn it into an editable site directory. Multiple source directories can be used, the first one containing a file with a given name will be used for that file, the others will be ignored. This allows to have a main source directory and an optional overlay directory with custom files. Only necessary to call if the source directory is different from the site directory, otherwise the site directory will be used as source directory.
      Parameters:
      sourceDirectory -
      Since:
      2.1
    • getEditableSourceDirectories

      public Collection<File> getEditableSourceDirectories()
      Get the source directories for this site directory. If no alternative source directory has been added via addAlternativeEditableSourceDirectory(File) the site directory itself (getPath()) will be returned as the only source directory. If the site directory is not editable, an empty collection will be returned.
      Returns:
      the source directories for this site directory
      Since:
      2.1