public class VcsConfigurationHelperImpl extends Object implements VcsConfigurationHelper
VcsConfigurationHelper.Overrides
BAMBOO_TEST_CONNECTION, OVERRIDE_ALL, OVERRIDE_NOTHING
Constructor and Description |
---|
VcsConfigurationHelperImpl(VcsViewerUIConfigBean vcsViewerUIConfigBean,
com.atlassian.struts.TextProvider textProvider,
BambooPermissionManager bambooPermissionManager,
RepositoryDefinitionManager repositoryDefinitionManager,
VcsRepositoryConfigurationService vcsRepositoryConfigurationService,
VcsBambooSpecsConfigurator vcsBambooSpecsConfigurator) |
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 previousVcsData,
ErrorCollection errorCollection,
Set<VcsConfigurationHelper.Overrides> overrides)
Run repository configuration validation(s) on action's data.
|
void |
validateVcsConfigurationForConnectionTesting(ActionParametersMap apm,
VcsRepositoryModuleDescriptor vcsDescriptor,
PartialVcsRepositoryData previousVcsData,
ErrorCollection errorCollection)
Run repository configuration validation(s) on action's data before testing the connection.
|
public VcsConfigurationHelperImpl(VcsViewerUIConfigBean vcsViewerUIConfigBean, com.atlassian.struts.TextProvider textProvider, BambooPermissionManager bambooPermissionManager, RepositoryDefinitionManager repositoryDefinitionManager, VcsRepositoryConfigurationService vcsRepositoryConfigurationService, VcsBambooSpecsConfigurator vcsBambooSpecsConfigurator)
public void validateVcsConfiguration(@NotNull ActionParametersMap apm, @NotNull VcsRepositoryModuleDescriptor vcsDescriptor, @Nullable PartialVcsRepositoryData previousVcsData, @NotNull ErrorCollection errorCollection, @NotNull Set<VcsConfigurationHelper.Overrides> overrides)
VcsConfigurationHelper
validateVcsConfiguration
in interface VcsConfigurationHelper
public void validateVcsConfigurationForConnectionTesting(@NotNull ActionParametersMap apm, @NotNull VcsRepositoryModuleDescriptor vcsDescriptor, @Nullable PartialVcsRepositoryData previousVcsData, @NotNull ErrorCollection errorCollection)
VcsConfigurationHelper
validateVcsConfigurationForConnectionTesting
in interface VcsConfigurationHelper
@NotNull public PartialVcsRepositoryData reconfigureRepositoryWithMavenData(@NotNull VcsRepositoryModuleDescriptor oldModuleDescriptor, @NotNull PartialVcsRepositoryData oldData, @Nullable VcsRepositoryModuleDescriptor newModuleDescriptor, @NotNull Map<String,String> newServerConfiguration, @Nullable VcsBranch vcsBranch, @Nullable String webRepositoryUrl)
VcsConfigurationHelper
reconfigureRepositoryWithMavenData
in interface VcsConfigurationHelper
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 public PartialVcsRepositoryData getNewPartialVcsConfigurationFromActionData(@NotNull ActionParametersMap apm, @NotNull VcsRepositoryModuleDescriptor vcsDescriptor, @NotNull String repositoryName, @Nullable String userDescription, @Nullable PartialVcsRepositoryData previousVcsDefinition, boolean createPlan, @NotNull Set<VcsConfigurationHelper.Overrides> overrides)
VcsConfigurationHelper
getNewPartialVcsConfigurationFromActionData
in interface VcsConfigurationHelper
@NotNull public PartialVcsRepositoryData temporaryVcsDataFromActionParams(@NotNull ActionParametersMap apm, @NotNull VcsRepositoryModuleDescriptor moduleDescriptor, @Nullable PartialVcsRepositoryData existingData, @NotNull Set<VcsConfigurationHelper.Overrides> overrides)
VcsConfigurationHelper
temporaryVcsDataFromActionParams
in interface VcsConfigurationHelper
public void validateSharedRepositoryName(String repositoryName, com.atlassian.struts.ValidationAware validationAware)
VcsConfigurationHelper
validateSharedRepositoryName
in interface VcsConfigurationHelper
repositoryName
- namevalidationAware
- caller@NotNull public ErrorCollection validateSharedRepositoryName(String repositoryName)
VcsConfigurationHelper
validateSharedRepositoryName
in interface VcsConfigurationHelper
repositoryName
- namepublic boolean currentUserHasPermissionToCreateSharedRepository()
currentUserHasPermissionToCreateSharedRepository
in interface VcsConfigurationHelper
@Nullable public RepositoryDataEntity validateRepositoryExistenceAndPermissions(long repositoryId, com.atlassian.struts.ValidationAware validationAware)
VcsConfigurationHelper
validateRepositoryExistenceAndPermissions
in interface VcsConfigurationHelper
validationAware
- callerCopyright © 2020 Atlassian Software Systems Pty Ltd. All rights reserved.