WebLogic Process Integrator Version 1.1

com.bea.wlpi.common
Class VersionInfo

java.lang.Object
  |
  +--com.bea.wlpi.common.VersionInfo

public final class VersionInfo
extends java.lang.Object
implements java.io.Serializable, java.lang.Comparable

Holds information about a version number. Objects of this class are available in both clients and server (via the ServerProperties session bean, and can be compared with each other to determine up/down level compatibility.

Objects of this class override the boolean equals(Object) and implement the comparable interface.

See Also:
Serialized Form

Constructor Summary
VersionInfo(int majorVersion, int minorVersion, java.lang.String build, java.lang.String name)
          Create a new VersionInfo object.
 
Method Summary
 int compareTo(java.lang.Object obj)
          Compare two VersionInfo objects.
 boolean equals(java.lang.Object obj)
          Test two VersionInfo objects for equality.
 java.lang.String getBuild()
          Return the build number or name.
static VersionInfo getDefaultVersion()
          Return the information about the first release of WebLogic Process Integrator.
 int getMajorVersion()
          Return the major version number.
 int getMinorVersion()
          Return the minor version number.
 java.lang.String getName()
          Return the release name.
 java.lang.String toString()
          Return a string representation of the object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VersionInfo

public VersionInfo(int majorVersion,
                   int minorVersion,
                   java.lang.String build,
                   java.lang.String name)
Create a new VersionInfo object.
Parameters:
majorVersion - The major version number (e.g. the 1 in "1.2").
minorVersion - The minor version number (e.g. the 2 in "1.2").
build - The build number or name.
name - The release name (e.g. "Chicoutimi").
Method Detail

getDefaultVersion

public static final VersionInfo getDefaultVersion()
Return the information about the first release of WebLogic Process Integrator.
Returns:
information for "1.0.0 Athabasca"

getMajorVersion

public final int getMajorVersion()
Return the major version number.
Returns:
The major version number as set by the constructor.

getMinorVersion

public final int getMinorVersion()
Return the minor version number.
Returns:
The minor version number as set by the constructor.

getBuild

public final java.lang.String getBuild()
Return the build number or name.
Returns:
The build number or name as set by the constructor.

getName

public final java.lang.String getName()
Return the release name.
Returns:
The release name as set by the constructor.

equals

public boolean equals(java.lang.Object obj)
Test two VersionInfo objects for equality. The comparison is based solely on the major and minor version numbers.
Overrides:
equals in class java.lang.Object
Parameters:
obj - Object with which to compare this one.
Returns:
true if obj is an instance of VersionInfo with the same majorVersion and minorVersion as this one.
See Also:
compareTo(java.lang.Object)

compareTo

public int compareTo(java.lang.Object obj)
Compare two VersionInfo objects.
Specified by:
compareTo in interface java.lang.Comparable
Parameters:
obj - Object with which to compare this one.
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object. The result of detemined by comparing the majorVersion and minorVersion members of the two objects.
Throws:
java.lang.ClassCastException - if o is not an instance of VersionInfo.
See Also:
equals(java.lang.Object)

toString

public java.lang.String toString()
Return a string representation of the object. The string contains the values of the majorVersion, minorVersion and build members, separated by periods (e.g. "1.2.0").
Overrides:
toString in class java.lang.Object
Returns:
the version number as a string.

WebLogic Process Integrator Version 1.1

WebLogic and Process Integrator are trademarks of BEA Systems, Inc.
Copyright (c) 2000 BEA Systems, Inc., 8920 Woodbine Avenue, Suite 400,
Markham, Ontario L3R 9W9 Canada. All rights reserved.