public class Versions extends Object
Modifier and Type | Method and Description |
---|---|
static long |
getBeansVersionNumber()
Gets the "beans" software version number, as a long.
|
static String |
getBeansVersionString()
Gets the "beans" software version number.
|
static int |
getComponentValue(String version,
int segment)
Gets the value of a specified segment of a version number.
|
static long |
getMaximumSchemaVersionNumber()
Gets the maximum schema version number that is compatible with the
software version, as a long.
|
static String |
getMaximumSchemaVersionString()
Gets the maximum schema version number that is compatible with the
software version.
|
static long |
getMinimumIfsCredentialManagerVersionNumber()
Gets the minimum allowed
IfsCredentialManager version number , as a long. |
static String |
getMinimumIfsCredentialManagerVersionString()
Gets the minimum allowed
IfsCredentialManager version number . |
static long |
getMinimumSchemaVersionNumber()
Gets the minimum schema version number that is compatible with the
software version, as a long.
|
static String |
getMinimumSchemaVersionString()
Gets the minimum schema version number that is compatible with the
software version.
|
static long |
getServerVersionNumber()
Gets the "server" software version number, as a long.
|
static String |
getServerVersionString()
Gets the "server" software version number.
|
static String |
getSignificantVersion(String version,
int number)
Gets the version number corresponding to the
number
left-most segments of the specified version number. |
static void |
main(String[] args)
This main method is used in ANT targets to retrieve the different versions
directly from the API.
|
static String |
setComponentValue(String version,
int segment,
int value)
For a specified version number, returns the version number obtained
by updating one of its segments to the specified value.
|
static long |
versionStringToLong(String version)
For a specified version number, returns a long-valued representation.
|
public static String getServerVersionString()
public static long getServerVersionNumber()
public static String getBeansVersionString()
public static long getBeansVersionNumber()
public static String getMinimumSchemaVersionString()
public static long getMinimumSchemaVersionNumber()
public static String getMaximumSchemaVersionString()
public static long getMaximumSchemaVersionNumber()
public static String getMinimumIfsCredentialManagerVersionString()
IfsCredentialManager version number
.public static long getMinimumIfsCredentialManagerVersionNumber()
IfsCredentialManager version number
, as a long.public static String getSignificantVersion(String version, int number)
number
left-most segments of the specified version number.
For example, for version="1.0.8.3.7"
and
number=3
, returns "1.0.8.0.0
".
Returns an empty string if number
is zero or less.
version
- the version numbernumber
- the number of significant segmentsnumber
left-most segmentspublic static int getComponentValue(String version, int segment)
For example, for version="1.0.8.3.7"
, the third segment's
value is 8.
version
- the version numbersegment
- the desired segmentsegment
or version
are invalidpublic static String setComponentValue(String version, int segment, int value)
version="1.0.8.3.7"
, segment=2
,
and value=4
, returns "1.4.8.3.7
".version
- the version numbersegment
- the segment to updatevalue
- the new value of that segmentpublic static long versionStringToLong(String version)
The long representation is computed by concatenating the value of each segment left-padded with zeros to three digits.
For example, for version="10.1.0.33.5"
, returns
10001000033005.
IllegalArgumentException
- if the version number is invalidpublic static void main(String[] args)
args
- Copyright © 2023. All rights reserved.