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 for
DefaultBuildDefinitionManager
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.atlassian.bamboo.build.BuildDefinitionManager
BuildDefinitionManager.BuildDefinitionNotFoundException
-
Constructor Summary
ConstructorDescriptionDefaultBuildDefinitionManagerTx
(@NotNull BuildDefinitionConverter buildDefinitionConverter, @NotNull PlanManager planManager) -
Method Summary
Modifier and TypeMethodDescription@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 ImmutablePlan masterImmutablePlan) 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 Details
-
DefaultBuildDefinitionManagerTx
public DefaultBuildDefinitionManagerTx(@NotNull @NotNull BuildDefinitionConverter buildDefinitionConverter, @NotNull @NotNull PlanManager planManager)
-
-
Method Details
-
getUnmergedBuildDefinition
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
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
- Specified by:
getBuildDefinition
in interfaceBuildDefinitionManager
-
getBuildDefinition
@NotNull public @NotNull BuildDefinition getBuildDefinition(@NotNull @NotNull Pair<EnrichedPlanDto, ImmutablePlan> dtoWithImmutableEntity, @Nullable @Nullable ImmutablePlan masterImmutablePlan) - Specified by:
getBuildDefinition
in interfaceBuildDefinitionManager
-
savePlanAndDefinition
Description copied from interface:BuildDefinitionManager
Saves thePlan
while polling jobs are stopped.- Specified by:
savePlanAndDefinition
in interfaceBuildDefinitionManager
-
savePlanAndDefinition
Description copied from interface:BuildDefinitionManager
Saves thePlan
and theBuildConfiguration
- Specified by:
savePlanAndDefinition
in interfaceBuildDefinitionManager
-
savePlanAndDefinition
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
-