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, Comparable<Repository>

public class CvsRepository
extends AbstractRepository


Field Summary
static long CVS_OPERATION_TIMEOUT_DEFAULT
           
static String KEY_BASEDIR
           
static String KEY_CVS_ROOT
           
static String KEY_CVS_TIMEOUT
           
static String KEY_FETCH_LOG
           
static String KEY_LOG_FILE_PATH
           
static String KEY_MODULE_NAME
           
static 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(Object o)
           
 boolean fetchLog()
           
 List<net.sf.statcvs.model.Commit> getCommitsForIssue(String issueKey)
          Return a list of Commit objects
protected  net.sf.statcvs.model.CvsContent getCvsContent()
          Returns the CVS content of this repository.
 String getCvsLogFilePath()
           
 String getCvsRoot()
           
 long getCvsTimeout()
           
 String getCvsTimeoutStringInSeconds()
           
 String getModuleName()
           
 String getPassword()
           
 String getType()
           
 int hashCode()
           
 void setCvsLogFilePath(String cvsLogFilePath)
           
 void setCvsRoot(String cvsRoot)
           
 void setCvsTimeout(long cvsTimeout)
           
 void setFetchLog(boolean fetchLog)
           
 void setModuleName(String moduleName)
           
 void setPassword(String password)
           
 String toString()
           
 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 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 String KEY_LOG_FILE_PATH
See Also:
Constant Field Values

KEY_CVS_ROOT

public static final String KEY_CVS_ROOT
See Also:
Constant Field Values

KEY_MODULE_NAME

public static final String KEY_MODULE_NAME
See Also:
Constant Field Values

KEY_PASSWORD

public static final String KEY_PASSWORD
See Also:
Constant Field Values

KEY_FETCH_LOG

public static final String KEY_FETCH_LOG
See Also:
Constant Field Values

KEY_CVS_TIMEOUT

public static final 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 String getCvsLogFilePath()

setCvsLogFilePath

public void setCvsLogFilePath(String cvsLogFilePath)

getCvsRoot

public String getCvsRoot()

setCvsRoot

public void setCvsRoot(String cvsRoot)

getModuleName

public String getModuleName()

setModuleName

public void setModuleName(String moduleName)

setPassword

public void setPassword(String password)

getPassword

public String getPassword()

getCvsTimeout

public long getCvsTimeout()

setCvsTimeout

public void setCvsTimeout(long cvsTimeout)

getCvsTimeoutStringInSeconds

public String getCvsTimeoutStringInSeconds()

fetchLog

public boolean fetchLog()

setFetchLog

public void setFetchLog(boolean fetchLog)

updateCvs

public String updateCvs()
                 throws org.netbeans.lib.cvsclient.command.CommandException,
                        org.netbeans.lib.cvsclient.connection.AuthenticationException,
                        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
IOException - if cannot create file or update of CVS repository fails
LockException - if update of CVS repository fails

getCommitsForIssue

public List<net.sf.statcvs.model.Commit> getCommitsForIssue(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,
                             IOException,
                             LockException,
                             net.sf.statcvs.input.LogSyntaxException
Throws:
org.netbeans.lib.cvsclient.command.CommandException
org.netbeans.lib.cvsclient.connection.AuthenticationException
IOException
LockException
net.sf.statcvs.input.LogSyntaxException

getType

public String getType()

toString

public String toString()
Overrides:
toString in class AbstractRepository

equals

public boolean equals(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-2013 Atlassian. All Rights Reserved.