public class SvnRepository extends AbstractStandaloneRepository implements SelectableAuthenticationRepository, InitialBuildAwareRepository, RepositoryEventAware, MavenPomAccessorCapableRepository, CommitIsolationAwareRepository, BranchingAwareRepository, TaggingAwareRepository, CustomSourceDirectoryAwareRepository, MandatoryCleanCheckoutAwareRepository, AdvancedConfigurationAwareRepository, CustomRevisionDataAwareRepository, CustomVariableProviderRepository, BranchInformationProvider, CachingAwareRepository, DeploymentAwareRepository, TestConnectionAwareRepository
CachingAwareRepository.CachableOperation| Modifier and Type | Field and Description |
|---|---|
static String |
BRANCH_AUTODETECT_ROOT |
static String |
BRANCH_MANUAL_ROOT |
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 |
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 |
TAG_AUTODETECT_ROOT |
static String |
TAG_MANUAL_ROOT |
static String |
TEMPORARY_SVN_PASSWORD |
static String |
TEMPORARY_SVN_REPO_PREFIX |
protected TrustedKeyHelper |
trustedKeyHelper |
static String |
USE_EXPORT |
static String |
USE_EXTERNALS |
BUILD_TRIGGER_IP, buildDirectoryManager, buildLoggerManager, customVariableContext, featureManager, REPO_PREFIX, repositoryModuleDescriptor, templateRenderer, textProvidermoduleDescriptorCOMMIT_ISOLATION_OPTIONSELECTED_REPOSITORY, UNKNOWN_HOSTHOST_KEYFILTER_PATTERN_EXCLUDE, FILTER_PATTERN_INCLUDE, FILTER_PATTERN_NONE, FILTER_PATTERN_OPTION, FILTER_PATTERN_REGEXCHANGESET_FILTER_PATTERN_REGEX, MAVEN_RELEASE_PLUGIN_EXCLUSION_PATTERN| Constructor and Description |
|---|
SvnRepository() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
static 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 static 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,
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,
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 |
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 |
setTrustedKeyHelper(TrustedKeyHelper trustedKeyHelper) |
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) |
ErrorCollection |
testConnection(long timeout,
TimeUnit unit)
Test connection to the repository within the given timeout.
|
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. |
getAdvancedEditHtml, getAdvancedViewHtml, getEditHtml, getViewHtml, getViewHtmlcheckConnection, 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, toMergeCapableRepositorypopulateContextForEdit, populateContextForViewclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetAdvancedEditHtml, getAdvancedViewHtmlcheckConnection, getKey, getMinimalEditHtml, getShortKeygetSourceCodeDirectorycustomizeBuildRequirements, removeBuildRequirementsisConfigurationMissinginitgetEditHtml, getViewHtmlgetDescriptionvalidateForConnectionTestingpublic static final String NAME
public static final String KEY
public static final String COMPLETE_PLUGIN_KEY
public static final String SVN_REPO_PREFIX
public static final String SVN_REPO_URL
public static final String SVN_USERNAME
public static final String SVN_AUTH_TYPE
public static final String SVN_PASSWORD
public static final String SVN_KEYFILE
public static final String SVN_PASSPHRASE
public static final String SVN_SSL_KEYFILE
public static final String SVN_SSL_PASSPHRASE
public static final String USE_EXTERNALS
public static final String USE_EXPORT
public static final String TEMPORARY_SVN_REPO_PREFIX
public static final String TEMPORARY_SVN_PASSWORD
public static final String BRANCH_AUTODETECT_ROOT
public static final String BRANCH_MANUAL_ROOT
public static final String TAG_AUTODETECT_ROOT
public static final String TAG_MANUAL_ROOT
public static final String BRANCHES_DETECTION_BRANCHES_ROOT
public static final String BRANCHES_DETECTION_BRANCHES_ROOT_OVERRIDDEN
public static final org.tmatesoft.svn.core.wc.ISVNOptions DEFAULT_SVN_OPTIONS
protected TrustedKeyHelper trustedKeyHelper
@NotNull public BuildRepositoryChanges collectChangesSinceLastBuild(@NotNull String planKey, @NotNull PlanVcsRevisionData revisionData) throws RepositoryException
collectChangesSinceLastBuild in interface CustomRevisionDataAwareRepositoryRepositoryException@NotNull public BuildRepositoryChanges collectChangesForRevision(@NotNull PlanKey planKey, @NotNull String targetRevision) throws RepositoryException
OnceOffCapableRepositorycollectChangesForRevision in interface OnceOffCapableRepositorycollectChangesForRevision in class AbstractRepositoryRepositoryException - if something goes wrong@NotNull public BuildRepositoryChanges collectChangesSinceLastBuild(@NotNull String planKey, @Nullable String lastVcsRevisionKey) throws RepositoryException
RepositoryV2collectChangesSinceLastBuild in interface RepositoryV2lastVcsRevisionKey - can be null, if null you should ensure the correct vcsrevisionkey is returned in the BuildChanges object.RepositoryException - if something goes wrongpublic boolean usePollingForBranchDetection()
BranchInformationProviderusePollingForBranchDetection in interface BranchInformationProvider@NotNull public String retrieveSourceCode(@NotNull BuildContext buildContext, @Nullable String vcsRevisionKey, @NotNull File sourceDirectory) throws RepositoryException
CustomSourceDirectoryAwareRepositoryretrieveSourceCode in interface CustomSourceDirectoryAwareRepositoryvcsRevisionKey - - may be null if you want latest codesourceDirectory - - directory to checkout toRepositoryExceptionpublic void preRetrieveSourceCode(@NotNull
BuildContext buildContext,
@NotNull
File sourceDirectory)
preRetrieveSourceCode in interface RepositoryEventAwarebuildContext - public void postRetrieveSourceCode(@NotNull
BuildContext buildContext,
@NotNull
File sourceDirectory)
RepositoryEventAwarepostRetrieveSourceCode in interface RepositoryEventAwareprotected boolean isRecoverableException(@NotNull
org.tmatesoft.svn.core.SVNException e)
e - Exception to be analyzed.protected org.tmatesoft.svn.core.wc.SVNClientManager getSvnClientManager()
@NotNull public ErrorCollection validate(@NotNull BuildConfiguration buildConfiguration)
BuildConfigurationAwarePluginBuildConfiguration 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.validate in interface BuildConfigurationAwarePluginvalidate in class AbstractRepositorybuildConfiguration - -ErrorCollection keyed by the field name.public boolean isRepositoryDifferent(@NotNull
Repository repository)
RepositoryV2isRepositoryDifferent in interface RepositoryV2repository - to compare againstpublic void prepareConfigObject(@NotNull
BuildConfiguration buildConfiguration)
BuildConfigurationAwarePluginprepareConfigObject in interface BuildConfigurationAwarePluginprepareConfigObject in class BaseBuildConfigurationAwarePluginbuildConfiguration - -public long checkout(org.tmatesoft.svn.core.SVNURL url,
org.tmatesoft.svn.core.wc.SVNRevision revision,
File dstPath,
boolean isRecursive)
throws RepositoryException
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(..) recursivelyRepositoryException - Failed!public long export(org.tmatesoft.svn.core.SVNURL url,
org.tmatesoft.svn.core.wc.SVNRevision revision,
File dstPath,
boolean isRecursive)
throws RepositoryException
RepositoryException@NotNull public SvnRepositoryMavenPomAccessor getMavenPomAccessor()
getMavenPomAccessor in interface MavenPomAccessorCapableRepository@NotNull
public org.tmatesoft.svn.core.wc.SVNInfo info(org.tmatesoft.svn.core.SVNURL url,
org.tmatesoft.svn.core.wc.SVNRevision revision)
throws RepositoryException
url - repository location which shall be queriedrevision - a revision of repository location which shall be queriedRepositoryException - Failed!public void addDefaultValues(@NotNull
BuildConfiguration buildConfiguration)
BuildConfigurationAwarePluginRenderableBuildConfiguration.getEditHtml(com.atlassian.bamboo.ww2.actions.build.admin.create.BuildConfiguration, com.atlassian.bamboo.plan.Plan)addDefaultValues in interface BuildConfigurationAwarePluginaddDefaultValues in class AbstractRepositorybuildConfiguration - -public void populateFromConfig(@NotNull
org.apache.commons.configuration.HierarchicalConfiguration config)
ConvertibleFromConfigHierarchicalConfigurationpopulateFromConfig in interface ConvertibleFromConfigpopulateFromConfig in class AbstractRepository@NotNull public org.apache.commons.configuration.HierarchicalConfiguration toConfiguration()
toConfiguration in interface ConvertibleFromConfigtoConfiguration in class AbstractRepositorypublic void onInitialBuild(BuildContext buildContext)
InitialBuildAwareRepositoryRepository to perform custom actions when an initial build is triggered.onInitialBuild in interface InitialBuildAwareRepositorypublic boolean isAdvancedOptionEnabled(@NotNull
BuildConfiguration buildConfiguration)
isAdvancedOptionEnabled in class AbstractRepository@NotNull public String getName()
getName in interface RepositorygetName in interface DescriptionProvidergetName in interface NameProviderpublic String getPassphrase()
public void setPassphrase(String passphrase)
public String getEncryptedPassphrase()
public void setEncryptedPassphrase(String encryptedPassphrase)
public String getKeyFile()
public String getSubstitutedKeyFile()
public void setKeyFile(String myKeyFile)
public String getAuthType()
getAuthType in interface SelectableAuthenticationRepositorypublic void setAuthType(String authType)
public String getUrl()
public void setRepositoryUrl(String repositoryUrl)
repositoryUrl - The subversion repositorypublic String getRepositoryUrl()
public String getSubstitutedRepositoryUrl()
public void setUsername(String username)
username - The user name, null if there is no userpublic String getUsername()
public void setUserPassword(String password)
password - The password (null if we are not using user authentication)public String getUserPassword()
public String getEncryptedPassword()
public void setEncryptedPassword(String encryptedPassword)
protected org.tmatesoft.svn.core.SVNURL getSubstitutedSvnUrl()
throws org.tmatesoft.svn.core.SVNException
org.tmatesoft.svn.core.SVNExceptionpublic String getHost()
RepositorygetHost in interface Repositorypublic String getHost(BuildContext buildContext)
@NotNull public String getLocationIdentifier()
RepositorygetLocationIdentifier in interface RepositorygetLocationIdentifier in class AbstractRepositorypublic boolean isUseExternals()
public void setUseExternals(boolean useExternals)
public boolean isUseExport()
public void setUseExport(boolean useExport)
public boolean isCleanCheckoutRequired()
isCleanCheckoutRequired in interface MandatoryCleanCheckoutAwareRepositorypublic void setSvnClientManagerFactory(SVNClientManagerFactory svnClientManagerFactory)
public int compareTo(Object obj)
@NotNull public List<NameValuePair> getAuthenticationTypes()
SelectableAuthenticationRepositorygetAuthenticationTypes in interface SelectableAuthenticationRepositorypublic boolean isCommitIsolationEnabled()
CommitIsolationAwareRepositoryisCommitIsolationEnabled in interface CommitIsolationAwareRepositorypublic void setCommitIsolationEnabled(boolean commitIsolationEnabled)
public boolean isAutodetectBranchRootUrl()
public void setAutodetectBranchRoot(boolean autodetectBranchRoot)
public boolean isAutodetectTagRootUrl()
public String getManualBranchRootUrl()
public void setManualBranchRootUrl(String branchRoot)
public String getManualTagRootUrl()
public void setTrustedKeyHelper(TrustedKeyHelper trustedKeyHelper)
public void setAdministrationConfigurationAccessor(AdministrationConfigurationAccessor administrationConfigurationAccessor)
setAdministrationConfigurationAccessor in class AbstractRepository@NotNull public List<BuildRepositoryChanges> isolateCommits(@NotNull BuildRepositoryChanges buildChanges)
CommitIsolationAwareRepositoryBuildRepositoryChanges. Must not be null. May return an empty
list but that doesn't actually make any sense. BuildRepositoryChanges
will be more likely to be built than lower changes, which may be discarded.isolateCommits in interface CommitIsolationAwareRepositorypublic void createBranch(long repositoryId,
@NotNull
String branchName,
@NotNull
BuildContext buildContext)
throws RepositoryException
BranchingAwareRepositorycreateBranch in interface BranchingAwareRepositorybranchName - name of new branchbuildContext - build contextRepositoryExceptionpublic void createTag(long repositoryId,
@NotNull
String tagName,
@NotNull
BuildContext buildContext)
throws RepositoryException
TaggingAwareRepositorycreateTag in interface TaggingAwareRepositorytagName - - name of the tagbuildContext - - build contextRepositoryException@NotNull public Map<String,String> getCustomVariables()
CustomVariableProviderRepositoryNull values will be filtered out so it's safe to put them in the map.
getCustomVariables in interface CustomVariableProviderRepository@NotNull public Map<String,String> getPlanRepositoryVariables()
CustomVariableProviderRepositoryNull values will be filtered out so it's safe to put them in the map.
getPlanRepositoryVariables in interface CustomVariableProviderRepositorypublic org.tmatesoft.svn.core.SVNURL getBranchRootUrl()
throws org.tmatesoft.svn.core.SVNException
org.tmatesoft.svn.core.SVNException@NotNull public List<VcsBranch> getOpenBranches(@Nullable String context) throws RepositoryException
BranchDetectionCapableRepositorySet 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).getOpenBranches in interface BranchDetectionCapableRepositoryList of branch names. May be empty.RepositoryExceptionpublic CommitContext getLastCommit() throws RepositoryException
BranchDetectionCapableRepositorygetLastCommit in interface BranchDetectionCapableRepositoryRepositoryExceptionpublic CommitContext getFirstCommit() throws RepositoryException
BranchDetectionCapableRepositorygetFirstCommit in interface BranchDetectionCapableRepositoryRepositoryException@NotNull public VcsBranch getVcsBranch()
getVcsBranch in interface BranchAwareRepositorypublic void setVcsBranch(@NotNull
VcsBranch branch)
BranchAwareRepositorysetVcsBranch in interface BranchAwareRepositorypublic void setVcsBranch(@NotNull
VcsBranch branch,
@NotNull
org.apache.commons.configuration.HierarchicalConfiguration customConfiguration)
public CacheId getCacheId(@NotNull CachingAwareRepository.CachableOperation cachableOperation)
CachingAwareRepositorygetCacheId in interface CachingAwareRepository@NotNull public ErrorCollection testConnection(long timeout, @NotNull TimeUnit unit)
TestConnectionAwareRepositorytestConnection in interface TestConnectionAwareRepositorytimeout - the maximum time to waitunit - the time unit of the timeout argumentpublic boolean isCachingSupportedFor(@NotNull
CachingAwareRepository.CachableOperation cachableOperation)
isCachingSupportedFor in interface CachingAwareRepositoryprotected static String getRepoPrefix()
protected String getTemporaryPrefix()
Copyright © 2017 Atlassian Software Systems Pty Ltd. All rights reserved.