public class PlanDependencyManagerImpl extends Object implements PlanDependencyManager
Constructor and Description |
---|
PlanDependencyManagerImpl(PlanDependencyDao planDependencyDao,
PlanManager planManager) |
Modifier and Type | Method and Description |
---|---|
void |
adjustChildDependencyList(String dependencyKey,
Plan plan,
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.
|
void |
adjustParentDependencyList(String dependencyKey,
Plan childPlan,
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.
|
Set<PlanDependency> |
getAllDependencies()
Retrieves all dependency relationships in the system regardless of the plan involved
|
Set<String> |
getChildChainKeys(PlanIdentifier plan)
Retrieves all chain that are children of the current plan
|
Set<PlanDependency> |
getChildPlanDependencies(PlanIdentifier plan)
Retrieves all plan dependencies in which the given plan features as a parent
|
Set<String> |
getChildPlanKeys(PlanIdentifier plan)
Retrievs all plan that are children of the current plan
|
Set<ImmutablePlan> |
getEffectiveChildPlans(ImmutablePlan chain) |
Set<ImmutablePlan> |
getEffectiveParentPlans(ImmutablePlan chain) |
Set<String> |
getNotEditableChildKeys(PlanIdentifier plan)
Retrieves a list of keys representing the children that are not editable of the given plan
|
Set<String> |
getNotEditableParentKeys(PlanIdentifier plan)
Retrieves a list of keys representing the children that are not editable of the given plan
|
Set<String> |
getParentChainKeys(PlanIdentifier plan)
Retrieves all chain that are children of the current plan
|
Set<PlanDependency> |
getParentPlanDependencies(PlanIdentifier plan)
Retrieves all plan dependencies in which the given plan features as a child
|
Set<String> |
getParentPlanKeys(PlanIdentifier plan)
Retrievs all plans that are a parent of the current plan
|
void |
removeAllDependenciesForPlan(PlanIdentifier plan)
Deletes any existing dependency featuring the given plan.
|
boolean |
savePlanDependency(PlanDependency dependency)
Save the given dependency.
|
public PlanDependencyManagerImpl(@NotNull PlanDependencyDao planDependencyDao, @NotNull PlanManager planManager)
@NotNull public Set<PlanDependency> getAllDependencies()
getAllDependencies
in interface PlanDependencyManager
@NotNull public Set<PlanDependency> getChildPlanDependencies(@NotNull PlanIdentifier plan)
PlanDependencyManager
getChildPlanDependencies
in interface PlanDependencyManager
plan
- - the parent@NotNull public Set<String> getParentChainKeys(@NotNull PlanIdentifier plan)
PlanDependencyManager
getParentChainKeys
in interface PlanDependencyManager
plan
- - the parent@NotNull public Set<String> getChildChainKeys(@NotNull PlanIdentifier plan)
PlanDependencyManager
getChildChainKeys
in interface PlanDependencyManager
plan
- - the parent@NotNull public Set<String> getNotEditableChildKeys(@NotNull PlanIdentifier plan)
PlanDependencyManager
getNotEditableChildKeys
in interface PlanDependencyManager
plan
- parent@NotNull public Set<String> getNotEditableParentKeys(@NotNull PlanIdentifier plan)
PlanDependencyManager
getNotEditableParentKeys
in interface PlanDependencyManager
plan
- parent@NotNull public Set<PlanDependency> getParentPlanDependencies(@NotNull PlanIdentifier plan)
PlanDependencyManager
getParentPlanDependencies
in interface PlanDependencyManager
plan
- - the childpublic void removeAllDependenciesForPlan(@NotNull PlanIdentifier plan)
PlanDependencyManager
removeAllDependenciesForPlan
in interface PlanDependencyManager
plan
- to be removed@NotNull public Set<String> getChildPlanKeys(@NotNull PlanIdentifier plan)
PlanDependencyManager
getChildPlanKeys
in interface PlanDependencyManager
plan
- - the parent@NotNull public Set<String> getParentPlanKeys(@NotNull PlanIdentifier plan)
PlanDependencyManager
getParentPlanKeys
in interface PlanDependencyManager
plan
- - the childpublic void adjustChildDependencyList(@NotNull String dependencyKey, @NotNull Plan plan, @NotNull Set<PlanKey> newChildPlanKeys, boolean overwriteExisting)
PlanDependencyManager
adjustChildDependencyList
in interface PlanDependencyManager
dependencyKey
- 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 typepublic void adjustParentDependencyList(@NotNull String dependencyKey, @NotNull Plan childPlan, @NotNull Set<PlanKey> newParentPlanKeys, boolean overwriteExisting)
PlanDependencyManager
adjustParentDependencyList
in interface PlanDependencyManager
dependencyKey
- of the dependencies being adjustedchildPlan
- 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 typepublic boolean savePlanDependency(@Nullable PlanDependency dependency)
PlanDependencyManager
savePlanDependency
in interface PlanDependencyManager
dependency
- to savepublic Set<ImmutablePlan> getEffectiveChildPlans(@NotNull ImmutablePlan chain)
getEffectiveChildPlans
in interface PlanDependencyManager
public Set<ImmutablePlan> getEffectiveParentPlans(@NotNull ImmutablePlan chain)
getEffectiveParentPlans
in interface PlanDependencyManager
Copyright © 2017 Atlassian Software Systems Pty Ltd. All rights reserved.