You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ol...@apache.org on 2013/03/03 16:06:42 UTC

svn commit: r1452051 - in /maven/doxia/doxia-sitetools/trunk/doxia-decoration-model: pom.xml src/main/java/org/apache/maven/doxia/site/decoration/inheritance/DefaultDecorationModelInheritanceAssembler.java src/main/mdo/decoration.mdo

Author: olamy
Date: Sun Mar  3 15:06:42 2013
New Revision: 1452051

URL: http://svn.apache.org/r1452051
Log:
[DOXIASITETOOLS-80] Decoration model missing Version and PublishDate default values
Submitted by Michael Osipov .


Modified:
    maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/pom.xml
    maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/main/java/org/apache/maven/doxia/site/decoration/inheritance/DefaultDecorationModelInheritanceAssembler.java
    maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/main/mdo/decoration.mdo

Modified: maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/pom.xml
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/pom.xml?rev=1452051&r1=1452050&r2=1452051&view=diff
==============================================================================
--- maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/pom.xml (original)
+++ maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/pom.xml Sun Mar  3 15:06:42 2013
@@ -51,7 +51,7 @@ under the License.
           <models>
             <model>src/main/mdo/decoration.mdo</model>
           </models>
-          <version>1.3.0</version>
+          <version>1.3.1</version>
           <firstVersion>1.0.0</firstVersion>
         </configuration>
         <executions>

Modified: maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/main/java/org/apache/maven/doxia/site/decoration/inheritance/DefaultDecorationModelInheritanceAssembler.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/main/java/org/apache/maven/doxia/site/decoration/inheritance/DefaultDecorationModelInheritanceAssembler.java?rev=1452051&r1=1452050&r2=1452051&view=diff
==============================================================================
--- maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/main/java/org/apache/maven/doxia/site/decoration/inheritance/DefaultDecorationModelInheritanceAssembler.java (original)
+++ maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/main/java/org/apache/maven/doxia/site/decoration/inheritance/DefaultDecorationModelInheritanceAssembler.java Sun Mar  3 15:06:42 2013
@@ -68,12 +68,12 @@ public class DefaultDecorationModelInher
             rebaseBannerPaths( child.getBannerRight(), urlContainer );
         }
 
-        if ( child.getPublishDate() == null && parent.getPublishDate() != null )
+        if ( child.isDefaultPublishDate() && parent.getPublishDate() != null )
         {
             child.setPublishDate( parent.getPublishDate().clone());
         }
 
-        if ( child.getVersion() == null && parent.getVersion() != null )
+        if ( child.isDefaultVersion() && parent.getVersion() != null )
         {
             child.setVersion( parent.getVersion().clone());
         }

Modified: maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/main/mdo/decoration.mdo
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/main/mdo/decoration.mdo?rev=1452051&r1=1452050&r2=1452051&view=diff
==============================================================================
--- maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/main/mdo/decoration.mdo (original)
+++ maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/main/mdo/decoration.mdo Sun Mar  3 15:06:42 2013
@@ -28,7 +28,7 @@ under the License.
     <p>This is a reference for the site decoration descriptor used in Doxia Sitetools, also known as <code>site.xml</code>.</p>
     <p>An XSD is available at:</p>
     <ul>
-      <li><a href="http://maven.apache.org/xsd/decoration-1.3.0.xsd">http://maven.apache.org/xsd/decoration-1.3.0.xsd</a></li>
+      <li><a href="http://maven.apache.org/xsd/decoration-1.3.1.xsd">http://maven.apache.org/xsd/decoration-1.3.1.xsd</a></li>
     </ul>
     ]]></description>
 
@@ -94,7 +94,7 @@ under the License.
           <type>String</type>
           <identifier>true</identifier>
         </field>
-        <field xdoc.separator="blank">
+        <field xdoc.separator="blank" java.getter="false">
           <name>publishDate</name>
           <description>Modify the date published display properties.</description>
           <version>1.0.0+</version>
@@ -103,7 +103,7 @@ under the License.
           </association>
           <identifier>true</identifier>
         </field>
