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
Constructors Constructor Description DefaultBuildDefinitionManager(@NotNull BuildDefinitionManager target, @NotNull PlanScheduler planScheduler, @NotNull BuildDefinitionConverter buildDefinitionConverter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @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 Pair<EnrichedPlanDto,ImmutablePlan> masterDtoWithImmutableEntity)BuildDefinitiongetUnmergedBuildDefinition(@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 Detail
-
DefaultBuildDefinitionManager
public DefaultBuildDefinitionManager(@NotNull @NotNull BuildDefinitionManager target, @NotNull @NotNull PlanScheduler planScheduler, @NotNull @NotNull BuildDefinitionConverter buildDefinitionConverter)
-
-
Method Detail
-
getUnmergedBuildDefinition
public BuildDefinition getUnmergedBuildDefinition(@NotNull @NotNull Plan plan)
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- 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- Returns:
- A populated
BuildDefinitionobject.
-
getBuildDefinition
@NotNull public @NotNull BuildDefinition getBuildDefinition(@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 merged with Master plan.- Specified by:
getBuildDefinitionin interfaceBuildDefinitionManager- Returns:
- A populated
BuildDefinitionobject.
-
getBuildDefinition
@NotNull public @NotNull BuildDefinition getBuildDefinition(@NotNull @NotNull Plan plan)
- Specified by:
getBuildDefinitionin interfaceBuildDefinitionManager
-
getBuildDefinition
@NotNull public @NotNull BuildDefinition getBuildDefinition(@NotNull @NotNull Pair<EnrichedPlanDto,ImmutablePlan> dtoWithImmutableEntity, @Nullable @Nullable Pair<EnrichedPlanDto,ImmutablePlan> masterDtoWithImmutableEntity)
- Specified by:
getBuildDefinitionin interfaceBuildDefinitionManager
-
savePlanAndDefinition
public void savePlanAndDefinition(Plan plan)
Description copied from interface:BuildDefinitionManagerSaves thePlanwhile polling jobs are stopped.- Specified by:
savePlanAndDefinitionin interfaceBuildDefinitionManager
-
savePlanAndDefinition
public void savePlanAndDefinition(Plan plan, BuildConfiguration newBuildConfiguration)
Description copied from interface:BuildDefinitionManagerSaves thePlanand theBuildConfiguration- Specified by:
savePlanAndDefinitionin interfaceBuildDefinitionManager
-
savePlanAndDefinition
public void savePlanAndDefinition(Plan plan, BuildDefinition newBuildDefinition)
Description copied from interface:BuildDefinitionManagerConvert and save the build definition.- Specified by:
savePlanAndDefinitionin interfaceBuildDefinitionManager
-
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 interfaceBuildDefinitionManagerwithQuartzJobsRestart- indicates if relevant polling jobs should be reinitialised
-
-