com.sun.messaging
public class Version extends Object
Modifier and Type | Field and Description |
---|---|
static int |
LONG_COPYRIGHT
Deprecated.
|
static int |
MINI_COPYRIGHT
Deprecated.
|
static int |
SHORT_COPYRIGHT
Deprecated.
|
Constructor and Description |
---|
Version()
Constructor for this class
|
Modifier and Type | Method and Description |
---|---|
static int |
compareVersions(int[] s1,
int[] s2)
Deprecated.
|
static int |
compareVersions(String stra,
String strb)
Deprecated.
|
static int |
compareVersions(String verA,
String verB,
boolean ignoreServicePack)
Deprecated.
|
String |
getAbbreviatedProductName()
Deprecated.
|
String |
getBanner(boolean alldata)
Deprecated.
|
String |
getBanner(boolean alldata,
int copyrightType)
Deprecated.
|
String |
getBuildDate()
Deprecated.
|
String |
getBuildMilestone()
Deprecated.
|
String |
getBuildVersion()
Deprecated.
|
String |
getCopyright(int copyrightType)
Deprecated.
|
String |
getHeader()
Deprecated.
|
String |
getHeader(int copyrightType)
Deprecated.
|
String |
getImplementationVersion()
Returns the implementation version of the product example 3.6
|
static int[] |
getIntVersion(String str)
Returns the Version info in the form of an array of integer.
|
String |
getJMSAdminSpiVersion()
Deprecated.
|
String |
getLowerCaseAbbreviatedProductName()
Deprecated.
|
int |
getMajorVersion()
Returns the Major release of the Product version for example if the
release value is 3.6.1 then the major version value will be 3.
|
int |
getMinorVersion()
Returns the Minor release of the Product version for example if
the release value is 3.6.1 then the returned value of minor version will be 6
|
String[] |
getPatchIds()
Deprecated.
|
String |
getPatchString()
Deprecated.
|
String |
getProductCompanyName()
Deprecated.
|
String |
getProductCopyrightDate()
Deprecated.
|
String |
getProductName()
Returns the product name example Oracle GlassFish(tm) Server Message Queue
|
String |
getProductVersion()
Deprecated.
|
Properties |
getProps()
Deprecated.
|
String |
getProtocolVersion()
Deprecated.
|
String |
getReleaseQID()
Deprecated.
|
String |
getShortProductName()
Deprecated.
|
String |
getTargetJMSVersion()
Returns the JMS API version the product implements example 1.1
|
String |
getUserAgent()
Deprecated.
|
String |
getVersion()
Returns the Version info of the product, this string is the concatanated value
of pacakage name, API version, Protocol version, JMS API version, and the patch information.
|
String |
getVersionPackageName()
Deprecated.
|
String |
getVersionProperty(String name)
Deprecated.
|
static void |
main(String[] args)
Deprecated.
|
String |
toString()
Deprecated.
|
static String |
toVersionString(int[] ver)
Deprecated.
|
public static final int MINI_COPYRIGHT
public static final int SHORT_COPYRIGHT
public static final int LONG_COPYRIGHT
public Properties getProps()
public String getProductVersion()
public int getMajorVersion()
public int getMinorVersion()
public String getVersionProperty(String name)
name
- String representing the name of the property whose value is desiredpublic String getBuildMilestone()
public String getBuildDate()
public String getBuildVersion()
public String getProductName()
public String getReleaseQID()
public String getAbbreviatedProductName()
public String getLowerCaseAbbreviatedProductName()
public String getShortProductName()
public String getProductCopyrightDate()
public String getProductCompanyName()
public String getVersionPackageName()
public String getImplementationVersion()
public String getProtocolVersion()
public String getTargetJMSVersion()
public String getUserAgent()
public String toString()
public String getHeader()
public String getHeader(int copyrightType)
copyrightType
- an integer value of the valid copyright type MINI_COPYRIGHT, SHORT_COPYRIGHT, LONG_COPYRIGHTpublic String getCopyright(int copyrightType)
copyrightType
- an integer value of the copyright type valid values are MINI_COPYRIGHT, SHORT_COPYRIGHT, LONG_COPYRIGHTpublic String[] getPatchIds()
public String getPatchString()
public String getJMSAdminSpiVersion()
public String getVersion()
public String getBanner(boolean alldata)
alldata
- a boolean value indicating that is it desired to get a detailed infopublic String getBanner(boolean alldata, int copyrightType)
alldata
- a boolean value indicating whether you want a detailed info(true) or not(false)copyrightType
- an integer representing the copyright for which the banner detail is required
valid values are SHORT_COPYRIGHT, MINI_COPYRIGHT, LONG_COPYRIGHTpublic static int[] getIntVersion(String str) throws NumberFormatException
str
- String representing the product versionNumberFormatException
public static int compareVersions(String stra, String strb)
stra
- representing the version which need to be comparedstrb
- representing the second version string that needs to be compared.public static int compareVersions(String verA, String verB, boolean ignoreServicePack) throws NumberFormatException
verA
- First version stringverB
- Second version stringignoreServicePack
- true to ignore the service pack or patch
levelNumberFormatException
public static int compareVersions(int[] s1, int[] s2)
s1
- the first array of integer representing the versin infos2
- the second array of interger representing the version info that has to be comparedpublic static String toVersionString(int[] ver)
ver
- an array of integer reperesenting the version info int[0]=major int[1]=minor int[2]=micro int[3]=service packpublic static void main(String[] args)
Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.