-        <field>
+        <field java.getter="false">
           <name>version</name>
           <description>Modify the version published display properties.</description>
           <version>1.0.0+</version>
@@ -163,6 +163,33 @@ under the License.
           <version>1.0.0+</version>
           <code>
             <![CDATA[
+
+    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;
 
     /**
@@ -305,10 +332,11 @@ under the License.
           <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. The default is ISO-8601 yyyy-MM-dd.</description>
+          <description>Date format to use.</description>
           <version>1.0.0+</version>
           <type>String</type>
           <identifier>true</identifier>
@@ -328,6 +356,7 @@ under the License.
           <version>1.0.0+</version>
           <type>String</type>
           <identifier>true</identifier>
+          <defaultValue>left</defaultValue>
         </field>
       </fields>
     </class>



Re: svn commit: r1452051 - in /maven/doxia/doxia-sitetools/trunk/doxia-decoration-model: pom.xml src/main/java/org/apache/maven/doxia/site/decoration/inheritance/DefaultDecorationModelInheritanceAssembler.java src/main/mdo/decoration.mdo

Posted by Olivier Lamy <ol...@apache.org>.
2013/3/4 Dennis Lundberg <de...@apache.org>:
> Hi Olivier,
>
> Previously I aligned the model versions with the product versions. This
> commit doesn't follow that path. Unless you plan for the next version of
> doxia-sitetools to be 1.3.1, then I suggest changing the model version
> to 1.4.0.
agree I just fixed that.
Thanks for review
>
> On 2013-03-03 16:06, olamy@apache.org wrote:
>> Author: olamy
>> Date: Sun Mar  3 15:06:42 2013
>> New Revision: 1452051
>>
>> URL: http://svn.apache.org/r1452051
>> Log:
>> [DOXIASITETOOLS-80] Decoration model missing Version and PublishDate default values
>> Submitted by Michael Osipov .
>>
>>
>> Modified:
>>     maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/pom.xml
>>     maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/main/java/org/apache/maven/doxia/site/decoration/inheritance/DefaultDecorationModelInheritanceAssembler.java
>>     maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/main/mdo/decoration.mdo
>>
>> Modified: maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/pom.xml
>> URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/pom.xml?rev=1452051&r1=1452050&r2=1452051&view=diff
>> ==============================================================================
>> --- maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/pom.xml (original)
>> +++ maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/pom.xml Sun Mar  3 15:06:42 2013
>> @@ -51,7 +51,7 @@ under the License.
>>            <models>
>>              <model>src/main/mdo/decoration.mdo</model>
>>            </models>
>> -          <version>1.3.0</version>
>> +          <version>1.3.1</version>
>>            <firstVersion>1.0.0</firstVersion>
>>          </configuration>
>>          <executions>
>>
>> Modified: maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/main/java/org/apache/maven/doxia/site/decoration/inheritance/DefaultDecorationModelInheritanceAssembler.java
>> URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/main/java/org/apache/maven/doxia/site/decoration/inheritance/DefaultDecorationModelInheritanceAssembler.java?rev=1452051&r1=1452050&r2=1452051&view=diff
>> ==============================================================================
>> --- maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/main/java/org/apache/maven/doxia/site/decoration/inheritance/DefaultDecorationModelInheritanceAssembler.java (original)
>> +++ maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/main/java/org/apache/maven/doxia/site/decoration/inheritance/DefaultDecorationModelInheritanceAssembler.java Sun Mar  3 15:06:42 2013
>> @@ -68,12 +68,12 @@ public class DefaultDecorationModelInher
>>              rebaseBannerPaths( child.getBannerRight(), urlContainer );
>>          }
>>
>> -        if ( child.getPublishDate() == null && parent.getPublishDate() != null )
>> +        if ( child.isDefaultPublishDate() && parent.getPublishDate() != null )
>>          {
>>              child.setPublishDate( parent.getPublishDate().clone());
>>          }
>>
>> -        if ( child.getVersion() == null && parent.getVersion() != null )
>> +        if ( child.isDefaultVersion() && parent.getVersion() != null )
>>          {
>>              child.setVersion( parent.getVersion().clone());
>>          }
>>
>> Modified: maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/main/mdo/decoration.mdo
>> URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/main/mdo/decoration.mdo?rev=1452051&r1=1452050&r2=1452051&view=diff
>> ==============================================================================
>> --- maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/main/mdo/decoration.mdo (original)
>> +++ maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/main/mdo/decoration.mdo Sun Mar  3 15:06:42 2013
>> @@ -28,7 +28,7 @@ under the License.
>>      <p>This is a reference for the site decoration descriptor used in Doxia Sitetools, also known as <code>site.xml</code>.</p>
>>      <p>An XSD is available at:</p>
>>      <ul>
>> -      <li><a href="http://maven.apache.org/xsd/decoration-1.3.0.xsd">http://maven.apache.org/xsd/decoration-1.3.0.xsd</a></li>
>> +      <li><a href="http://maven.apache.org/xsd/decoration-1.3.1.xsd">http://maven.apache.org/xsd/decoration-1.3.1.xsd</a></li>
>>      </ul>
>>      ]]></description>
>>
>> @@ -94,7 +94,7 @@ under the License.
>>            <type>String</type>
>>            <identifier>true</identifier>
>>          </field>
>> -        <field xdoc.separator="blank">
>> +        <field xdoc.separator="blank" java.getter="false">
>>            <name>publishDate</name>
>>            <description>Modify the date published display properties.</description>
>>            <version>1.0.0+</version>
>> @@ -103,7 +103,7 @@ under the License.
>>            </association>
>>            <identifier>true</identifier>
>>          </field>
>> -        <field>
>> +        <field java.getter="false">
>>            <name>version</name>
>>            <description>Modify the version published display properties.</description>
>>            <version>1.0.0+</version>
>> @@ -163,6 +163,33 @@ under the License.
>>            <version>1.0.0+</version>
>>            <code>
>>              <![CDATA[
>> +
>> +    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;
>>
>>      /**
>> @@ -305,10 +332,11 @@ under the License.
>>            <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. The default is ISO-8601 yyyy-MM-dd.</description>
>> +          <description>Date format to use.</description>
>>            <version>1.0.0+</version>
>>            <type>String</type>
>>            <identifier>true</identifier>
>> @@ -328,6 +356,7 @@ under the License.
>>            <version>1.0.0+</version>
>>            <type>String</type>
>>            <identifier>true</identifier>
>> +          <defaultValue>left</defaultValue>
>>          </field>
>>        </fields>
>>      </class>
>>
>>
>
>
> --
> Dennis Lundberg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>



-- 
Olivier Lamy
Talend: http://coders.talend.com
http://twitter.com/olamy | http://linkedin.com/in/olamy

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: svn commit: r1452051 - in /maven/doxia/doxia-sitetools/trunk/doxia-decoration-model: pom.xml src/main/java/org/apache/maven/doxia/site/decoration/inheritance/DefaultDecorationModelInheritanceAssembler.java src/main/mdo/decoration.mdo

Posted by Dennis Lundberg <de...@apache.org>.
Hi Olivier,

Previously I aligned the model versions with the product versions. This
commit doesn't follow that path. Unless you plan for the next version of
doxia-sitetools to be 1.3.1, then I suggest changing the model version
to 1.4.0.

On 2013-03-03 16:06, olamy@apache.org wrote:
> Author: olamy
> Date: Sun Mar  3 15:06:42 2013
> New Revision: 1452051
> 
> URL: http://svn.apache.org/r1452051
> Log:
> [DOXIASITETOOLS-80] Decoration model missing Version and PublishDate default values
> Submitted by Michael Osipov .
> 
> 
> Modified:
>     maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/pom.xml
>     maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/main/java/org/apache/maven/doxia/site/decoration/inheritance/DefaultDecorationModelInheritanceAssembler.java
>     maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/main/mdo/decoration.mdo
> 
> Modified: maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/pom.xml
> URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/pom.xml?rev=1452051&r1=1452050&r2=1452051&view=diff
> ==============================================================================
> --- maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/pom.xml (original)
> +++ maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/pom.xml Sun Mar  3 15:06:42 2013
> @@ -51,7 +51,7 @@ under the License.
>            <models>
>              <model>src/main/mdo/decoration.mdo</model>
>            </models>
> -          <version>1.3.0</version>
> +          <version>1.3.1</version>
>            <firstVersion>1.0.0</firstVersion>
>          </configuration>
>          <executions>
> 
> Modified: maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/main/java/org/apache/maven/doxia/site/decoration/inheritance/DefaultDecorationModelInheritanceAssembler.java
> URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/main/java/org/apache/maven/doxia/site/decoration/inheritance/DefaultDecorationModelInheritanceAssembler.java?rev=1452051&r1=1452050&r2=1452051&view=diff
> ==============================================================================
> --- maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/main/java/org/apache/maven/doxia/site/decoration/inheritance/DefaultDecorationModelInheritanceAssembler.java (original)
> +++ maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/main/java/org/apache/maven/doxia/site/decoration/inheritance/DefaultDecorationModelInheritanceAssembler.java Sun Mar  3 15:06:42 2013
> @@ -68,12 +68,12 @@ public class DefaultDecorationModelInher
>              rebaseBannerPaths( child.getBannerRight(), urlContainer );
>          }
>  
> -        if ( child.getPublishDate() == null && parent.getPublishDate() != null )
> +        if ( child.isDefaultPublishDate() && parent.getPublishDate() != null )
>          {
>              child.setPublishDate( parent.getPublishDate().clone());
>          }
>  
> -        if ( child.getVersion() == null && parent.getVersion() != null )
> +        if ( child.isDefaultVersion() && parent.getVersion() != null )
>          {
>              child.setVersion( parent.getVersion().clone());
>          }
> 
> Modified: maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/main/mdo/decoration.mdo
> URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/main/mdo/decoration.mdo?rev=1452051&r1=1452050&r2=1452051&view=diff
> ==============================================================================
> --- maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/main/mdo/decoration.mdo (original)
> +++ maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/main/mdo/decoration.mdo Sun Mar  3 15:06:42 2013
> @@ -28,7 +28,7 @@ under the License.
>      <p>This is a reference for the site decoration descriptor used in Doxia Sitetools, also known as <code>site.xml</code>.</p>
>      <p>An XSD is available at:</p>
>      <ul>
> -      <li><a href="http://maven.apache.org/xsd/decoration-1.3.0.xsd">http://maven.apache.org/xsd/decoration-1.3.0.xsd</a></li>
> +      <li><a href="http://maven.apache.org/xsd/decoration-1.3.1.xsd">http://maven.apache.org/xsd/decoration-1.3.1.xsd</a></li>
>      </ul>
>      ]]></description>
>  
> @@ -94,7 +94,7 @@ under the License.
>            <type>String</type>
>            <identifier>true</identifier>
>          </field>
> -        <field xdoc.separator="blank">
> +        <field xdoc.separator="blank" java.getter="false">
>            <name>publishDate</name>
>            <description>Modify the date published display properties.</description>
>            <version>1.0.0+</version>
> @@ -103,7 +103,7 @@ under the License.
>            </association>
>            <identifier>true</identifier>
>          </field>
> -        <field>
> +        <field java.getter="false">
>            <name>version</name>
>            <description>Modify the version published display properties.</description>
>            <version>1.0.0+</version>
> @@ -163,6 +163,33 @@ under the License.
>            <version>1.0.0+</version>
>            <code>
>              <![CDATA[
> +
> +    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;
>  
>      /**
> @@ -305,10 +332,11 @@ under the License.
>            <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. The default is ISO-8601 yyyy-MM-dd.</description>
> +          <description>Date format to use.</description>
>            <version>1.0.0+</version>
>            <type>String</type>
>            <identifier>true</identifier>
> @@ -328,6 +356,7 @@ under the License.
>            <version>1.0.0+</version>
>            <type>String</type>
>            <identifier>true</identifier>
> +          <defaultValue>left</defaultValue>
>          </field>
>        </fields>
>      </class>
> 
> 


-- 
Dennis Lundberg

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org