Package com.atlassian.bamboo.repository
Interface TestConnectionAwareRepository
-
- All Superinterfaces:
BambooPluginModule
,BuildConfigurationAwarePlugin
,ConfigurablePlugin
,ConvertibleFromConfig
,DescriptionProvider
,InitablePluginModule
,NameProvider
,RenderableBuildConfiguration
,Repository
,RepositoryV2
,Serializable
- All Known Implementing Classes:
BitbucketRepository
,GitRepository
,SvnRepository
public interface TestConnectionAwareRepository extends Repository
Repository that supports testing connection.
-
-
Field Summary
Fields Modifier and Type Field Description static String
HOST_KEY
Marker field for error messages related to host key verification.-
Fields inherited from interface com.atlassian.bamboo.repository.Repository
SELECTED_REPOSITORY, UNKNOWN_HOST
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description @NotNull ErrorCollection
testConnection(long timeout, @NotNull TimeUnit unit)
Test connection to the repository within the given timeout.default @NotNull ErrorCollection
validateForConnectionTesting(@NotNull BuildConfiguration configuration)
A method similar toBuildConfigurationAwarePlugin.validate(BuildConfiguration)
used to validate repository configuration before connection testing.-
Methods inherited from interface com.atlassian.bamboo.v2.build.BuildConfigurationAwarePlugin
addDefaultValues, isConfigurationMissing, prepareConfigObject, validate
-
Methods inherited from interface com.atlassian.bamboo.v2.build.ConfigurablePlugin
customizeBuildRequirements, removeBuildRequirements
-
Methods inherited from interface com.atlassian.bamboo.fieldvalue.ConvertibleFromConfig
populateFromConfig, toConfiguration
-
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, getHost, getKey, getLocationIdentifier, getMinimalEditHtml, getName, getShortKey
-
Methods inherited from interface com.atlassian.bamboo.v2.build.repository.RepositoryV2
collectChangesSinceLastBuild, getSourceCodeDirectory, isRepositoryDifferent
-
-
-
-
Field Detail
-
HOST_KEY
static final String HOST_KEY
Marker field for error messages related to host key verification.
-
-
Method Detail
-
testConnection
@NotNull @NotNull ErrorCollection testConnection(long timeout, @NotNull @NotNull TimeUnit unit)
Test connection to the repository within the given timeout. The method should stop executing after the given time elapses.- 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.
- Since:
- 5.10
-
validateForConnectionTesting
@NotNull default @NotNull ErrorCollection validateForConnectionTesting(@NotNull @NotNull BuildConfiguration configuration)
A method similar toBuildConfigurationAwarePlugin.validate(BuildConfiguration)
used to validate repository configuration before connection testing. This method may be more relaxed than normal validation. Additionally, different error messages may be displayed (e.g. related to impossibility of transferring files).- Parameters:
configuration
- repository configuration to validate- Returns:
- validation errors
- Since:
- 5.13
-
-