Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.atlassian.bamboo.repository.cvsimpl
Class CVSRepository

    java.lang.Object
      com.atlassian.bamboo.repository.AbstractRepository
          com.atlassian.bamboo.repository.cvsimpl.CVSRepository

All Implemented Interfaces:
  ConvertibleFromConfig, Repository

    public class CVSRepository

extends AbstractRepository

This class provides a CVS implemention of the `Repository` interface.

Field Summary
`static String` | `BUILD_MODULE_BRANCH`
`static String` | `BUILD_MODULE_TRUNK`
`static String` | `CVS_BRANCH`
`static String` | `CVS_MODULE`
`static String` | `CVS_PASSWORD`
`static String` | `CVS_QUIET_PERIOD`
`static String` | `CVS_ROOT`
`static String` | `CVS_VERSION_TYPE`
`static String` | `KEY`
`static String` | `NAME`

Fields inherited from class com.atlassian.bamboo.repository.AbstractRepository
`BUILD_TRIGGER_IP, WEB_REPO_MODULE_NAME, WEB_REPO_URL`

Fields inherited from interface com.atlassian.bamboo.repository.Repository
`REPOSIORTY_TYPE, UNKNOWN_HOST`

Constructor Summary
`CVSRepository()`

Method Summary
`void` | `addDefaultValues(BuildConfiguration buildConfiguration)`
`int` | `compareTo(Object obj)`
`boolean` | `equals(Object o)`
`void` | `getAllSourceCode(Build build)` Clean and re-get all the build source code from the repository.
`String` | `getBranchName()`
`Collection` | `getChangesSinceLastBuild(Build build, Date lastBuildStartTime)` Obtain the number of changes that have been made to the build since the build was last executed.
`String` | `getCvsRoot()`
`String` | `getEncryptedPassword()`
`String` | `getHost()` What's the repostory server host
`String` | `getKey()`
`String` | `getModule()`
`String` | `getName()`
`String` | `getPassword()`
`int` | `getQuietPeriod()`
`File` | `getSourceCodeDirectory(Build build)` CVS checks out the source into the a subdirectory (named after the build) in the working directory
`String` | `getUrl()`
`String` | `getWebRepositoryUrl()` What's the repository's web url
`String` | `getWebRepositoryUrlForDiff(CommitFile file)`
`String` | `getWebRepositoryUrlForFile(CommitFile file)` Return a link to the given file on a viewcvs web server.
`String` | `getWebRepositoryUrlForRevision(CommitFile file)`
`String` | `getWebRepositoryUrlRepoName()` What's the repository's web url repository
`int` | `hashCode()`
`boolean` | `isRepositoryDifferent(Repository repository)` Checks if the current repo is the same or not and sets the referencesDifferentRepository flag accordingly
`void` | `populateFromConfig(HierarchicalConfiguration config)` Update the current object with data in the `FieldValueItemHolder`
`void` | `setBranchName(String branchName)`
`void` | `setCvsRoot(String cvsRoot)`
`void` | `setEncryptedPassword(String encryptedPassword)`
`void` | `setModule(String moduleName)`
`void` | `setPassword(String password)`
`void` | `setQuietPeriod(int i)`
`void` | `setQuietPeriod(String quietPeriod)` Defines the quiet period for this build (in seconds)
`void` | `setWebRepositoryUrl(String url)` Where should we link to to show build file changes?
`void` | `setWebRepositoryUrlRepoName(String repoName)` This is used to identify the repository on multi-repository configurations.
`HierarchicalConfiguration` | `toConfiguration()` Generate a `FieldValueItemHolder` from the current state of the object
`ErrorCollection` | `validate()` Ensure we have the been initialised with the mandatory settings This is called from the build form.
`ErrorCollection` | `validate(BuildConfiguration buildConfiguration)`

Methods inherited from class com.atlassian.bamboo.repository.AbstractRepository
`addPasswordToCvsRoot, createStringFromList, getLabel, getTriggerIpAddress, getWorkingDirectory, hasWebBasedRepositoryAccess, isProcessingRepositoryRequest, referencesDifferentRepository, setLabel, setProcessingRepositoryRequest, setReferencesDifferentRepository, setTriggerIpAddress, setWorkingDir, updateAectIfRepositoryHasChanged`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### NAME

    public static final String NAME

See Also:
  Constant Field Values

### KEY

    public static final String KEY

See Also:
  Constant Field Values

### CVS_VERSION_TYPE

    public static final String CVS_VERSION_TYPE

See Also:
  Constant Field Values

### BUILD_MODULE_TRUNK

    public static final String BUILD_MODULE_TRUNK

See Also:
  Constant Field Values

### BUILD_MODULE_BRANCH

    public static final String BUILD_MODULE_BRANCH

See Also:
  Constant Field Values

### CVS_ROOT

    public static final String CVS_ROOT

See Also:
  Constant Field Values

### CVS_PASSWORD

    public static final String CVS_PASSWORD

See Also:
  Constant Field Values

### CVS_QUIET_PERIOD

    public static final String CVS_QUIET_PERIOD

See Also:
  Constant Field Values

### CVS_MODULE

    public static final String CVS_MODULE

See Also:
  Constant Field Values

