@ExperimentalApi
public interface BranchCreationFacade
Modifier and Type | Method and Description |
---|---|
ChainBranchCreationResult |
createChainBranch(ImmutableChain chain,
PlanBranchWorkflow planBranchWorkflow,
String branchName,
String branchDescription,
VcsBranch vcsBranch,
PlanCreationService.EnablePlan enablePlan,
boolean enableExpiry)
Given a branch name and (optionally) vcs branch name, creates a plan branch, overriding repository definition.
|
ChainBranchCreationResult |
createChainBranch(ImmutableChain chain,
PlanBranchWorkflow planBranchWorkflow,
String branchName,
String branchDescription,
VcsBranch vcsBranch,
PlanCreationService.EnablePlan enablePlan,
boolean enableExpiry,
com.atlassian.struts.ValidationAware validationAware)
Given a branch name and (optionally) vcs branch name, creates a plan branch, overriding repository definition.
|
List<ChainBranchCreationResult> |
createManualBranches(ImmutableChain chain,
Collection<VcsBranch> branches,
ErrorCollection errorCollection,
PlanCreationService.EnablePlan enablePlan)
Given a list of branches names, create plan branches for them under give chain.
|
void |
createOrEnableChainsBranches(List<ImmutableChain> chains,
PlanBranchWorkflow planBranchWorkflow,
Function<VcsBranchConfigurator,VcsBranch> vcsBranchProvider,
Function<ImmutableChain,BuildConfiguration> buildConfigurationProvider,
Consumer<PlanKey> planBranchConsumer)
Given a list of plans and a vcs branch creates plan branches for those chains, queuing RSS execution if
required.
|
void |
enableExistingChainBranch(ImmutableChain masterChain,
ImmutableChainBranch existingChainBranch)
Enables existing chain branch, queuing RSS execution if required.
|
List<VcsBranch> |
getOpenBranches(ImmutableChain chain,
ErrorCollection errorCollection)
Returns a list of currently open branches for the chain's default repository List ordering determined by
underlying repository (preference is for native ordering e.g.
|
boolean |
scheduleBranchListInitialisation(Chain chain)
Schedules initialisation of existing vcs branch list.
|
void createOrEnableChainsBranches(@NotNull List<ImmutableChain> chains, @NotNull PlanBranchWorkflow planBranchWorkflow, @NotNull Function<VcsBranchConfigurator,VcsBranch> vcsBranchProvider, @NotNull Function<ImmutableChain,BuildConfiguration> buildConfigurationProvider, @NotNull Consumer<PlanKey> planBranchConsumer)
If branch name conflicts with an existing plan branch, the name will be automatically generated.
chains
- list of plans for which plan branches should be createdplanBranchWorkflow
- workflow which led to creation of these branchesvcsBranchProvider
- provides VcsBranch to use when overriding repository definitionbuildConfigurationProvider
- provides a default fragment of configuration to create the chain branch withplanBranchConsumer
- code should be executed before triggering events that new plan createdvoid enableExistingChainBranch(@NotNull ImmutableChain masterChain, @NotNull ImmutableChainBranch existingChainBranch)
@NotNull List<ChainBranchCreationResult> createManualBranches(@NotNull ImmutableChain chain, @NotNull Collection<VcsBranch> branches, @Nullable ErrorCollection errorCollection, @NotNull PlanCreationService.EnablePlan enablePlan)
chain
- chain for which plan branches should be createdbranches
- branches to createerrorCollection
- to add errors to, if you don't supply an error collection, they will just get loggedenablePlan
- defines whether newly created branches should be enabled or disabled after creation@NotNull ChainBranchCreationResult createChainBranch(@NotNull ImmutableChain chain, @NotNull PlanBranchWorkflow planBranchWorkflow, @NotNull String branchName, @Nullable String branchDescription, @Nullable VcsBranch vcsBranch, @NotNull PlanCreationService.EnablePlan enablePlan, boolean enableExpiry) throws PlanCreationDeniedException, WebValidationException
chain
- chain for which plan branches should be createdplanBranchWorkflow
- workflow which led to creation of this chain branchbranchName
- name of plan branch to createbranchDescription
- optional description of the new branchvcsBranch
- VCS branch to use when overriding repository definitionenablePlan
- defines whether newly created branches should be enabled or disabled after creationenableExpiry
- defines whether created branch can be removed due to branch expiration detectionPlanCreationDeniedException
- if chain branch creation was denied for any reasonWebValidationException
- if there were validation errors@Nullable ChainBranchCreationResult createChainBranch(@NotNull ImmutableChain chain, @NotNull PlanBranchWorkflow planBranchWorkflow, @NotNull String branchName, @Nullable String branchDescription, @Nullable VcsBranch vcsBranch, @NotNull PlanCreationService.EnablePlan enablePlan, boolean enableExpiry, @NotNull com.atlassian.struts.ValidationAware validationAware) throws PlanCreationDeniedException
chain
- chain to create branches underplanBranchWorkflow
- which workflow led to creation of this chain branchbranchName
- name of plan branch to createbranchDescription
- optional description of the new branchvcsBranch
- VCS branch to use when overriding repository definitionenablePlan
- defines whether newly created branches should be enabled or disabled after creationenableExpiry
- defines whether created branch can be removed due to branch expiration detectionvalidationAware
- to add errors toPlanCreationDeniedException
- if chain branch creation was denied for any reasonboolean scheduleBranchListInitialisation(@NotNull Chain chain)
chain
- chain which vcs branches list should be initializedIllegalStateException
- if plan doesn't have default repository@Nullable List<VcsBranch> getOpenBranches(@NotNull ImmutableChain chain, @Nullable ErrorCollection errorCollection)
chain
- to find branches forerrorCollection
- to add errors toCopyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.