public final class Release extends Object
% java -cp JSPWiki.jar org.apache.wiki.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.
Modifier and Type | Field and Description |
---|---|
static String |
APPNAME
This is the default application name.
|
static 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 String |
VERSTR
This is the generic version string you should use when printing out the version.
|
Modifier and Type | Method and 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.
|
public static final String APPNAME
public static final int VERSION
public static final int REVISION
public static final int MINORREVISION
public static final String BUILD
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.
public static String getVersionString()
public static boolean isNewerOrEqual(String version) throws IllegalArgumentException
version
- A version parameter string (a.b.c-something). B and C are optional.IllegalArgumentException
- If the version string could not be parsed.public static boolean isOlderOrEqual(String version) throws IllegalArgumentException
version
- A version parameter string (a.b.c-something)IllegalArgumentException
- If the version string could not be parsed.public static void main(String[] argv)
Example:
% java org.apache.wiki.Release 1.9.26-cvs
argv
- The argument string. This class takes in no arguments.Copyright © 2001-2019 The Apache Software Foundation. All rights reserved.