Package org.apache.maven.doxia.site
Class SiteModel
- java.lang.Object
-
- org.apache.maven.doxia.site.SiteModel
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable
public class SiteModel extends java.lang.Object implements java.io.Serializable, java.lang.CloneableThe<site>element is the root of the site decoration descriptor.- Version:
- $Revision$ $Date$
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SiteModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPoweredBy(Logo logo)Method addPoweredBy.SiteModelclone()Method clone.booleanequals(java.lang.Object other)Method equals.BannergetBannerLeft()Get banner logo on the masthead of the site to the left.BannergetBannerRight()Get banner logo on the masthead of the site to the right.BodygetBody()Get the main site content.java.lang.StringgetCombineSelf()Get whether to inherit configuration from a parent project site descriptor (merge) or not (override).java.lang.ObjectgetCustom()Get custom configuration for use with customized Velocity templates.java.lang.ObjectgetCustomChild(java.lang.String path)java.lang.StringgetCustomValue(java.lang.String path)java.lang.StringgetCustomValue(java.lang.String path, java.lang.String defaultValue)java.lang.StringgetEdit()Get the base url to edit Doxia document sources.longgetLastModified()Get timestamp of the last modification of this site model.MenugetMenuRef(java.lang.String key)java.util.List<Menu>getMenus()MermaidConfigurationgetMermaid()Get the configuration used for rendering Mermaid diagrams (https://mermaid.ai/open-source/) on client-side.java.lang.StringgetModelEncoding()Get the modelEncoding field.java.lang.StringgetName()Get the full name of the project site.java.util.List<Logo>getPoweredBy()Method getPoweredBy.PublishDategetPublishDate()SkingetSkin()Get the artifact containing the skin for the site.VersiongetVersion()inthashCode()Method hashCode.booleanisDefaultPublishDate()booleanisDefaultVersion()booleanisLink(java.lang.String href)booleanisMergeParent()booleanisRequireParent()Get whether this "site.xml" should inherit from a parent "site.xml".voidremoveMenuRef(java.lang.String key)voidremovePoweredBy(Logo logo)Method removePoweredBy.voidsetBannerLeft(Banner bannerLeft)Set banner logo on the masthead of the site to the left.voidsetBannerRight(Banner bannerRight)Set banner logo on the masthead of the site to the right.voidsetBody(Body body)Set the main site content.voidsetCombineSelf(java.lang.String combineSelf)Set whether to inherit configuration from a parent project site descriptor (merge) or not (override).voidsetCustom(java.lang.Object custom)Set custom configuration for use with customized Velocity templates.voidsetEdit(java.lang.String edit)Set the base url to edit Doxia document sources.voidsetLastModified(long lastModified)Set timestamp of the last modification of this site model.voidsetMermaid(MermaidConfiguration mermaid)Set the configuration used for rendering Mermaid diagrams (https://mermaid.ai/open-source/) on client-side.voidsetModelEncoding(java.lang.String modelEncoding)Set the modelEncoding field.voidsetName(java.lang.String name)Set the full name of the project site.voidsetPoweredBy(java.util.List<Logo> poweredBy)Set powered by logos list.voidsetPublishDate(PublishDate publishDate)Set modify the date published display properties.voidsetRequireParent(boolean requireParent)Set whether this "site.xml" should inherit from a parent "site.xml".voidsetSkin(Skin skin)Set the artifact containing the skin for the site.voidsetVersion(Version version)Set modify the version published display properties.java.lang.StringtoString()Method toString.
-
-
-
Field Detail
-
MERGE
public static final java.lang.String MERGE
- See Also:
- Constant Field Values
-
OVERRIDE
public static final java.lang.String OVERRIDE
- See Also:
- Constant Field Values
-
-
Method Detail
-
addPoweredBy
public void addPoweredBy(Logo logo)
Method addPoweredBy.- Parameters:
logo- a logo object.
-
clone
public SiteModel clone()
Method clone.- Overrides:
clonein classjava.lang.Object- Returns:
- SiteModel
-
equals
public boolean equals(java.lang.Object other)
Method equals.- Overrides:
equalsin classjava.lang.Object- Parameters:
other- a other object.- Returns:
- boolean
-
getBannerLeft
public Banner getBannerLeft()
Get banner logo on the masthead of the site to the left.- Returns:
- Banner
-
getBannerRight
public Banner getBannerRight()
Get banner logo on the masthead of the site to the right.- Returns:
- Banner
-
getBody
public Body getBody()
Get the main site content.- Returns:
- Body
-
getCombineSelf
public java.lang.String getCombineSelf()
Get whether to inherit configuration from a parent project site descriptor (merge) or not (override).- Returns:
- String
-
getCustom
public java.lang.Object getCustom()
Get custom configuration for use with customized Velocity templates. Data from this field are accessible in Velocity template from$site.customvariable as DOM content. Example:$site.custom.getChild( 'customElement' ).getValue()- Returns:
- Object
-
getEdit
public java.lang.String getEdit()
Get the base url to edit Doxia document sources. In general,${project.scm.url}value should do the job.- Returns:
- String
-
getLastModified
public long getLastModified()
Get timestamp of the last modification of this site model.- Returns:
- long
-
getMermaid
public MermaidConfiguration getMermaid()
Get the configuration used for rendering Mermaid diagrams (https://mermaid.ai/open-source/) on client-side. If the element does not exist, no Mermaid specific scripts will be included in the generated site. If it exists but the "config" field is not set, a default configuration will be used.- Returns:
- MermaidConfiguration
-
getModelEncoding
public java.lang.String getModelEncoding()
Get the modelEncoding field.- Returns:
- String
-
getName
public java.lang.String getName()
Get the full name of the project site.- Returns:
- String
-
getPoweredBy
public java.util.List<Logo> getPoweredBy()
Method getPoweredBy.- Returns:
- List
-
getSkin
public Skin getSkin()
Get the artifact containing the skin for the site.- Returns:
- Skin
-
hashCode
public int hashCode()
Method hashCode.- Overrides:
hashCodein classjava.lang.Object- Returns:
- int
-
isRequireParent
public boolean isRequireParent()
Get whether this "site.xml" should inherit from a parent "site.xml". If set to "true" it fails the build in case a parent site descriptor cannot be retrieved. It does not necessarily need to be the direct parent but just a site descriptor anywhere in the parent hierarchy.- Returns:
- boolean
-
removePoweredBy
public void removePoweredBy(Logo logo)
Method removePoweredBy.- Parameters:
logo- a logo object.
-
setBannerLeft
public void setBannerLeft(Banner bannerLeft)
Set banner logo on the masthead of the site to the left.- Parameters:
bannerLeft- a bannerLeft object.
-
setBannerRight
public void setBannerRight(Banner bannerRight)
Set banner logo on the masthead of the site to the right.- Parameters:
bannerRight- a bannerRight object.
-
setBody
public void setBody(Body body)
Set the main site content.- Parameters:
body- a body object.
-
setCombineSelf
public void setCombineSelf(java.lang.String combineSelf)
Set whether to inherit configuration from a parent project site descriptor (merge) or not (override).- Parameters:
combineSelf- a combineSelf object.
-
setCustom
public void setCustom(java.lang.Object custom)
Set custom configuration for use with customized Velocity templates. Data from this field are accessible in Velocity template from$site.customvariable as DOM content. Example:$site.custom.getChild( 'customElement' ).getValue()- Parameters:
custom- a custom object.
-
setEdit
public void setEdit(java.lang.String edit)
Set the base url to edit Doxia document sources. In general,${project.scm.url}value should do the job.- Parameters:
edit- a edit object.
-
setLastModified
public void setLastModified(long lastModified)
Set timestamp of the last modification of this site model.- Parameters:
lastModified- a lastModified object.
-
setMermaid
public void setMermaid(MermaidConfiguration mermaid)
Set the configuration used for rendering Mermaid diagrams (https://mermaid.ai/open-source/) on client-side. If the element does not exist, no Mermaid specific scripts will be included in the generated site. If it exists but the "config" field is not set, a default configuration will be used.- Parameters:
mermaid- a mermaid object.
-
setModelEncoding
public void setModelEncoding(java.lang.String modelEncoding)
Set the modelEncoding field.- Parameters:
modelEncoding- a modelEncoding object.
-
setName
public void setName(java.lang.String name)
Set the full name of the project site.- Parameters:
name- a name object.
-
setPoweredBy
public void setPoweredBy(java.util.List<Logo> poweredBy)
Set powered by logos list.- Parameters:
poweredBy- a poweredBy object.
-
setPublishDate
public void setPublishDate(PublishDate publishDate)
Set modify the date published display properties.- Parameters:
publishDate- a publishDate object.
-
setRequireParent
public void setRequireParent(boolean requireParent)
Set whether this "site.xml" should inherit from a parent "site.xml". If set to "true" it fails the build in case a parent site descriptor cannot be retrieved. It does not necessarily need to be the direct parent but just a site descriptor anywhere in the parent hierarchy.- Parameters:
requireParent- a requireParent object.
-
setSkin
public void setSkin(Skin skin)
Set the artifact containing the skin for the site.- Parameters:
skin- a skin object.
-
setVersion
public void setVersion(Version version)
Set modify the version published display properties.- Parameters:
version- a version object.
-
toString
public java.lang.String toString()
Method toString.- Overrides:
toStringin classjava.lang.Object- Returns:
- String
-
isMergeParent
public boolean isMergeParent()
-
getPublishDate
public PublishDate getPublishDate()
-
isDefaultPublishDate
public boolean isDefaultPublishDate()
-
getVersion
public Version getVersion()
-
isDefaultVersion
public boolean isDefaultVersion()
-
getMenuRef
public Menu getMenuRef(java.lang.String key)
- Parameters:
key- not null- Returns:
- the menu ref defined by the given key.
-
removeMenuRef
public void removeMenuRef(java.lang.String key)
- Parameters:
key- not null
-
getMenus
public java.util.List<Menu> getMenus()
- Returns:
- the menus list or EMPTY_LIST.
-
isLink
public boolean isLink(java.lang.String href)
- Since:
- 1.7
- See Also:
SiteUtils.isLink(java.lang.String)
-
getCustomChild
public java.lang.Object getCustomChild(java.lang.String path)
- Since:
- 1.8
- See Also:
SiteUtils.getCustomChild(org.codehaus.plexus.util.xml.Xpp3Dom, java.lang.String)
-
getCustomValue
public java.lang.String getCustomValue(java.lang.String path)
- Since:
- 1.8
- See Also:
SiteUtils.getCustomValue(org.codehaus.plexus.util.xml.Xpp3Dom, java.lang.String)
-
getCustomValue
public java.lang.String getCustomValue(java.lang.String path, java.lang.String defaultValue)- Since:
- 1.8
- See Also:
SiteUtils.getCustomValue(org.codehaus.plexus.util.xml.Xpp3Dom, java.lang.String)
-
-