com.atlassian.bamboo.repository.svn
Class SvnRepository

java.lang.Object
  extended by com.atlassian.bamboo.v2.build.BaseBuildConfigurationAwarePlugin
      extended by com.atlassian.bamboo.v2.build.BaseConfigurablePlugin
          extended by com.atlassian.bamboo.repository.AbstractRepository
              extended by com.atlassian.bamboo.repository.AbstractStandaloneRepository
                  extended by com.atlassian.bamboo.repository.svn.SvnRepository
All Implemented Interfaces:
ConvertibleFromConfig, InitablePluginModule, AdvancedConfigurationAwareRepository, BranchAwareRepository, BranchDetectionCapableRepository, BranchInformationProvider, BranchingAwareRepository, CachingAwareRepository, CommitIsolationAwareRepository, CustomRevisionDataAwareRepository, CustomVariableProviderRepository, DeploymentAwareRepository, FilterChangesetAwareRepository, IncludeExcludeAwareRepository, InitialBuildAwareRepository, MandatoryCleanCheckoutAwareRepository, MavenPomAccessorCapableRepository, OnceOffCapableRepository, QuietPeriodAwareRepository, Repository, SelectableAuthenticationRepository, StandaloneRepository, TaggingAwareRepository, DescriptionProvider, NameProvider, BambooPluginModule, BuildConfigurationAwarePlugin, ConfigurablePlugin, RenderableBuildConfiguration, CustomSourceDirectoryAwareRepository, RepositoryEventAware, RepositoryV2, Serializable

public class SvnRepository
extends AbstractStandaloneRepository
implements SelectableAuthenticationRepository, InitialBuildAwareRepository, RepositoryEventAware, MavenPomAccessorCapableRepository, CommitIsolationAwareRepository, BranchingAwareRepository, TaggingAwareRepository, CustomSourceDirectoryAwareRepository, MandatoryCleanCheckoutAwareRepository, AdvancedConfigurationAwareRepository, CustomRevisionDataAwareRepository, CustomVariableProviderRepository, BranchInformationProvider, CachingAwareRepository, DeploymentAwareRepository

This class provides a Subversion repository for Bamboo.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.atlassian.bamboo.repository.CachingAwareRepository
CachingAwareRepository.CachableOperation
 
Field Summary
static String BRANCHES_DETECTION_BRANCHES_ROOT
           
static String BRANCHES_DETECTION_BRANCHES_ROOT_OVERRIDDEN
           
static String COMPLETE_PLUGIN_KEY
           
static org.tmatesoft.svn.core.wc.ISVNOptions DEFAULT_SVN_OPTIONS
           
protected  EncryptionService encryptionService
           
static String KEY
           
static String NAME
           
static String SVN_AUTH_TYPE
           
static String SVN_KEYFILE
           
static String SVN_PASSPHRASE
           
static String SVN_PASSWORD
           
static String SVN_REPO_PREFIX
           
static String SVN_REPO_URL
           
static String SVN_SSL_KEYFILE
           
static String SVN_SSL_PASSPHRASE
           
static String SVN_USERNAME
           
static String TEMPORARY_SVN_PASSWORD
           
static String TEMPORARY_SVN_REPO_PREFIX
           
 
Fields inherited from class com.atlassian.bamboo.repository.AbstractRepository
BUILD_TRIGGER_IP, buildDirectoryManager, buildLoggerManager, customVariableContext, featureManager, REPO_PREFIX, repositoryModuleDescriptor, templateRenderer, textProvider
 
Fields inherited from class com.atlassian.bamboo.v2.build.BaseBuildConfigurationAwarePlugin
moduleDescriptor
 
Fields inherited from interface com.atlassian.bamboo.repository.CommitIsolationAwareRepository
COMMIT_ISOLATION_OPTION
 
Fields inherited from interface com.atlassian.bamboo.repository.Repository
SELECTED_REPOSITORY, UNKNOWN_HOST
 
Fields inherited from interface com.atlassian.bamboo.repository.IncludeExcludeAwareRepository
FILTER_PATTERN_EXCLUDE, FILTER_PATTERN_INCLUDE, FILTER_PATTERN_OPTION, FILTER_PATTERN_REGEX
 
Fields inherited from interface com.atlassian.bamboo.repository.FilterChangesetAwareRepository
CHANGESET_FILTER_PATTERN_REGEX, MAVEN_RELEASE_PLUGIN_EXCLUSION_PATTERN
 
