Package com.atlassian.bamboo.build
Interface PlanDependencyManager
-
- All Known Implementing Classes:
PlanDependencyManagerImpl
public interface PlanDependencyManager
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidadjustChildDependencyList(@NotNull String dependencyType, @NotNull Plan plan, @NotNull Set<PlanKey> newChildPlanKeys, boolean overwriteExisting)Update the existing children dependencies of the given plan and dependency Type to match the provided list of new children.voidadjustParentDependencyList(@NotNull String dependencyType, @NotNull Plan plan, @NotNull Set<PlanKey> newParentPlanKeys, boolean overwriteExisting)Update the existing parent dependencies of the given plan and dependency Type to match the provided list of new parents.@NotNull Set<PlanDependency>getAllDependencies()Retrieves all dependency relationships in the system regardless of the plans involved@NotNull Set<String>getChildChainKeys(@NotNull PlanIdentifier plan)Retrieves all chain that are children of the current plan@NotNull Set<PlanDependency>getChildPlanDependencies(@NotNull PlanIdentifier plan)Retrieves all plan dependencies in which the given plan features as a parent@NotNull Set<String>getChildPlanKeys(@NotNull PlanIdentifier plan)Retrievs all plan that are children of the current planSet<ImmutablePlan>getEffectiveChildPlans(@NotNull ImmutablePlan chain)Set<ImmutablePlan>getEffectiveParentPlans(@NotNull ImmutablePlan chain)@NotNull Set<String>getNotEditableChildKeys(@NotNull PlanIdentifier plan)Retrieves a list of keys representing the children that are not editable of the given plan@NotNull Set<String>getNotEditableParentKeys(@NotNull PlanIdentifier plan)Retrieves a list of keys representing the children that are not editable of the given plan@NotNull Set<String>getParentChainKeys(@NotNull PlanIdentifier plan)Retrieves all chain that are children of the current plan@NotNull Set<PlanDependency>getParentPlanDependencies(@NotNull PlanIdentifier plan)Retrieves all plan dependencies in which the given plan features as a child@NotNull Set<String>getParentPlanKeys(@NotNull PlanIdentifier plan)Retrievs all plans that are a parent of the current planvoidremoveAllDependenciesForPlan(@NotNull PlanIdentifier plan)Deletes any existing dependency featuring the given plan.booleansavePlanDependency(@Nullable PlanDependency dependency)Save the given dependency.@NotNull ErrorCollectionvalidateChildDependencyList(@NotNull String dependencyType, @NotNull Plan plan, @NotNull Set<PlanKey> newChildPlanKeys, boolean overwriteExisting)Validate child dependency list
-
-
-
Method Detail
-
getAllDependencies
@NotNull @NotNull Set<PlanDependency> getAllDependencies()
Retrieves all dependency relationships in the system regardless of the plans involved- Returns:
- all plan dependencies.
-
getChildPlanDependencies
@NotNull @NotNull Set<PlanDependency> getChildPlanDependencies(@NotNull @NotNull PlanIdentifier plan)
Retrieves all plan dependencies in which the given plan features as a parent- Parameters:
plan- - the parent- Returns:
- set of all children of the given plan
-
getParentPlanDependencies
@NotNull @NotNull Set<PlanDependency> getParentPlanDependencies(@NotNull @NotNull PlanIdentifier plan)
Retrieves all plan dependencies in which the given plan features as a child- Parameters:
plan- - the child- Returns:
- newly created set of all parents to the given plan
-
removeAllDependenciesForPlan
void removeAllDependenciesForPlan(@NotNull @NotNull PlanIdentifier plan)Deletes any existing dependency featuring the given plan. Used when deleting a plan.- Parameters:
plan- to be removed
-
getChildPlanKeys
@NotNull @NotNull Set<String> getChildPlanKeys(@NotNull @NotNull PlanIdentifier plan)
Retrievs all plan that are children of the current plan- Parameters:
plan- - the parent- Returns:
- set of plan keys representing all children of the given plan
-
getParentPlanKeys
@NotNull @NotNull Set<String> getParentPlanKeys(@NotNull @NotNull PlanIdentifier plan)
Retrievs all plans that are a parent of the current plan- Parameters:
plan- - the child- Returns:
- set of plan keys representing all parents of the given plan
-
getChildChainKeys
@NotNull @NotNull Set<String> getChildChainKeys(@NotNull @NotNull PlanIdentifier plan)
Retrieves all chain that are children of the current plan- Parameters:
plan- - the parent- Returns:
- set of chain keys representing all children of the given plan
-
getParentChainKeys
@NotNull @NotNull Set<String> getParentChainKeys(@NotNull @NotNull PlanIdentifier plan)
Retrieves all chain that are children of the current plan- Parameters:
plan- - the parent- Returns:
- set of chain keys representing all children of the given plan
-
savePlanDependency
boolean savePlanDependency(@Nullable @Nullable PlanDependency dependency)Save the given dependency. Will check if it exists or if the dependency is invalid.- Parameters:
dependency- to save- Returns:
- true if it saved it, false otherwise
-
getNotEditableChildKeys
@NotNull @NotNull Set<String> getNotEditableChildKeys(@NotNull @NotNull PlanIdentifier plan)
Retrieves a list of keys representing the children that are not editable of the given plan- Parameters:
plan- parent- Returns:
- Set of un-editable dependencies representing the children of the given plan
-
getNotEditableParentKeys
@NotNull @NotNull Set<String> getNotEditableParentKeys(@NotNull @NotNull PlanIdentifier plan)
Retrieves a list of keys representing the children that are not editable of the given plan- Parameters:
plan- parent- Returns:
- Set of un-editable dependencies representing the children of the given plan
-
validateChildDependencyList
@NotNull @NotNull ErrorCollection validateChildDependencyList(@NotNull @NotNull String dependencyType, @NotNull @NotNull Plan plan, @NotNull @NotNull Set<PlanKey> newChildPlanKeys, boolean overwriteExisting)
Validate child dependency list
-
adjustChildDependencyList
void adjustChildDependencyList(@NotNull @NotNull String dependencyType, @NotNull @NotNull Plan plan, @NotNull @NotNull Set<PlanKey> newChildPlanKeys, boolean overwriteExisting)Update the existing children dependencies of the given plan and dependency Type to match the provided list of new children.- Parameters:
dependencyType- of the dependencies being adjustedplan- parentnewChildPlanKeys- the new list of parents (as plan keys)overwriteExisting- whether or not to overwrite any existing dependencies (of a different type) with one of the new type
-
adjustParentDependencyList
void adjustParentDependencyList(@NotNull @NotNull String dependencyType, @NotNull @NotNull Plan plan, @NotNull @NotNull Set<PlanKey> newParentPlanKeys, boolean overwriteExisting)Update the existing parent dependencies of the given plan and dependency Type to match the provided list of new parents.- Parameters:
dependencyType- of the dependencies being adjustedplan- parentnewParentPlanKeys- the new list of parents (as plan keys)overwriteExisting- whether or not to overwrite any existing dependencies (of a different type) with one of the new type
-
getEffectiveChildPlans
Set<ImmutablePlan> getEffectiveChildPlans(@NotNull @NotNull ImmutablePlan chain)
- Since:
- 4.2
-
getEffectiveParentPlans
Set<ImmutablePlan> getEffectiveParentPlans(@NotNull @NotNull ImmutablePlan chain)
- Since:
- 4.2
-
-