productVendorName - ProductName - majorVersion.minorVersion.maintVersion [beta] - (buildNumber)
| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private static final int | |
| private static final String | |
| private String | |
| private int | |
| private Boolean | |
| public static final int | |
| private int | |
| private int | |
| private int | |
| private String | |
| private String | |
| private String | |
| private String |
| Access | Constructor and Description |
|---|---|
| private | |
| private | ProductVersionHolder(String productVendorName, String productName, String productTechnologyName, int majorVersion, int minorVersion, int maintVersion, int drdaMaintVersion, String buildNumber, Boolean isBeta)
Create a ProductVersionHolder Please see the documentation for the varient of getProductVesionHolder that takes the same parameters as this for a description of the parameters. |
| Modifier and Type | Method and Description |
|---|---|
| public static String | |
| public String | Returns: the build number for this product.Return the build number for this product. |
| public int | Returns: the build number as an integer if possible,Return the build number as an integer if possible, mapping from the SVN number. |
| public int | Returns: the drda maintenance version numberReturn the drda protocol maintenance version for this minor release. |
| public int | Returns: the fix pack version numberReturn the fix pack version from the maintenance encoding. |
| public int | Returns: the maintenance version numberReturn the encoded maintainence version number. |
| public int | |
| public int | |
| public String | |
| public String | |
| public String | |
| public static ProductVersionHolder | Returns: A valid ProductVersionHolder of null if any of the parameters provided are not valid.The name of the vendor productVendorName, String The name of the product. productName.length()
must be greater than 0. The syntax for a product name is
'productGenus[:productSpecies]'. productName, String The technology name productTechnologyName, int The most significant portion of a 3
part product version. Must be non-negative. majorVersion, int The second portion of a 3 part
product version. Must be non-negative. minorVersion, int The least significant portion of a 3 part
product version. Must be non-negative. maintVersion, int The protocol modification number for minor release. drdaMaintVersion, String The buildNumber for a product. buildNumber, Boolean true iff the product is beta. isBeta)Create a valid ProductVersionHolder. |
| public static ProductVersionHolder | Returns: The ProductVersionHolder or null if a product with the given genus is not available in the caller's environment.The properties object that holds the productVersion
information. p)Get a ProductVersionHolder based on the information in the Properties object provided. |
| public static ProductVersionHolder | Returns: The ProductVersionHolder or null if a product with the given genus is not available in the caller's environment.The genus for the product. productGenus)Get a ProductVersionHolder for a product of a given genus, that is available in the caller's environment. |
| public static ProductVersionHolder | Returns: the product descriptorThe version information propertiesStream)Load the version info from the already opened properties files. |
| public String | Returns: the feature version string, ie. major.minor. (e.g. 5.2)Return the feature version string, ie. |
| public String | Returns: the build version stringIf true, include the build number withBuild)Returns a short-hand value for the product version string. |
| public boolean | |
| public boolean | |
| private Properties | |
| private static int | |
| public final Properties | |
| public static String | Returns: a version string encoding the argumentsMajor version number major, int Minor version number minor, boolean Beta flag isBeta)Convert a major and minor number with beta status into a string. |
| public String | Returns: a string representation of this ProductVersion.Overrides java. |
| ALPHA | back to summary |
|---|---|
| private static final String ALPHA | |
| BAD_NUMBER | back to summary |
|---|---|
| private static final int BAD_NUMBER | |
| BETA | back to summary |
|---|---|
| private static final String BETA | |
| buildNumber | back to summary |
|---|---|
| private String buildNumber | |
| drdaMaintVersion | back to summary |
|---|---|
| private int drdaMaintVersion | |
| isBeta | back to summary |
|---|---|
| private Boolean isBeta | |
| MAINT_ENCODING | back to summary |
|---|---|
| public static final int MAINT_ENCODING | |
| maintVersion | back to summary |
|---|---|
| private int maintVersion | |
| majorVersion | back to summary |
|---|---|
| private int majorVersion | |
| minorVersion | back to summary |
|---|---|
| private int minorVersion | |
| productGenus | back to summary |
|---|---|
| private String productGenus | |
| productName | back to summary |
|---|---|
| private String productName | |
| productTechnologyName | back to summary |
|---|---|
| private String productTechnologyName | |
| productVendorName | back to summary |
|---|---|
| private String productVendorName | |
| ProductVersionHolder | back to summary |
|---|---|
| private ProductVersionHolder() | |
| ProductVersionHolder | back to summary |
|---|---|
| private ProductVersionHolder(String productVendorName, String productName, String productTechnologyName, int majorVersion, int minorVersion, int maintVersion, int drdaMaintVersion, String buildNumber, Boolean isBeta) Create a ProductVersionHolder Please see the documentation for the varient of getProductVesionHolder that takes the same parameters as this for a description of the parameters. | |
| fullVersionString | back to summary |
|---|---|
| public static String fullVersionString(int major, int minor, int maint, boolean isBeta, String build) | |
| getBuildNumber | back to summary |
|---|---|
| public String getBuildNumber() Return the build number for this product.
| |
| getBuildNumberAsInt | back to summary |
|---|---|
| public int getBuildNumberAsInt() Return the build number as an integer if possible, mapping from the SVN number. nnnnn -> returns nnnnn nnnnnM -> returns -nnnnn indicates a modified code base nnnnn:mmmmm -> returns -nnnnn anything else -> returns -1
| |
| getDrdaMaintVersion | back to summary |
|---|---|
| public int getDrdaMaintVersion() Return the drda protocol maintenance version for this minor release. Starts at 0 for each minor release and only incremented when client behaviour changes based on the server version.
| |
| getFixPackVersion | back to summary |
|---|---|
| public int getFixPackVersion() Return the fix pack version from the maintenance encoding.
| |
| getMaintVersion | back to summary |
|---|---|
| public int getMaintVersion() Return the encoded maintainence version number.
| |
| getMajorVersion | back to summary |
|---|---|
| public int getMajorVersion() Return the major version number.
| |
| getMinorVersion | back to summary |
|---|---|
| public int getMinorVersion() Return the minor version number.
| |
| getProductName | back to summary |
|---|---|
| public String getProductName() Return the external product name.
| |
| getProductTechnologyName | back to summary |
|---|---|
| public String getProductTechnologyName() | |
| getProductVendorName | back to summary |
|---|---|
| public String getProductVendorName() Return the product vendor name.
| |
| getProductVersionHolder | back to summary |
|---|---|
| public static ProductVersionHolder getProductVersionHolder(String productVendorName, String productName, String productTechnologyName, int majorVersion, int minorVersion, int maintVersion, int drdaMaintVersion, String buildNumber, Boolean isBeta) Create a valid ProductVersionHolder. If any of the parameters provided is invalid, this returns null.
| |
| getProductVersionHolder | back to summary |
|---|---|
| public static ProductVersionHolder getProductVersionHolder(Properties p) Get a ProductVersionHolder based on the information in the Properties object provided.
| |
| getProductVersionHolderFromMyEnv | back to summary |
|---|---|
| public static ProductVersionHolder getProductVersionHolderFromMyEnv(String productGenus) Get a ProductVersionHolder for a product of a given genus, that is available in the caller's environment. This may fail when the jar the version is being fetched from, is different to the one that loaded this class, AND the jars are in different security contexts.
| |
| getProductVersionHolderFromMyEnv | back to summary |
|---|---|
| public static ProductVersionHolder getProductVersionHolderFromMyEnv(InputStream propertiesStream) Load the version info from the already opened properties files. We need to do this because if the jar files (e.g. db2jtools and db2j) are in different security contexts (entries in the policy files) then we cannot load the version information for one of them correctly. This is because the this class will either have been loaded from only one of the jars and hence can only access the resource in its own jar. By making code specific to the jar open the resource we are guaranteed it will work.
| |
| getSimpleVersionString | back to summary |
|---|---|
| public String getSimpleVersionString() Return the feature version string, ie. major.minor. (e.g. 5.2)
| |
| getVersionBuildString | back to summary |
|---|---|
| public String getVersionBuildString(boolean withBuild) Returns a short-hand value for the product version string. Used by Sysinfo. Includes the optional beta designation
| |
| isAlpha | back to summary |
|---|---|
| public boolean isAlpha() Return true if this is a alpha product.
| |
| isBeta | back to summary |
|---|---|
| public boolean isBeta() Return true if this is a beta product.
| |
| loadProperties | back to summary |
|---|---|
| private Properties loadProperties(String productGenus) | |
| parseInt | back to summary |
|---|---|
| private static int parseInt(String s) Parse a string containing a non-negative integer. Return a negative integer is the String is invalid.
| |
| run | back to summary |
|---|---|
| public final Properties run() | |
| simpleVersionString | back to summary |
|---|---|
| public static String simpleVersionString(int major, int minor, boolean isBeta) Convert a major and minor number with beta status into a string.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Return a string representation of this ProductVersion. The difference between this and createProductVersionString, is that this method retruns a String when this ProductVersionHolder holds invalid version information.
| |