com.hungry.javacvs.util
Class CVSRoot

java.lang.Object
  |
  +--com.hungry.javacvs.util.CVSRoot

public class CVSRoot
extends java.lang.Object

This class corresponds to the CVSROOT variable. It has access methods to get all the useful information out of the CVSROOT.


Field Summary
static int JSERVER_METHOD
          corresponds to CVSROOTs with :jserver:
static int KSERVER_METHOD
          corresponds to CVSROOTs with :kserver:
static int PSERVER_METHOD
          corresponds to CVSROOTs with :pserver:
static int SERVER_METHOD
          corresponds to CVSROOTs without any of the above patterns.
 
Constructor Summary
CVSRoot(java.lang.String root)
          Construct a CVSRoot corresponding to the given CVSROOT spec.
 
Method Summary
 java.lang.String getLogin()
          Returns the user's login
 int getMethod()
          Returns the access method
 java.lang.String getRootDir()
          Returns the server-side root directory for
 java.lang.String getServer()
          Returns the server hostname
static java.lang.String methodToString(int method)
          Converts from a *_METHOD constant to its corresponding string.
static int stringToMethod(java.lang.String method)
          Converts from the string of type "pserver" to one of the *_METHOD constants
 java.lang.String toString()
          Converts the CVSRoot to the form from which it was parsed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PSERVER_METHOD

public static final int PSERVER_METHOD
corresponds to CVSROOTs with :pserver:

JSERVER_METHOD

public static final int JSERVER_METHOD
corresponds to CVSROOTs with :jserver:

KSERVER_METHOD

public static final int KSERVER_METHOD
corresponds to CVSROOTs with :kserver:

SERVER_METHOD

public static final int SERVER_METHOD
corresponds to CVSROOTs without any of the above patterns.
Constructor Detail

CVSRoot

public CVSRoot(java.lang.String root)
        throws CVSBadCVSRootError
Construct a CVSRoot corresponding to the given CVSROOT spec.
Parameters:
root - the CVSROOT string
Throws:
CVSBadCVSRootError - the CVSROOT was invalid.
Method Detail

getMethod

public int getMethod()
Returns the access method

getRootDir

public java.lang.String getRootDir()
Returns the server-side root directory for

getServer

public java.lang.String getServer()
Returns the server hostname

getLogin

public java.lang.String getLogin()
Returns the user's login

stringToMethod

public static int stringToMethod(java.lang.String method)
Converts from the string of type "pserver" to one of the *_METHOD constants

methodToString

public static java.lang.String methodToString(int method)
Converts from a *_METHOD constant to its corresponding string.

toString

public java.lang.String toString()
Converts the CVSRoot to the form from which it was parsed.
Overrides:
toString in class java.lang.Object