Class SiteRenderingContext
- java.lang.Object
-
- org.apache.maven.doxia.siterenderer.SiteRenderingContext
-
public class SiteRenderingContext extends java.lang.Object
Context for a site rendering.- Author:
- Brett Porter
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SiteRenderingContext.SiteDirectory
-
Constructor Summary
Constructors Constructor Description SiteRenderingContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addSiteDirectory(java.io.File siteDirectory)
Deprecated.void
addSiteDirectory(SiteRenderingContext.SiteDirectory 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(java.util.List<java.util.Locale> locales)
Adds passed locales to the list of site locales.java.lang.String
getDefaultTitle()
Getter for the fielddefaultTitle
.java.lang.String
getInputEncoding()
Getter for the fieldinputEncoding
.java.util.Locale
getLocale()
Getter for the fieldlocale
.java.util.Map<java.lang.String,java.lang.String>
getModuleExcludes()
Getter for the fieldmoduleExcludes
.java.lang.String
getOutputEncoding()
Getter for the fieldoutputEncoding
.ParserConfigurator
getParserConfigurator()
Return the configurator forparsers
.java.io.File
getProcessedContentOutput()
Directory where to save content after Velocity processing (*.vm
), but before parsing it with Doxia.java.util.Date
getPublishDate()
If you want to specify a specific publish date instead of the current date.java.io.File
getRootDirectory()
Root directory, to calculate relative path to every site directories.java.util.List<SiteRenderingContext.SiteDirectory>
getSiteDirectories()
Getter for the fieldsiteDirectories
.java.util.List<java.util.Locale>
getSiteLocales()
Getter for the fieldsiteLocales
- a list of locales available for this site context.org.apache.maven.doxia.site.SiteModel
getSiteModel()
Getter for the fieldsiteModel
.org.apache.maven.artifact.Artifact
getSkin()
Getter for the fieldskin
.org.apache.maven.doxia.site.skin.SkinModel
getSkinModel()
Getter for the fieldskinModel
.java.lang.ClassLoader
getTemplateClassLoader()
Getter for the fieldtemplateClassLoader
.java.lang.String
getTemplateName()
Getter for the fieldtemplateName
.java.util.Map<java.lang.String,?>
getTemplateProperties()
Getter for the fieldtemplateProperties
.boolean
isValidate()
If input documents should be validated before parsing.void
setDefaultTitle(java.lang.String defaultTitle)
Setter for the fielddefaultTitle
.void
setInputEncoding(java.lang.String inputEncoding)
Setter for the fieldinputEncoding
.void
setLocale(java.util.Locale locale)
Setter for the fieldlocale
.void
setModuleExcludes(java.util.Map<java.lang.String,java.lang.String> moduleExcludes)
Setter for the fieldmoduleExcludes
.void
setOutputEncoding(java.lang.String outputEncoding)
Setter for the fieldoutputEncoding
.void
setParserConfigurator(ParserConfigurator parserConfigurator)
Set the configurator to use forparsers
.void
setProcessedContentOutput(java.io.File processedContentOutput)
Where to (eventually) save content after Velocity processing (*.vm
), but before parsing it with Doxia?void
setPublishDate(java.util.Date publishDate)
Specify a specific publish date instead of the current date.void
setRootDirectory(java.io.File rootDirectory)
Set the root directory.void
setSiteModel(org.apache.maven.doxia.site.SiteModel siteModel)
Setter for the fieldsiteModel
.void
setSkin(org.apache.maven.artifact.Artifact skin)
Setter for the fieldskinJarFile
.void
setSkinModel(org.apache.maven.doxia.site.skin.SkinModel skinModel)
Setter for the fieldskinModel
.void
setTemplateClassLoader(java.lang.ClassLoader templateClassLoader)
Setter for the fieldtemplateClassLoader
.void
setTemplateName(java.lang.String templateName)
Setter for the fieldtemplateName
.void
setTemplateProperties(java.util.Map<java.lang.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 java.lang.String getTemplateName()
Getter for the field
templateName
.- Returns:
- a
String
object.
-
getTemplateClassLoader
public java.lang.ClassLoader getTemplateClassLoader()
Getter for the field
templateClassLoader
.- Returns:
- a
ClassLoader
object.
-
setTemplateClassLoader
public void setTemplateClassLoader(java.lang.ClassLoader templateClassLoader)
Setter for the field
templateClassLoader
.- Parameters:
templateClassLoader
- aClassLoader
object.
-
getTemplateProperties
public java.util.Map<java.lang.String,?> getTemplateProperties()
Getter for the field
templateProperties
.- Returns:
- a
Map
object.
-
setTemplateProperties
public void setTemplateProperties(java.util.Map<java.lang.String,?> templateProperties)
Setter for the field
templateProperties
.- Parameters:
templateProperties
- aMap
object.
-
getLocale
public java.util.Locale getLocale()
Getter for the field
locale
.- Returns:
- a
Locale
object.
-
setLocale
public void setLocale(java.util.Locale locale)
Setter for the field
locale
.- Parameters:
locale
- aLocale
object.
-
getSiteLocales
public java.util.List<java.util.Locale> getSiteLocales()
Getter for the field
siteLocales
- a list of locales available for this site context.- Returns:
- a
List
object withLocale
objects.
-
addSiteLocales
public void addSiteLocales(java.util.List<java.util.Locale> locales)
Adds passed locales to the list of site locales.
- Parameters:
locales
- List ofLocale
objects to add to the site locales list.
-
getSiteModel
public org.apache.maven.doxia.site.SiteModel getSiteModel()
Getter for the field
siteModel
.- Returns:
- a
SiteModel
object.
-
setSiteModel
public void setSiteModel(org.apache.maven.doxia.site.SiteModel siteModel)
Setter for the field
siteModel
.- Parameters:
siteModel
- aSiteModel
object.
-
setDefaultTitle
public void setDefaultTitle(java.lang.String defaultTitle)
Setter for the field
defaultTitle
.- Parameters:
defaultTitle
- aString
object.
-
getDefaultTitle
public java.lang.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 org.apache.maven.doxia.site.skin.SkinModel getSkinModel()
Getter for the field
skinModel
.- Returns:
- a
SkinModel
object.
-
setSkinModel
public void setSkinModel(org.apache.maven.doxia.site.skin.SkinModel skinModel)
Setter for the field
skinModel
.- Parameters:
skinModel
- aSkinModel
object.
-
setTemplateName
public void setTemplateName(java.lang.String templateName)
Setter for the field
templateName
.- Parameters:
templateName
- aString
object.
-
addSiteDirectory
@Deprecated public void addSiteDirectory(java.io.File siteDirectory)
Deprecated.
-
addSiteDirectory
public void addSiteDirectory(SiteRenderingContext.SiteDirectory 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
- aSiteRenderingContext.SiteDirectory
object.- Since:
- 2.0.0
-
getSiteDirectories
public java.util.List<SiteRenderingContext.SiteDirectory> getSiteDirectories()
Getter for the field
siteDirectories
.- Returns:
- List of site directories.
-
getModuleExcludes
public java.util.Map<java.lang.String,java.lang.String> getModuleExcludes()
Getter for the field
moduleExcludes
.- Returns:
- a map defining exclude patterns (comma separated) by parser id.
-
setModuleExcludes
public void setModuleExcludes(java.util.Map<java.lang.String,java.lang.String> moduleExcludes)
Setter for the field
moduleExcludes
.- Parameters:
moduleExcludes
- aMap
object.
-
getInputEncoding
public java.lang.String getInputEncoding()
Getter for the field
inputEncoding
.- Returns:
- a
String
object.
-
setInputEncoding
public void setInputEncoding(java.lang.String inputEncoding)
Setter for the field
inputEncoding
.- Parameters:
inputEncoding
- aString
object.
-
getOutputEncoding
public java.lang.String getOutputEncoding()
Getter for the field
outputEncoding
.- Returns:
- a
String
object.
-
setOutputEncoding
public void setOutputEncoding(java.lang.String outputEncoding)
Setter for the field
outputEncoding
.- Parameters:
outputEncoding
- aString
object.
-
getPublishDate
public java.util.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(java.util.Date publishDate)
Specify a specific publish date instead of the current date.
- Parameters:
publishDate
- the publish date
-
getProcessedContentOutput
public java.io.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(java.io.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 java.io.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(java.io.File rootDirectory)
Set the root directory.- Parameters:
rootDirectory
- the root directory- Since:
- 1.8
-
getParserConfigurator
public ParserConfigurator getParserConfigurator()
Return the configurator forparsers
.- Returns:
- the parser configurator (may be
null
in which case the default configuration is applied) - Since:
- 2.0.0
-
setParserConfigurator
public void setParserConfigurator(ParserConfigurator parserConfigurator)
Set the configurator to use forparsers
.- Parameters:
parserConfigurator
- the configurator- Since:
- 2.0.0
-
-