version"

From Documentation
m
m
Line 8: Line 8:
 
  </version>
 
  </version>
  
It specifies the version of this language definition or addon. It also controls whether to ignore this document. It is optional.
+
[Optional]
 +
 
 +
It specifies the version of this language definition or addon. It also controls whether to ignore this document.
  
 
First, ZK checks if the specified class (&lt;version-calss&gt;) matches the version (&lt;version-uuid&gt;). Second, it checks if ZK's version is the same or larger than the version specified in &lt;zk-version&gt;.
 
First, ZK checks if the specified class (&lt;version-calss&gt;) matches the version (&lt;version-uuid&gt;). Second, it checks if ZK's version is the same or larger than the version specified in &lt;zk-version&gt;.
  
The specified class, if any, must have a static field called <tt>UUID</tt>. ZK will compare its value with the version specified in &lt;version-uuid&gt;.
+
The specified class, if any, must have a static field called <tt>UUID</tt>. ZK will compare its value with the version specified in &lt;version-uuid&gt;. For example,
 +
 
 +
<source lang="java">
 +
package foo;
 +
public class MyAddon {
 +
    public static public static final String UID = "1.0.3";
 +
}
 +
</source>
  
Example,
+
Then, you could specify it as follows.
  
 
<source lang="xml">
 
<source lang="xml">
 
<version>
 
<version>
<version-class>org.zkoss.zkmax.Version</version-class>
+
<version-class>foo.MyAddon</version-class>
<version-uid>5.0.5</version-uid>
+
<version-uid>1.0.3</version-uid>
 
<zk-version>5.0.0</zk-version>
 
<zk-version>5.0.0</zk-version>
 
</version>
 
</version>
 
</source>
 
</source>
  
which means <javadoc method="UUID">org.zkoss.zkmax.Version</javadoc> must be 5.0.5, and <javadoc method="getVersion()" type="interface">org.zkoss.zk.ui.WebApp</javadoc> must be 5.0.0 or later.
+
which means <tt>foo.MyAddon.UID</tt> must be 1.0.3, and <javadoc method="getVersion()" type="interface">org.zkoss.zk.ui.WebApp</javadoc> must be 5.0.0 or later.
  
 
=Version History=
 
=Version History=

Revision as of 07:30, 21 December 2010


Syntax:

<version>
   <version-class>a_class</version-class>
   <version-uuid>a_version</version-uuid>
   <zk-version>a_version</zk-version>
</version>
[Optional]

It specifies the version of this language definition or addon. It also controls whether to ignore this document.

First, ZK checks if the specified class (<version-calss>) matches the version (<version-uuid>). Second, it checks if ZK's version is the same or larger than the version specified in <zk-version>.

The specified class, if any, must have a static field called UUID. ZK will compare its value with the version specified in <version-uuid>. For example,

package foo;
public class MyAddon {
    public static public static final String UID = "1.0.3";
}

Then, you could specify it as follows.

<version>
	<version-class>foo.MyAddon</version-class>
	<version-uid>1.0.3</version-uid>
	<zk-version>5.0.0</zk-version>
</version>

which means foo.MyAddon.UID must be 1.0.3, and WebApp.getVersion() must be 5.0.0 or later.

Version History

Last Update : 2010/12/21


Version Date Content
     



Last Update : 2010/12/21

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.