Class SiteRenderingContext
- java.lang.Object
-
- org.apache.maven.doxia.siterenderer.SiteRenderingContext
-
public class SiteRenderingContext extends java.lang.ObjectContext for a site rendering.
-
-
Field Summary
Fields Modifier and Type Field Description private DecorationModeldecorationprivate java.lang.StringdefaultWindowTitleprivate java.lang.StringinputEncodingprivate java.util.Localelocaleprivate java.util.Map<java.lang.String,java.lang.String>moduleExcludesprivate java.util.List<ExtraDoxiaModuleReference>modulesprivate java.lang.StringoutputEncodingprivate java.io.FileprocessedContentOutputprivate java.util.DatepublishDateprivate java.io.FilerootDirectoryprivate java.util.List<java.io.File>siteDirectoriesprivate java.util.List<java.util.Locale>siteLocalesprivate org.apache.maven.artifact.Artifactskinprivate SkinModelskinModelprivate java.lang.ClassLoadertemplateClassLoaderprivate java.lang.StringtemplateNameprivate java.util.Map<java.lang.String,?>templatePropertiesprivate booleanusingDefaultTemplateprivate booleanvalidate
-
Constructor Summary
Constructors Constructor Description SiteRenderingContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddModuleDirectory(java.io.File moduleBasedir, java.lang.String moduleParserId)Add a extra-module source directory: used for Maven 1.x${basedir}/xdocslayout, which containsxdocandfml.voidaddSiteDirectory(java.io.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.voidaddSiteLocales(java.util.List<java.util.Locale> locales)Adds passed locales to the list of site locales.DecorationModelgetDecoration()Getter for the fielddecoration.java.lang.StringgetDefaultWindowTitle()Getter for the fielddefaultWindowTitle.java.lang.StringgetInputEncoding()Getter for the fieldinputEncoding.java.util.LocalegetLocale()Getter for the fieldlocale.java.util.Map<java.lang.String,java.lang.String>getModuleExcludes()Getter for the fieldmoduleExcludes.java.util.List<ExtraDoxiaModuleReference>getModules()Getter for the fieldmodules.java.lang.StringgetOutputEncoding()Getter for the fieldoutputEncoding.java.io.FilegetProcessedContentOutput()Directory where to save content after Velocity processing (*.vm), but before parsing it with Doxia.java.util.DategetPublishDate()If you want to specify a specific publish date instead of the current date.java.io.FilegetRootDirectory()Root directory, to calculate relative path to every site directories.java.util.List<java.io.File>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.artifact.ArtifactgetSkin()Getter for the fieldskin.SkinModelgetSkinModel()Getter for the fieldskinModel.java.lang.ClassLoadergetTemplateClassLoader()Getter for the fieldtemplateClassLoader.java.lang.StringgetTemplateName()Getter for the fieldtemplateName.java.util.Map<java.lang.String,?>getTemplateProperties()Getter for the fieldtemplateProperties.booleanisUsingDefaultTemplate()isUsingDefaultTemplate.booleanisValidate()If input documents should be validated before parsing.voidsetDecoration(DecorationModel decoration)Setter for the fielddecoration.voidsetDefaultWindowTitle(java.lang.String defaultWindowTitle)Setter for the fielddefaultWindowTitle.voidsetInputEncoding(java.lang.String inputEncoding)Setter for the fieldinputEncoding.voidsetLocale(java.util.Locale locale)Setter for the fieldlocale.voidsetModuleExcludes(java.util.Map<java.lang.String,java.lang.String> moduleExcludes)Setter for the fieldmoduleExcludes.voidsetOutputEncoding(java.lang.String outputEncoding)Setter for the fieldoutputEncoding.voidsetProcessedContentOutput(java.io.File processedContentOutput)Where to (eventually) save content after Velocity processing (*.vm), but before parsing it with Doxia?voidsetPublishDate(java.util.Date publishDate)Specify a specific publish date instead of the current date.voidsetRootDirectory(java.io.File rootDirectory)Set the root directory.voidsetSkin(org.apache.maven.artifact.Artifact skin)Setter for the fieldskinJarFile.voidsetSkinModel(SkinModel skinModel)Setter for the fieldskinModel.voidsetTemplateClassLoader(java.lang.ClassLoader templateClassLoader)Setter for the fieldtemplateClassLoader.voidsetTemplateName(java.lang.String templateName)Setter for the fieldtemplateName.voidsetTemplateProperties(java.util.Map<java.lang.String,?> templateProperties)Setter for the fieldtemplateProperties.voidsetUsingDefaultTemplate(boolean usingDefaultTemplate)Setter for the fieldusingDefaultTemplate.voidsetValidate(boolean validate)Switch on/off validation.
-
-
-
Field Detail
-
inputEncoding
private java.lang.String inputEncoding
-
outputEncoding
private java.lang.String outputEncoding
-
templateName
private java.lang.String templateName
-
templateClassLoader
private java.lang.ClassLoader templateClassLoader
-
templateProperties
private java.util.Map<java.lang.String,?> templateProperties
-
locale
private java.util.Locale locale
-
siteLocales
private java.util.List<java.util.Locale> siteLocales
-
decoration
private DecorationModel decoration
-
defaultWindowTitle
private java.lang.String defaultWindowTitle
-
skin
private org.apache.maven.artifact.Artifact skin
-
skinModel
private SkinModel skinModel
-
usingDefaultTemplate
private boolean usingDefaultTemplate
-
rootDirectory
private java.io.File rootDirectory
-
siteDirectories
private java.util.List<java.io.File> siteDirectories
-
moduleExcludes
private java.util.Map<java.lang.String,java.lang.String> moduleExcludes
-
modules
private java.util.List<ExtraDoxiaModuleReference> modules
-
validate
private boolean validate
-
publishDate
private java.util.Date publishDate
-
processedContentOutput
private java.io.File processedContentOutput
-
-
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
Stringobject.
-
getTemplateClassLoader
public java.lang.ClassLoader getTemplateClassLoader()
Getter for the field
templateClassLoader.- Returns:
- a
ClassLoaderobject.
-
setTemplateClassLoader
public void setTemplateClassLoader(java.lang.ClassLoader templateClassLoader)
Setter for the field
templateClassLoader.- Parameters:
templateClassLoader- aClassLoaderobject.
-
getTemplateProperties
public java.util.Map<java.lang.String,?> getTemplateProperties()
Getter for the field
templateProperties.- Returns:
- a
Mapobject.
-
setTemplateProperties
public void setTemplateProperties(java.util.Map<java.lang.String,?> templateProperties)
Setter for the field
templateProperties.- Parameters:
templateProperties- aMapobject.
-
getLocale
public java.util.Locale getLocale()
Getter for the field
locale.- Returns:
- a
Localeobject.
-
setLocale
public void setLocale(java.util.Locale locale)
Setter for the field
locale.- Parameters:
locale- aLocaleobject.
-
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
Listobject withLocaleobjects.
-
addSiteLocales
public void addSiteLocales(java.util.List<java.util.Locale> locales)
Adds passed locales to the list of site locales.
- Parameters:
locales- List ofLocaleobjects to add to the site locales list.
-
getDecoration
public DecorationModel getDecoration()
Getter for the field
decoration.- Returns:
- a
DecorationModelobject.
-
setDecoration
public void setDecoration(DecorationModel decoration)
Setter for the field
decoration.- Parameters:
decoration- aDecorationModelobject.
-
setDefaultWindowTitle
public void setDefaultWindowTitle(java.lang.String defaultWindowTitle)
Setter for the field
defaultWindowTitle.- Parameters:
defaultWindowTitle- aStringobject.
-
getDefaultWindowTitle
public java.lang.String getDefaultWindowTitle()
Getter for the field
defaultWindowTitle.- Returns:
- a
Stringobject.
-
getSkin
public org.apache.maven.artifact.Artifact getSkin()
Getter for the field
skin.- Returns:
- a
Artifactobject.
-
setSkin
public void setSkin(org.apache.maven.artifact.Artifact skin)
Setter for the field
skinJarFile.- Parameters:
skin- anArtifactobject.
-
getSkinModel
public SkinModel getSkinModel()
Getter for the field
skinModel.- Returns:
- a
SkinModelobject.
-
setSkinModel
public void setSkinModel(SkinModel skinModel)
Setter for the field
skinModel.- Parameters:
skinModel- aSkinModelobject.
-
setTemplateName
public void setTemplateName(java.lang.String templateName)
Setter for the field
templateName.- Parameters:
templateName- aStringobject.
-
setUsingDefaultTemplate
public void setUsingDefaultTemplate(boolean usingDefaultTemplate)
Setter for the field
usingDefaultTemplate.- Parameters:
usingDefaultTemplate- a boolean.
-
isUsingDefaultTemplate
public boolean isUsingDefaultTemplate()
isUsingDefaultTemplate.
- Returns:
- a boolean.
-
addSiteDirectory
public void addSiteDirectory(java.io.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/siteortarget/generated-site.- Parameters:
siteDirectory- aFileobject.
-
addModuleDirectory
public void addModuleDirectory(java.io.File moduleBasedir, java.lang.String moduleParserId)Add a extra-module source directory: used for Maven 1.x${basedir}/xdocslayout, which containsxdocandfml.- Parameters:
moduleBasedir- The base directory for module's source files.moduleParserId- module's Doxia parser id.
-
getSiteDirectories
public java.util.List<java.io.File> getSiteDirectories()
Getter for the field
siteDirectories.- Returns:
- List of site directories files.
-
getModules
public java.util.List<ExtraDoxiaModuleReference> getModules()
Getter for the field
modules.- Returns:
- a
Listobject.
-
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- aMapobject.
-
getInputEncoding
public java.lang.String getInputEncoding()
Getter for the field
inputEncoding.- Returns:
- a
Stringobject.
-
setInputEncoding
public void setInputEncoding(java.lang.String inputEncoding)
Setter for the field
inputEncoding.- Parameters:
inputEncoding- aStringobject.
-
getOutputEncoding
public java.lang.String getOutputEncoding()
Getter for the field
outputEncoding.- Returns:
- a
Stringobject.
-
setOutputEncoding
public void setOutputEncoding(java.lang.String outputEncoding)
Setter for the field
outputEncoding.- Parameters:
outputEncoding- aStringobject.
-
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.xmldirectory for Maven build.- Returns:
- the root directory
- Since:
- 1.8
-
setRootDirectory
public void setRootDirectory(java.io.File rootDirectory)
Set the root directory.- Parameters:
rootDirectory-- Since:
- 1.8
-
-