Class DecorationModel
- java.lang.Object
-
- org.apache.maven.doxia.site.decoration.DecorationModel
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
public class DecorationModel extends java.lang.Object implements java.io.Serializable, java.lang.Cloneable
The<project>
element is the root of the site decoration descriptor.- Version:
- $Revision$ $Date$
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private Banner
bannerLeft
Banner logo on the masthead of the site to the left.private Banner
bannerRight
Banner logo on the masthead of the site to the right.private Body
body
The main site content decoration.private java.lang.String
combineSelf
Whether to inherit configuration from a parent project site descriptor (merge
) or not (override
).private java.lang.Object
custom
Custom configuration for use with customized Velocity templates.private java.lang.String
edit
The base url to edit Doxia document sources.private java.lang.String
googleAdSenseClient
Your Google AdSense client id.private java.lang.String
googleAdSenseSlot
Your Google AdSense slot id.private java.lang.String
googleAnalyticsAccountId
The id for your Google Analytics account.private long
lastModified
Timestamp of the last modification of this decoration model.private java.util.Map<java.lang.String,Menu>
menusByRef
static java.lang.String
MERGE
private java.lang.String
modelEncoding
Field modelEncoding.private java.lang.String
name
The full name of the project.static java.lang.String
OVERRIDE
private java.util.List<Logo>
poweredBy
Field poweredBy.private PublishDate
publishDate
Modify the date published display properties.private Skin
skin
The artifact containing the skin for the site.private Version
version
Modify the version published display properties.
-
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(java.lang.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.java.lang.String
getCombineSelf()
Get whether to inherit configuration from a parent project site descriptor (merge
) or not (override
).java.lang.Object
getCustom()
Get custom configuration for use with customized Velocity templates.java.lang.Object
getCustomChild(java.lang.String path)
java.lang.String
getCustomValue(java.lang.String path)
java.lang.String
getCustomValue(java.lang.String path, java.lang.String defaultValue)
java.lang.String
getEdit()
Get the base url to edit Doxia document sources.java.lang.String
getGoogleAdSenseClient()
Get your Google AdSense client id.java.lang.String
getGoogleAdSenseSlot()
Get your Google AdSense slot id.java.lang.String
getGoogleAnalyticsAccountId()
Get the id for your Google Analytics account.long
getLastModified()
Get timestamp of the last modification of this decoration model.Menu
getMenuRef(java.lang.String key)
java.util.List<Menu>
getMenus()
java.lang.String
getModelEncoding()
Get the modelEncoding field.java.lang.String
getName()
Get the full name of the project.java.util.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(java.lang.String href)
boolean
isMergeParent()
void
removeMenuRef(java.lang.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(java.lang.String combineSelf)
Set whether to inherit configuration from a parent project site descriptor (merge
) or not (override
).void
setCustom(java.lang.Object custom)
Set custom configuration for use with customized Velocity templates.void
setEdit(java.lang.String edit)
Set the base url to edit Doxia document sources.void
setGoogleAdSenseClient(java.lang.String googleAdSenseClient)
Set your Google AdSense client id.void
setGoogleAdSenseSlot(java.lang.String googleAdSenseSlot)
Set your Google AdSense slot id.void
setGoogleAnalyticsAccountId(java.lang.String googleAnalyticsAccountId)
Set the id for your Google Analytics account.void
setLastModified(long lastModified)
Set timestamp of the last modification of this decoration model.void
setModelEncoding(java.lang.String modelEncoding)
Set the modelEncoding field.void
setName(java.lang.String name)
Set the full name of the project.void
setPoweredBy(java.util.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.java.lang.String
toString()
Method toString.
-
-
-
Field Detail
-
name
private java.lang.String name
The full name of the project.
-
combineSelf
private java.lang.String combineSelf
Whether to inherit configuration from a parent project site descriptor (merge
) or not (override
).
-
bannerLeft
private Banner bannerLeft
Banner logo on the masthead of the site to the left.
-
bannerRight
private Banner bannerRight
Banner logo on the masthead of the site to the right.
-
googleAdSenseClient
private java.lang.String googleAdSenseClient
Your Google AdSense client id.
-
googleAdSenseSlot
private java.lang.String googleAdSenseSlot
Your Google AdSense slot id.
-
googleAnalyticsAccountId
private java.lang.String googleAnalyticsAccountId
The id for your Google Analytics account.
-
publishDate
private PublishDate publishDate
Modify the date published display properties.
-
version
private Version version
Modify the version published display properties.
-
edit
private java.lang.String edit
The base url to edit Doxia document sources. In general,${project.scm.url}
value should do the job.
-
poweredBy
private java.util.List<Logo> poweredBy
Field poweredBy.
-
skin
private Skin skin
The artifact containing the skin for the site.
-
body
private Body body
The main site content decoration.
-
custom
private java.lang.Object custom
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()
-
lastModified
private long lastModified
Timestamp of the last modification of this decoration model.
-
modelEncoding
private java.lang.String modelEncoding
Field modelEncoding.
-
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
-
menusByRef
private java.util.Map<java.lang.String,Menu> menusByRef
-
-
Method Detail
-
addPoweredBy
public void addPoweredBy(Logo logo)
Method addPoweredBy.- Parameters:
logo
-
-
clone
public DecorationModel clone()
Method clone.- Overrides:
clone
in classjava.lang.Object
- Returns:
- DecorationModel
-
equals
public boolean equals(java.lang.Object other)
Method equals.- Overrides:
equals
in classjava.lang.Object
- Parameters:
other
-- 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 decoration.- 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$decoration.custom
variable as DOM content. Example:$decoration.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
-
getGoogleAdSenseClient
public java.lang.String getGoogleAdSenseClient()
Get your Google AdSense client id.- Returns:
- String
-
getGoogleAdSenseSlot
public java.lang.String getGoogleAdSenseSlot()
Get your Google AdSense slot id.- Returns:
- String
-
getGoogleAnalyticsAccountId
public java.lang.String getGoogleAnalyticsAccountId()
Get the id for your Google Analytics account.- Returns:
- String
-
getLastModified
public long getLastModified()
Get timestamp of the last modification of this decoration model.- Returns:
- long
-
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.- 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:
hashCode
in classjava.lang.Object
- Returns:
- int
-
removePoweredBy
public void removePoweredBy(Logo logo)
Method removePoweredBy.- Parameters:
logo
-
-
setBannerLeft
public void setBannerLeft(Banner bannerLeft)
Set banner logo on the masthead of the site to the left.- Parameters:
bannerLeft
-
-
setBannerRight
public void setBannerRight(Banner bannerRight)
Set banner logo on the masthead of the site to the right.- Parameters:
bannerRight
-
-
setBody
public void setBody(Body body)
Set the main site content decoration.- Parameters:
body
-
-
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
-
-
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$decoration.custom
variable as DOM content. Example:$decoration.custom.getChild( 'customElement' ).getValue()
- Parameters:
custom
-
-
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
-
-
setGoogleAdSenseClient
public void setGoogleAdSenseClient(java.lang.String googleAdSenseClient)
Set your Google AdSense client id.- Parameters:
googleAdSenseClient
-
-
setGoogleAdSenseSlot
public void setGoogleAdSenseSlot(java.lang.String googleAdSenseSlot)
Set your Google AdSense slot id.- Parameters:
googleAdSenseSlot
-
-
setGoogleAnalyticsAccountId
public void setGoogleAnalyticsAccountId(java.lang.String googleAnalyticsAccountId)
Set the id for your Google Analytics account.- Parameters:
googleAnalyticsAccountId
-
-
setLastModified
public void setLastModified(long lastModified)
Set timestamp of the last modification of this decoration model.- Parameters:
lastModified
-
-
setModelEncoding
public void setModelEncoding(java.lang.String modelEncoding)
Set the modelEncoding field.- Parameters:
modelEncoding
-
-
setName
public void setName(java.lang.String name)
Set the full name of the project.- Parameters:
name
-
-
setPoweredBy
public void setPoweredBy(java.util.List<Logo> poweredBy)
Set powered by logos list.- Parameters:
poweredBy
-
-
setPublishDate
public void setPublishDate(PublishDate publishDate)
Set modify the date published display properties.- Parameters:
publishDate
-
-
setSkin
public void setSkin(Skin skin)
Set the artifact containing the skin for the site.- Parameters:
skin
-
-
setVersion
public void setVersion(Version version)
Set modify the version published display properties.- Parameters:
version
-
-
toString
public java.lang.String toString()
Method toString.- Overrides:
toString
in 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:
DecorationUtils.isLink(java.lang.String)
-
getCustomChild
public java.lang.Object getCustomChild(java.lang.String path)
-
getCustomValue
public java.lang.String getCustomValue(java.lang.String path)
-
getCustomValue
public java.lang.String getCustomValue(java.lang.String path, java.lang.String defaultValue)
-
-