Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| WebLogic Integration
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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.

Author:
  Copyright © 2000, 2001 BEA Systems, Inc. All Rights Reserved.
See Also:
  Serialized Form

Constructor Summary
`VersionInfo(int majorVersion, int minorVersion, int volume, java.lang.String build, java.lang.String name)` Create a new `VersionInfo` object.
`VersionInfo(int majorVersion, int minorVersion, java.lang.String build, java.lang.String name)` Create a new `VersionInfo` object.
`VersionInfo(java.lang.String version)` Create a new `VersionInfo` object from a string.

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.
`int` | `getVolume()` Return the volume number.
`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").

### VersionInfo

    public VersionInfo(int majorVersion,
                       int minorVersion,
                       int volume,
                       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").
    `volume` - The volume number (e.g., the 3 in "1.2.3"). Used only in volume releases.
    `build` - The build number or name.
    `name` - The release name (e.g. "Chicoutimi").

### VersionInfo

    public VersionInfo(java.lang.String version)

  Create a new `VersionInfo` object from a string.

  Parameters:
    `version` - The version number expressed in Dewey Decimal format (e.g., "1.2.3"). The string can contain between two and four dot-separated integer components, corresponding to the `majorVersion, minorVersion, volume, build` values. If there are three such components, the third is interpreted as the volume number: to specify a build number, supply four tokens (the volume number can be 0).

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.

### getVolume

    public final int getVolume()

  Return the volume number.

  Returns:
    The volume 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.

  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.
  Overrides:
    equals in class java.lang.Object
  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`, `volume` and `build` members, separated by periods (e.g., "1.2.3 SP4"). Volume and build (i.e., Service Pack) are only shown if they are non-zero.

  Returns:
    the version number as a string.
  Overrides:
    toString in class java.lang.Object

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| WebLogic Integration
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

WebLogic Integration (WLI)