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

## org.jasig.portal.tools.versioning
Class Version

    java.lang.Object
      org.jasig.portal.tools.versioning.Version

    public class Version

extends java.lang.Object

Represents the version of a specific unit of code that is currently installed in the portal. The unit of code is represented by its functional name. For the portal codebase this functional name uses the value of the IPermission interface, PORTAL_FRAMEWORK variable which currently is "UP_FRAMEWORK". The version of a specific piece of code is represented by three integers. In most significant order these are Major, Minor, and Micro.

Version:
  $Revision: 1.3 $
Author:
  Mark Boyd

Field Summary
`private java.lang.String` | `description`
`private java.lang.String` | `fname`
`private int` | `major`
`private int` | `micro`
`private int` | `minor`

Constructor Summary
`Version(java.lang.String fname, java.lang.String description, int major, int minor, int micro)` Only the versioning package classes are expected to create these objects.

Method Summary
`boolean` | `equals(java.lang.Object obj)` Returns true of the passed in object is a Version object and the functional names of the objects are equal and the version numbers within this class are equal to those of the passed in version object.
`boolean` | `equalTo(Version v)` Returns true of the version represented by this class is equal to that represented by the passed in version object.
`java.lang.String` | `getDescription()` Returns the description of the unit of code for which this object represents the version of this code that is currently installed in the portal.
`java.lang.String` | `getFname()` Returns the functional name of the unit of code for which this object represents the version of this code that is currently installed in the portal.
`int` | `getMajor()` The major version of the code represented by this object.
`int` | `getMicro()` The micro version of the code represented by this object.
`int` | `getMinor()` The minor version of the code represented by this object.
`boolean` | `greaterThan(Version v)` Returns true of the version represented by this class is greater than that represented by the passed in version object.
`boolean` | `lessThan(Version v)` Returns true of the version represented by this class is less than that represented by the passed in version object.
`java.lang.String` | `toString()` Returns a string representation of the version.

Methods inherited from class java.lang.Object
`clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### fname

    private java.lang.String fname

### description

    private java.lang.String description

### major

    private int major

### minor

    private int minor

### micro

    private int micro

Constructor Detail

### Version

    public Version(java.lang.String fname,
                   java.lang.String description,
                   int major,
                   int minor,
                   int micro)

  Only the versioning package classes are expected to create these objects.

  Parameters:
    `fname` - the functional name of the code being represented
    `major` - the major version of this code
    `minor` - the minor version of this code
    `micro` - the micro version of this code

Method Detail

### getFname

    public java.lang.String getFname()

  Returns the functional name of the unit of code for which this object represents the version of this code that is currently installed in the portal.

  Returns:
    String

### getDescription

    public java.lang.String getDescription()

  Returns the description of the unit of code for which this object represents the version of this code that is currently installed in the portal.

  Returns:
    String

### getMajor

    public int getMajor()

  The major version of the code represented by this object.

  Returns:
    int

### getMinor

    public int getMinor()

  The minor version of the code represented by this object.

  Returns:
    int

### getMicro

    public int getMicro()

  The micro version of the code represented by this object.

  Returns:
    int

### toString

    public java.lang.String toString()

  Returns a string representation of the version. The format is: : ..

  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    java.lang.String

### equals

    public boolean equals(java.lang.Object obj)

  Returns true of the passed in object is a Version object and the functional names of the objects are equal and the version numbers within this class are equal to those of the passed in version object.

  Overrides:
    `equals` in class `java.lang.Object`
  Parameters:
    `obj` - a Version object to be compared to this one
  Returns:
    boolean true if the above conditions are met

### equalTo

    public boolean equalTo(Version v)

  Returns true of the version represented by this class is equal to that represented by the passed in version object. The functional name is not queried for this evaluation. Only version numbers are compared.

  Parameters:
    `v` - the version to be compared with this version
  Returns:
    boolean true if this version is equal to the passed in version

### lessThan

    public boolean lessThan(Version v)

  Returns true of the version represented by this class is less than that represented by the passed in version object. The functional name is not queried for this evaluation. Only version numbers are compared.

  Parameters:
    `v` - the version to be compared with this version
  Returns:
    boolean true if this version is less than to the passed in version

### greaterThan

    public boolean greaterThan(Version v)

  Returns true of the version represented by this class is greater than that represented by the passed in version object. The functional name is not queried for this evaluation. Only version numbers are compared.

  Parameters:
    `v` - the version to be compared with this version
  Returns:
    boolean true if this version is greater than to the passed in version

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