com.atlassian.jira.vcs.cvsimpl
Class CvsRepositoryUtilImpl

java.lang.Object
  extended by com.atlassian.jira.vcs.cvsimpl.CvsRepositoryUtilImpl
All Implemented Interfaces:
CvsRepositoryUtil

public class CvsRepositoryUtilImpl
extends Object
implements CvsRepositoryUtil


Constructor Summary
CvsRepositoryUtilImpl()
           
 
Method Summary
 void checkCvsRoot(String cvsRoot)
           
 void checkLogFilePath(alt.java.io.File logFile, boolean fetchLog)
          Checks for the validity of the given CVS log file
 org.netbeans.lib.cvsclient.connection.Connection openConnectionToRepository(String cvsRoot, String password)
          Creates a connection to a CVS Repository given a CVS root
 net.sf.statcvs.model.CvsContent parseCvsLogs(alt.java.io.File logFile, String moduleName, String repositoryPath, String repositoryName)
          Parses the commit information form the cvs log
 org.netbeans.lib.cvsclient.CVSRoot parseCvsRoot(String cvsRoot)
           
 void updateCvs(alt.java.io.File logFile, String cvsRoot, String moduleName, String password, long cvsTimeout)
          Fetches the CVS log using the rlog cvs command
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CvsRepositoryUtilImpl

public CvsRepositoryUtilImpl()
Method Detail

checkLogFilePath

public void checkLogFilePath(alt.java.io.File logFile,
                             boolean fetchLog)
                      throws ValidationException
Checks for the validity of the given CVS log file

Specified by:
checkLogFilePath in interface CvsRepositoryUtil
Parameters:
logFile - the location of teh cvs log file
fetchLog - wether the cvs log is fetched into this file
Throws:
ValidationException - if there is a problem. The exception contains a useful error message.

parseCvsLogs

public net.sf.statcvs.model.CvsContent parseCvsLogs(alt.java.io.File logFile,
                                                    String moduleName,
                                                    String repositoryPath,
                                                    String repositoryName)
                                             throws IOException,
                                                    net.sf.statcvs.input.LogSyntaxException,
                                                    LockException
Parses the commit information form the cvs log

Specified by:
parseCvsLogs in interface CvsRepositoryUtil
Parameters:
logFile - the file containing cvs log
moduleName - the name of the module which the cvs log file represents
repositoryPath - the path used in cvs root while obtaining the log
Returns:
CvsContent object represneting the commit information
Throws:
IOException
net.sf.statcvs.input.LogSyntaxException
LockException

updateCvs

public void updateCvs(alt.java.io.File logFile,
                      String cvsRoot,
                      String moduleName,
                      String password,
                      long cvsTimeout)
               throws org.netbeans.lib.cvsclient.connection.AuthenticationException,
                      org.netbeans.lib.cvsclient.command.CommandException,
                      IOException,
                      LockException
Fetches the CVS log using the rlog cvs command

Specified by:
updateCvs in interface CvsRepositoryUtil
Parameters:
logFile - the file where the cvs log will be written
cvsRoot - the string representation of the CVS root
moduleName - the name of the module the log of which we will be retrieving
password - the password for the repository (can be null)
Throws:
org.netbeans.lib.cvsclient.connection.AuthenticationException
org.netbeans.lib.cvsclient.command.CommandException
IOException
LockException

openConnectionToRepository

public org.netbeans.lib.cvsclient.connection.Connection openConnectionToRepository(String cvsRoot,
                                                                                   String password)
                                                                            throws org.netbeans.lib.cvsclient.command.CommandAbortedException,
                                                                                   org.netbeans.lib.cvsclient.connection.AuthenticationException
Description copied from interface: CvsRepositoryUtil
Creates a connection to a CVS Repository given a CVS root

Specified by:
openConnectionToRepository in interface CvsRepositoryUtil
Parameters:
cvsRoot - the string representing a CVS root
Returns:
an unopened connection to CVS repository
Throws:
org.netbeans.lib.cvsclient.command.CommandAbortedException
org.netbeans.lib.cvsclient.connection.AuthenticationException

parseCvsRoot

public org.netbeans.lib.cvsclient.CVSRoot parseCvsRoot(String cvsRoot)
Specified by:
parseCvsRoot in interface CvsRepositoryUtil

checkCvsRoot

public void checkCvsRoot(String cvsRoot)
                  throws ValidationException
Specified by:
checkCvsRoot in interface CvsRepositoryUtil
Throws:
ValidationException


Copyright © 2002-2013 Atlassian. All Rights Reserved.