### CVS_BRANCH

    public static final String CVS_BRANCH

See Also:
  Constant Field Values

Constructor Detail

### CVSRepository

    public CVSRepository()

Method Detail

### getKey

    public String getKey()

### getName

    public String getName()

### getUrl

    public String getUrl()

### getChangesSinceLastBuild

    public Collection getChangesSinceLastBuild(Build build,
                                               Date lastBuildStartTime)
                                        throws RepositoryException

  Obtain the number of changes that have been made to the build since the build was last executed. Once it finds a change, it keeps checking for changes until there are no changes within the changeDetectQuietPeriod.

  Parameters:
    `build` - The build we're checking
    `lastBuildStartTime` - The last time the build was built.
  Returns:
    A collection of `ChangeLogEntry` objects.
  Throws:
    `RepositoryException` - Something went wrong

### getAllSourceCode

    public void getAllSourceCode(Build build)
                          throws RepositoryException

  Clean and re-get all the build source code from the repository.

  Parameters:
    `build` -
  Throws:
    `RepositoryException` - Failed to clean the code

### validate

    public ErrorCollection validate()

  Ensure we have the been initialised with the mandatory settings

  This is called from the build form.

  Returns:
    The collection of configuration errors, to be reported back to the GUI

### validate

    public ErrorCollection validate(BuildConfiguration buildConfiguration)

### addDefaultValues

    public void addDefaultValues(BuildConfiguration buildConfiguration)

  Specified by:
    `addDefaultValues` in interface `Repository`
  Overrides:
    `addDefaultValues` in class `AbstractRepository`

### getWebRepositoryUrl

    public String getWebRepositoryUrl()

  Description copied from interface: `Repository`
  What's the repository's web url

  Returns:
    The url

### getWebRepositoryUrlRepoName

    public String getWebRepositoryUrlRepoName()

  Description copied from interface: `Repository`
  What's the repository's web url repository

  Returns:
    The repository (only used in multi-build repositories). Null if not used.

### getWebRepositoryUrlForFile

    public String getWebRepositoryUrlForFile(CommitFile file)

  Return a link to the given file on a viewcvs web server.

  Parameters:
    `file` - The file that has been modified
  Returns:
    The url

### getWebRepositoryUrlForDiff

    public String getWebRepositoryUrlForDiff(CommitFile file)

### getWebRepositoryUrlForRevision

    public String getWebRepositoryUrlForRevision(CommitFile file)

### getHost

    public String getHost()

  Description copied from interface: `Repository`
  What's the repostory server host

  Returns:
    The host!

### isRepositoryDifferent

    public boolean isRepositoryDifferent(Repository repository)

  Description copied from interface: `Repository`
  Checks if the current repo is the same or not and sets the referencesDifferentRepository flag accordingly

### setWebRepositoryUrl

    public void setWebRepositoryUrl(String url)

  Description copied from interface: `Repository`
  Where should we link to to show build file changes?

  Parameters:
    `url` - The url of the repositories web interface

### setWebRepositoryUrlRepoName

    public void setWebRepositoryUrlRepoName(String repoName)

  Description copied from interface: `Repository`
  This is used to identify the repository on multi-repository configurations.

  Parameters:
    `repoName` - The name of the repository we are viewing

### getSourceCodeDirectory

    public File getSourceCodeDirectory(Build build)

  CVS checks out the source into the a subdirectory (named after the build) in the working directory

  Specified by:
    `getSourceCodeDirectory` in interface `Repository`
  Overrides:
    `getSourceCodeDirectory` in class `AbstractRepository`
  Parameters:
    `build` - The build we're checking out
  Returns:
    The location of the source code files

### getModule

    public String getModule()

### setModule

    public void setModule(String moduleName)

### getBranchName

    public String getBranchName()

### setBranchName

    public void setBranchName(String branchName)

### getPassword

    public String getPassword()

### setPassword

    public void setPassword(String password)

### setQuietPeriod

    public void setQuietPeriod(String quietPeriod)

  Defines the quiet period for this build (in seconds)

  Parameters:
    `quietPeriod` - the number of seconds to wait for more checkins

### setQuietPeriod

    public void setQuietPeriod(int i)

### getQuietPeriod

    public int getQuietPeriod()

### getCvsRoot

    public String getCvsRoot()

### setCvsRoot

    public void setCvsRoot(String cvsRoot)

### getEncryptedPassword

    public String getEncryptedPassword()

### setEncryptedPassword

    public void setEncryptedPassword(String encryptedPassword)

### populateFromConfig

    public void populateFromConfig(HierarchicalConfiguration config)

  Description copied from interface: `ConvertibleFromConfig`
  Update the current object with data in the `FieldValueItemHolder`

### toConfiguration

    public HierarchicalConfiguration toConfiguration()

  Description copied from interface: `ConvertibleFromConfig`
  Generate a `FieldValueItemHolder` from the current state of the object

  Returns:
    Always returns an `FieldValueItemHolder`. Never null

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

### equals

    public boolean equals(Object o)

  Overrides:
    `equals` in class `Object`

### compareTo

    public int compareTo(Object obj)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006 Atlassian Software Systems. All Rights Reserved.