Class 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,TestConnectionAwareRepository,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, TestConnectionAwareRepository
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
Fields Modifier and Type Field Description static StringBRANCH_AUTODETECT_ROOTstatic StringBRANCH_MANUAL_ROOTstatic StringBRANCHES_DETECTION_BRANCHES_ROOTstatic StringBRANCHES_DETECTION_BRANCHES_ROOT_OVERRIDDENstatic StringCOMPLETE_PLUGIN_KEYstatic org.tmatesoft.svn.core.wc.ISVNOptionsDEFAULT_SVN_OPTIONSstatic StringKEYstatic StringNAMEstatic StringSVN_AUTH_TYPEstatic StringSVN_KEYFILEstatic StringSVN_PASSPHRASEstatic StringSVN_PASSWORDstatic StringSVN_REPO_PREFIXstatic StringSVN_REPO_URLstatic StringSVN_SSL_KEYFILEstatic StringSVN_SSL_PASSPHRASEstatic StringSVN_USERNAMEstatic StringTAG_AUTODETECT_ROOTstatic StringTAG_MANUAL_ROOTstatic StringTEMPORARY_SVN_PASSWORDstatic StringTEMPORARY_SVN_REPO_PREFIXprotected TrustedKeyHelpertrustedKeyHelperstatic StringUSE_EXPORTstatic StringUSE_EXTERNALS-
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.FilterChangesetAwareRepository
CHANGESET_FILTER_PATTERN_REGEX, MAVEN_RELEASE_PLUGIN_EXCLUSION_PATTERN
-
Fields inherited from interface com.atlassian.bamboo.repository.IncludeExcludeAwareRepository
FILTER_PATTERN_EXCLUDE, FILTER_PATTERN_INCLUDE, FILTER_PATTERN_NONE, FILTER_PATTERN_OPTION, FILTER_PATTERN_REGEX
-
Fields inherited from interface com.atlassian.bamboo.repository.Repository
SELECTED_REPOSITORY, UNKNOWN_HOST
-
Fields inherited from interface com.atlassian.bamboo.repository.TestConnectionAwareRepository
HOST_KEY
-
-
Constructor Summary
Constructors Constructor Description SvnRepository()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDefaultValues(@NotNull BuildConfiguration buildConfiguration)Extension point for adding default values to the form forRenderableBuildConfiguration.getEditHtml(com.atlassian.bamboo.ww2.actions.build.admin.create.BuildConfiguration, com.atlassian.bamboo.plan.Plan)longcheckout(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.@NotNull BuildRepositoryChangescollectChangesForRevision(@NotNull PlanKey planKey, @NotNull String targetRevision)Collects the changes for the targetRevision.@NotNull BuildRepositoryChangescollectChangesSinceLastBuild(@NotNull String planKey, @NotNull PlanVcsRevisionData revisionData)@NotNull BuildRepositoryChangescollectChangesSinceLastBuild(@NotNull String planKey, @Nullable String lastVcsRevisionKey)Collects the changes since the lastVcsRevisionKey.intcompareTo(Object obj)voidcreateBranch(long repositoryId, @NotNull String branchName, @NotNull BuildContext buildContext)Creates branch in the repository.voidcreateTag(long repositoryId, @NotNull String tagName, @NotNull BuildContext buildContext)Creates a tag in the repositorybooleanequals(Object o)longexport(org.tmatesoft.svn.core.SVNURL url, org.tmatesoft.svn.core.wc.SVNRevision revision, File dstPath, boolean isRecursive)@NotNull List<NameValuePair>getAuthenticationTypes()List all authentication types supported by repository.StringgetAuthType()org.tmatesoft.svn.core.SVNURLgetBranchRootUrl()CacheIdgetCacheId(@NotNull 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.static StringgetConfigConstant(String s)@NotNull Map<String,String>getCustomVariables()Return a map containing name->value mapping of the variables.StringgetEncryptedPassphrase()StringgetEncryptedPassword()CommitContextgetFirstCommit()Retrieve the commit that created the Branch.StringgetHost()What's the repository server hostStringgetHost(BuildContext buildContext)StringgetKeyFile()CommitContextgetLastCommit()Retrieve last commit on the branch set on this Repository.@NotNull StringgetLocationIdentifier()A string representing the location of the repositoryStringgetManualBranchRootUrl()StringgetManualTagRootUrl()@NotNull SvnRepositoryMavenPomAccessorgetMavenPomAccessor()@NotNull StringgetName()What's the name of the plugin - appears in the GUI dropdown@NotNull List<VcsBranch>getOpenBranches(@Nullable String context)Setof open branches that are discovered in the repository.StringgetPassphrase()@NotNull Map<String,String>getPlanRepositoryVariables()Return a map containing name->value mapping of the plan repository format variables.protected static StringgetRepoPrefix()StringgetRepositoryUrl()Which repository URL are we using?StringgetSubstitutedKeyFile()StringgetSubstitutedRepositoryUrl()Return repository URL with extrapolated Bamboo variablesprotected org.tmatesoft.svn.core.SVNURLgetSubstitutedSvnUrl()protected org.tmatesoft.svn.core.wc.SVNClientManagergetSvnClientManager()SVNClientManager factory.protected StringgetTemporaryConstant(String s)protected StringgetTemporaryPrefix()StringgetUrl()Where is the documentation and help about using Subversion?StringgetUsername()What username are we using to access the repository?StringgetUserPassword()What password are we using to access the repository@NotNull VcsBranchgetVcsBranch()inthashCode()@NotNull org.tmatesoft.svn.core.wc.SVNInfoinfo(org.tmatesoft.svn.core.SVNURL url, org.tmatesoft.svn.core.wc.SVNRevision revision)Runs 'svn info' operation on a given URL.booleanisAdvancedOptionEnabled(@NotNull BuildConfiguration buildConfiguration)booleanisAutodetectBranchRootUrl()booleanisAutodetectTagRootUrl()booleanisCachingSupportedFor(@NotNull CachingAwareRepository.CachableOperation cachableOperation)booleanisCleanCheckoutRequired()booleanisCommitIsolationEnabled()Whether or not commits will be broken up into individual builds@NotNull List<BuildRepositoryChanges>isolateCommits(@NotNull BuildRepositoryChanges buildChanges)Break the single build changes object into a list ofBuildRepositoryChanges.protected booleanisRecoverableException(@NotNull org.tmatesoft.svn.core.SVNException e)Check if provided exception object identifies recoverable exception.booleanisRepositoryDifferent(@NotNull Repository repository)Checks if the current repo is the same as the given repositorybooleanisUseExport()booleanisUseExternals()voidonInitialBuild(BuildContext buildContext)Allows theRepositoryto perform custom actions when an initial build is triggered.voidpopulateFromConfig(@NotNull org.apache.commons.configuration.HierarchicalConfiguration config)Update the current object with data in theHierarchicalConfigurationvoidpostRetrieveSourceCode(@NotNull BuildContext buildContext, @NotNull File sourceDirectory)postRetrieveSourceCode will run after the retrieveSourceCode method is called.voidprepareConfigObject(@NotNull BuildConfiguration buildConfiguration)Do any preprocessing work before validation occurs.voidpreRetrieveSourceCode(@NotNull BuildContext buildContext, @NotNull File sourceDirectory)Checks if the SVN URL has changed@NotNull StringretrieveSourceCode(@NotNull BuildContext buildContext, @Nullable String vcsRevisionKey, @NotNull File sourceDirectory)Checks out the latest source code from an appropriate repository to specified directoryvoidsetAdministrationConfigurationAccessor(AdministrationConfigurationAccessor administrationConfigurationAccessor)voidsetAuthType(String authType)voidsetAutodetectBranchRoot(boolean autodetectBranchRoot)voidsetCommitIsolationEnabled(boolean commitIsolationEnabled)voidsetEncryptedPassphrase(String encryptedPassphrase)voidsetEncryptedPassword(String encryptedPassword)voidsetKeyFile(String myKeyFile)voidsetManualBranchRootUrl(String branchRoot)voidsetPassphrase(String passphrase)voidsetRepositoryUrl(String repositoryUrl)Specify the subversion repository we are usingvoidsetSvnClientManagerFactory(SVNClientManagerFactory svnClientManagerFactory)voidsetTrustedKeyHelper(TrustedKeyHelper trustedKeyHelper)voidsetUseExport(boolean useExport)voidsetUseExternals(boolean useExternals)voidsetUsername(String username)What's the username (if any) we are using to acces the repository?voidsetUserPassword(String password)Specify the password required to access the resposotoryvoidsetVcsBranch(@NotNull VcsBranch branch)Set and prepare the repository for using an arbitrary branch.voidsetVcsBranch(@NotNull VcsBranch branch, @NotNull org.apache.commons.configuration.HierarchicalConfiguration customConfiguration)@NotNull ErrorCollectiontestConnection(long timeout, @NotNull TimeUnit unit)Test connection to the repository within the given timeout.@NotNull org.apache.commons.configuration.HierarchicalConfigurationtoConfiguration()Store SvnRepository data into configuration object.booleanusePollingForBranchDetection()If Bamboo generic detection polling should be used for this repository@NotNull ErrorCollectionvalidate(@NotNull BuildConfiguration buildConfiguration)Validates the properties in theBuildConfigurationobject.-
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
getTemplateRenderer, 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.v2.build.BuildConfigurationAwarePlugin
isConfigurationMissing
-
Methods inherited from interface com.atlassian.bamboo.v2.build.ConfigurablePlugin
customizeBuildRequirements, removeBuildRequirements
-
Methods inherited from interface com.atlassian.bamboo.utils.DescriptionProvider
getDescription
-
Methods inherited from interface com.atlassian.bamboo.plugin.InitablePluginModule
init
-
Methods inherited from interface com.atlassian.bamboo.v2.build.RenderableBuildConfiguration
getEditHtml, getViewHtml
-
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.repository.TestConnectionAwareRepository
validateForConnectionTesting
-
-
-
-
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
-
USE_EXTERNALS
public static final String USE_EXTERNALS
- See Also:
- Constant Field Values
-
USE_EXPORT
public static final String USE_EXPORT
- 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
-
BRANCH_AUTODETECT_ROOT
public static final String BRANCH_AUTODETECT_ROOT
- See Also:
- Constant Field Values
-
BRANCH_MANUAL_ROOT
public static final String BRANCH_MANUAL_ROOT
- See Also:
- Constant Field Values
-
TAG_AUTODETECT_ROOT
public static final String TAG_AUTODETECT_ROOT
- See Also:
- Constant Field Values
-
TAG_MANUAL_ROOT
public static final String TAG_MANUAL_ROOT
- 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
-
trustedKeyHelper
protected TrustedKeyHelper trustedKeyHelper
-
-
Method Detail
-
collectChangesSinceLastBuild
@NotNull public @NotNull BuildRepositoryChanges collectChangesSinceLastBuild(@NotNull @NotNull String planKey, @NotNull @NotNull PlanVcsRevisionData revisionData) throws RepositoryException
- Specified by:
collectChangesSinceLastBuildin interfaceCustomRevisionDataAwareRepository- Throws:
RepositoryException
-
collectChangesForRevision
@NotNull public @NotNull BuildRepositoryChanges collectChangesForRevision(@NotNull @NotNull PlanKey planKey, @NotNull @NotNull String targetRevision) throws RepositoryException
Description copied from interface:OnceOffCapableRepositoryCollects the changes for the targetRevision. This method is called only on server side (never on agent).- Specified by:
collectChangesForRevisionin interfaceOnceOffCapableRepository- Overrides:
collectChangesForRevisionin classAbstractRepository- 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 @NotNull BuildRepositoryChanges collectChangesSinceLastBuild(@NotNull @NotNull String planKey, @Nullable @Nullable String lastVcsRevisionKey) throws RepositoryException
Description copied from interface:RepositoryV2Collects the changes since the lastVcsRevisionKey. This method is called only on server side (never on agent).- Specified by:
collectChangesSinceLastBuildin interfaceRepositoryV2lastVcsRevisionKey- 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:BranchInformationProviderIf Bamboo generic detection polling should be used for this repository- Specified by:
usePollingForBranchDetectionin interfaceBranchInformationProvider- Returns:
-
retrieveSourceCode
@NotNull public @NotNull String retrieveSourceCode(@NotNull @NotNull BuildContext buildContext, @Nullable @Nullable String vcsRevisionKey, @NotNull @NotNull File sourceDirectory) throws RepositoryException
Description copied from interface:CustomSourceDirectoryAwareRepositoryChecks out the latest source code from an appropriate repository to specified directory- Specified by:
retrieveSourceCodein interfaceCustomSourceDirectoryAwareRepositoryvcsRevisionKey- - may be null if you want latest codesourceDirectory- - directory to checkout to- Returns:
- vcsRevisionKey - the revision
- Throws:
RepositoryException
-
preRetrieveSourceCode
public void preRetrieveSourceCode(@NotNull @NotNull BuildContext buildContext, @NotNull @NotNull File sourceDirectory)Checks if the SVN URL has changed- Specified by:
preRetrieveSourceCodein interfaceRepositoryEventAware- Parameters:
buildContext-
-
postRetrieveSourceCode
public void postRetrieveSourceCode(@NotNull @NotNull BuildContext buildContext, @NotNull @NotNull File sourceDirectory)Description copied from interface:RepositoryEventAwarepostRetrieveSourceCode 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:
postRetrieveSourceCodein interfaceRepositoryEventAware
-
isRecoverableException
protected boolean isRecoverableException(@NotNull @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 @NotNull ErrorCollection validate(@NotNull @NotNull BuildConfiguration buildConfiguration)
Description copied from interface:BuildConfigurationAwarePluginValidates the properties in theBuildConfigurationobject. The name of the properties match those passed in through the form fragments inRenderableBuildConfiguration.getEditHtml(com.atlassian.bamboo.ww2.actions.build.admin.create.BuildConfiguration, com.atlassian.bamboo.plan.Plan)template.- Specified by:
validatein interfaceBuildConfigurationAwarePlugin- Overrides:
validatein classAbstractRepository- Parameters:
buildConfiguration- -- Returns:
ErrorCollectionkeyed by the field name.
-
isRepositoryDifferent
public boolean isRepositoryDifferent(@NotNull @NotNull Repository repository)Description copied from interface:RepositoryV2Checks if the current repo is the same as the given repository- Specified by:
isRepositoryDifferentin interfaceRepositoryV2- Parameters:
repository- to compare against- Returns:
- true of repositories are different, false if the same;
-
prepareConfigObject
public void prepareConfigObject(@NotNull @NotNull BuildConfiguration buildConfiguration)Description copied from interface:BuildConfigurationAwarePluginDo 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:
prepareConfigObjectin interfaceBuildConfigurationAwarePlugin- Overrides:
prepareConfigObjectin classBaseBuildConfigurationAwarePlugin- Parameters:
buildConfiguration- -
-
checkout
public long checkout(org.tmatesoft.svn.core.SVNURL url, org.tmatesoft.svn.core.wc.SVNRevision revision, File dstPath, boolean isRecursive) throws RepositoryExceptionChecks 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 @NotNull SvnRepositoryMavenPomAccessor getMavenPomAccessor()
- Specified by:
getMavenPomAccessorin interfaceMavenPomAccessorCapableRepository
-
info
@NotNull public @NotNull org.tmatesoft.svn.core.wc.SVNInfo info(org.tmatesoft.svn.core.SVNURL url, org.tmatesoft.svn.core.wc.SVNRevision revision) throws RepositoryExceptionRuns 'svn info' operation on a given URL.- Parameters:
url- repository location which shall be queriedrevision- a revision of repository location which shall be queried- Returns:
- SVNInfo object holding data
- Throws:
RepositoryException- Failed!
-
addDefaultValues
public void addDefaultValues(@NotNull @NotNull BuildConfiguration buildConfiguration)Description copied from interface:BuildConfigurationAwarePluginExtension point for adding default values to the form forRenderableBuildConfiguration.getEditHtml(com.atlassian.bamboo.ww2.actions.build.admin.create.BuildConfiguration, com.atlassian.bamboo.plan.Plan)- Specified by:
addDefaultValuesin interfaceBuildConfigurationAwarePlugin- Overrides:
addDefaultValuesin classAbstractRepository- Parameters:
buildConfiguration- -
-
populateFromConfig
public void populateFromConfig(@NotNull @NotNull org.apache.commons.configuration.HierarchicalConfiguration config)Description copied from interface:ConvertibleFromConfigUpdate the current object with data in theHierarchicalConfiguration- Specified by:
populateFromConfigin interfaceConvertibleFromConfig- Overrides:
populateFromConfigin classAbstractRepository
-
toConfiguration
@NotNull public @NotNull org.apache.commons.configuration.HierarchicalConfiguration toConfiguration()
Store SvnRepository data into configuration object.- Specified by:
toConfigurationin interfaceConvertibleFromConfig- Overrides:
toConfigurationin classAbstractRepository- Returns:
-
onInitialBuild
public void onInitialBuild(BuildContext buildContext)
Description copied from interface:InitialBuildAwareRepositoryAllows theRepositoryto perform custom actions when an initial build is triggered.- Specified by:
onInitialBuildin interfaceInitialBuildAwareRepository
-
isAdvancedOptionEnabled
public boolean isAdvancedOptionEnabled(@NotNull @NotNull BuildConfiguration buildConfiguration)- Overrides:
isAdvancedOptionEnabledin classAbstractRepository
-
getName
@NotNull public @NotNull String getName()
What's the name of the plugin - appears in the GUI dropdown- Specified by:
getNamein interfaceDescriptionProvider- Specified by:
getNamein interfaceNameProvider- Specified by:
getNamein interfaceRepository- 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:
getAuthTypein interfaceSelectableAuthenticationRepository- 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:RepositoryWhat's the repository server host- Specified by:
getHostin interfaceRepository- Returns:
- The host!
-
getHost
public String getHost(BuildContext buildContext)
-
getLocationIdentifier
@NotNull public @NotNull String getLocationIdentifier()
Description copied from interface:RepositoryA string representing the location of the repository- Specified by:
getLocationIdentifierin interfaceRepository- Overrides:
getLocationIdentifierin classAbstractRepository- 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:
isCleanCheckoutRequiredin interfaceMandatoryCleanCheckoutAwareRepository
-
setSvnClientManagerFactory
public void setSvnClientManagerFactory(SVNClientManagerFactory svnClientManagerFactory)
-
compareTo
public int compareTo(Object obj)
-
getAuthenticationTypes
@NotNull public @NotNull List<NameValuePair> getAuthenticationTypes()
Description copied from interface:SelectableAuthenticationRepositoryList all authentication types supported by repository.- Specified by:
getAuthenticationTypesin interfaceSelectableAuthenticationRepository- Returns:
- List of authentication types supported by repository
-
isCommitIsolationEnabled
public boolean isCommitIsolationEnabled()
Description copied from interface:CommitIsolationAwareRepositoryWhether or not commits will be broken up into individual builds- Specified by:
isCommitIsolationEnabledin interfaceCommitIsolationAwareRepository- 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()
-
setTrustedKeyHelper
public void setTrustedKeyHelper(TrustedKeyHelper trustedKeyHelper)
-
setAdministrationConfigurationAccessor
public void setAdministrationConfigurationAccessor(AdministrationConfigurationAccessor administrationConfigurationAccessor)
- Overrides:
setAdministrationConfigurationAccessorin classAbstractRepository
-
isolateCommits
@NotNull public @NotNull List<BuildRepositoryChanges> isolateCommits(@NotNull @NotNull BuildRepositoryChanges buildChanges)
Description copied from interface:CommitIsolationAwareRepositoryBreak the single build changes object into a list ofBuildRepositoryChanges. Must not be null. May return an empty list but that doesn't actually make any sense.
The order here matters. The first of theBuildRepositoryChangeswill be more likely to be built than lower changes, which may be discarded.- Specified by:
isolateCommitsin interfaceCommitIsolationAwareRepository- Returns:
-
createBranch
public void createBranch(long repositoryId, @NotNull @NotNull String branchName, @NotNull @NotNull BuildContext buildContext) throws RepositoryExceptionDescription copied from interface:BranchingAwareRepositoryCreates branch in the repository.- Specified by:
createBranchin interfaceBranchingAwareRepositorybranchName- name of new branchbuildContext- build context- Throws:
RepositoryException
-
createTag
public void createTag(long repositoryId, @NotNull @NotNull String tagName, @NotNull @NotNull BuildContext buildContext) throws RepositoryExceptionDescription copied from interface:TaggingAwareRepositoryCreates a tag in the repository- Specified by:
createTagin interfaceTaggingAwareRepositorytagName- - name of the tagbuildContext- - build context- Throws:
RepositoryException
-
getCustomVariables
@NotNull public @NotNull Map<String,String> getCustomVariables()
Description copied from interface:CustomVariableProviderRepositoryReturn 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:
getCustomVariablesin interfaceCustomVariableProviderRepository- Returns:
- Map with variable substitutions
-
getPlanRepositoryVariables
@NotNull public @NotNull Map<String,String> getPlanRepositoryVariables()
Description copied from interface:CustomVariableProviderRepositoryReturn 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:
getPlanRepositoryVariablesin interfaceCustomVariableProviderRepository- 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 @NotNull List<VcsBranch> getOpenBranches(@Nullable @Nullable String context) throws RepositoryException
Description copied from interface:BranchDetectionCapableRepositorySetof 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:
getOpenBranchesin interfaceBranchDetectionCapableRepository- Returns:
Listof branch names. May be empty.- Throws:
RepositoryException
-
getLastCommit
public CommitContext getLastCommit() throws RepositoryException
Description copied from interface:BranchDetectionCapableRepositoryRetrieve 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:
getLastCommitin interfaceBranchDetectionCapableRepository- Returns:
- the last commit or null if N/A
- Throws:
RepositoryException
-
getFirstCommit
public CommitContext getFirstCommit() throws RepositoryException
Description copied from interface:BranchDetectionCapableRepositoryRetrieve the commit that created the Branch.- Specified by:
getFirstCommitin interfaceBranchDetectionCapableRepository- Returns:
- the first commit to the branch
- Throws:
RepositoryException
-
getVcsBranch
@NotNull public @NotNull VcsBranch getVcsBranch()
- Specified by:
getVcsBranchin interfaceBranchAwareRepository- Returns:
- the branch being used currently by this repository.
-
setVcsBranch
public void setVcsBranch(@NotNull @NotNull VcsBranch branch)Description copied from interface:BranchAwareRepositorySet and prepare the repository for using an arbitrary branch. Generally the subsequent getVcsBranch should return the same branch name.- Specified by:
setVcsBranchin interfaceBranchAwareRepository
-
setVcsBranch
public void setVcsBranch(@NotNull @NotNull VcsBranch branch, @NotNull @NotNull org.apache.commons.configuration.HierarchicalConfiguration customConfiguration)
-
getCacheId
public CacheId getCacheId(@NotNull @NotNull CachingAwareRepository.CachableOperation cachableOperation)
Description copied from interface:CachingAwareRepositoryCache 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:
getCacheIdin interfaceCachingAwareRepository- Returns:
- the cache id of repository, null if the supplied operation cannot be cached
-
testConnection
@NotNull public @NotNull ErrorCollection testConnection(long timeout, @NotNull @NotNull TimeUnit unit)
Description copied from interface:TestConnectionAwareRepositoryTest connection to the repository within the given timeout. The method should stop executing after the given time elapses.- Specified by:
testConnectionin interfaceTestConnectionAwareRepository- Parameters:
timeout- the maximum time to waitunit- the time unit of the timeout argument- Returns:
- Errors discovered during testing connection. Empty error collection should be returned if connection was successful. The errors should be translated to error messages, rather than field errors. Field errors are used by Bamboo to handle special cases.
-
isCachingSupportedFor
public boolean isCachingSupportedFor(@NotNull @NotNull CachingAwareRepository.CachableOperation cachableOperation)- Specified by:
isCachingSupportedForin interfaceCachingAwareRepository- Returns:
- true if the repository supports generation of CacheIds for a given operation
-
getRepoPrefix
protected static String getRepoPrefix()
-
getTemporaryPrefix
protected String getTemporaryPrefix()
-
-