@Internal
public interface VcsConfigurationHelper
Modifier and Type | Interface and Description |
---|---|
static class |
VcsConfigurationHelper.Overrides |
Modifier and Type | Field and Description |
---|---|
static String |
BAMBOO_TEST_CONNECTION
Special marker added to
ActionParametersMap if validation invoked from test connection. |
static EnumSet<VcsConfigurationHelper.Overrides> |
OVERRIDE_ALL |
static EnumSet<VcsConfigurationHelper.Overrides> |
OVERRIDE_NOTHING |
Modifier and Type | Method and Description |
---|---|
boolean |
currentUserHasPermissionToCreateSharedRepository() |
PartialVcsRepositoryData |
getNewPartialVcsConfigurationFromActionData(ActionParametersMap apm,
VcsRepositoryModuleDescriptor vcsDescriptor,
String repositoryName,
String userDescription,
PartialVcsRepositoryData previousVcsDefinition,
boolean createPlan,
Set<VcsConfigurationHelper.Overrides> overrides)
Extracts repository configuration from action's parameters for saving in DB.
|
PartialVcsRepositoryData |
reconfigureRepositoryWithMavenData(VcsRepositoryModuleDescriptor oldModuleDescriptor,
PartialVcsRepositoryData oldData,
VcsRepositoryModuleDescriptor newModuleDescriptor,
Map<String,String> newServerConfiguration,
VcsBranch vcsBranch,
String webRepositoryUrl)
Creates new repository configuration according to data found in a maven pom.xml.
|
PartialVcsRepositoryData |
temporaryVcsDataFromActionParams(ActionParametersMap apm,
VcsRepositoryModuleDescriptor moduleDescriptor,
PartialVcsRepositoryData existingData,
Set<VcsConfigurationHelper.Overrides> overrides)
Extracts repository configuration from action's parameters.
|
RepositoryDataEntity |
validateRepositoryExistenceAndPermissions(long repositoryId,
com.atlassian.struts.ValidationAware validationAware)
Checks if a repository exists in the DB.
|
ErrorCollection |
validateSharedRepositoryName(String repositoryName)
Check if new shared repository name is valid.
|
void |
validateSharedRepositoryName(String repositoryName,
com.atlassian.struts.ValidationAware validationAware)
Check if new shared repository name is valid.
|
void |
validateVcsConfiguration(ActionParametersMap apm,
VcsRepositoryModuleDescriptor vcsDescriptor,
PartialVcsRepositoryData previousVcsDefinition,
ErrorCollection errorCollection,
Set<VcsConfigurationHelper.Overrides> overrides)
Run repository configuration validation(s) on action's data.
|
void |
validateVcsConfigurationForConnectionTesting(ActionParametersMap apm,
VcsRepositoryModuleDescriptor vcsDescriptor,
PartialVcsRepositoryData previousVcsDefinition,
ErrorCollection errorCollection)
Run repository configuration validation(s) on action's data before testing the connection.
|
static final String BAMBOO_TEST_CONNECTION
ActionParametersMap
if validation invoked from test connection.static final EnumSet<VcsConfigurationHelper.Overrides> OVERRIDE_NOTHING
static final EnumSet<VcsConfigurationHelper.Overrides> OVERRIDE_ALL
void validateVcsConfiguration(@NotNull ActionParametersMap apm, @NotNull VcsRepositoryModuleDescriptor vcsDescriptor, @Nullable PartialVcsRepositoryData previousVcsDefinition, @NotNull ErrorCollection errorCollection, @NotNull Set<VcsConfigurationHelper.Overrides> overrides)
apm
- vcsDescriptor
- previousVcsDefinition
- errorCollection
- void validateVcsConfigurationForConnectionTesting(@NotNull ActionParametersMap apm, @NotNull VcsRepositoryModuleDescriptor vcsDescriptor, @Nullable PartialVcsRepositoryData previousVcsDefinition, @NotNull ErrorCollection errorCollection)
apm
- vcsDescriptor
- previousVcsDefinition
- errorCollection
- @NotNull PartialVcsRepositoryData reconfigureRepositoryWithMavenData(@NotNull VcsRepositoryModuleDescriptor oldModuleDescriptor, @NotNull PartialVcsRepositoryData oldData, @Nullable VcsRepositoryModuleDescriptor newModuleDescriptor, @NotNull Map<String,String> newServerConfiguration, @Nullable VcsBranch vcsBranch, @Nullable String webRepositoryUrl)
oldModuleDescriptor
- descriptor of the plugin which was used to check out maven pomoldData
- repository data used to check out maven pomnewModuleDescriptor
- descriptor of the repository plugin according to repository url found in pom.xmlnewServerConfiguration
- server configuration as extracted by VcsMavenPomAccessor.parseMavenScmUrlToVcsLocation(String, VcsRepositoryData)
vcsBranch
- vcs branch as extracted by VcsMavenPomAccessor.parseMavenScmUrlToVcsBranch(String, VcsRepositoryData)
webRepositoryUrl
- url to be used by web repository viewer@NotNull PartialVcsRepositoryData getNewPartialVcsConfigurationFromActionData(@NotNull ActionParametersMap apm, @NotNull VcsRepositoryModuleDescriptor vcsDescriptor, @NotNull String repositoryName, @Nullable String userDescription, @Nullable PartialVcsRepositoryData previousVcsDefinition, boolean createPlan, @NotNull Set<VcsConfigurationHelper.Overrides> overrides)
apm
- vcsDescriptor
- repositoryName
- userDescription
- previousVcsDefinition
- createPlan
- @NotNull PartialVcsRepositoryData temporaryVcsDataFromActionParams(@NotNull ActionParametersMap apm, @NotNull VcsRepositoryModuleDescriptor moduleDescriptor, @Nullable PartialVcsRepositoryData existingData, @NotNull Set<VcsConfigurationHelper.Overrides> overrides)
apm
- moduleDescriptor
- existingData
- void validateSharedRepositoryName(String repositoryName, com.atlassian.struts.ValidationAware validationAware)
repositoryName
- namevalidationAware
- caller@NotNull ErrorCollection validateSharedRepositoryName(String repositoryName)
repositoryName
- nameboolean currentUserHasPermissionToCreateSharedRepository()
@Nullable RepositoryDataEntity validateRepositoryExistenceAndPermissions(long repositoryId, com.atlassian.struts.ValidationAware validationAware)
repositoryId
- validationAware
- callerCopyright © 2020 Atlassian Software Systems Pty Ltd. All rights reserved.