public interface ChainBranchManager
Modifier and Type | Method and Description |
---|---|
int |
getBranchCount(ImmutablePlan plan)
Returns the number of branches the given plan has
|
List<ChainBranch> |
getBranchesForChain(ImmutableChain chain)
Get all feature branches associated with the given chain
|
Collection<Job> |
getBranchesForJob(Job job) |
List<ChainBranchIdentifier> |
getBranchIdentifiersForChain(PlanIdentifier chain)
Get all feature branches associated with the given chain, however on pulls up
minimal details about each branch.
|
ChainBranchIdentifier |
getBranchWithName(ImmutableChain masterPlan,
String branchName)
|
long |
getNextBranchKeyNumber(ImmutablePlan chain)
Retrieving suggested number for next branch key in given chain.
|
Set<Long> |
getPlansWithBranches()
Returns a list of plans that currently have branches
|
void |
handleVcsBranchDeletedOfPlanBranch(ImmutableChain chainBranch)
Handles deletion of a VCS branch from plan branch's default repository.
|
void |
handleVcsBranchDeletedOfPlanBranch(ImmutableChain chainBranch,
PlanRepositoryDefinition planRepositoryDefinition)
Handles deletion of a VCS branch from any of the plan branch's repositories.
|
boolean |
hasBranches(Plan plan)
Returns whether or not the given plan has any branches
|
boolean |
isPlanBranchNameConflicting(ImmutableChain masterPlan,
long chainBranchIdToIgnore,
String branchName)
Verifies whether a
ChainBranch name is unique with a given master Chain |
void |
updateNextBranchKeyNumber(ImmutablePlan chain,
long number)
Set suggested number for next branch key in given chain
|
@NotNull List<ChainBranch> getBranchesForChain(@NotNull ImmutableChain chain)
chain
- - the masterChainBranch
s associated with the given chain.@NotNull List<ChainBranchIdentifier> getBranchIdentifiersForChain(@NotNull PlanIdentifier chain)
chain
- - the masterChainBranchIdentifier
for branches associated with the given Chain.boolean hasBranches(@NotNull Plan plan)
plan
- to check for branches forint getBranchCount(@NotNull ImmutablePlan plan)
plan
- to check for branches for@NotNull Set<Long> getPlansWithBranches()
boolean isPlanBranchNameConflicting(ImmutableChain masterPlan, long chainBranchIdToIgnore, String branchName)
ChainBranch
name is unique with a given master Chain
masterPlan
- the master chain within which the name has to be uniquechainBranchIdToIgnore
- 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@Nullable ChainBranchIdentifier getBranchWithName(ImmutableChain masterPlan, String branchName)
masterPlan
- branchName
- ChainBranchIdentifier
or null if no such branch existsvoid handleVcsBranchDeletedOfPlanBranch(ImmutableChain chainBranch)
chainBranch
- the plan branch of which a default VCS branch was deletedvoid handleVcsBranchDeletedOfPlanBranch(@NotNull ImmutableChain chainBranch, @NotNull PlanRepositoryDefinition planRepositoryDefinition)
chainBranch
- the plan branch of which a VCS branch was deletedplanRepositoryDefinition
- plan repository whose branch was deletedCollection<Job> getBranchesForJob(Job job)
long getNextBranchKeyNumber(ImmutablePlan chain)
chain
- void updateNextBranchKeyNumber(ImmutablePlan chain, long number)
chain
- number
- Copyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.