Package org.apache.wiki.api

# Class Release

java.lang.Object
org.apache.wiki.api.Release

public final class Release extends 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 final String`
`APPNAME`
This is the default application name.
`static final String`
`BUILD`
The build number/identifier.
`static final int`
`MINORREVISION`
The minor revision.
`static final int`
`REVISION`
The JSPWiki revision.
`static final int`
`VERSION`
The JSPWiki major version.
`static final String`
`VERSTR`
This is the generic version string you should use when printing out the version.

## Method Summary

Modifier and Type
Method
Description
`static 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(String version)`
Returns true, if this version of JSPWiki is newer or equal than what is requested.
`static boolean`
`isOlderOrEqual(String version)`
Returns true, if this version of JSPWiki is older or equal than what is requested.
`static void`
`main(String[] argv)`
Executing this class directly from command line prints out the current version.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### APPNAME

public static final 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 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 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 Details

### getVersionString

public static 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(String version) throws 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:
  `IllegalArgumentException` - If the version string could not be parsed.
Since:
  2.4.57

### isOlderOrEqual

public static boolean isOlderOrEqual(String version) throws 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:
  `IllegalArgumentException` - If the version string could not be parsed.
Since:
  2.4.57

### main

public static void main(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.