Class SiteRenderingContext
- java.lang.Object
-
- org.apache.maven.doxia.siterenderer.SiteRenderingContext
-
public class SiteRenderingContext extends Object
Context for a site rendering.- Author:
- Brett Porter
-
-
Constructor Summary
Constructors Constructor Description SiteRenderingContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addModuleDirectory(File moduleBasedir, String moduleParserId)
Deprecated.void
addSiteDirectory(File siteDirectory)
Add a site directory, expected to have a Doxia Site layout, ie one directory per Doxia parser module containing files with parser extension.void
addSiteLocales(List<Locale> locales)
Adds passed locales to the list of site locales.DecorationModel
getDecoration()
Getter for the fielddecoration
.String
getDefaultTitle()
Getter for the fielddefaultTitle
.String
getDefaultWindowTitle()
Deprecated.String
getInputEncoding()
Getter for the fieldinputEncoding
.Locale
getLocale()
Getter for the fieldlocale
.Map<String,String>
getModuleExcludes()
Getter for the fieldmoduleExcludes
.List<org.apache.maven.doxia.siterenderer.ExtraDoxiaModuleReference>
getModules()
Deprecated.String
getOutputEncoding()
Getter for the fieldoutputEncoding
.File
getProcessedContentOutput()
Directory where to save content after Velocity processing (*.vm
), but before parsing it with Doxia.Date
getPublishDate()
If you want to specify a specific publish date instead of the current date.File
getRootDirectory()
Root directory, to calculate relative path to every site directories.List<File>
getSiteDirectories()
Getter for the fieldsiteDirectories
.List<Locale>
getSiteLocales()
Getter for the fieldsiteLocales
- a list of locales available for this site context.org.apache.maven.artifact.Artifact
getSkin()
Getter for the fieldskin
.SkinModel
getSkinModel()
Getter for the fieldskinModel
.ClassLoader
getTemplateClassLoader()
Getter for the fieldtemplateClassLoader
.String
getTemplateName()
Getter for the fieldtemplateName
.Map<String,?>
getTemplateProperties()
Getter for the fieldtemplateProperties
.boolean
isValidate()
If input documents should be validated before parsing.void
setDecoration(DecorationModel decoration)
Setter for the fielddecoration
.void
setDefaultTitle(String defaultTitle)
Setter for the fielddefaultTitle
.void
setDefaultWindowTitle(String defaultWindowsTitle)
Deprecated.void
setInputEncoding(String inputEncoding)
Setter for the fieldinputEncoding
.void
setLocale(Locale locale)
Setter for the fieldlocale
.void
setModuleExcludes(Map<String,String> moduleExcludes)
Setter for the fieldmoduleExcludes
.void
setOutputEncoding(String outputEncoding)
Setter for the fieldoutputEncoding
.void
setProcessedContentOutput(File processedContentOutput)
Where to (eventually) save content after Velocity processing (*.vm
), but before parsing it with Doxia?void
setPublishDate(Date publishDate)
Specify a specific publish date instead of the current date.void
setRootDirectory(File rootDirectory)
Set the root directory.void
setSkin(org.apache.maven.artifact.Artifact skin)
Setter for the fieldskinJarFile
.void
setSkinModel(SkinModel skinModel)
Setter for the fieldskinModel
.void
setTemplateClassLoader(ClassLoader templateClassLoader)
Setter for the fieldtemplateClassLoader
.void
setTemplateName(String templateName)
Setter for the fieldtemplateName
.void
setTemplateProperties(Map<String,?> templateProperties)
Setter for the fieldtemplateProperties
.void
setValidate(boolean validate)
Switch on/off validation.
-
-
-
Method Detail
-
isValidate
public boolean isValidate()
If input documents should be validated before parsing. By default no validation is performed.- Returns:
- true if validation is switched on.
- Since:
- 1.1.3
-
setValidate
public void setValidate(boolean validate)
Switch on/off validation.- Parameters:
validate
- true to switch on validation.- Since:
- 1.1.3
-
getTemplateName
public String getTemplateName()
Getter for the field
templateName
.- Returns:
- a
String
object.
-
getTemplateClassLoader
public ClassLoader getTemplateClassLoader()
Getter for the field
templateClassLoader
.- Returns:
- a
ClassLoader
object.
-
setTemplateClassLoader
public void setTemplateClassLoader(ClassLoader templateClassLoader)
Setter for the field
templateClassLoader
.- Parameters:
templateClassLoader
- aClassLoader
object.
-
getTemplateProperties
public Map<String,?> getTemplateProperties()
Getter for the field
templateProperties
.- Returns:
- a
Map
object.
-
setTemplateProperties
public void setTemplateProperties(Map<String,?> templateProperties)
Setter for the field
templateProperties
.- Parameters:
templateProperties
- aMap
object.
-
setLocale
public void setLocale(Locale locale)
Setter for the field
locale
.- Parameters:
locale
- aLocale
object.
-
getSiteLocales
public List<Locale> getSiteLocales()
Getter for the field
siteLocales
- a list of locales available for this site context.
-
addSiteLocales
public void addSiteLocales(List<Locale> locales)
Adds passed locales to the list of site locales.
- Parameters:
locales
- List ofLocale
objects to add to the site locales list.
-
getDecoration
public DecorationModel getDecoration()
Getter for the field
decoration
.- Returns:
- a
DecorationModel
object.
-
setDecoration
public void setDecoration(DecorationModel decoration)
Setter for the field
decoration
.- Parameters:
decoration
- aDecorationModel
object.
-
setDefaultWindowTitle
@Deprecated public void setDefaultWindowTitle(String defaultWindowsTitle)
Deprecated.
-
setDefaultTitle
public void setDefaultTitle(String defaultTitle)
Setter for the field
defaultTitle
.- Parameters:
defaultTitle
- aString
object.
-
getDefaultWindowTitle
@Deprecated public String getDefaultWindowTitle()
Deprecated.
-
getDefaultTitle
public String getDefaultTitle()
Getter for the field
defaultTitle
.- Returns:
- a
String
object.
-
getSkin
public org.apache.maven.artifact.Artifact getSkin()
Getter for the field
skin
.- Returns:
- a
Artifact
object.
-
setSkin
public void setSkin(org.apache.maven.artifact.Artifact skin)
Setter for the field
skinJarFile
.- Parameters:
skin
- anArtifact
object.
-
getSkinModel
public SkinModel getSkinModel()
Getter for the field
skinModel
.- Returns:
- a
SkinModel
object.
-
setSkinModel
public void setSkinModel(SkinModel skinModel)
Setter for the field
skinModel
.- Parameters:
skinModel
- aSkinModel
object.
-
setTemplateName
public void setTemplateName(String templateName)
Setter for the field
templateName
.- Parameters:
templateName
- aString
object.
-
addSiteDirectory
public void addSiteDirectory(File siteDirectory)
Add a site directory, expected to have a Doxia Site layout, ie one directory per Doxia parser module containing files with parser extension. Typical values aresrc/site
ortarget/generated-site
.- Parameters:
siteDirectory
- aFile
object.
-
addModuleDirectory
@Deprecated public void addModuleDirectory(File moduleBasedir, String moduleParserId)
Deprecated.Add a extra-module source directory: used for Maven 1.x${basedir}/xdocs
layout, which containsxdoc
andfml
.- Parameters:
moduleBasedir
- The base directory for module's source files.moduleParserId
- module's Doxia parser id.
-
getSiteDirectories
public List<File> getSiteDirectories()
Getter for the field
siteDirectories
.- Returns:
- List of site directories files.
-
getModules
@Deprecated public List<org.apache.maven.doxia.siterenderer.ExtraDoxiaModuleReference> getModules()
Deprecated.Getter for the field
modules
.- Returns:
- a
List
object.
-
getModuleExcludes
public Map<String,String> getModuleExcludes()
Getter for the field
moduleExcludes
.- Returns:
- a map defining exclude patterns (comma separated) by parser id.
-
setModuleExcludes
public void setModuleExcludes(Map<String,String> moduleExcludes)
Setter for the field
moduleExcludes
.- Parameters:
moduleExcludes
- aMap
object.
-
getInputEncoding
public String getInputEncoding()
Getter for the field
inputEncoding
.- Returns:
- a
String
object.
-
setInputEncoding
public void setInputEncoding(String inputEncoding)
Setter for the field
inputEncoding
.- Parameters:
inputEncoding
- aString
object.
-
getOutputEncoding
public String getOutputEncoding()
Getter for the field
outputEncoding
.- Returns:
- a
String
object.
-
setOutputEncoding
public void setOutputEncoding(String outputEncoding)
Setter for the field
outputEncoding
.- Parameters:
outputEncoding
- aString
object.
-
getPublishDate
public Date getPublishDate()
If you want to specify a specific publish date instead of the current date.
- Returns:
- the publish date, can be
null
-
setPublishDate
public void setPublishDate(Date publishDate)
Specify a specific publish date instead of the current date.
- Parameters:
publishDate
- the publish date
-
getProcessedContentOutput
public File getProcessedContentOutput()
Directory where to save content after Velocity processing (*.vm
), but before parsing it with Doxia.- Returns:
- not null if the documents are to be saved
- Since:
- 1.7
-
setProcessedContentOutput
public void setProcessedContentOutput(File processedContentOutput)
Where to (eventually) save content after Velocity processing (*.vm
), but before parsing it with Doxia?- Parameters:
processedContentOutput
- not null if the documents are to be saved- Since:
- 1.7
-
getRootDirectory
public File getRootDirectory()
Root directory, to calculate relative path to every site directories. Corresponds to thepom.xml
directory for Maven build.- Returns:
- the root directory
- Since:
- 1.8
-
setRootDirectory
public void setRootDirectory(File rootDirectory)
Set the root directory.- Parameters:
rootDirectory
- the root directory- Since:
- 1.8
-
-