Constructor Summary
SvnRepository()
           
 
Method Summary
 void addDefaultValues(BuildConfiguration buildConfiguration)
          Extension point for adding default values to the form for RenderableBuildConfiguration.getEditHtml(com.atlassian.bamboo.ww2.actions.build.admin.create.BuildConfiguration, com.atlassian.bamboo.plan.Plan)
 long checkout(org.tmatesoft.svn.core.SVNURL url, org.tmatesoft.svn.core.wc.SVNRevision revision, File dstPath, boolean isRecursive)
          Checks out a working copy from a repository.
 BuildRepositoryChanges collectChangesForRevision(PlanKey planKey, String targetRevision)
          Collects the changes for the targetRevision.
 BuildRepositoryChanges collectChangesSinceLastBuild(String planKey, PlanVcsRevisionData revisionData)
           
 BuildRepositoryChanges collectChangesSinceLastBuild(String planKey, String lastVcsRevisionKey)
          Collects the changes since the lastVcsRevisionKey.
 int compareTo(Object obj)
           
 void createBranch(long repositoryId, String branchName, BuildContext buildContext)
          Creates branch in the repository.
 void createTag(long repositoryId, String tagName, BuildContext buildContext)
          Creates a tag in the repository
 boolean equals(Object o)
           
 long export(org.tmatesoft.svn.core.SVNURL url, org.tmatesoft.svn.core.wc.SVNRevision revision, File dstPath, boolean isRecursive)
           
 List<NameValuePair> getAuthenticationTypes()
          List all authentication types supported by repository.
 String getAuthType()
           
 org.tmatesoft.svn.core.SVNURL getBranchRootUrl()
           
 CacheId getCacheId(CachingAwareRepository.CachableOperation cachableOperation)
          Cache id has to fulfill the following: Given two Repository objects A and B, returning equal CacheId (in terms of equals()) and a cachable operation foo(), in the following sequence of calls made in a short time period: 1.
protected  String getConfigConstant(String s)
           
 Map<String,String> getCustomVariables()
          Return a map containing name->value mapping of the variables.
 String getEncryptedPassphrase()
           
 String getEncryptedPassword()
           
 CommitContext getFirstCommit()
          Retrieve the commit that created the Branch.
 String getHost()
          What's the repository server host
 String getHost(BuildContext buildContext)
           
 String getKeyFile()
           
 CommitContext getLastCommit()
          Retrieve last commit on the branch set on this Repository.
 String getLocationIdentifier()
          A string representing the location of the repository
 String getManualBranchRootUrl()
           
 String getManualTagRootUrl()
           
 SvnRepositoryMavenPomAccessor getMavenPomAccessor()
           
 String getName()
          What's the name of the plugin - appears in the GUI dropdown
 List<VcsBranch> getOpenBranches(String context)
          Set of open branches that are discovered in the repository.
 String getPassphrase()
           
 Map<String,String> getPlanRepositoryVariables()
          Return a map containing name->value mapping of the plan repository format variables.
protected  String getRepoPrefix()
           
 String getRepositoryUrl()
          Which repository URL are we using?
 String getSubstitutedKeyFile()
           
 String getSubstitutedRepositoryUrl()
          Return repository URL with extrapolated Bamboo variables
protected  org.tmatesoft.svn.core.SVNURL getSubstitutedSvnUrl()
           
protected  org.tmatesoft.svn.core.wc.SVNClientManager getSvnClientManager()
          SVNClientManager factory.
protected  String getTemporaryConstant(String s)
           
protected  String getTemporaryPrefix()
           
 String getUrl()
          Where is the documentation and help about using Subversion?
 String getUsername()
          What username are we using to access the repository?
 String getUserPassword()
          What password are we using to access the repository
 VcsBranch getVcsBranch()
           
 int hashCode()
           
 org.tmatesoft.svn.core.wc.SVNInfo info(org.tmatesoft.svn.core.SVNURL url, org.tmatesoft.svn.core.wc.SVNRevision revision)
          Runs 'svn info' operation on a given URL.
 boolean isAdvancedOptionEnabled(BuildConfiguration buildConfiguration)
           
 boolean isAutodetectBranchRootUrl()
           
 boolean isAutodetectTagRootUrl()
           
 boolean isCachingSupportedFor(CachingAwareRepository.CachableOperation cachableOperation)
           
 boolean isCleanCheckoutRequired()
           
 boolean isCommitIsolationEnabled()
          Whether or not commits will be broken up into individual builds
 List<BuildRepositoryChanges> isolateCommits(BuildRepositoryChanges buildChanges)
          Break the single build changes object into a list of BuildRepositoryChanges.
protected  boolean isRecoverableException(org.tmatesoft.svn.core.SVNException e)
          Check if provided exception object identifies recoverable exception.
 boolean isRepositoryDifferent(Repository repository)
          Checks if the current repo is the same as the given repository
 boolean isUseExport()
           
 boolean isUseExternals()
           
 void onInitialBuild(BuildContext buildContext)
          Allows the Repository to perform custom actions when an initial build is triggered.
 void populateFromConfig(org.apache.commons.configuration.HierarchicalConfiguration config)
          Update the current object with data in the HierarchicalConfiguration
 void postRetrieveSourceCode(BuildContext buildContext)
          postRetrieveSourceCode will run after the retrieveSourceCode method is called.
 void postRetrieveSourceCode(BuildContext buildContext, File sourceDirectory)
          postRetrieveSourceCode will run after the retrieveSourceCode method is called.
 void prepareConfigObject(BuildConfiguration buildConfiguration)
          Do any preprocessing work before validation occurs.
 void preRetrieveSourceCode(BuildContext buildContext)
          preRetrieveSourceCode will run before the retrieveSourceCode method is called.
 void preRetrieveSourceCode(BuildContext buildContext, File sourceDirectory)
          Checks if the SVN URL has changed
 String retrieveSourceCode(BuildContext buildContext, String vcsRevisionKey, File sourceDirectory)
          Checks out the latest source code from an appropriate repository to specified directory
 void setAdministrationConfigurationAccessor(AdministrationConfigurationAccessor administrationConfigurationAccessor)
           
 void setAuthType(String authType)
           
 void setAutodetectBranchRoot(boolean autodetectBranchRoot)
           
 void setCommitIsolationEnabled(boolean commitIsolationEnabled)
           
 void setEncryptedPassphrase(String encryptedPassphrase)
           
 void setEncryptedPassword(String encryptedPassword)
           
 void setEncryptionService(EncryptionService encryptionService)
           
 void setKeyFile(String myKeyFile)
           
 void setManualBranchRootUrl(String branchRoot)
           
 void setPassphrase(String passphrase)
           
 void setRepositoryUrl(String repositoryUrl)
          Specify the subversion repository we are using
 void setSvnClientManagerFactory(SVNClientManagerFactory svnClientManagerFactory)
           
 void setUseExport(boolean useExport)
           
 void setUseExternals(boolean useExternals)
           
 void setUsername(String username)
          What's the username (if any) we are using to acces the repository?
 void setUserPassword(String password)
          Specify the password required to access the resposotory
 void setVcsBranch(VcsBranch branch)
          Set and prepare the repository for using an arbitrary branch.
 void setVcsBranch(VcsBranch branch, org.apache.commons.configuration.HierarchicalConfiguration customConfiguration)
           
 org.apache.commons.configuration.HierarchicalConfiguration toConfiguration()
          Store SvnRepository data into configuration object.
 boolean usePollingForBranchDetection()
          If Bamboo generic detection polling should be used for this repository
 ErrorCollection validate(BuildConfiguration buildConfiguration)
          Validates the properties in the BuildConfiguration object.
 
Methods inherited from class com.atlassian.bamboo.repository.AbstractStandaloneRepository
getAdvancedEditHtml, getAdvancedViewHtml, getEditHtml, getViewHtml, getViewHtml
 
Methods inherited from class com.atlassian.bamboo.repository.AbstractRepository
checkConnection, customizeBuildRequirements, getAdvancedEditHtml, getAdvancedViewHtml, getBranchIntegrationEditHtml, getChangesetFilterPatternRegex, getDefaultTriggerModule, getDescription, getEditHtml, getFilterFilePatternOption, getFilterFilePatternRegex, getKey, getMavenPomCheckoutAccessEditHtml, getMaxCommitsToReturn, getMaxRetries, getMinimalEditHtml, getPollingTriggerModule, getQuietPeriod, getShortKey, getSourceCodeDirectory, getSystemWideExclusionPatterns, getViewHtml, getWorkingDirectory, init, isQuietPeriodEnabled, isWorkspaceEmpty, removeBuildRequirements, setBuildDirectoryManager, setBuildLoggerManager, setChangesetFilterPatternRegex, setCustomVariableContext, setFeatureManager, setFilterFilePatternOption, setFilterFilePatternRegex, setTemplateRenderer, setTextProvider, setWorkingDir, substituteString, toMergeCapableRepository
 
Methods inherited from class com.atlassian.bamboo.v2.build.BaseBuildConfigurationAwarePlugin
isConfigurationMissing, populateContextForEdit, populateContextForView
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.bamboo.repository.AdvancedConfigurationAwareRepository
getAdvancedEditHtml, getAdvancedViewHtml
 
Methods inherited from interface com.atlassian.bamboo.repository.Repository
checkConnection, getKey, getMinimalEditHtml, getShortKey
 
Methods inherited from interface com.atlassian.bamboo.v2.build.repository.RepositoryV2
getSourceCodeDirectory
 
Methods inherited from interface com.atlassian.bamboo.v2.build.ConfigurablePlugin
customizeBuildRequirements, removeBuildRequirements
 
Methods inherited from interface com.atlassian.bamboo.v2.build.RenderableBuildConfiguration
getEditHtml, getViewHtml
 
Methods inherited from interface com.atlassian.bamboo.utils.DescriptionProvider
getDescription
 

Field Detail

NAME

public static final String NAME
See Also:
Constant Field Values

KEY

public static final String KEY
See Also:
Constant Field Values

COMPLETE_PLUGIN_KEY

public static final String COMPLETE_PLUGIN_KEY
See Also:
Constant Field Values

SVN_REPO_PREFIX

public static final String SVN_REPO_PREFIX
See Also:
Constant Field Values

SVN_REPO_URL

public static final String SVN_REPO_URL
See Also:
Constant Field Values

SVN_USERNAME

public static final String SVN_USERNAME
See Also:
Constant Field Values

SVN_AUTH_TYPE

public static final String SVN_AUTH_TYPE
See Also:
Constant Field Values

SVN_PASSWORD

public static final String SVN_PASSWORD
See Also:
Constant Field Values

SVN_KEYFILE

public static final String SVN_KEYFILE
See Also:
Constant Field Values

SVN_PASSPHRASE

public static final String SVN_PASSPHRASE
See Also:
Constant Field Values

SVN_SSL_KEYFILE

public static final String SVN_SSL_KEYFILE
See Also:
Constant Field Values

SVN_SSL_PASSPHRASE

public static final String SVN_SSL_PASSPHRASE
See Also:
Constant Field Values

TEMPORARY_SVN_REPO_PREFIX

public static final String TEMPORARY_SVN_REPO_PREFIX
See Also:
Constant Field Values

TEMPORARY_SVN_PASSWORD

public static final String TEMPORARY_SVN_PASSWORD
See Also:
Constant Field Values

BRANCHES_DETECTION_BRANCHES_ROOT

public static final String BRANCHES_DETECTION_BRANCHES_ROOT
See Also:
Constant Field Values

BRANCHES_DETECTION_BRANCHES_ROOT_OVERRIDDEN

public static final String BRANCHES_DETECTION_BRANCHES_ROOT_OVERRIDDEN
See Also:
Constant Field Values

DEFAULT_SVN_OPTIONS

public static final org.tmatesoft.svn.core.wc.ISVNOptions DEFAULT_SVN_OPTIONS

encryptionService

protected EncryptionService encryptionService
Constructor Detail

SvnRepository

public SvnRepository()
Method Detail

collectChangesSinceLastBuild

@NotNull
public BuildRepositoryChanges collectChangesSinceLastBuild(@NotNull
                                                                   String planKey,
                                                                   @NotNull
                                                                   PlanVcsRevisionData revisionData)
                                                    throws RepositoryException
Specified by:
collectChangesSinceLastBuild in interface CustomRevisionDataAwareRepository
Throws:
RepositoryException

collectChangesForRevision

@NotNull
public BuildRepositoryChanges collectChangesForRevision(@NotNull
                                                                PlanKey planKey,
                                                                @NotNull
                                                                String targetRevision)
                                                 throws RepositoryException
Description copied from interface: OnceOffCapableRepository
Collects the changes for the targetRevision. This method is called only on server side (never on agent).

Specified by:
collectChangesForRevision in interface OnceOffCapableRepository
Overrides:
collectChangesForRevision in class AbstractRepository
Returns:
A build changes object with the appropriate build changes (that is - with the single commit data relevant for targetRevision)
Throws:
RepositoryException - if something goes wrong

collectChangesSinceLastBuild

@NotNull
public BuildRepositoryChanges collectChangesSinceLastBuild(@NotNull
                                                                   String planKey,
                                                                   @Nullable
                                                                   String lastVcsRevisionKey)
                                                    throws RepositoryException
Description copied from interface: RepositoryV2
Collects the changes since the lastVcsRevisionKey. This method is called only on server side (never on agent).

Specified by:
collectChangesSinceLastBuild in interface RepositoryV2
lastVcsRevisionKey - can be null, if null you should ensure the correct vcsrevisionkey is returned in the BuildChanges object.
Returns:
A build changes object with the appropriate build changes
Throws:
RepositoryException - if something goes wrong

usePollingForBranchDetection

public boolean usePollingForBranchDetection()
Description copied from interface: BranchInformationProvider
If Bamboo generic detection polling should be used for this repository

Specified by:
usePollingForBranchDetection in interface BranchInformationProvider
Returns:

retrieveSourceCode

@NotNull
public String retrieveSourceCode(@NotNull
                                         BuildContext buildContext,
                                         @Nullable
                                         String vcsRevisionKey,
                                         @NotNull
                                         File sourceDirectory)
                          throws RepositoryException
Description copied from interface: CustomSourceDirectoryAwareRepository
Checks out the latest source code from an appropriate repository to specified directory

Specified by:
retrieveSourceCode in interface CustomSourceDirectoryAwareRepository
vcsRevisionKey - - may be null if you want latest code
sourceDirectory - - directory to checkout to
Returns:
vcsRevisionKey - the revision
Throws:
RepositoryException

preRetrieveSourceCode

public void preRetrieveSourceCode(@NotNull
                                  BuildContext buildContext,
                                  @NotNull
                                  File sourceDirectory)
Checks if the SVN URL has changed

Specified by:
preRetrieveSourceCode in interface RepositoryEventAware
Parameters:
buildContext -

postRetrieveSourceCode

public void postRetrieveSourceCode(@NotNull
                                   BuildContext buildContext)
Description copied from interface: RepositoryEventAware
postRetrieveSourceCode will run after the retrieveSourceCode method is called. The extension point allows you to easily set custom data, do any post checkout collection of data.

Specified by:
postRetrieveSourceCode in interface RepositoryEventAware

postRetrieveSourceCode

public void postRetrieveSourceCode(@NotNull
                                   BuildContext buildContext,
                                   @NotNull
                                   File sourceDirectory)
Description copied from interface: RepositoryEventAware
postRetrieveSourceCode will run after the retrieveSourceCode method is called. The extension point allows you to easily set custom data, do any post checkout collection of data.

Specified by:
postRetrieveSourceCode in interface RepositoryEventAware

preRetrieveSourceCode

public void preRetrieveSourceCode(@NotNull
                                  BuildContext buildContext)
Description copied from interface: RepositoryEventAware
preRetrieveSourceCode will run before the retrieveSourceCode method is called. It allows you to do custom actions to prepare for the checkout such as some customised cleanup of the source directory.

Specified by:
preRetrieveSourceCode in interface RepositoryEventAware

isRecoverableException

protected boolean isRecoverableException(@NotNull
                                         org.tmatesoft.svn.core.SVNException e)
Check if provided exception object identifies recoverable exception.

Parameters:
e - Exception to be analyzed.
Returns:
True if exception is recognized as the one we can recover from.

getSvnClientManager

protected org.tmatesoft.svn.core.wc.SVNClientManager getSvnClientManager()
SVNClientManager factory.

Returns:
SVNClientManager appropriate for authorization mode

validate

@NotNull
public ErrorCollection validate(@NotNull
                                        BuildConfiguration buildConfiguration)
Description copied from interface: BuildConfigurationAwarePlugin
Validates the properties in the BuildConfiguration object. The name of the properties match those passed in through the form fragments in RenderableBuildConfiguration.getEditHtml(com.atlassian.bamboo.ww2.actions.build.admin.create.BuildConfiguration, com.atlassian.bamboo.plan.Plan) template.

Specified by:
validate in interface BuildConfigurationAwarePlugin
Overrides:
validate in class AbstractRepository
Parameters:
buildConfiguration - - @NotNull
Returns:
ErrorCollection keyed by the field name. @NotNull

isRepositoryDifferent

public boolean isRepositoryDifferent(@NotNull
                                     Repository repository)
Description copied from interface: RepositoryV2
Checks if the current repo is the same as the given repository

Specified by:
isRepositoryDifferent in interface RepositoryV2
Parameters:
repository - to compare against
Returns:
true of repositories are different, false if the same;

prepareConfigObject

public void prepareConfigObject(@NotNull
                                BuildConfiguration buildConfiguration)
Description copied from interface: BuildConfigurationAwarePlugin
Do any preprocessing work before validation occurs. For repository, builder and web repository plugins this will only be called if the plugin is select by the user.

Specified by:
prepareConfigObject in interface BuildConfigurationAwarePlugin
Overrides:
prepareConfigObject in class BaseBuildConfigurationAwarePlugin
Parameters:
buildConfiguration - - @NotNull

