|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.bamboo.v2.build.BaseBuildConfigurationAwarePlugin com.atlassian.bamboo.v2.build.BaseConfigurablePlugin com.atlassian.bamboo.repository.AbstractRepository com.atlassian.bamboo.repository.svn.SvnRepository
public class SvnRepository
This class provides a Subversion repository for Bamboo.
Field Summary | |
---|---|
static java.lang.String |
COMPLETE_PLUGIN_KEY
|
static org.tmatesoft.svn.core.wc.ISVNOptions |
DEFAULT_SVN_OPTIONS
|
static java.lang.String |
KEY
|
static java.lang.String |
NAME
|
static java.lang.String |
SVN_AUTH_TYPE
|
static java.lang.String |
SVN_KEYFILE
|
static java.lang.String |
SVN_PASSPHRASE
|
static java.lang.String |
SVN_PASSWORD
|
static java.lang.String |
SVN_REPO_URL
|
static java.lang.String |
SVN_SSL_KEYFILE
|
static java.lang.String |
SVN_SSL_PASSPHRASE
|
static java.lang.String |
SVN_USERNAME
|
static java.lang.String |
TEMPORARY_SVN_PASSWORD
|
Fields inherited from class com.atlassian.bamboo.repository.AbstractRepository |
---|
BUILD_TRIGGER_IP, buildDirectoryManager, buildLoggerManager, CLEAN_CHECKOUT_PARAM, CLEAN_WORKING_DIRECTORY_PARAM, customVariableContext, repositoryModuleDescriptor, templateRenderer, textProvider |
Fields inherited from class com.atlassian.bamboo.v2.build.BaseBuildConfigurationAwarePlugin |
---|
moduleDescriptor |
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 |
Constructor Summary | |
---|---|
SvnRepository()
|
Method Summary | |
---|---|
long |
checkout(org.tmatesoft.svn.core.SVNURL url,
org.tmatesoft.svn.core.wc.SVNRevision revision,
java.io.File dstPath,
boolean isRecursive)
Checks out a working copy from a repository. |
BuildChanges |
collectChangesSinceLastBuild(java.lang.String planKey,
java.lang.String lastVcsRevisionKey)
Collects the changes since the lastVcsRevisionKey |
int |
compareTo(java.lang.Object obj)
|
boolean |
equals(java.lang.Object o)
|
java.util.List<NameValuePair> |
getAuthenticationTypes()
List all authentication types supported by repository. |
java.lang.String |
getAuthType()
|
java.lang.String |
getEncryptedPassphrase()
|
java.lang.String |
getEncryptedPassword()
|
java.util.Map<java.lang.String,java.lang.Long> |
getExternalPathRevisionMappings()
|
java.util.SortedMap<java.lang.String,java.lang.Long> |
getExternalPathRevisionMappingsSorted()
|
java.lang.String |
getHost()
What's the repository server host |
java.lang.String |
getHost(BuildContext buildContext)
|
java.lang.String |
getKeyFile()
|
java.lang.String |
getLocationIdentifier()
A string representing the location of the repository |
SvnRepositoryMavenPomAccessor |
getMavenPomAccessor()
|
java.lang.String |
getName()
What's the name of the plugin - appears in the GUI dropdown |
java.lang.String |
getPassphrase()
|
java.lang.String |
getRepositoryUrl()
Which repository URL are we using? |
java.lang.String |
getSubstitutedKeyFile()
|
java.lang.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. |
java.lang.String |
getUrl()
Where is the documentation and help about using Subversion? |
java.lang.String |
getUsername()
What username are we using to access the repository? |
java.lang.String |
getUserPassword()
What password are we using to access the repository |
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)
|
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 |
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 |
prepareConfigObject(BuildConfiguration buildConfiguration)
Do any preprocessing work before validation occurs. |
void |
preRetrieveSourceCode(BuildContext buildContext)
Checks if the SVN URL has changed |
java.lang.String |
retrieveSourceCode(BuildContext buildContext,
java.lang.String vcsRevisionKey)
Checks out the latest source code to an appropriate repository |
java.lang.String |
retrieveSourceCode(java.lang.String planKey,
java.lang.String vcsRevisionKey)
Checks out the latest source code to an appropriate repository |
void |
setAuthType(java.lang.String authType)
|
void |
setEncryptedPassphrase(java.lang.String encryptedPassphrase)
|
void |
setEncryptedPassword(java.lang.String encryptedPassword)
|
void |
setKeyFile(java.lang.String myKeyFile)
|
void |
setPassphrase(java.lang.String passphrase)
|
void |
setRepositoryUrl(java.lang.String repositoryUrl)
Specify the subversion repository we are using |
void |
setSvnClientManagerFactory(SVNClientManagerFactory svnClientManagerFactory)
|
void |
setUseExternals(boolean useExternals)
|
void |
setUsername(java.lang.String username)
What's the username (if any) we are using to acces the repository? |
void |
setUserPassword(java.lang.String password)
Specify the password required to access the resposotory |
org.apache.commons.configuration.HierarchicalConfiguration |
toConfiguration()
Store SvnRepository data into configuration object. |
ErrorCollection |
validate(BuildConfiguration buildConfiguration)
Validates the properties in the BuildConfiguration object. |
Methods inherited from class com.atlassian.bamboo.v2.build.BaseConfigurablePlugin |
---|
customizeBuildRequirements, removeBuildRequirements |
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.Repository |
---|
checkConnection, getKey, getMinimalEditHtml, getShortKey, getTriggerIpAddress, setReferencesDifferentRepository |
Methods inherited from interface com.atlassian.bamboo.v2.build.repository.RepositoryV2 |
---|
getSourceCodeDirectory, getSourceCodeDirectory, referencesDifferentRepository |
Methods inherited from interface com.atlassian.bamboo.v2.build.ConfigurablePlugin |
---|
customizeBuildRequirements, removeBuildRequirements |
Methods inherited from interface com.atlassian.bamboo.v2.build.BuildConfigurationAwarePlugin |
---|
addDefaultValues |
Methods inherited from interface com.atlassian.bamboo.v2.build.RenderableBuildConfiguration |
---|
getEditHtml, getViewHtml |
Methods inherited from interface com.atlassian.bamboo.utils.DescriptionProvider |
---|
getDescription |
Field Detail |
---|
public static final java.lang.String NAME
public static final java.lang.String KEY
public static final java.lang.String COMPLETE_PLUGIN_KEY
public static final java.lang.String SVN_REPO_URL
public static final java.lang.String SVN_USERNAME
public static final java.lang.String SVN_AUTH_TYPE
public static final java.lang.String SVN_PASSWORD
public static final java.lang.String SVN_KEYFILE
public static final java.lang.String SVN_PASSPHRASE
public static final java.lang.String SVN_SSL_KEYFILE
public static final java.lang.String SVN_SSL_PASSPHRASE
public static final java.lang.String TEMPORARY_SVN_PASSWORD
public static final org.tmatesoft.svn.core.wc.ISVNOptions DEFAULT_SVN_OPTIONS
Constructor Detail |
---|
public SvnRepository()
Method Detail |
---|
@NotNull public BuildChanges collectChangesSinceLastBuild(@NotNull java.lang.String planKey, @Nullable java.lang.String lastVcsRevisionKey) throws RepositoryException
RepositoryV2
collectChangesSinceLastBuild
in interface RepositoryV2
lastVcsRevisionKey
- - can be null, if null you should ensure the correct vcsrevisionkey is returned in the BuildChanges object.
RepositoryException
- if something goes wrong@NotNull public java.lang.String retrieveSourceCode(@NotNull java.lang.String planKey, @Nullable java.lang.String vcsRevisionKey) throws RepositoryException
RepositoryV2
retrieveSourceCode
in interface RepositoryV2
vcsRevisionKey
- - may be null if you want latest code
RepositoryException
@NotNull public java.lang.String retrieveSourceCode(@NotNull BuildContext buildContext, @Nullable java.lang.String vcsRevisionKey) throws RepositoryException
RepositoryV2
retrieveSourceCode
in interface RepositoryV2
vcsRevisionKey
- - may be null if you want latest code
RepositoryException
public void preRetrieveSourceCode(@NotNull BuildContext buildContext)
preRetrieveSourceCode
in interface RepositoryEventAware
buildContext
- public void postRetrieveSourceCode(@NotNull BuildContext buildContext)
RepositoryEventAware
postRetrieveSourceCode
in interface RepositoryEventAware
protected 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)
BuildConfigurationAwarePlugin
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.
validate
in interface BuildConfigurationAwarePlugin
validate
in class AbstractRepository
buildConfiguration
- - @NotNull
ErrorCollection
keyed by the field name. @NotNullpublic boolean isRepositoryDifferent(@NotNull Repository repository)
RepositoryV2
isRepositoryDifferent
in interface RepositoryV2
repository
- to compare against
public void prepareConfigObject(@NotNull BuildConfiguration buildConfiguration)
BuildConfigurationAwarePlugin
prepareConfigObject
in interface BuildConfigurationAwarePlugin
prepareConfigObject
in class BaseBuildConfigurationAwarePlugin
buildConfiguration
- - @NotNullpublic long checkout(org.tmatesoft.svn.core.SVNURL url, org.tmatesoft.svn.core.wc.SVNRevision revision, java.io.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(..) recursively
RepositoryException
- Failed!@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 queried
RepositoryException
- Failed!public void populateFromConfig(@NotNull org.apache.commons.configuration.HierarchicalConfiguration config)
ConvertibleFromConfig
HierarchicalConfiguration
populateFromConfig
in interface ConvertibleFromConfig
populateFromConfig
in class AbstractRepository
@NotNull public org.apache.commons.configuration.HierarchicalConfiguration toConfiguration()
toConfiguration
in interface ConvertibleFromConfig
toConfiguration
in class AbstractRepository
public void onInitialBuild(BuildContext buildContext)
InitialBuildAwareRepository
Repository
to perform custom actions when an initial build is triggered.
onInitialBuild
in interface InitialBuildAwareRepository
public boolean isAdvancedOptionEnabled(@NotNull BuildConfiguration buildConfiguration)
@NotNull public java.lang.String getName()
getName
in interface Repository
getName
in interface DescriptionProvider
getName
in interface NameProvider
public java.lang.String getPassphrase()
public void setPassphrase(java.lang.String passphrase)
public java.lang.String getEncryptedPassphrase()
public void setEncryptedPassphrase(java.lang.String encryptedPassphrase)
public java.lang.String getKeyFile()
public java.lang.String getSubstitutedKeyFile()
public void setKeyFile(java.lang.String myKeyFile)
public java.lang.String getAuthType()
getAuthType
in interface SelectableAuthenticationRepository
public void setAuthType(java.lang.String authType)
public java.lang.String getUrl()
public void setRepositoryUrl(java.lang.String repositoryUrl)
repositoryUrl
- The subversion repositorypublic java.lang.String getRepositoryUrl()
public java.lang.String getSubstitutedRepositoryUrl()
public void setUsername(java.lang.String username)
username
- The user name, null if there is no userpublic java.lang.String getUsername()
public void setUserPassword(java.lang.String password)
password
- The password (null if we are not using user authentication)public java.lang.String getUserPassword()
public java.lang.String getEncryptedPassword()
public void setEncryptedPassword(java.lang.String encryptedPassword)
protected org.tmatesoft.svn.core.SVNURL getSubstitutedSvnUrl() throws org.tmatesoft.svn.core.SVNException
org.tmatesoft.svn.core.SVNException
public java.lang.String getHost()
Repository
getHost
in interface Repository
public java.lang.String getHost(BuildContext buildContext)
@NotNull public java.lang.String getLocationIdentifier()
Repository
getLocationIdentifier
in interface Repository
getLocationIdentifier
in class AbstractRepository
public boolean isUseExternals()
public void setUseExternals(boolean useExternals)
public void setSvnClientManagerFactory(SVNClientManagerFactory svnClientManagerFactory)
public java.util.Map<java.lang.String,java.lang.Long> getExternalPathRevisionMappings()
public java.util.SortedMap<java.lang.String,java.lang.Long> getExternalPathRevisionMappingsSorted()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int compareTo(java.lang.Object obj)
@NotNull public java.util.List<NameValuePair> getAuthenticationTypes()
SelectableAuthenticationRepository
getAuthenticationTypes
in interface SelectableAuthenticationRepository
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |