Class DeploymentProjectServiceImpl
java.lang.Object
com.atlassian.bamboo.deployments.projects.service.DeploymentProjectServiceImpl
- All Implemented Interfaces:
DeploymentProjectService
-
Constructor Summary
ConstructorDescriptionDeploymentProjectServiceImpl
(ArtifactDefinitionManager artifactDefinitionManager, BambooAclUpdateHelper aclUpdateHelper, BambooAuthenticationContext authenticationContext, CachedPlanManager cachedPlanManager, DeploymentProjectDao deploymentProjectDao, DeploymentResultService deploymentResultService, EnvironmentDao environmentDao, EnvironmentService environmentService, InternalEnvironmentService internalEnvironmentService, EnvironmentTaskService environmentTaskService, HibernateMutableAclService aclService, com.opensymphony.xwork2.TextProvider textProvider, ValidationService validationService, VariableDefinitionManager variableDefinitionManager, VersionNamingService versionNamingService, DeploymentVersionService deploymentVersionService, ResultsSummaryManager resultsSummaryManager, com.atlassian.event.api.EventPublisher eventPublisher, TriggerTypeManager triggerTypeManager, PlanScheduler planScheduler, BambooEntityOidService bambooEntityOidService) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addArtifactProjectItem
(long deploymentProjectId, @NotNull ArtifactDefinition artifactDefinition) Add artifact project item to deployment project.@NotNull DeploymentProject
addDeploymentProject
(String name, String description, String planKeyString, boolean accessForAllUsers) Create a new deployment project.@NotNull DeploymentProject
cloneDeploymentProject
(long deploymentProjectId, String name, String description, String planKeyString) Create a new deployment project.void
deleteDeploymentProject
(long deploymentProjectId) Deprecated.since 5.4@NotNull DeploymentProject
editDeploymentProject
(long deploymentProjectId, String name, @Nullable String description, @Nullable String planKeyString) Edit the details of the deployment project@NotNull Collection<Long>
findDeploymentProjectsInOtherStates
(@NotNull VcsLocationBambooSpecsState specsState) generateArtifactProjectItems
(@NotNull MutableDeploymentProject mutableDeploymentProject) Create and save artifact project items for deployment projects.@NotNull List<DeploymentProject>
@Nullable DeploymentProject
getDeploymentProject
(long id) int
@Nullable DeploymentProject
getDeploymentProjectForEnvironment
(long environmentID) Retrieve the deployment project that a specific environment belongs to.@Nullable DeploymentProject
getDeploymentProjectForVersion
(long versionId) Retrieve the deployment project that a specific version belongs to.@NotNull List<DeploymentProjectItem>
getDeploymentProjectItems
(long deploymentProjectId) Does not validate deployment project existsgetDeploymentProjectsReferencingArtifact
(@NotNull Artifact artifact) Get all deployment projects that contain a version that uses specified artifact@NotNull List<DeploymentProject>
getDeploymentProjectsRelatedToArtifact
(@NotNull ArtifactDefinition artifactDefinition) Retrieve the deployment projects that refer to the artifactDefinition within their items@NotNull List<DeploymentProject>
getDeploymentProjectsRelatedToPlan
(@NotNull PlanKey planKey) Retrieve the deployment projects that are linked to a specific plan@NotNull List<DeploymentProject>
getDeploymentProjectsRelatedToPlanConfiguration
(@NotNull PlanKey masterOrBranchPlanKey) Retrieve the deployment projects that are linked to a specific plan configuration, taking branch divergency into account.@NotNull List<DeploymentProject>
getDeploymentProjectsRelatedToPlanOrBranches
(@NotNull PlanKey masterOrBranchPlanKey) Retrieve the deployment projects that are linked to a specific plan or any of its branches.@NotNull List<DeploymentProjectWithEnvironmentStatuses>
getDeploymentProjectsWithStatusesRelatedToPlan
(@NotNull PlanKey planKey) Retrieve the deployment projects that are linked to a specific plan.@NotNull List<DeploymentProjectWithEnvironmentStatuses>
getDeploymentProjectsWithStatusesRelatedToPlanOrBranches
(@NotNull PlanKey masterOrBranchPlanKey) Retrieve the deployment projects that are linked to a specific plan or any of its branches.@NotNull List<DeploymentProjectStatusForResultSummary>
getDeploymentProjectsWithStatusesRelatedToPlanResult
(@NotNull ResultsSummary resultsSummary) Retrieve the deployment projects that are linked to a specific result.@NotNull String
getIncrementedVersionName
(@NotNull String versionName) Calculates an incremented version name for a project.getPaginatedDeploymentsWithEnvironments
(int start, int limit, @Nullable String filter) Retrieve paginated view of DeploymentProject and Environment and information if there are more entries ordered byInternalDeploymentProject.getName()
andInternalEnvironment.getPosition()
.@Nullable DeploymentProjectItem
getProjectItem
(long projectItemId) Get a specific Project Item.@Nullable VersionNamingScheme
getVersionNamingScheme
(long deploymentProjectId) Get the version naming configuration for a projectvoid
removeArtifactProjectItem
(long deploymentProjectId, @NotNull ArtifactDefinition artifactDefinition) Remove artifact project item from deployment project.void
removeProjectItem
(long deploymentProjectId, long projectItemId) Remove item from deployment projectvoid
resetTriggers
(@NotNull PlanKey planKey) Delete and recreate the triggers for every deployment that's related to this planKey.void
unlinkDeploymentProjectsRelatedToPlan
(@NotNull PlanKey planKey) Remove all references to aPlan
from all related deployment projects.void
updatePlanKey
(@NotNull PlanKey originalPlanKey, @NotNull PlanKey newPlanKey) Update planKey in DeploymentProject when plan key has changed (ie after moving plan).@NotNull VersionNamingScheme
updateVersionNamingScheme
(long deploymentProjectId, String nextVersionName, boolean autoIncrement, boolean applicableToBranches, @NotNull Set<String> variablesToAutoIncrement) update the version naming configuration for a project@NotNull VersionNamingScheme
updateVersionNamingScheme
(long deploymentProjectId, String nextVersionName, boolean autoIncrement, @NotNull Set<String> variablesToAutoIncrement) update the version naming configuration for a projectboolean
userHasPermissionsToChangeAutoIncrementedVariables
(long deploymentProjectId, @NotNull Set<String> variablesToAutoIncrement) Check if current user has necessary permissions to modify auto incremented variables settings.@NotNull ErrorCollection
validateAddDeploymentProject
(String name, String description, String planKeyString) Validates data to be used when adding a deployment project.@NotNull ErrorCollection
validateAddDeploymentProject
(String name, String description, String masterPlanKeyString, String planKeyString) Validates data to be used when adding a deployment project.@NotNull ErrorCollection
validateArtifactTaskDefinitionOnPlanChange
(long deploymentProjectId, String planKeyString, @NotNull Map<String, ArtifactValidationError> artifactValidationErrors) Validates artifact definitions on plan change and warn if artifact differ, so deployment tasks using it may fail@NotNull ErrorCollection
validateCloneDeploymentProject
(String name, String description, @Nullable String planKeyString) Validates data to be used when adding a deployment project.@NotNull ErrorCollection
validateEditDeploymentProject
(long id, String name, @Nullable String description, @Nullable String planKeyString) Validates data to be used when editing an existing deployment.@NotNull ErrorCollection
validateEditDeploymentProject
(long id, String name, @Nullable String description, String masterPlanKeyString, String planKeyString) Validates data to be used when editing an existing deployment.@NotNull ErrorCollection
validateTriggerConfigurationOnPlanChange
(long deploymentProjectId, @NotNull PlanKey newPlanKey, @NotNull List<EnvironmentTriggerValidationError> triggerValidationErrors) Validate trigger configuration on deployment project's plan change@NotNull ErrorCollection
validateVersionNamingScheme
(long deploymentProjectId, String nextVersionName, boolean autoIncrement, @NotNull Set<String> variablesToAutoIncrement) Validate the version naming configuration for a projectMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.atlassian.bamboo.deployments.projects.service.DeploymentProjectService
addDeploymentProject
-
Constructor Details
-
DeploymentProjectServiceImpl
public DeploymentProjectServiceImpl(ArtifactDefinitionManager artifactDefinitionManager, BambooAclUpdateHelper aclUpdateHelper, BambooAuthenticationContext authenticationContext, CachedPlanManager cachedPlanManager, DeploymentProjectDao deploymentProjectDao, DeploymentResultService deploymentResultService, EnvironmentDao environmentDao, EnvironmentService environmentService, InternalEnvironmentService internalEnvironmentService, EnvironmentTaskService environmentTaskService, HibernateMutableAclService aclService, com.opensymphony.xwork2.TextProvider textProvider, ValidationService validationService, VariableDefinitionManager variableDefinitionManager, VersionNamingService versionNamingService, DeploymentVersionService deploymentVersionService, ResultsSummaryManager resultsSummaryManager, com.atlassian.event.api.EventPublisher eventPublisher, TriggerTypeManager triggerTypeManager, PlanScheduler planScheduler, BambooEntityOidService bambooEntityOidService)
-
-
Method Details
-
getAllDeploymentProjects
- Specified by:
getAllDeploymentProjects
in interfaceDeploymentProjectService
- Returns:
- a list of all deployment projects
-
getDeploymentProjectCount
public int getDeploymentProjectCount()- Specified by:
getDeploymentProjectCount
in interfaceDeploymentProjectService
- Returns:
- count of all deployment projects
-
getDeploymentProjectsWithStatusesRelatedToPlan
@NotNull public @NotNull List<DeploymentProjectWithEnvironmentStatuses> getDeploymentProjectsWithStatusesRelatedToPlan(@NotNull @NotNull PlanKey planKey) Description copied from interface:DeploymentProjectService
Retrieve the deployment projects that are linked to a specific plan. Includes projects their environments + latest status- Specified by:
getDeploymentProjectsWithStatusesRelatedToPlan
in interfaceDeploymentProjectService
- Parameters:
planKey
- of the linked plan- Returns:
- a list of all deployment projects linked to a specified plan
-
getDeploymentProjectsWithStatusesRelatedToPlanOrBranches
@NotNull public @NotNull List<DeploymentProjectWithEnvironmentStatuses> getDeploymentProjectsWithStatusesRelatedToPlanOrBranches(@NotNull @NotNull PlanKey masterOrBranchPlanKey) Description copied from interface:DeploymentProjectService
Retrieve the deployment projects that are linked to a specific plan or any of its branches. Includes projects their environments + latest status- Specified by:
getDeploymentProjectsWithStatusesRelatedToPlanOrBranches
in interfaceDeploymentProjectService
- Parameters:
masterOrBranchPlanKey
- identifies master plan or branch- Returns:
- a list of all deployment projects linked to a specified plan or any of its branches
-
getDeploymentProjectsWithStatusesRelatedToPlanResult
@NotNull public @NotNull List<DeploymentProjectStatusForResultSummary> getDeploymentProjectsWithStatusesRelatedToPlanResult(@NotNull @NotNull ResultsSummary resultsSummary) Description copied from interface:DeploymentProjectService
Retrieve the deployment projects that are linked to a specific result. Includes projects their environments + latest status- Specified by:
getDeploymentProjectsWithStatusesRelatedToPlanResult
in interfaceDeploymentProjectService
- Parameters:
resultsSummary
- of the linked plan- Returns:
- a list of all deployment projects linked to a specified plan
-
getDeploymentProjectsRelatedToPlan
@NotNull public @NotNull List<DeploymentProject> getDeploymentProjectsRelatedToPlan(@NotNull @NotNull PlanKey planKey) Description copied from interface:DeploymentProjectService
Retrieve the deployment projects that are linked to a specific plan- Specified by:
getDeploymentProjectsRelatedToPlan
in interfaceDeploymentProjectService
- Parameters:
planKey
- of the linked plan- Returns:
- a list of all deployment projects linked to a specified plan
-
getDeploymentProjectsRelatedToPlanOrBranches
@NotNull public @NotNull List<DeploymentProject> getDeploymentProjectsRelatedToPlanOrBranches(@NotNull @NotNull PlanKey masterOrBranchPlanKey) Description copied from interface:DeploymentProjectService
Retrieve the deployment projects that are linked to a specific plan or any of its branches. Use with care: it will include the whole 'family', including deployments related to divergent branches. See also:DeploymentProjectService.getDeploymentProjectsRelatedToPlanConfiguration(PlanKey)
- Specified by:
getDeploymentProjectsRelatedToPlanOrBranches
in interfaceDeploymentProjectService
- Parameters:
masterOrBranchPlanKey
- identifies master plan or branch- Returns:
- a list of all deployment projects linked to a specified plan or any of its branches
-
getDeploymentProjectsRelatedToPlanConfiguration
@NotNull public @NotNull List<DeploymentProject> getDeploymentProjectsRelatedToPlanConfiguration(@NotNull @NotNull PlanKey masterOrBranchPlanKey) Description copied from interface:DeploymentProjectService
Retrieve the deployment projects that are linked to a specific plan configuration, taking branch divergency into account. If the argument is a master plan or a lightweight branch, deployments linked to the master plan and lightweight branches are returned. If the argument is a divergent branch, only deployments linked to that particular branch will be returned.- Specified by:
getDeploymentProjectsRelatedToPlanConfiguration
in interfaceDeploymentProjectService
- Parameters:
masterOrBranchPlanKey
- identifies master plan or branch- Returns:
- a list of all deployment projects linked to a specified plan or any of its branches
-
getDeploymentProjectsRelatedToArtifact
@NotNull public @NotNull List<DeploymentProject> getDeploymentProjectsRelatedToArtifact(@NotNull @NotNull ArtifactDefinition artifactDefinition) Description copied from interface:DeploymentProjectService
Retrieve the deployment projects that refer to the artifactDefinition within their items- Specified by:
getDeploymentProjectsRelatedToArtifact
in interfaceDeploymentProjectService
- Parameters:
artifactDefinition
- related artifact definition- Returns:
- a list of all deployment projects referring specified artifactDefinition
-
getDeploymentProject
@Nullable public @Nullable DeploymentProject getDeploymentProject(long id) throws org.acegisecurity.AccessDeniedException - Specified by:
getDeploymentProject
in interfaceDeploymentProjectService
- Parameters:
id
- of the deployment project to retrieve- Returns:
- deployment project with the given id or null if none found.
- Throws:
org.acegisecurity.AccessDeniedException
-
getDeploymentProjectForEnvironment
Description copied from interface:DeploymentProjectService
Retrieve the deployment project that a specific environment belongs to.- Specified by:
getDeploymentProjectForEnvironment
in interfaceDeploymentProjectService
- Parameters:
environmentID
- of the environment- Returns:
- DeploymentProject environment belongs to
-
deleteDeploymentProject
Deprecated.since 5.4Description copied from interface:DeploymentProjectService
Delete DeploymentProject and all dependent data- Specified by:
deleteDeploymentProject
in interfaceDeploymentProjectService
- Parameters:
deploymentProjectId
- of the project
-
getDeploymentProjectForVersion
Description copied from interface:DeploymentProjectService
Retrieve the deployment project that a specific version belongs to.- Specified by:
getDeploymentProjectForVersion
in interfaceDeploymentProjectService
- Parameters:
versionId
- of the version- Returns:
- DeploymentProject version belongs to
-
validateAddDeploymentProject
@NotNull public @NotNull ErrorCollection validateAddDeploymentProject(String name, String description, String planKeyString) Description copied from interface:DeploymentProjectService
Validates data to be used when adding a deployment project. This method is used by automated deployment project creation where validation of master plan is not required.- Specified by:
validateAddDeploymentProject
in interfaceDeploymentProjectService
- Parameters:
name
- shortish display name of the projectdescription
- optional description of what the project is aboutplanKeyString
- key of the linked plan or its branch- Returns:
- ErrorCollection containing any errors which may exist. If no errors found and empty ErrorCollection will be returned;
-
validateAddDeploymentProject
@NotNull public @NotNull ErrorCollection validateAddDeploymentProject(String name, String description, String masterPlanKeyString, String planKeyString) Description copied from interface:DeploymentProjectService
Validates data to be used when adding a deployment project. This method is used by UI where validation of master plan is required.- Specified by:
validateAddDeploymentProject
in interfaceDeploymentProjectService
- Parameters:
name
- shortish display name of the projectdescription
- optional description of what the project is aboutmasterPlanKeyString
- key of the master of linked plan/branchplanKeyString
- key of the linked plan or its branch- Returns:
- ErrorCollection containing any errors which may exist. If no errors found and empty ErrorCollection will be returned;
-
validateCloneDeploymentProject
@NotNull public @NotNull ErrorCollection validateCloneDeploymentProject(String name, String description, @Nullable @Nullable String planKeyString) Description copied from interface:DeploymentProjectService
Validates data to be used when adding a deployment project. This method is used by UI where validation of master plan is required.- Specified by:
validateCloneDeploymentProject
in interfaceDeploymentProjectService
- Parameters:
name
- shortish display name of the projectdescription
- optional description of what the project is about- Returns:
- ErrorCollection containing any errors which may exist. If no errors found and empty ErrorCollection will be returned;
-
validateEditDeploymentProject
@NotNull public @NotNull ErrorCollection validateEditDeploymentProject(long id, String name, @Nullable @Nullable String description, @Nullable @Nullable String planKeyString) Description copied from interface:DeploymentProjectService
Validates data to be used when editing an existing deployment. This method is used by automated deployment project edit where validation of master plan is not required.- Specified by:
validateEditDeploymentProject
in interfaceDeploymentProjectService
- Returns:
- ErrorCollection containing any errors which may exist. If no errors found and empty ErrorCollection will be returned;
-
validateEditDeploymentProject
@NotNull public @NotNull ErrorCollection validateEditDeploymentProject(long id, String name, @Nullable @Nullable String description, String masterPlanKeyString, String planKeyString) Description copied from interface:DeploymentProjectService
Validates data to be used when editing an existing deployment. This method is used by UI where validation of master plan is required.- Specified by:
validateEditDeploymentProject
in interfaceDeploymentProjectService
- Returns:
- ErrorCollection containing any errors which may exist. If no errors found and empty ErrorCollection will be returned;
-
validateArtifactTaskDefinitionOnPlanChange
@NotNull public @NotNull ErrorCollection validateArtifactTaskDefinitionOnPlanChange(long deploymentProjectId, String planKeyString, @NotNull @NotNull Map<String, ArtifactValidationError> artifactValidationErrors) Description copied from interface:DeploymentProjectService
Validates artifact definitions on plan change and warn if artifact differ, so deployment tasks using it may fail- Specified by:
validateArtifactTaskDefinitionOnPlanChange
in interfaceDeploymentProjectService
- Returns:
-
validateTriggerConfigurationOnPlanChange
@NotNull public @NotNull ErrorCollection validateTriggerConfigurationOnPlanChange(long deploymentProjectId, @NotNull @NotNull PlanKey newPlanKey, @NotNull @NotNull List<EnvironmentTriggerValidationError> triggerValidationErrors) Description copied from interface:DeploymentProjectService
Validate trigger configuration on deployment project's plan change- Specified by:
validateTriggerConfigurationOnPlanChange
in interfaceDeploymentProjectService
- Parameters:
deploymentProjectId
- identifies deployment projectnewPlanKey
- new plan keytriggerValidationErrors
- list to store trigger validation errors- Returns:
-
addDeploymentProject
@NotNull public @NotNull DeploymentProject addDeploymentProject(String name, String description, String planKeyString, boolean accessForAllUsers) throws WebValidationException Description copied from interface:DeploymentProjectService
Create a new deployment project.- Specified by:
addDeploymentProject
in interfaceDeploymentProjectService
- Parameters:
name
- shortish display name of the projectdescription
- optional description of what the project is aboutplanKeyString
- key of the linked plan or its branchaccessForAllUsers
- whether all Bamboo users will be allowed to view the deployment project- Returns:
- the created deployment project.
- Throws:
WebValidationException
-
cloneDeploymentProject
@NotNull public @NotNull DeploymentProject cloneDeploymentProject(long deploymentProjectId, String name, String description, String planKeyString) throws WebValidationException Description copied from interface:DeploymentProjectService
Create a new deployment project.- Specified by:
cloneDeploymentProject
in interfaceDeploymentProjectService
name
- shortish display name of the projectdescription
- optional description of what the project is about- Returns:
- the created deployment project.
- Throws:
WebValidationException
-
editDeploymentProject
@NotNull public @NotNull DeploymentProject editDeploymentProject(long deploymentProjectId, String name, @Nullable @Nullable String description, @Nullable @Nullable String planKeyString) throws WebValidationException Description copied from interface:DeploymentProjectService
Edit the details of the deployment project- Specified by:
editDeploymentProject
in interfaceDeploymentProjectService
- Parameters:
deploymentProjectId
- of the deployment project to editname
- the new name for the projectdescription
- the new description of the projectplanKeyString
- optional of the linked plan- Returns:
- The updated deployment project
- Throws:
WebValidationException
-
getProjectItem
Description copied from interface:DeploymentProjectService
Get a specific Project Item.- Specified by:
getProjectItem
in interfaceDeploymentProjectService
- Parameters:
projectItemId
- of the project item to retrieve.- Returns:
- project item with the given idea. Null if none found.
-
addArtifactProjectItem
public void addArtifactProjectItem(long deploymentProjectId, @NotNull @NotNull ArtifactDefinition artifactDefinition) Description copied from interface:DeploymentProjectService
Add artifact project item to deployment project. If artifact is already referenced by one of the project items this method will do nothing. There's no check if artifact is "shared".- Specified by:
addArtifactProjectItem
in interfaceDeploymentProjectService
- Parameters:
deploymentProjectId
- id of the deployment projectartifactDefinition
- ArtifactDefinition
-
removeArtifactProjectItem
public void removeArtifactProjectItem(long deploymentProjectId, @NotNull @NotNull ArtifactDefinition artifactDefinition) Description copied from interface:DeploymentProjectService
Remove artifact project item from deployment project. If artifact is not referenced by any of the project items this method will do nothing.- Specified by:
removeArtifactProjectItem
in interfaceDeploymentProjectService
- Parameters:
deploymentProjectId
- id of the deployment projectartifactDefinition
- ArtifactDefinition
-
getDeploymentProjectItems
@NotNull public @NotNull List<DeploymentProjectItem> getDeploymentProjectItems(long deploymentProjectId) Description copied from interface:DeploymentProjectService
Does not validate deployment project exists- Specified by:
getDeploymentProjectItems
in interfaceDeploymentProjectService
- Parameters:
deploymentProjectId
- if of the deployment project- Returns:
- all project items for the specified deployment project. Empty list if deployment project not found.
-
removeProjectItem
public void removeProjectItem(long deploymentProjectId, long projectItemId) Description copied from interface:DeploymentProjectService
Remove item from deployment project- Specified by:
removeProjectItem
in interfaceDeploymentProjectService
- Parameters:
deploymentProjectId
- DeploymentProject id
-
getVersionNamingScheme
Description copied from interface:DeploymentProjectService
Get the version naming configuration for a project- Specified by:
getVersionNamingScheme
in interfaceDeploymentProjectService
- Parameters:
deploymentProjectId
- of the project- Returns:
- version naming scheme for a project
-
getIncrementedVersionName
Description copied from interface:DeploymentProjectService
Calculates an incremented version name for a project. See VersionNamingService.getIncrementedVersionName for details.- Specified by:
getIncrementedVersionName
in interfaceDeploymentProjectService
- Parameters:
versionName
- to increment- Returns:
- incremented version name.
-
userHasPermissionsToChangeAutoIncrementedVariables
public boolean userHasPermissionsToChangeAutoIncrementedVariables(long deploymentProjectId, @NotNull @NotNull Set<String> variablesToAutoIncrement) Description copied from interface:DeploymentProjectService
Check if current user has necessary permissions to modify auto incremented variables settings.- Specified by:
userHasPermissionsToChangeAutoIncrementedVariables
in interfaceDeploymentProjectService
-
validateVersionNamingScheme
@NotNull public @NotNull ErrorCollection validateVersionNamingScheme(long deploymentProjectId, String nextVersionName, boolean autoIncrement, @NotNull @NotNull Set<String> variablesToAutoIncrement) Description copied from interface:DeploymentProjectService
Validate the version naming configuration for a project- Specified by:
validateVersionNamingScheme
in interfaceDeploymentProjectService
- Parameters:
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- Returns:
- error collection with any validation errors, if no errors, empty error collection is returned
-
updateVersionNamingScheme
@NotNull public @NotNull VersionNamingScheme updateVersionNamingScheme(long deploymentProjectId, String nextVersionName, boolean autoIncrement, @NotNull @NotNull Set<String> variablesToAutoIncrement) throws WebValidationException Description copied from interface:DeploymentProjectService
update the version naming configuration for a project- Specified by:
updateVersionNamingScheme
in interfaceDeploymentProjectService
- Parameters:
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- Returns:
- the updated version naming scheme.
- Throws:
WebValidationException
- if any validation errors occur
-
updateVersionNamingScheme
@NotNull public @NotNull VersionNamingScheme updateVersionNamingScheme(long deploymentProjectId, String nextVersionName, boolean autoIncrement, boolean applicableToBranches, @NotNull @NotNull Set<String> variablesToAutoIncrement) throws WebValidationException Description copied from interface:DeploymentProjectService
update the version naming configuration for a project- Specified by:
updateVersionNamingScheme
in interfaceDeploymentProjectService
- Parameters:
deploymentProjectId
- of the projectnextVersionName
- the value to be used for the next version nameautoIncrement
- whether the version name should be auto-incrementedapplicableToBranches
- whether the same scheme should be used with branchesvariablesToAutoIncrement
- variables to increment- Returns:
- the updated version naming scheme.
- Throws:
WebValidationException
- if any validation errors occur
-
unlinkDeploymentProjectsRelatedToPlan
Description copied from interface:DeploymentProjectService
Remove all references to aPlan
from all related deployment projects.- Specified by:
unlinkDeploymentProjectsRelatedToPlan
in interfaceDeploymentProjectService
-
getDeploymentProjectsReferencingArtifact
public List<DeploymentProject> getDeploymentProjectsReferencingArtifact(@NotNull @NotNull Artifact artifact) Description copied from interface:DeploymentProjectService
Get all deployment projects that contain a version that uses specified artifact- Specified by:
getDeploymentProjectsReferencingArtifact
in interfaceDeploymentProjectService
- Returns:
-
updatePlanKey
public void updatePlanKey(@NotNull @NotNull PlanKey originalPlanKey, @NotNull @NotNull PlanKey newPlanKey) Description copied from interface:DeploymentProjectService
Update planKey in DeploymentProject when plan key has changed (ie after moving plan).- Specified by:
updatePlanKey
in interfaceDeploymentProjectService
- Parameters:
originalPlanKey
- original PlanKeynewPlanKey
- new PlanKey
-
resetTriggers
Description copied from interface:DeploymentProjectService
Delete and recreate the triggers for every deployment that's related to this planKey.- Specified by:
resetTriggers
in interfaceDeploymentProjectService
-
generateArtifactProjectItems
public Map<String,ArtifactDefinition> generateArtifactProjectItems(@NotNull @NotNull MutableDeploymentProject mutableDeploymentProject) Description copied from interface:DeploymentProjectService
Create and save artifact project items for deployment projects.- Specified by:
generateArtifactProjectItems
in interfaceDeploymentProjectService
-
findDeploymentProjectsInOtherStates
@NotNull public @NotNull Collection<Long> findDeploymentProjectsInOtherStates(@NotNull @NotNull VcsLocationBambooSpecsState specsState) - Specified by:
findDeploymentProjectsInOtherStates
in interfaceDeploymentProjectService
-
findSpecsStateIdsReferencedByDeployments
- Specified by:
findSpecsStateIdsReferencedByDeployments
in interfaceDeploymentProjectService
- Since:
- 8.0
-
getPaginatedDeploymentsWithEnvironments
public DeploymentProjectWithEnvironmentForDashboard getPaginatedDeploymentsWithEnvironments(int start, int limit, @Nullable @Nullable String filter) Description copied from interface:DeploymentProjectService
Retrieve paginated view of DeploymentProject and Environment and information if there are more entries ordered byInternalDeploymentProject.getName()
andInternalEnvironment.getPosition()
. Deployment projects are not operation aware, environments are. In case of null or empty filter no filtering.- Specified by:
getPaginatedDeploymentsWithEnvironments
in interfaceDeploymentProjectService
-