com.atlassian.bamboo.build
Interface PlanDependencyManager

All Known Implementing Classes:
PlanDependencyManagerImpl

public interface PlanDependencyManager


Method Summary
 void adjustChildDependencyList(java.lang.String dependencyType, Plan plan, java.util.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(java.lang.String dependencyType, Plan plan, java.util.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.
 java.util.Set<PlanDependency> getAllDependencies()
          Retrieves all dependency relationships in the system regardless of the plans involved
 java.util.Set<java.lang.String> getChildChainKeys(PlanIdentifier plan)
          Retrieves all chain that are children of the current plan
 java.util.Set<PlanDependency> getChildPlanDependencies(PlanIdentifier plan)
          Retrieves all plan dependencies in which the given plan features as a parent
 java.util.Set<java.lang.String> getChildPlanKeys(PlanIdentifier plan)
          Retrievs all plan that are children of the current plan
 java.util.Set<ImmutablePlan> getEffectiveChildPlans(ImmutablePlan chain)
           
 java.util.Set<ImmutablePlan> getEffectiveParentPlans(ImmutablePlan chain)
           
 java.util.Set<java.lang.String> getNotEditableChildKeys(PlanIdentifier plan)
          Retrieves a list of keys representing the children that are not editable of the given plan
 java.util.Set<java.lang.String> getNotEditableParentKeys(PlanIdentifier plan)
          Retrieves a list of keys representing the children that are not editable of the given plan
 java.util.Set<java.lang.String> getParentChainKeys(PlanIdentifier plan)
          Retrieves all chain that are children of the current plan
 java.util.Set<PlanDependency> getParentPlanDependencies(PlanIdentifier plan)
          Retrieves all plan dependencies in which the given plan features as a child
 java.util.Set<java.lang.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.
 

Method Detail

getAllDependencies

@NotNull
java.util.Set<PlanDependency> getAllDependencies()
Retrieves all dependency relationships in the system regardless of the plans involved

Returns:
all plan dependencies.

getChildPlanDependencies

@NotNull
java.util.Set<PlanDependency> getChildPlanDependencies(@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
java.util.Set<PlanDependency> getParentPlanDependencies(@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
                                  PlanIdentifier plan)
Deletes any existing dependency featuring the given plan. Used when deleting a plan.

Parameters:
plan - to be removed

getChildPlanKeys

@NotNull
java.util.Set<java.lang.String> getChildPlanKeys(@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
java.util.Set<java.lang.String> getParentPlanKeys(@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
java.util.Set<java.lang.String> getChildChainKeys(@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
java.util.Set<java.lang.String> getParentChainKeys(@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
                           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
java.util.Set<java.lang.String> getNotEditableChildKeys(@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
java.util.Set<java.lang.String> getNotEditableParentKeys(@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

adjustChildDependencyList

void adjustChildDependencyList(@NotNull
                               java.lang.String dependencyType,
                               @NotNull
                               Plan plan,
                               @NotNull
                               java.util.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 adjusted
plan - parent
newChildPlanKeys - 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
                                java.lang.String dependencyType,
                                @NotNull
                                Plan plan,
                                @NotNull
                                java.util.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 adjusted
plan - parent
newParentPlanKeys - 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

java.util.Set<ImmutablePlan> getEffectiveChildPlans(@NotNull
                                                    ImmutablePlan chain)
Since:
4.2

getEffectiveParentPlans

java.util.Set<ImmutablePlan> getEffectiveParentPlans(@NotNull
                                                     ImmutablePlan chain)
Since:
4.2


Copyright © 2014 Atlassian Software Systems Pty Ltd. All Rights Reserved.