com.atlassian.bamboo.plan.branch
Interface ChainBranchManager

All Known Implementing Classes:
ChainBranchManagerImpl

public interface ChainBranchManager


Method Summary
 int getBranchCount(Plan plan)
          Returns the number of branches the given plan has
 java.util.List<ChainBranch> getBranchesForChain(ImmutableChain chain)
          Get all feature branches associated with the given chain
 java.util.List<ChainBranchIdentifier> getBranchIdentifiersForChain(PlanIdentifier chain)
          Get all feature branches associated with the given chain, however on pulls up minimal details about each branch.
 java.util.Set<java.lang.Long> getPlansWithBranches()
          Returns a list of plans that currently have branches
 boolean hasBranches(Plan plan)
          Returns whether or not the given plan has any branches
 boolean isPlanBranchNameConflicting(ImmutableChain masterPlan, long chainBranchIdToIgnore, java.lang.String branchName)
          Verifies whether a ChainBranch name is unique with a given master Chain

 

Method Detail

getBranchesForChain

@NotNull
java.util.List<ChainBranch> getBranchesForChain(@NotNull
                                                        ImmutableChain chain)
Get all feature branches associated with the given chain

Parameters:
chain - - the master
Returns:
List ChainBranchs associated with the given chain.

getBranchIdentifiersForChain

@NotNull
java.util.List<ChainBranchIdentifier> getBranchIdentifiersForChain(@NotNull
                                                                           PlanIdentifier chain)
Get all feature branches associated with the given chain, however on pulls up minimal details about each branch.

Parameters:
chain - - the master
Returns:
List ChainBranchIdentifier for branches associated with the given Chain.

hasBranches

boolean hasBranches(@NotNull
                    Plan plan)
Returns whether or not the given plan has any branches

Parameters:
plan - to check for branches for
Returns:
true if branches exist of the plan

getBranchCount

int getBranchCount(@NotNull
                   Plan plan)
Returns the number of branches the given plan has

Parameters:
plan - to check for branches for
Returns:
number of branches for the plan

getPlansWithBranches

@NotNull
java.util.Set<java.lang.Long> getPlansWithBranches()
Returns a list of plans that currently have branches

Returns:
a list of plan ids of the plans with branches.

isPlanBranchNameConflicting

boolean isPlanBranchNameConflicting(ImmutableChain masterPlan,
                                    long chainBranchIdToIgnore,
                                    java.lang.String branchName)
Verifies whether a ChainBranch name is unique with a given master Chain

Parameters:
masterPlan - the master chain within which the name has to be unique
chainBranchIdToIgnore - the id of the ChainBranch that has to be ignored during lookup (when you're saving a ChainBranch, you should supply its id here)
branchName - displayed name of the ChainBranch inside the master's plan
Returns:
true if the name is in conflict
Since:
4.0


Copyright © 2012 Atlassian. All Rights Reserved.