com.atlassian.jira.vcs.cvsimpl
Class CvsRepository

java.lang.Object
  extended by com.atlassian.jira.vcs.AbstractRepository
      extended by com.atlassian.jira.vcs.cvsimpl.CvsRepository
All Implemented Interfaces:
Repository, java.lang.Comparable<Repository>

public class CvsRepository
extends AbstractRepository


Field Summary
static long CVS_OPERATION_TIMEOUT_DEFAULT
           
static java.lang.String KEY_BASEDIR
           
static java.lang.String KEY_CVS_ROOT
           
static java.lang.String KEY_CVS_TIMEOUT
           
static java.lang.String KEY_FETCH_LOG
           
static java.lang.String KEY_LOG_FILE_PATH
           
static java.lang.String KEY_MODULE_NAME
           
static java.lang.String KEY_PASSWORD
           
 
Fields inherited from class com.atlassian.jira.vcs.AbstractRepository
description, id, KEY_DESCRIPTION, KEY_NAME, name, updateDelay
 
Fields inherited from interface com.atlassian.jira.vcs.Repository
KEY_REPOSITTORY_BROWSER_TYPE
 
Constructor Summary
CvsRepository(com.opensymphony.module.propertyset.PropertySet propertySet, CvsRepositoryUtil cvsRepositoryUtil)
           
 
Method Summary
 void copyContent(Repository repository)
          Copies the content of the given repository only if it is the same type (CvsRepository).
 boolean equals(java.lang.Object o)
           
 boolean fetchLog()
           
 java.util.List<net.sf.statcvs.model.Commit> getCommitsForIssue(java.lang.String issueKey)
          Return a list of Commit objects
protected  net.sf.statcvs.model.CvsContent getCvsContent()
          Returns the CVS content of this repository.
 java.lang.String getCvsLogFilePath()
           
 java.lang.String getCvsRoot()
           
 long getCvsTimeout()
           
 java.lang.String getCvsTimeoutStringInSeconds()
           
 java.lang.String getModuleName()
           
 java.lang.String getPassword()
           
 java.lang.String getType()
           
 int hashCode()
           
 void setCvsLogFilePath(java.lang.String cvsLogFilePath)
           
 void setCvsRoot(java.lang.String cvsRoot)
           
 void setCvsTimeout(long cvsTimeout)
           
 void setFetchLog(boolean fetchLog)
           
 void setModuleName(java.lang.String moduleName)
           
 void setPassword(java.lang.String password)
           
 java.lang.String toString()
           
 java.lang.String updateCvs()
          Returns the filename where the log has been written.
 void updateRepository()
           
 
Methods inherited from class com.atlassian.jira.vcs.AbstractRepository
compareTo, getDescription, getId, getName, getRepositoryBrowser, getUpdateDelay, setDescription, setId, setName, setRepositoryBrowser, setUpdateDelay
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

KEY_BASEDIR

public static final java.lang.String KEY_BASEDIR
See Also:
Constant Field Values

CVS_OPERATION_TIMEOUT_DEFAULT

public static final long CVS_OPERATION_TIMEOUT_DEFAULT
See Also:
Constant Field Values

KEY_LOG_FILE_PATH

public static final java.lang.String KEY_LOG_FILE_PATH
See Also:
Constant Field Values

KEY_CVS_ROOT

public static final java.lang.String KEY_CVS_ROOT
See Also:
Constant Field Values

KEY_MODULE_NAME

public static final java.lang.String KEY_MODULE_NAME
See Also:
Constant Field Values

KEY_PASSWORD

public static final java.lang.String KEY_PASSWORD
See Also:
Constant Field Values

KEY_FETCH_LOG

public static final java.lang.String KEY_FETCH_LOG
See Also:
Constant Field Values

KEY_CVS_TIMEOUT

public static final java.lang.String KEY_CVS_TIMEOUT
See Also:
Constant Field Values
Constructor Detail

CvsRepository

public CvsRepository(com.opensymphony.module.propertyset.PropertySet propertySet,
                     CvsRepositoryUtil cvsRepositoryUtil)
Method Detail

getCvsLogFilePath

public java.lang.String getCvsLogFilePath()

setCvsLogFilePath

public void setCvsLogFilePath(java.lang.String cvsLogFilePath)

getCvsRoot

public java.lang.String getCvsRoot()

setCvsRoot

public void setCvsRoot(java.lang.String cvsRoot)

getModuleName

public java.lang.String getModuleName()

setModuleName

public void setModuleName(java.lang.String moduleName)

setPassword

public void setPassword(java.lang.String password)

getPassword

public java.lang.String getPassword()

getCvsTimeout

public long getCvsTimeout()

setCvsTimeout

public void setCvsTimeout(long cvsTimeout)

getCvsTimeoutStringInSeconds

public java.lang.String getCvsTimeoutStringInSeconds()

fetchLog

public boolean fetchLog()

setFetchLog

public void setFetchLog(boolean fetchLog)

updateCvs

public java.lang.String updateCvs()
                           throws org.netbeans.lib.cvsclient.command.CommandException,
                                  org.netbeans.lib.cvsclient.connection.AuthenticationException,
                                  java.io.IOException,
                                  LockException
Returns the filename where the log has been written.

Returns:
the filename where the log has been written
Throws:
org.netbeans.lib.cvsclient.command.CommandException - if update of CVS repository fails
org.netbeans.lib.cvsclient.connection.AuthenticationException - if update of CVS repository fails
java.io.IOException - if cannot create file or update of CVS repository fails
LockException - if update of CVS repository fails

getCommitsForIssue

public java.util.List<net.sf.statcvs.model.Commit> getCommitsForIssue(java.lang.String issueKey)
                                                               throws RepositoryException
Return a list of Commit objects

Parameters:
issueKey - issue key
Returns:
List a list of Commit objects
Throws:
RepositoryException - if cannot retrieve commits for given issue

updateRepository

public void updateRepository()
                      throws org.netbeans.lib.cvsclient.command.CommandException,
                             org.netbeans.lib.cvsclient.connection.AuthenticationException,
                             java.io.IOException,
                             LockException,
                             net.sf.statcvs.input.LogSyntaxException
Throws:
org.netbeans.lib.cvsclient.command.CommandException
org.netbeans.lib.cvsclient.connection.AuthenticationException
java.io.IOException
LockException
net.sf.statcvs.input.LogSyntaxException

getType

public java.lang.String getType()

toString

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

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class AbstractRepository

hashCode

public int hashCode()
Overrides:
hashCode in class AbstractRepository

copyContent

public void copyContent(Repository repository)
Copies the content of the given repository only if it is the same type (CvsRepository).

Parameters:
repository - repository to copy the content of
Since:
v3.10

getCvsContent

protected net.sf.statcvs.model.CvsContent getCvsContent()
Returns the CVS content of this repository.

Returns:
the CVS content of this repository, can be null


Copyright © 2002-2010 Atlassian. All Rights Reserved.