Package com.atlassian.bamboo.build
Class DefaultBuildDefinitionManagerTx
- java.lang.Object
-
- com.atlassian.bamboo.build.DefaultBuildDefinitionManagerTx
-
- All Implemented Interfaces:
BuildDefinitionManager
@Internal public class DefaultBuildDefinitionManagerTx extends Object implements BuildDefinitionManager
Transactional class that does the real work forDefaultBuildDefinitionManager
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.atlassian.bamboo.build.BuildDefinitionManager
BuildDefinitionManager.BuildDefinitionNotFoundException
-
-
Constructor Summary
Constructors Constructor Description DefaultBuildDefinitionManagerTx(@NotNull BuildDefinitionConverter buildDefinitionConverter, @NotNull PlanManager planManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull BuildDefinition
getBuildDefinition(@NotNull Plan plan)
@NotNull BuildDefinition
getBuildDefinition(@NotNull PlanKey planKey)
Returns a stateful version the build definition for thePlan
.@NotNull BuildDefinition
getBuildDefinition(@NotNull Pair<EnrichedPlanDto,ImmutablePlan> dtoWithImmutableEntity, @Nullable Pair<EnrichedPlanDto,ImmutablePlan> masterDtoWithImmutableEntity)
BuildDefinition
getUnmergedBuildDefinition(@NotNull Plan plan)
Returns a stateful version the build definition for thePlan
.@NotNull BuildDefinition
getUnmergedBuildDefinition(@NotNull PlanKey planKey)
Returns a stateful version the build definition for thePlan
.void
savePlanAndDefinition(Plan plan)
Saves thePlan
while polling jobs are stopped.void
savePlanAndDefinition(Plan plan, BuildDefinition newBuildDefinition)
Convert and save the build definition.void
savePlanAndDefinition(Plan plan, BuildDefinition newBuildDefinition, boolean withQuartzJobsRestart)
Convert and save the build definition.void
savePlanAndDefinition(Plan plan, BuildConfiguration newBuildConfiguration)
Saves thePlan
and theBuildConfiguration
-
-
-
Constructor Detail
-
DefaultBuildDefinitionManagerTx
public DefaultBuildDefinitionManagerTx(@NotNull @NotNull BuildDefinitionConverter buildDefinitionConverter, @NotNull @NotNull PlanManager planManager)
-
-
Method Detail
-
getUnmergedBuildDefinition
public BuildDefinition getUnmergedBuildDefinition(@NotNull @NotNull Plan plan)
Description copied from interface:BuildDefinitionManager
Returns 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:
getUnmergedBuildDefinition
in interfaceBuildDefinitionManager
- Returns:
- A populated
BuildDefinition
object.
-
getUnmergedBuildDefinition
@NotNull public @NotNull BuildDefinition getUnmergedBuildDefinition(@NotNull @NotNull PlanKey planKey)
Description copied from interface:BuildDefinitionManager
Returns 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:
getUnmergedBuildDefinition
in interfaceBuildDefinitionManager
- Returns:
- A populated
BuildDefinition
object.
-
getBuildDefinition
@NotNull public @NotNull BuildDefinition getBuildDefinition(@NotNull @NotNull PlanKey planKey)
Description copied from interface:BuildDefinitionManager
Returns 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:
getBuildDefinition
in interfaceBuildDefinitionManager
- Returns:
- A populated
BuildDefinition
object.
-
getBuildDefinition
@NotNull public @NotNull BuildDefinition getBuildDefinition(@NotNull @NotNull Plan plan)
- Specified by:
getBuildDefinition
in interfaceBuildDefinitionManager
-
getBuildDefinition
@NotNull public @NotNull BuildDefinition getBuildDefinition(@NotNull @NotNull Pair<EnrichedPlanDto,ImmutablePlan> dtoWithImmutableEntity, @Nullable @Nullable Pair<EnrichedPlanDto,ImmutablePlan> masterDtoWithImmutableEntity)
- Specified by:
getBuildDefinition
in interfaceBuildDefinitionManager
-
savePlanAndDefinition
public void savePlanAndDefinition(Plan plan)
Description copied from interface:BuildDefinitionManager
Saves thePlan
while polling jobs are stopped.- Specified by:
savePlanAndDefinition
in interfaceBuildDefinitionManager
-
savePlanAndDefinition
public void savePlanAndDefinition(Plan plan, BuildConfiguration newBuildConfiguration)
Description copied from interface:BuildDefinitionManager
Saves thePlan
and theBuildConfiguration
- Specified by:
savePlanAndDefinition
in interfaceBuildDefinitionManager
-
savePlanAndDefinition
public void savePlanAndDefinition(Plan plan, BuildDefinition newBuildDefinition)
Description copied from interface:BuildDefinitionManager
Convert and save the build definition.- Specified by:
savePlanAndDefinition
in interfaceBuildDefinitionManager
-
savePlanAndDefinition
public void savePlanAndDefinition(Plan plan, BuildDefinition newBuildDefinition, boolean withQuartzJobsRestart)
Description copied from interface:BuildDefinitionManager
Convert and save the build definition. To be used during plan creation only.- Specified by:
savePlanAndDefinition
in interfaceBuildDefinitionManager
withQuartzJobsRestart
- indicates if relevant polling jobs should be reinitialised
-
-