org.griphyn.cPlanner.classes
Class GlobusVersion

java.lang.Object
  extended by org.griphyn.cPlanner.classes.GlobusVersion

public class GlobusVersion
extends Object

This is a data class that stores the globus version installed and to be used on a particular pool for the gridftp server or the jobmanagers.

Version:
$Revision: 50 $
Author:
Gaurang Mehta gmehta@isi.edu, Karan Vahi vahi@isi.edu

Field Summary
static String MAJOR
          The constant for the major version type.
static String MINOR
          The constant for the minor version type.
private  int mMajorVersion
          This variable defines the major version number.
private  int mMinorVersion
          This variable defines the minor version number.
private  int mPatchVersion
          This variable defines the patch version number.
static String PATCH
          The constant for patche version type.
 
Constructor Summary
GlobusVersion()
          The default constructor.
GlobusVersion(int major, int minor, int patch)
          Constructor to set the version information
GlobusVersion(String version)
          Overloaded constructor for the class;
 
Method Summary
 String getGlobusVersion()
          Returns the Globus version as a dot separated String.
 int getGlobusVersion(String version)
          Returns the version corresponding to a particular version type.
 String toMultiLine()
          Returns the textual description of the contents of GlobusVersion object in the multiline format.
 String toString()
          Returns the textual description of the contents of GlobusVersion object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MAJOR

public static final String MAJOR
The constant for the major version type.

See Also:
Constant Field Values

MINOR

public static final String MINOR
The constant for the minor version type.

See Also:
Constant Field Values

PATCH

public static final String PATCH
The constant for patche version type.

See Also:
Constant Field Values

mMajorVersion

private int mMajorVersion
This variable defines the major version number.


mMinorVersion

private int mMinorVersion
This variable defines the minor version number.


mPatchVersion

private int mPatchVersion
This variable defines the patch version number.

Constructor Detail

GlobusVersion

public GlobusVersion()
The default constructor.


GlobusVersion

public GlobusVersion(String version)
Overloaded constructor for the class;

Parameters:
version - a . separated String denoting the version . e.g. 2.2.4

GlobusVersion

public GlobusVersion(int major,
                     int minor,
                     int patch)
Constructor to set the version information

Parameters:
major - Specifies the Major version number.
minor - Specifies the minor version number.
patch - Specifies the patch version number.
Method Detail

getGlobusVersion

public int getGlobusVersion(String version)
Returns the version corresponding to a particular version type. If an invalid version type is specified then 0 is returned.

Parameters:
version - the String type corresponding to the version that you want.
Returns:
int value corresponding to the version, 0 in case of incorrect version type.
See Also:
MAJOR, MINOR, PATCH

getGlobusVersion

public String getGlobusVersion()
Returns the Globus version as a dot separated String. It is of type major.minor.patch where major, minor and patch are the various version numbers stored in the class.

Returns:
the version a dot separated String.

toMultiLine

public String toMultiLine()
Returns the textual description of the contents of GlobusVersion object in the multiline format.

Returns:
the textual description in multiline format.

toString

public String toString()
Returns the textual description of the contents of GlobusVersion object.

Overrides:
toString in class Object
Returns:
the textual description.


Copyright © 2007 The University of Southern California. All Rights Reserved.