checkout

public long checkout(org.tmatesoft.svn.core.SVNURL url,
                     org.tmatesoft.svn.core.wc.SVNRevision revision,
                     File dstPath,
                     boolean isRecursive)
              throws RepositoryException
Checks out a working copy from a repository. Like 'svn checkout URL[@REV] PATH (-r..)' command; It's done by invoking

Parameters:
url - repository location where a working copy is to be checked out from;
revision - a revision at which a working copy being checked out is to be;
dstPath - a local path where the working copy will be fetched into;
isRecursive - if true and url corresponds to a directory then doCheckout(..) recursively
Returns:
the number of the revision at which the working copy is
Throws:
RepositoryException - Failed!

export

public long export(org.tmatesoft.svn.core.SVNURL url,
                   org.tmatesoft.svn.core.wc.SVNRevision revision,
                   File dstPath,
                   boolean isRecursive)
            throws RepositoryException
Throws:
RepositoryException

getMavenPomAccessor

@NotNull
public SvnRepositoryMavenPomAccessor getMavenPomAccessor()
Specified by:
getMavenPomAccessor in interface MavenPomAccessorCapableRepository

info

@NotNull
public org.tmatesoft.svn.core.wc.SVNInfo info(org.tmatesoft.svn.core.SVNURL url,
                                                      org.tmatesoft.svn.core.wc.SVNRevision revision)
                                       throws RepositoryException
Runs 'svn info' operation on a given URL.

Parameters:
url - repository location which shall be queried
revision - a revision of repository location which shall be queried
Returns:
SVNInfo object holding data
Throws:
RepositoryException - Failed!

addDefaultValues

public void addDefaultValues(@NotNull
                             BuildConfiguration buildConfiguration)
Description copied from interface: BuildConfigurationAwarePlugin
Extension point for adding default values to the form for RenderableBuildConfiguration.getEditHtml(com.atlassian.bamboo.ww2.actions.build.admin.create.BuildConfiguration, com.atlassian.bamboo.plan.Plan)

Specified by:
addDefaultValues in interface BuildConfigurationAwarePlugin
Overrides:
addDefaultValues in class AbstractRepository
Parameters:
buildConfiguration - - @NotNull

populateFromConfig

public void populateFromConfig(@NotNull
                               org.apache.commons.configuration.HierarchicalConfiguration config)
Description copied from interface: ConvertibleFromConfig
Update the current object with data in the HierarchicalConfiguration

Specified by:
populateFromConfig in interface ConvertibleFromConfig
Overrides:
populateFromConfig in class AbstractRepository

toConfiguration

@NotNull
public org.apache.commons.configuration.HierarchicalConfiguration toConfiguration()
Store SvnRepository data into configuration object.

Specified by:
toConfiguration in interface ConvertibleFromConfig
Overrides:
toConfiguration in class AbstractRepository
Returns:

onInitialBuild

public void onInitialBuild(BuildContext buildContext)
Description copied from interface: InitialBuildAwareRepository
Allows the Repository to perform custom actions when an initial build is triggered.

Specified by:
onInitialBuild in interface InitialBuildAwareRepository

isAdvancedOptionEnabled

public boolean isAdvancedOptionEnabled(@NotNull
                                       BuildConfiguration buildConfiguration)
Overrides:
isAdvancedOptionEnabled in class AbstractRepository

getName

@NotNull
public String getName()
What's the name of the plugin - appears in the GUI dropdown

Specified by:
getName in interface Repository
Specified by:
getName in interface DescriptionProvider
Specified by:
getName in interface NameProvider
Returns:
The name

getPassphrase

public String getPassphrase()

setPassphrase

public void setPassphrase(String passphrase)

getEncryptedPassphrase

public String getEncryptedPassphrase()

setEncryptedPassphrase

public void setEncryptedPassphrase(String encryptedPassphrase)

getKeyFile

public String getKeyFile()

getSubstitutedKeyFile

public String getSubstitutedKeyFile()

setKeyFile

public void setKeyFile(String myKeyFile)

getAuthType

public String getAuthType()
Specified by:
getAuthType in interface SelectableAuthenticationRepository
Returns:
the authentication type for this repository configuration

setAuthType

public void setAuthType(String authType)

getUrl

public String getUrl()
Where is the documentation and help about using Subversion?

Returns:
The web url

setRepositoryUrl

public void setRepositoryUrl(String repositoryUrl)
Specify the subversion repository we are using

Parameters:
repositoryUrl - The subversion repository

getRepositoryUrl

public String getRepositoryUrl()
Which repository URL are we using?

