public class VersionHelper extends Object
Modifier and Type | Field and Description |
---|---|
static int |
VERSION_12_2_1_4
The encoded 12.2.1.4.0 and 20 versions.
|
static int |
VERSION_12_2_1_4_20 |
static int |
VERSION_12_2_1_4_21 |
static int |
VERSION_12_2_1_6
The encoded 12.2.1.6.0 and 6 versions.
|
static int |
VERSION_12_2_1_6_6 |
static int |
VERSION_12_2_1_6_7 |
static int |
VERSION_14_1_1_0
The encoded 14.1.1.0.0 and 16 versions.
|
static int |
VERSION_14_1_1_0_16 |
static int |
VERSION_14_1_1_0_17 |
static int |
VERSION_14_1_1_2206
The encoded 14.1.1.2206.0, 6 and 7 versions.
|
static int |
VERSION_14_1_1_2206_6 |
static int |
VERSION_14_1_1_2206_7 |
static int |
VERSION_14_1_2_0
The encoded 14.1.2.0.0 version.
|
static int |
VERSION_23_09
The encoded CE 23.09.0 and 1 versions.
|
static int |
VERSION_23_09_1 |
Constructor and Description |
---|
VersionHelper() |
Modifier and Type | Method and Description |
---|---|
static int |
encodeVersion(int nYear,
int nMonth,
int nPatch)
Convert the version elements into a single integer value.
|
static int |
encodeVersion(int nMajor,
int nMinor,
int nMicro,
int nPatchSet,
int nPatch)
Convert the version elements into a single integer value.
|
static int |
getVersionPrefix(int nYear,
int nMonth)
Return the version prefix for a given yy-mm version.
|
static boolean |
isCalendarVersion(int nVersion)
Return
true if the provided part of the version could represent a year. |
static boolean |
isPatchCompatible(int nRequired,
int nActual)
Return
true iff the required and the actual versions provided have
the identical base version, and the actual patch version is greater or equal
to the required patch version. |
static boolean |
isVersionCompatible(int nRequired,
int nActual)
Return
true iff the actual version provided is greater than or equal
to the required version. |
static void |
main(String[] args)
Compare two version strings for compatability.
|
static int |
parseVersion(String sVersion)
Parse the specified version string and generate an internal integer
representation.
|
static void |
resolveFusionAppsPatchSet(int[] anVersion)
This method will map Fusion Apps versions to the correct Coherence version.
|
static int |
resolveFusionAppsPatchSet(int nMajor,
int nMinor,
int nMicro,
int nPatchSet)
Return the actual patch set value to use for a given version.
|
static int[] |
toVersionArray(String sVersion)
Create an array of version elements, where index 0 is "major", 1 is
"minor", ... 4 is "patch".
|
static String |
toVersionString(int nVersion,
boolean fIncludePrefix)
Create a string representation of the specified version in internal
encoding.
|
public static final int VERSION_23_09
public static final int VERSION_23_09_1
public static final int VERSION_14_1_1_2206
public static final int VERSION_14_1_1_2206_6
public static final int VERSION_14_1_1_2206_7
public static final int VERSION_14_1_2_0
public static final int VERSION_14_1_1_0
public static final int VERSION_14_1_1_0_16
public static final int VERSION_14_1_1_0_17
public static final int VERSION_12_2_1_4
public static final int VERSION_12_2_1_4_20
public static final int VERSION_12_2_1_4_21
public static final int VERSION_12_2_1_6
public static final int VERSION_12_2_1_6_6
public static final int VERSION_12_2_1_6_7
public static int encodeVersion(int nYear, int nMonth, int nPatch)
nYear
- the version yearnMonth
- the version monthnPatch
- the version patchpublic static int encodeVersion(int nMajor, int nMinor, int nMicro, int nPatchSet, int nPatch)
nMajor
- the major version numbernMinor
- the minor version numbernMicro
- the micro version numbernPatchSet
- the patch set version numbernPatch
- the patch version numberpublic static int getVersionPrefix(int nYear, int nMonth)
nYear
- the version yearnMonth
- the version monthpublic static boolean isCalendarVersion(int nVersion)
true
if the provided part of the version could represent a year.nVersion
- the version part to checktrue
if the provided part of the version could represent a yearpublic static int parseVersion(String sVersion)
sVersion
- the version string to encodeint
public static int[] toVersionArray(String sVersion)
public static String toVersionString(int nVersion, boolean fIncludePrefix)
public static boolean isVersionCompatible(int nRequired, int nActual)
true
iff the actual version provided is greater than or equal
to the required version.nRequired
- the required version in its encoded formnActual
- the actual version in its encoded formtrue
iff the actual version provided is greater than or equal
to the required versionpublic static boolean isPatchCompatible(int nRequired, int nActual)
true
iff the required and the actual versions provided have
the identical base version, and the actual patch version is greater or equal
to the required patch version.nRequired
- the required version in its encoded formnActual
- the actual version in its encoded formtrue
iff the required and the actual versions provided have
the identical base version, and the actual patch version is greater or equal
to the required patch versionpublic static void resolveFusionAppsPatchSet(int[] anVersion)
anVersion
- the possible FA version to resolve to a Coherence versionpublic static int resolveFusionAppsPatchSet(int nMajor, int nMinor, int nMicro, int nPatchSet)
This method will map Fusion Apps versions to the correct Coherence version.
nMajor
- the major version numbernMinor
- the minor version numbernMicro
- the micro version numbernPatchSet
- the patch set version numberpublic static void main(String[] args)
The first string is the version to test, the second is the version required. If the second version is compatible with the first, then "pass" is displayed otherwise "fail" is displayed.
args
- the two version strings to compare