public class VersionNamingServiceImpl extends Object implements VersionNamingService
Constructor and Description |
---|
VersionNamingServiceImpl(DeploymentProjectDao deploymentProjectDao,
DeploymentResultDao deploymentResultDao,
ScopedExclusionService exclusionService,
DeploymentVersionDao deploymentVersionDao,
VariableDefinitionManager variableDefinitionManager,
VariableConfigurationService variableConfigurationService,
VariableSubstitutorFactory variableSubstitutorFactory) |
Modifier and Type | Method and Description |
---|---|
String |
getIncrementedVersionName(String versionName)
Calculates an increment of a version name.
|
protected String |
getUniqueVersionName(long deploymentProjectId,
String versionName) |
protected io.atlassian.fugue.Pair<String,String> |
getUniqueVersionNameByAutoIncrementing(long deploymentProjectId,
MutableVersionNamingScheme versionNamingScheme,
String nextSubstitutedName,
VariableSubstitutor variableSubstitutor) |
MutableVersionNamingScheme |
getVersionNamingSchemeForProject(long deploymentProjectId)
Get the version naming configuration for a project
|
MutableDeploymentVersion |
nameAndCreateVersion(InternalDeploymentProject deploymentProject,
ImmutablePlan linkedPlan,
MutableDeploymentVersion deploymentVersion,
String versionName,
String nextVersionName,
Map<String,VariableDefinitionContext> variables)
Takes a new deployment version, if new version name supplied, uses that, otherwise generates unique name based on version naming scheme.
|
MutableDeploymentVersion |
renameVersion(long deploymentProjectId,
DeploymentVersion deploymentVersion,
String newVersionName)
Rename a version.
|
MutableVersionNamingScheme |
updateVersionNamingSchemeForProject(long deploymentProjectId,
String nextVersionName,
boolean autoIncrement,
Set<String> variablesToAutoIncrement)
update the version naming configuration for a project
|
public VersionNamingServiceImpl(DeploymentProjectDao deploymentProjectDao, DeploymentResultDao deploymentResultDao, ScopedExclusionService exclusionService, DeploymentVersionDao deploymentVersionDao, VariableDefinitionManager variableDefinitionManager, VariableConfigurationService variableConfigurationService, VariableSubstitutorFactory variableSubstitutorFactory)
@Nullable public MutableVersionNamingScheme getVersionNamingSchemeForProject(long deploymentProjectId)
VersionNamingService
getVersionNamingSchemeForProject
in interface VersionNamingService
deploymentProjectId
- of the project@NotNull public MutableVersionNamingScheme updateVersionNamingSchemeForProject(long deploymentProjectId, String nextVersionName, boolean autoIncrement, @NotNull Set<String> variablesToAutoIncrement)
VersionNamingService
updateVersionNamingSchemeForProject
in interface VersionNamingService
deploymentProjectId
- of the projectnextVersionName
- the value to be used for the next version nameautoIncrement
- whether the version name should be auto-incrementedvariablesToAutoIncrement
- variables to increment@NotNull public MutableDeploymentVersion nameAndCreateVersion(@NotNull InternalDeploymentProject deploymentProject, @NotNull ImmutablePlan linkedPlan, @NotNull MutableDeploymentVersion deploymentVersion, @Nullable String versionName, @Nullable String nextVersionName, @NotNull Map<String,VariableDefinitionContext> variables) throws WebValidationException
VersionNamingService
nameAndCreateVersion
in interface VersionNamingService
deploymentProject
- the version belongs todeploymentVersion
- the version to be named and saved.versionName
- (optional) name to be used for this versionnextVersionName
- (optional) the value the next version name should be set to.variables
- map containing variables available for version name creation (doesn't have to contain GLOBAL and SYSTEM variables)WebValidationException
- on any error@NotNull public String getIncrementedVersionName(@NotNull String versionName)
VersionNamingService
getIncrementedVersionName
in interface VersionNamingService
versionName
- to increment@NotNull public MutableDeploymentVersion renameVersion(long deploymentProjectId, DeploymentVersion deploymentVersion, String newVersionName) throws WebValidationException
VersionNamingService
renameVersion
in interface VersionNamingService
WebValidationException
@Nullable protected io.atlassian.fugue.Pair<String,String> getUniqueVersionNameByAutoIncrementing(long deploymentProjectId, MutableVersionNamingScheme versionNamingScheme, String nextSubstitutedName, VariableSubstitutor variableSubstitutor)
Copyright © 2017 Atlassian Software Systems Pty Ltd. All rights reserved.