Returns:
The subversion repository

getSubstitutedRepositoryUrl

public String getSubstitutedRepositoryUrl()
Return repository URL with extrapolated Bamboo variables

Returns:
Repository URL with extrapolated Bamboo variables

setUsername

public void setUsername(String username)
What's the username (if any) we are using to acces the repository?

Parameters:
username - The user name, null if there is no user

getUsername

public String getUsername()
What username are we using to access the repository?

Returns:
The username, null if we are not using user authentication

setUserPassword

public void setUserPassword(String password)
Specify the password required to access the resposotory

Parameters:
password - The password (null if we are not using user authentication)

getUserPassword

public String getUserPassword()
What password are we using to access the repository

Returns:
The password (null if we are not using user authentication)

getEncryptedPassword

public String getEncryptedPassword()

setEncryptedPassword

public void setEncryptedPassword(String encryptedPassword)

getSubstitutedSvnUrl

protected org.tmatesoft.svn.core.SVNURL getSubstitutedSvnUrl()
                                                      throws org.tmatesoft.svn.core.SVNException
Throws:
org.tmatesoft.svn.core.SVNException

getHost

public String getHost()
Description copied from interface: Repository
What's the repository server host

Specified by:
getHost in interface Repository
Returns:
The host!

getHost

public String getHost(BuildContext buildContext)

getLocationIdentifier

@NotNull
public String getLocationIdentifier()
Description copied from interface: Repository
A string representing the location of the repository

Specified by:
getLocationIdentifier in interface Repository
Overrides:
getLocationIdentifier in class AbstractRepository
Returns:

isUseExternals

public boolean isUseExternals()

setUseExternals

public void setUseExternals(boolean useExternals)

isUseExport

public boolean isUseExport()

setUseExport

public void setUseExport(boolean useExport)

isCleanCheckoutRequired

public boolean isCleanCheckoutRequired()
Specified by:
isCleanCheckoutRequired in interface MandatoryCleanCheckoutAwareRepository

setSvnClientManagerFactory

public void setSvnClientManagerFactory(SVNClientManagerFactory svnClientManagerFactory)

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)

getAuthenticationTypes

@NotNull
public List<NameValuePair> getAuthenticationTypes()
Description copied from interface: SelectableAuthenticationRepository
List all authentication types supported by repository.

Specified by:
getAuthenticationTypes in interface SelectableAuthenticationRepository
Returns:
List of authentication types supported by repository

isCommitIsolationEnabled

public boolean isCommitIsolationEnabled()
Description copied from interface: CommitIsolationAwareRepository
Whether or not commits will be broken up into individual builds

Specified by:
isCommitIsolationEnabled in interface CommitIsolationAwareRepository
Returns:

setCommitIsolationEnabled

public void setCommitIsolationEnabled(boolean commitIsolationEnabled)

isAutodetectBranchRootUrl

public boolean isAutodetectBranchRootUrl()

setAutodetectBranchRoot

public void setAutodetectBranchRoot(boolean autodetectBranchRoot)

isAutodetectTagRootUrl

public boolean isAutodetectTagRootUrl()

getManualBranchRootUrl

public String getManualBranchRootUrl()

setManualBranchRootUrl

public void setManualBranchRootUrl(String branchRoot)

getManualTagRootUrl

public String getManualTagRootUrl()

setEncryptionService

public void setEncryptionService(EncryptionService encryptionService)

setAdministrationConfigurationAccessor

public void setAdministrationConfigurationAccessor(AdministrationConfigurationAccessor administrationConfigurationAccessor)
Overrides:
setAdministrationConfigurationAccessor in class AbstractRepository

isolateCommits

@NotNull
public List<BuildRepositoryChanges> isolateCommits(@NotNull
                                                           BuildRepositoryChanges buildChanges)
Description copied from interface: CommitIsolationAwareRepository
Break the single build changes object into a list of BuildRepositoryChanges. Must not be null. May return an empty list but that doesn't actually make any sense.
The order here matters. The first of the BuildRepositoryChanges will be more likely to be built than lower changes, which may be discarded.

Specified by:
isolateCommits in interface CommitIsolationAwareRepository
Returns:

createBranch

public void createBranch(long repositoryId,
                         @NotNull
                         String branchName,
                         @NotNull
                         BuildContext buildContext)
                  throws RepositoryException
Description copied from interface: BranchingAwareRepository
Creates branch in the repository.

Specified by:
createBranch in interface BranchingAwareRepository
branchName - name of new branch
buildContext - build context
Throws:
RepositoryException

createTag

