net.sf.bloof.scm.cvsplugin
Class RepositoryLocation

java.lang.Object
  |
  +--net.sf.bloof.scm.cvsplugin.RepositoryLocation

public class RepositoryLocation
extends java.lang.Object

Defines the location of a repository.

Author:
Nicholas Allen, Lukasz Pekacki

Constructor Summary
RepositoryLocation(CvsConnectionMethod aMethod, java.lang.String aUserName, java.lang.String aHostName, java.lang.String aRepositoryPath)
          Creates a CVSRepositoryLocation object using the specified parameters
RepositoryLocation(java.lang.String aLocation)
          Creates a CVSRepositoryLocation object using sLocation as the location.
 
Method Summary
static RepositoryLocation createValidLocation(CvsConnectionMethod aMethod, java.lang.String aUserName, java.lang.String aHostName, java.lang.String aRepositoryPath)
          Creates a RepositoryLocation with asserted valid parameters This method is used internally for local logfile and sample log file access
 CvsConnectionMethod getConnectionMethod()
          Gets the connection method for this location
 java.lang.String getCvsRoot()
          Returns the CVSROOT Representation of this Location
 java.lang.String getHostName()
          Gets the host name.
 java.lang.String getRepositoryPath()
          Gets the path to the repository.
 java.lang.String getUserName()
          Gets the user name.
 void setConnectionMethod(CvsConnectionMethod aMethod)
           
 java.lang.String toString()
          Converts this location to a string of the form: :method:user@host:/path/to/repository
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RepositoryLocation

public RepositoryLocation(CvsConnectionMethod aMethod,
                          java.lang.String aUserName,
                          java.lang.String aHostName,
                          java.lang.String aRepositoryPath)
                   throws InvalidRepositoryLocationException
Creates a CVSRepositoryLocation object using the specified parameters

Parameters:
aMethod - method of connection
aUserName - login of the user
aHostName - name of cvs host
aRepositoryPath - path to CVS repository
Throws:
InvalidRepositoryLocationException - if the specified String does not match

RepositoryLocation

public RepositoryLocation(java.lang.String aLocation)
                   throws InvalidRepositoryLocationException
Creates a CVSRepositoryLocation object using sLocation as the location.

Parameters:
aLocation - the location of the repository. This is of the form:

:method:user@host:/path/to/repository
Throws:
InvalidRepositoryLocationException - if the specified String does not match
Method Detail

createValidLocation

public static RepositoryLocation createValidLocation(CvsConnectionMethod aMethod,
                                                     java.lang.String aUserName,
                                                     java.lang.String aHostName,
                                                     java.lang.String aRepositoryPath)
Creates a RepositoryLocation with asserted valid parameters This method is used internally for local logfile and sample log file access

Parameters:
aMethod - method
aUserName - username
aHostName - hostname
aRepositoryPath - path
Returns:
RepositoryLocation

getConnectionMethod

public CvsConnectionMethod getConnectionMethod()
Gets the connection method for this location

Returns:
CvsConnectionMethod

getCvsRoot

public java.lang.String getCvsRoot()
Returns the CVSROOT Representation of this Location

Returns:
CVSROOT Representation of this Location

getHostName

public java.lang.String getHostName()
Gets the host name.

Returns:
String

getRepositoryPath

public java.lang.String getRepositoryPath()
Gets the path to the repository.

Returns:
String

getUserName

public java.lang.String getUserName()
Gets the user name.

Returns:
String

setConnectionMethod

public void setConnectionMethod(CvsConnectionMethod aMethod)
Parameters:
aMethod - method

toString

public java.lang.String toString()
Converts this location to a string of the form:

:method:user@host:/path/to/repository

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


Copyright © 2003 bloof@Sourceforge. All Rights Reserved.