blob: ee867e4c4bca9f6e20260b5fe6d424ad7ba77397 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<model xmlns="http://modello.codehaus.org/MODELLO/1.4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://modello.codehaus.org/MODELLO/1.4.1 http://modello.codehaus.org/xsd/modello-1.4.1.xsd"
xml.namespace="http://maven.apache.org/DECORATION/${version}"
xml.schemaLocation="http://maven.apache.org/xsd/decoration-${version}.xsd">
<id>decoration</id>
<name>Decoration</name>
<description><![CDATA[
<p>This is a reference for the site decoration descriptor used in Doxia Sitetools, also known as <code>site.xml</code>:
it is used to configure a site template (aka skin).</p>
<p>An XSD is available at:</p>
<ul>
<!-- There is no property filtering in Modello, this has to be updated manually. See DOXIASITETOOLS-98. -->
<li><a href="http://maven.apache.org/xsd/decoration-1.8.0.xsd">http://maven.apache.org/xsd/decoration-1.8.0.xsd</a></li>
</ul>
]]></description>
<defaults>
<default>
<key>package</key>
<value>org.apache.maven.doxia.site.decoration</value>
</default>
</defaults>
<classes>
<class rootElement="true" xml.tagName="project" java.clone="deep">
<name>DecorationModel</name>
<description><![CDATA[
The <code>&lt;project&gt;</code> element is the root of the site decoration descriptor.
]]></description>
<version>1.0.0+</version>
<fields>
<field xml.attribute="true">
<name>name</name>
<description>The full name of the project.</description>
<version>1.0.0+</version>
<type>String</type>
<identifier>true</identifier>
</field>
<field xml.attribute="true" xml.tagName="combine.self">
<description><![CDATA[
Whether to inherit configuration from a parent project site descriptor (<code>merge</code>)
or not (<code>override</code>).
]]></description>
<name>combineSelf</name>
<version>1.6.0+</version>
<type>String</type>
<defaultValue>merge</defaultValue>
</field>
<field>
<name>bannerLeft</name>
<description>Banner logo on the masthead of the site to the left.</description>
<version>1.0.0+</version>
<association>
<type>Banner</type>
</association>
<identifier>true</identifier>
</field>
<field>
<name>bannerRight</name>
<description>Banner logo on the masthead of the site to the right.</description>
<version>1.0.0+</version>
<association>
<type>Banner</type>
</association>
<identifier>true</identifier>
</field>
<field>
<name>googleAdSenseClient</name>
<description>Your Google AdSense client id.</description>
<version>1.3.0+</version>
<type>String</type>
<identifier>true</identifier>
</field>
<field>
<name>googleAdSenseSlot</name>
<description>Your Google AdSense slot id.</description>
<version>1.3.0+</version>
<type>String</type>
<identifier>true</identifier>
</field>
<field>
<name>googleAnalyticsAccountId</name>
<description>The id for your Google Analytics account.</description>
<version>1.1.0+</version>
<type>String</type>
<identifier>true</identifier>
</field>
<field xdoc.separator="blank" java.getter="false">
<name>publishDate</name>
<description>Modify the date published display properties.</description>
<version>1.0.0+</version>
<association>
<type>PublishDate</type>
</association>
<identifier>true</identifier>
</field>
<field java.getter="false">
<name>version</name>
<description>Modify the version published display properties.</description>
<version>1.0.0+</version>
<association>
<type>Version</type>
</association>
<identifier>true</identifier>
</field>
<field>
<name>edit</name>
<description><![CDATA[
The base url to edit Doxia document sources.
In general, <code>${project.scm.url}</code> value should do the job.
]]></description>
<version>1.8.0+</version>
<type>String</type>
</field>
<field>
<name>poweredBy</name>
<description>Powered by logos list.</description>
<version>1.0.0+</version>
<association xml.tagName="logo">
<type>Logo</type>
<multiplicity>*</multiplicity>
</association>
<identifier>true</identifier>
</field>
<field xdoc.separator="blank">
<name>skin</name>
<description>The artifact containing the skin for the site.</description>
<version>1.0.0+</version>
<association>
<type>Skin</type>
</association>
<identifier>true</identifier>
</field>
<field xdoc.separator="blank">
<name>body</name>
<description>The main site content decoration.</description>
<version>1.0.0+</version>
<association>
<type>Body</type>
</association>
<identifier>true</identifier>
</field>
<field xdoc.separator="blank">
<name>custom</name>
<description><![CDATA[
Custom configuration for use with customized Velocity templates. Data from this field are
accessible in Velocity template from <code>$decoration.custom</code> variable as DOM content.
Example: <code>$decoration.custom.getChild( 'customElement' ).getValue()</code>
]]></description>
<version>1.0.0+</version>
<type>DOM</type>
<identifier>true</identifier>
</field>
<field xml.transient="true">
<name>lastModified</name>
<description>Timestamp of the last modification of this decoration model.</description>
<version>1.0.1+</version>
<type>long</type>
</field>
</fields>
<codeSegments>
<codeSegment>
<version>1.0.0+</version>
<code>
<![CDATA[
public static final String MERGE = "merge";
public static final String OVERRIDE = "override";
public boolean isMergeParent()
{
return !OVERRIDE.equals( combineSelf );
}
public PublishDate getPublishDate()
{
if ( publishDate == null )
return new PublishDate();
else
return publishDate;
}
public boolean isDefaultPublishDate()
{
return publishDate == null;
}
public Version getVersion()
{
if ( version == null )
return new Version();
else
return version;
}
public boolean isDefaultVersion()
{
return version == null;
}
private java.util.Map<String, Menu> menusByRef;
/**
* @param key not null
* @return the menu ref defined by the given key.
*/
public Menu getMenuRef( String key )
{
if ( menusByRef == null )
{
menusByRef = new java.util.HashMap<String, Menu>();
if ( body != null )
{
for ( Menu menu : body.getMenus() )
{
if ( menu.getRef() != null )
{
menusByRef.put( menu.getRef(), menu );
}
}
}
}
return menusByRef.get( key );
}
/**
* @param key not null
*/
public void removeMenuRef( String key )
{
if ( body != null )
{
for ( java.util.Iterator<Menu> i = body.getMenus().iterator(); i.hasNext(); )
{
Menu menu = i.next();
if ( key.equals( menu.getRef() ) )
{
i.remove();
}
}
}
}
/**
* @return the menus list or EMPTY_LIST.
*/
public java.util.List<Menu> getMenus()
{
java.util.List menus;
if ( body != null && body.getMenus() != null )
{
menus = body.getMenus();
}
else
{
menus = java.util.Collections.emptyList();
}
return menus;
}
]]>
</code>
</codeSegment>
<codeSegment>
<version>1.7.0+</version>
<code>
/**
* @since 1.7
* @see DecorationUtils#isLink
*/
public boolean isLink( String href )
{
return DecorationUtils.isLink( href );
}
</code>
</codeSegment>
<codeSegment>
<version>1.8.0+</version>
<code>
/**
* @since 1.8
* @see DecorationUtils#getCustomChild
*/
public Object getCustomChild( String path )
{
return DecorationUtils.getCustomChild( (org.codehaus.plexus.util.xml.Xpp3Dom) custom, path );
}
/**
* @since 1.8
* @see DecorationUtils#getCustomValue
*/
public String getCustomValue( String path )
{
return DecorationUtils.getCustomValue( (org.codehaus.plexus.util.xml.Xpp3Dom) custom, path );
}
/**
* @since 1.8
* @see DecorationUtils#getCustomValue
*/
public String getCustomValue( String path, String defaultValue )
{
return DecorationUtils.getCustomValue( (org.codehaus.plexus.util.xml.Xpp3Dom) custom, path, defaultValue );
}
</code>
</codeSegment>
</codeSegments>
</class>
<class java.clone="deep">
<name>Banner</name>
<description>Banner logo on the masthead of the site.</description>
<version>1.0.0+</version>
<fields>
<!-- Ideally we want attributes DOXIA-335 -->
<field>
<name>name</name>
<version>1.0.0+</version>
<description>The name of the banner.</description>
<type>String</type>
<identifier>true</identifier>
</field>
<field>
<name>src</name>
<version>1.0.0+</version>
<description>The source location of an image for the banner.</description>
<type>String</type>
<identifier>true</identifier>
</field>
<field>
<name>alt</name>
<version>1.0.0+</version>
<description>The alt description for the banner image.</description>
<type>String</type>
<identifier>true</identifier>
</field>
<field>
<name>href</name>
<version>1.0.0+</version>
<description>The href of a link to be used for the banner image.</description>
<type>String</type>
<identifier>true</identifier>
</field>
<field>
<name>border</name>
<description>The border to use for the banner image.</description>
<version>1.0.1+</version>
<type>String</type>
<identifier>true</identifier>
</field>
<field>
<name>width</name>
<description>The width to use for the banner image.</description>
<version>1.0.1+</version>
<type>String</type>
<identifier>true</identifier>
</field>
<field>
<name>height</name>
<description>The height to use for the banner image.</description>
<version>1.0.1+</version>
<type>String</type>
<identifier>true</identifier>
</field>
<field>
<name>title</name>
<version>1.3.0+</version>
<description>The title for the banner image.</description>
<type>String</type>
<identifier>true</identifier>
</field>
</fields>
</class>
<class java.clone="deep">
<name>PublishDate</name>
<description>Modify display properties for date published.</description>
<version>1.0.0+</version>
<fields>
<field xml.attribute="true">
<name>position</name>
<description>Where to place the date published (left, right, navigation-top, navigation-bottom, bottom).</description>
<version>1.0.0+</version>
<type>String</type>
<identifier>true</identifier>
<defaultValue>left</defaultValue>
</field>
<field xml.attribute="true">
<name>format</name>
<description>Date format to use.</description>
<version>1.0.0+</version>
<type>String</type>
<identifier>true</identifier>
<defaultValue>yyyy-MM-dd</defaultValue>
</field>
</fields>
</class>
<class java.clone="deep">
<name>Version</name>
<description>Modify display properties for version published.</description>
<version>1.0.0+</version>
<fields>
<field xml.attribute="true">
<name>position</name>
<description>Where to place the version published (left, right, navigation-top, navigation-bottom, bottom).</description>
<version>1.0.0+</version>
<type>String</type>
<identifier>true</identifier>
<defaultValue>left</defaultValue>
</field>
</fields>
</class>
<class java.clone="deep">
<name>Logo</name>
<description>Power by logo on the navigation.</description>
<version>1.0.0+</version>
<superClass>LinkItem</superClass>
</class>
<class java.clone="deep" xsd.compositor="sequence">
<name>Body</name>
<description>The main content decoration.</description>
<version>1.0.0+</version>
<fields>
<field>
<name>head</name>
<description>Additional content (like JavaScript) to include in the HEAD block of the generated pages.</description>
<version>1.0.0/1.6.0</version>
<type>DOM</type>
<identifier>true</identifier>
</field>
<field>
<name>head</name>
<description>Additional content (like JavaScript) to include in the HEAD block of the generated pages.</description>
<version>1.7.0+</version>
<type>String</type>
<identifier>true</identifier>
</field>
<field>
<name>links</name>
<description>A list of links to display in the navigation.</description>
<version>1.0.0+</version>
<association xml.tagName="item">
<type>LinkItem</type>
<multiplicity>*</multiplicity>
</association>
<identifier>true</identifier>
</field>
<field>
<name>breadcrumbs</name>
<description>A list of breadcrumbs to display in the navigation.</description>
<version>1.0.0+</version>
<association xml.tagName="item">
<type>LinkItem</type>
<multiplicity>*</multiplicity>
</association>
<identifier>true</identifier>
</field>
<field xdoc.separator="blank">
<name>menus</name>
<description>A list of menus to include in the navigation.</description>
<version>1.0.0+</version>
<association xml.itemsStyle="flat">
<type>Menu</type>
<multiplicity>*</multiplicity>
</association>
<identifier>true</identifier>
</field>
<field>
<name>footer</name>
<description>If present, the contained text will be used instead of the generated copyright text.</description>
<version>1.7.0+</version>
<type>String</type>
<identifier>true</identifier>
</field>
<field>
<name>footer</name>
<description>If present, the contained text will be used instead of the generated copyright text.</description>
<version>1.1.0/1.6.0</version>
<type>DOM</type>
<identifier>true</identifier>
</field>
</fields>
</class>
<class java.clone="deep">
<name>LinkItem</name>
<description>A link in the navigation.</description>
<version>1.0.0+</version>
<fields>
<field xml.attribute="true">
<name>name</name>
<description>The name to display for the link.</description>
<version>1.0.0+</version>
<type>String</type>
<identifier>true</identifier>
</field>
<field xml.attribute="true">
<name>href</name>
<description>The href to use for the link.</description>
<version>1.0.0+</version>
<type>String</type>
<identifier>true</identifier>
</field>
<field xml.attribute="true">
<name>img</name>
<description>The source location of an image.</description>
<version>1.0.0+</version>
<type>String</type>
<identifier>true</identifier>
</field>
<field xml.attribute="true">
<name>position</name>
<description>Where to place the image regarding the displayed name (left or right).</description>
<version>1.0.1+</version>
<type>String</type>
<identifier>true</identifier>
<defaultValue>left</defaultValue>
</field>
<field xml.attribute="true">
<name>alt</name>
<description>The alt to use for the image.</description>
<version>1.0.1+</version>
<type>String</type>
<identifier>true</identifier>
</field>
<field xml.attribute="true">
<name>border</name>
<description>The border to use for the image.</description>
<version>1.0.1+</version>
<type>String</type>
<identifier>true</identifier>
</field>
<field xml.attribute="true">
<name>width</name>
<description>The width to use for the image.</description>
<version>1.0.1+</version>
<type>String</type>
<identifier>true</identifier>
</field>
<field xml.attribute="true">
<name>height</name>
<description>The height to use for the image.</description>
<version>1.0.1+</version>
<type>String</type>
<identifier>true</identifier>
</field>
<field xml.attribute="true">
<name>target</name>
<description>Where the new document will be displayed when the user follows a link, i.e. _blank opens the new document in a new window.</description>
<version>1.0.1+</version>
<type>String</type>
<identifier>true</identifier>
</field>
<field xml.attribute="true">
<name>title</name>
<description>The title to use for the image.</description>
<version>1.3.0+</version>
<type>String</type>
<identifier>true</identifier>
</field>
</fields>
</class>
<class java.clone="deep" xsd.compositor="sequence">
<name>Menu</name>
<description>A menu in the navigation.</description>
<version>1.0.0+</version>
<fields>
<field xml.attribute="true">
<name>name</name>
<description>The name to display for the menu.</description>
<version>1.0.0+</version>
<type>String</type>
<identifier>true</identifier>
</field>
<field xml.attribute="true">
<name>inherit</name>
<description><![CDATA[
The way in which the menu is inherited. Can be one of : <code>top</code>, <code>bottom</code>.
]]></description>
<version>1.0.0+</version>
<type>String</type>
<identifier>true</identifier>
</field>
<field xml.attribute="true">
<name>inheritAsRef</name>
<description><![CDATA[
If this is a reference, setting <inheritAsRef>true</inheritAsRef> means that it will be populated
in the project, whereas if it is false, it is populated in the parent and then inherited.
]]></description>
<version>1.0.0+</version>
<type>boolean</type>
</field>
<field xml.attribute="true">
<name>ref</name>
<description><![CDATA[
Mark this menu as reference to a pre-defined menu: <code>reports</code>, <code>modules</code>
or <code>parent</code>. It will be populated at runtime with corresponding pre-defined content.
]]></description>
<version>1.0.0+</version>
<type>String</type>
<identifier>true</identifier>
</field>
<field xml.attribute="true">
<name>img</name>
<description>The source location of an menu image.</description>
<version>1.0.0+</version>
<type>String</type>
<identifier>true</identifier>
</field>
<field xml.attribute="true">
<name>alt</name>
<version>1.0.1+</version>
<description>The alt description for the image.</description>
<type>String</type>
<identifier>true</identifier>
</field>
<field xml.attribute="true">
<name>position</name>
<description>Where to place the image regarding the displayed name (left or right).</description>
<version>1.0.1+</version>
<type>String</type>
<identifier>true</identifier>
<defaultValue>left</defaultValue>
</field>
<field xml.attribute="true">
<name>border</name>
<description>The border to use for the menu image.</description>
<version>1.0.1+</version>
<type>String</type>
<identifier>true</identifier>
</field>
<field xml.attribute="true">
<name>width</name>
<description>The width to use for the menu image.</description>
<version>1.0.1+</version>
<type>String</type>
<identifier>true</identifier>
</field>
<field xml.attribute="true">
<name>height</name>
<description>The height to use for the menu image.</description>
<version>1.0.1+</version>
<type>String</type>
<identifier>true</identifier>
</field>
<field xml.attribute="true">
<name>title</name>
<version>1.3.0+</version>
<description>The title for the image.</description>
<type>String</type>
<identifier>true</identifier>
</field>
<field>
<name>items</name>
<description>A list of menu item.</description>
<version>1.0.0+</version>
<association xml.itemsStyle="flat">
<type>MenuItem</type>
<multiplicity>*</multiplicity>
</association>
<identifier>true</identifier>
</field>
</fields>
</class>
<class java.clone="deep" xsd.compositor="sequence">
<name>MenuItem</name>
<description>A menu item.</description>
<version>1.0.0+</version>
<superClass>LinkItem</superClass>
<fields>
<field>
<name>description</name>
<description>A description of the menu item. This is used on any summary pages for a menu.</description>
<version>1.0.0+</version>
<type>String</type>
<identifier>true</identifier>
</field>
<field xml.attribute="true">
<name>collapse</name>
<description>Whether to collapse children elements of an item menu (by default).</description>
<version>1.0.0+</version>
<type>boolean</type>
<identifier>true</identifier>
</field>
<field xml.attribute="true">
<name>ref</name>
<description>A reference to a pre-defined menu item, such as a report (specified by the report goal
name). Any elements explicitly given override those from the pre-defined reference.</description>
<version>1.0.0+</version>
<type>String</type>
<identifier>true</identifier>
</field>
<field>
<name>items</name>
<description>A list of menu item.</description>
<version>1.0.0+</version>
<association xml.itemsStyle="flat">
<type>MenuItem</type>
<multiplicity>*</multiplicity>
</association>
<identifier>true</identifier>
</field>
</fields>
</class>
<class java.clone="deep">
<name>Skin</name>
<description>An skin artifact declaration.</description>
<version>1.0.0+</version>
<fields>
<field>
<name>groupId</name>
<description>The skin group ID.</description>
<version>1.0.0+</version>
<type>String</type>
<required>true</required>
<identifier>true</identifier>
</field>
<field>
<name>artifactId</name>
<description>The skin artifact ID.</description>
<version>1.0.0+</version>
<type>String</type>
<required>true</required>
<identifier>true</identifier>
</field>
<field>
<name>version</name>
<description>The skin version.</description>
<version>1.0.0+</version>
<type>String</type>
<identifier>true</identifier>
</field>
</fields>
<codeSegments>
<codeSegment>
<version>1.0.0+</version>
<code>
<![CDATA[
/**
* @return the default skin <code>org.apache.maven.skins:maven-default-skin:1.2</code>.
*/
public static Skin getDefaultSkin()
{
Skin skin = new Skin();
skin.setGroupId( "org.apache.maven.skins" );
skin.setArtifactId( "maven-default-skin" );
skin.setVersion( "1.2" );
return skin;
}
]]>
</code>
</codeSegment>
</codeSegments>
</class>
</classes>
</model>