public void createTag(long repositoryId,
                      @NotNull
                      String tagName,
                      @NotNull
                      BuildContext buildContext)
               throws RepositoryException
Description copied from interface: TaggingAwareRepository
Creates a tag in the repository

Specified by:
createTag in interface TaggingAwareRepository
tagName - - name of the tag
buildContext - - build context
Throws:
RepositoryException

getCustomVariables

@NotNull
public Map<String,String> getCustomVariables()
Description copied from interface: CustomVariableProviderRepository
Return a map containing name->value mapping of the variables.

Null values will be filtered out so it's safe to put them in the map.

Specified by:
getCustomVariables in interface CustomVariableProviderRepository
Returns:
Map with variable substitutions

getPlanRepositoryVariables

@NotNull
public Map<String,String> getPlanRepositoryVariables()
Description copied from interface: CustomVariableProviderRepository
Return a map containing name->value mapping of the plan repository format variables.

Null values will be filtered out so it's safe to put them in the map.

Specified by:
getPlanRepositoryVariables in interface CustomVariableProviderRepository
Returns:
Map with variable substitutions

getBranchRootUrl

public org.tmatesoft.svn.core.SVNURL getBranchRootUrl()
                                               throws org.tmatesoft.svn.core.SVNException
Throws:
org.tmatesoft.svn.core.SVNException

getOpenBranches

@NotNull
public List<VcsBranch> getOpenBranches(@Nullable
                                               String context)
                                throws RepositoryException
Description copied from interface: BranchDetectionCapableRepository
Set of open branches that are discovered in the repository. Returns empty collection if no branches at all (can that happen?). Used for monitoring repositories for new branches. An open branch is a branch that is considered 'open' by underlying VCS - it has nothing to do with the actual development on that branch (recent commits or so).

Specified by:
getOpenBranches in interface BranchDetectionCapableRepository
Returns:
List of branch names. May be empty.
Throws:
RepositoryException

getLastCommit

public CommitContext getLastCommit()
                            throws RepositoryException
Description copied from interface: BranchDetectionCapableRepository
Retrieve last commit on the branch set on this Repository. Method is used by Chain Branch automatic expiry. If this method returns null Chain Branch is not expired.

Specified by:
getLastCommit in interface BranchDetectionCapableRepository
Returns:
the last commit or null if N/A
Throws:
RepositoryException

getFirstCommit

public CommitContext getFirstCommit()
                             throws RepositoryException
Description copied from interface: BranchDetectionCapableRepository
Retrieve the commit that created the Branch.

Specified by:
getFirstCommit in interface BranchDetectionCapableRepository
Returns:
the first commit to the branch
Throws:
RepositoryException

getVcsBranch

@NotNull
public VcsBranch getVcsBranch()
Specified by:
getVcsBranch in interface BranchAwareRepository
Returns:
the branch being used currently by this repository.

setVcsBranch

public void setVcsBranch(@NotNull
                         VcsBranch branch)
Description copied from interface: BranchAwareRepository
Set and prepare the repository for using an arbitrary branch. Generally the subsequent getVcsBranch should return the same branch name.

Specified by:
setVcsBranch in interface BranchAwareRepository

setVcsBranch

public void setVcsBranch(@NotNull
                         VcsBranch branch,
                         @NotNull
                         org.apache.commons.configuration.HierarchicalConfiguration customConfiguration)

getCacheId

public CacheId getCacheId(@NotNull
                          CachingAwareRepository.CachableOperation cachableOperation)
Description copied from interface: CachingAwareRepository
Cache id has to fulfill the following: Given two Repository objects A and B, returning equal CacheId (in terms of equals()) and a cachable operation foo(), in the following sequence of calls made in a short time period: 1. A::foo() 2. B::foo() 3. A::foo() the result of B::foo() should be the same as either the first or the second call to A::foo().

Specified by:
getCacheId in interface CachingAwareRepository
Returns:
the cache id of repository, null if the supplied operation cannot be cached

isCachingSupportedFor

public boolean isCachingSupportedFor(@NotNull
                                     CachingAwareRepository.CachableOperation cachableOperation)
Specified by:
isCachingSupportedFor in interface CachingAwareRepository
Returns:
true if the repository supports generation of CacheIds for a given operation

getRepoPrefix

protected String getRepoPrefix()

getTemporaryPrefix

protected String getTemporaryPrefix()

getConfigConstant

protected String getConfigConstant(String s)

getTemporaryConstant

protected String getTemporaryConstant(String s)


Copyright © 2015 Atlassian Software Systems Pty Ltd. All rights reserved.