Package com.atlassian.bamboo.build
Class DefaultBuildDefinitionManager
java.lang.Object
com.atlassian.bamboo.build.DefaultBuildDefinitionManager
- All Implemented Interfaces:
BuildDefinitionManager
@ThreadSafe
public class DefaultBuildDefinitionManager
extends Object
implements BuildDefinitionManager
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.atlassian.bamboo.build.BuildDefinitionManager
BuildDefinitionManager.BuildDefinitionNotFoundException -
Constructor Summary
ConstructorsConstructorDescriptionDefaultBuildDefinitionManager(@NotNull BuildDefinitionManager target, @NotNull PlanScheduler planScheduler, @NotNull BuildDefinitionConverter buildDefinitionConverter) -
Method Summary
Modifier and TypeMethodDescription@NotNull BuildDefinitiongetBuildDefinition(@NotNull Plan plan) @NotNull BuildDefinitiongetBuildDefinition(@NotNull PlanKey planKey) Returns a stateful version the build definition for thePlan.@NotNull BuildDefinitiongetBuildDefinition(@NotNull Pair<EnrichedPlanDto, ImmutablePlan> dtoWithImmutableEntity, @Nullable ImmutablePlan masterImmutablePlan) getUnmergedBuildDefinition(@NotNull Plan plan) Returns a stateful version the build definition for thePlan.@NotNull BuildDefinitiongetUnmergedBuildDefinition(@NotNull PlanKey planKey) Returns a stateful version the build definition for thePlan.voidsavePlanAndDefinition(Plan plan) Saves thePlanwhile polling jobs are stopped.voidsavePlanAndDefinition(Plan plan, BuildDefinition newBuildDefinition) Convert and save the build definition.voidsavePlanAndDefinition(Plan plan, BuildDefinition newBuildDefinition, boolean withQuartzJobsRestart) Convert and save the build definition.voidsavePlanAndDefinition(Plan plan, BuildConfiguration newBuildConfiguration) Saves thePlanand theBuildConfiguration
-
Constructor Details
-
DefaultBuildDefinitionManager
public DefaultBuildDefinitionManager(@NotNull @NotNull BuildDefinitionManager target, @NotNull @NotNull PlanScheduler planScheduler, @NotNull @NotNull BuildDefinitionConverter buildDefinitionConverter)
-
-
Method Details
-
getUnmergedBuildDefinition
Description copied from interface:BuildDefinitionManagerReturns a stateful version the build definition for thePlan. This means that when you set various flags on it, the flags won't be lost (unless you updated yourBuildDefinition. In case of PlanBranches, it will return BuildDefinition specific to a given PlanBranch.- Specified by:
getUnmergedBuildDefinitionin interfaceBuildDefinitionManager- Parameters:
plan-- Returns:
- A populated
BuildDefinitionobject.
-
getUnmergedBuildDefinition
@NotNull public @NotNull BuildDefinition getUnmergedBuildDefinition(@NotNull @NotNull PlanKey planKey) Description copied from interface:BuildDefinitionManagerReturns a stateful version the build definition for thePlan. This means that when you set various flags on it, the flags won't be lost (unless you updated yourBuildDefinition. In case of PlanBranches, it will return BuildDefinition specific to a given PlanBranch. Note: for better performance, consider usingBuildDefinitionManager.getUnmergedBuildDefinition(Plan)instead.- Specified by:
getUnmergedBuildDefinitionin interfaceBuildDefinitionManager- Parameters:
planKey-- Returns:
- A populated
BuildDefinitionobject.
-
getBuildDefinition
Description copied from interface:BuildDefinitionManagerReturns a stateful version the build definition for thePlan. This means that when you set various flags on it, the flags won't be lost (unless you updated yourBuildDefinition. In case of PlanBranches, it will return BuildDefinition merged with Master plan.- Specified by:
getBuildDefinitionin interfaceBuildDefinitionManager- Parameters:
planKey-- Returns:
- A populated
BuildDefinitionobject.
-
getBuildDefinition
- Specified by:
getBuildDefinitionin interfaceBuildDefinitionManager
-
getBuildDefinition
@NotNull public @NotNull BuildDefinition getBuildDefinition(@NotNull @NotNull Pair<EnrichedPlanDto, ImmutablePlan> dtoWithImmutableEntity, @Nullable @Nullable ImmutablePlan masterImmutablePlan) - Specified by:
getBuildDefinitionin interfaceBuildDefinitionManager
-
savePlanAndDefinition
Description copied from interface:BuildDefinitionManagerSaves thePlanwhile polling jobs are stopped.- Specified by:
savePlanAndDefinitionin interfaceBuildDefinitionManager- Parameters:
plan-
-
savePlanAndDefinition
Description copied from interface:BuildDefinitionManagerSaves thePlanand theBuildConfiguration- Specified by:
savePlanAndDefinitionin interfaceBuildDefinitionManager- Parameters:
plan-newBuildConfiguration-
-
savePlanAndDefinition
Description copied from interface:BuildDefinitionManagerConvert and save the build definition.- Specified by:
savePlanAndDefinitionin interfaceBuildDefinitionManager- Parameters:
plan-newBuildDefinition-
-
savePlanAndDefinition
public void savePlanAndDefinition(Plan plan, BuildDefinition newBuildDefinition, boolean withQuartzJobsRestart) Description copied from interface:BuildDefinitionManagerConvert and save the build definition. To be used during plan creation only.- Specified by:
savePlanAndDefinitionin interfaceBuildDefinitionManager- Parameters:
plan-newBuildDefinition-withQuartzJobsRestart- indicates if relevant polling jobs should be reinitialised
-