allensoft.javacvs.client
Class RepositoryDetails

java.lang.Object
  |
  +--allensoft.javacvs.client.RepositoryDetails

public class RepositoryDetails
extends java.lang.Object

Defines details about how to connect to a repository given its location. A CVS repository location does not fully define how to connect to a repository for the ext or server connection methods. For example, what is the external command that should be executed? Should RSH or SSH be used? Because of this, this class defines these extra details when the ext or server is used. It also allows a name to be associated with the connection details thus allowing the user to refer to the settings by a simpler, or more obvious, name. This is much more flexible than the standard CVS way of doing it where the CVS_RSH environment variable must be set as this is global to all ext repositories whereas it is possible to specify this for individual repository locations using this approach.


Inner Class Summary
static class RepositoryDetails.ExtConnectionType
          Defines possible connection types when using the ext or server connection methods.
static class RepositoryDetails.InvalidRepositoryDetailsException
          Excpetion thrown for when repository details are added using the add method.
 
Method Summary
static RepositoryDetails add(java.lang.String sName, RepositoryLocation location, RepositoryDetails.ExtConnectionType extConnectionType, java.lang.String sExtCommand)
          Adds a new repository details to the list.
static RepositoryDetails get(int i)
           
static RepositoryDetails get(RepositoryLocation location)
           
static RepositoryDetails get(java.lang.String sName)
           
static int getCount()
           
 RepositoryDetails.ExtConnectionType getExtConnectionType()
           
 java.lang.String getExternalCommand()
           
 java.lang.String getName()
           
 RepositoryLocation getRepositoryLocation()
           
static void remove(RepositoryDetails details)
           
static void removeAll()
           
static void save()
          Saves the repository details database.
 void setExtConnectionType(RepositoryDetails.ExtConnectionType type)
           
 void setExternalCommand(java.lang.String sCommand)
           
 void setRepositoryLocation(RepositoryLocation location)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

save

public static void save()
                 throws allensoft.javacvs.client.TransformerException
Saves the repository details database.

getCount

public static int getCount()

get

public static RepositoryDetails get(int i)

get

public static RepositoryDetails get(RepositoryLocation location)

get

public static RepositoryDetails get(java.lang.String sName)

add

public static RepositoryDetails add(java.lang.String sName,
                                    RepositoryLocation location,
                                    RepositoryDetails.ExtConnectionType extConnectionType,
                                    java.lang.String sExtCommand)
                             throws RepositoryDetails.InvalidRepositoryDetailsException
Adds a new repository details to the list. This is the only way of creating a new repository details.
Throws:
RepositoryDetails.InvalidRepositoryDetailsException - if there is a problem adding the details.

remove

public static void remove(RepositoryDetails details)

removeAll

public static void removeAll()

getName

public java.lang.String getName()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getRepositoryLocation

public RepositoryLocation getRepositoryLocation()

setRepositoryLocation

public void setRepositoryLocation(RepositoryLocation location)

getExtConnectionType

public RepositoryDetails.ExtConnectionType getExtConnectionType()

setExtConnectionType

public void setExtConnectionType(RepositoryDetails.ExtConnectionType type)

getExternalCommand

public java.lang.String getExternalCommand()

setExternalCommand

public void setExternalCommand(java.lang.String sCommand)