Class SiteRenderingContext.SiteDirectory
- java.lang.Object
-
- org.apache.maven.doxia.siterenderer.SiteRenderingContext.SiteDirectory
-
- Enclosing class:
- SiteRenderingContext
public static class SiteRenderingContext.SiteDirectory extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description SiteDirectory(java.io.File path, boolean editable)SiteDirectory(java.io.File path, boolean editable, boolean skipDuplicates)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAlternativeEditableSourceDirectory(java.io.File sourceDirectory)Add an alternative source directory to this site directory.java.util.Collection<java.io.File>getEditableSourceDirectories()Get the source directories for this site directory.java.io.FilegetPath()booleanisEditable()booleanisSkipDuplicates()
-
-
-
Constructor Detail
-
SiteDirectory
public SiteDirectory(java.io.File path, boolean editable)
-
SiteDirectory
public SiteDirectory(java.io.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 moduleeditable-trueif the site directory is expected to be editableskipDuplicates- flag indicating if duplicates in this directory should be skipped (true) or lead to an exception (false)- Since:
- 2.1
-
-
Method Detail
-
getPath
public java.io.File getPath()
-
isEditable
public boolean isEditable()
-
isSkipDuplicates
public boolean isSkipDuplicates()
-
addAlternativeEditableSourceDirectory
public void addAlternativeEditableSourceDirectory(java.io.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 java.util.Collection<java.io.File> getEditableSourceDirectories()
Get the source directories for this site directory. If no alternative source directory has been added viaaddAlternativeEditableSourceDirectory(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
-
-