Package org.apache.wiki.api
Class Release
- java.lang.Object
-
- org.apache.wiki.api.Release
-
public final class Release extends java.lang.Object
Contains release and version information. You may also invoke this class directly, in which case it prints out the version string. This is a handy way of checking which JSPWiki version you have - just type from a command line:% java -cp JSPWiki.jar org.apache.wiki.api.Release 2.5.38
As a historical curiosity, this is the oldest JSPWiki file. According to the CVS history, it dates from 6.7.2001, and it really hasn't changed much since.
- Since:
- 1.0
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
APPNAME
This is the default application name.static java.lang.String
BUILD
The build number/identifier.static int
MINORREVISION
The minor revision.static int
REVISION
The JSPWiki revision.static int
VERSION
The JSPWiki major version.static java.lang.String
VERSTR
This is the generic version string you should use when printing out the version.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
getVersionString()
This method is useful for templates, because hopefully it will not be inlined, and thus any change to version number does not need recompiling the pages.static boolean
isNewerOrEqual(java.lang.String version)
Returns true, if this version of JSPWiki is newer or equal than what is requested.static boolean
isOlderOrEqual(java.lang.String version)
Returns true, if this version of JSPWiki is older or equal than what is requested.static void
main(java.lang.String[] argv)
Executing this class directly from command line prints out the current version.
-
-
-
Field Detail
-
APPNAME
public static final java.lang.String APPNAME
This is the default application name.- See Also:
- Constant Field Values
-
VERSION
public static final int VERSION
The JSPWiki major version.- See Also:
- Constant Field Values
-
REVISION
public static final int REVISION
The JSPWiki revision.- See Also:
- Constant Field Values
-
MINORREVISION
public static final int MINORREVISION
The minor revision.- See Also:
- Constant Field Values
-
BUILD
public static final java.lang.String BUILD
The build number/identifier. This is a String as opposed to an integer, just so that people can add other identifiers to it. The build number is incremented every time a committer checks in code, and reset when a release is made.If you are a person who likes to build his own releases, we recommend that you add your initials to this identifier (e.g. "13-jj", or "49-aj").
If the build identifier is empty, it is not added.
- See Also:
- Constant Field Values
-
VERSTR
public static final java.lang.String VERSTR
This is the generic version string you should use when printing out the version. It is of the form "VERSION.REVISION.MINORREVISION[-POSTFIX][-BUILD]".- See Also:
- Constant Field Values
-
-
Method Detail
-
getVersionString
public static java.lang.String getVersionString()
This method is useful for templates, because hopefully it will not be inlined, and thus any change to version number does not need recompiling the pages.- Returns:
- The version string (e.g. 2.5.23).
- Since:
- 2.1.26.
-
isNewerOrEqual
public static boolean isNewerOrEqual(java.lang.String version) throws java.lang.IllegalArgumentException
Returns true, if this version of JSPWiki is newer or equal than what is requested.- Parameters:
version
- A version parameter string (a.b.c-something). B and C are optional.- Returns:
- A boolean value describing whether the given version is newer than the current JSPWiki.
- Throws:
java.lang.IllegalArgumentException
- If the version string could not be parsed.- Since:
- 2.4.57
-
isOlderOrEqual
public static boolean isOlderOrEqual(java.lang.String version) throws java.lang.IllegalArgumentException
Returns true, if this version of JSPWiki is older or equal than what is requested.- Parameters:
version
- A version parameter string (a.b.c-something)- Returns:
- A boolean value describing whether the given version is older than the current JSPWiki version
- Throws:
java.lang.IllegalArgumentException
- If the version string could not be parsed.- Since:
- 2.4.57
-
main
public static void main(java.lang.String[] argv)
Executing this class directly from command line prints out the current version. It is very useful for things like different command line tools.Example:
% java org.apache.wiki.api.Release 1.9.26-cvs
- Parameters:
argv
- The argument string. This class takes in no arguments.
-
-