Class DecorationModel
- java.lang.Object
-
- org.apache.maven.doxia.site.decoration.DecorationModel
-
- All Implemented Interfaces:
Serializable
,Cloneable
public class DecorationModel extends Object implements Serializable, Cloneable
The<project>
element is the root of the site decoration descriptor.- Version:
- $Revision$ $Date$
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DecorationModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addPoweredBy(Logo logo)
Method addPoweredBy.DecorationModel
clone()
Method clone.boolean
equals(Object other)
Method equals.Banner
getBannerLeft()
Get banner logo on the masthead of the site to the left.Banner
getBannerRight()
Get banner logo on the masthead of the site to the right.Body
getBody()
Get the main site content decoration.String
getCombineSelf()
Get whether to inherit configuration from a parent project site descriptor (merge
) or not (override
).Object
getCustom()
Get custom configuration for use with customized Velocity templates.Object
getCustomChild(String path)
String
getCustomValue(String path)
String
getCustomValue(String path, String defaultValue)
String
getEdit()
Get the base url to edit Doxia document sources.long
getLastModified()
Get timestamp of the last modification of this decoration model.Menu
getMenuRef(String key)
List<Menu>
getMenus()
String
getModelEncoding()
Get the modelEncoding field.String
getName()
Get the full name of the project.List<Logo>
getPoweredBy()
Method getPoweredBy.PublishDate
getPublishDate()
Skin
getSkin()
Get the artifact containing the skin for the site.Version
getVersion()
int
hashCode()
Method hashCode.boolean
isDefaultPublishDate()
boolean
isDefaultVersion()
boolean
isLink(String href)
boolean
isMergeParent()
void
removeMenuRef(String key)
void
removePoweredBy(Logo logo)
Method removePoweredBy.void
setBannerLeft(Banner bannerLeft)
Set banner logo on the masthead of the site to the left.void
setBannerRight(Banner bannerRight)
Set banner logo on the masthead of the site to the right.void
setBody(Body body)
Set the main site content decoration.void
setCombineSelf(String combineSelf)
Set whether to inherit configuration from a parent project site descriptor (merge
) or not (override
).void
setCustom(Object custom)
Set custom configuration for use with customized Velocity templates.void
setEdit(String edit)
Set the base url to edit Doxia document sources.void
setLastModified(long lastModified)
Set timestamp of the last modification of this decoration model.void
setModelEncoding(String modelEncoding)
Set the modelEncoding field.void
setName(String name)
Set the full name of the project.void
setPoweredBy(List<Logo> poweredBy)
Set powered by logos list.void
setPublishDate(PublishDate publishDate)
Set modify the date published display properties.void
setSkin(Skin skin)
Set the artifact containing the skin for the site.void
setVersion(Version version)
Set modify the version published display properties.String
toString()
Method toString.
-
-
-
Field Detail
-
MERGE
public static final String MERGE
- See Also:
- Constant Field Values
-
OVERRIDE
public static final String OVERRIDE
- See Also:
- Constant Field Values
-
-
Method Detail
-
addPoweredBy
public void addPoweredBy(Logo logo)
Method addPoweredBy.- Parameters:
logo
- a logo object.
-
clone
public DecorationModel clone()
Method clone.
-
equals
public boolean equals(Object other)
Method equals.
-
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 decoration.- Returns:
- Body
-
getCombineSelf
public String getCombineSelf()
Get whether to inherit configuration from a parent project site descriptor (merge
) or not (override
).- Returns:
- String
-
getCustom
public Object getCustom()
Get custom configuration for use with customized Velocity templates. Data from this field are accessible in Velocity template from$decoration.custom
variable as DOM content. Example:$decoration.custom.getChild( 'customElement' ).getValue()
- Returns:
- Object
-
getEdit
public 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 decoration model.- Returns:
- long
-
getModelEncoding
public String getModelEncoding()
Get the modelEncoding field.- Returns:
- String
-
getName
public String getName()
Get the full name of the project.- Returns:
- String
-
getSkin
public Skin getSkin()
Get the artifact containing the skin for the site.- Returns:
- Skin
-
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 decoration.- Parameters:
body
- a body object.
-
setCombineSelf
public void setCombineSelf(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(Object custom)
Set custom configuration for use with customized Velocity templates. Data from this field are accessible in Velocity template from$decoration.custom
variable as DOM content. Example:$decoration.custom.getChild( 'customElement' ).getValue()
- Parameters:
custom
- a custom object.
-
setEdit
public void setEdit(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 decoration model.- Parameters:
lastModified
- a lastModified object.
-
setModelEncoding
public void setModelEncoding(String modelEncoding)
Set the modelEncoding field.- Parameters:
modelEncoding
- a modelEncoding object.
-
setName
public void setName(String name)
Set the full name of the project.- Parameters:
name
- a name object.
-
setPoweredBy
public void setPoweredBy(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.
-
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 String toString()
Method toString.
-
isMergeParent
public boolean isMergeParent()
-
getPublishDate
public PublishDate getPublishDate()
-
isDefaultPublishDate
public boolean isDefaultPublishDate()
-
getVersion
public Version getVersion()
-
isDefaultVersion
public boolean isDefaultVersion()
-
getMenuRef
public Menu getMenuRef(String key)
- Parameters:
key
- not null- Returns:
- the menu ref defined by the given key.
-
removeMenuRef
public void removeMenuRef(String key)
- Parameters:
key
- not null
-
isLink
public boolean isLink(String href)
- Since:
- 1.7
- See Also:
DecorationUtils.isLink(java.lang.String)
-
-