public class PlanBranchPullRequestServiceImpl extends Object implements PlanBranchPullRequestService
| Constructor and Description |
|---|
PlanBranchPullRequestServiceImpl(CachedPlanManager cachedPlanManager,
com.atlassian.event.api.EventPublisher eventPublisher,
PlanBranchPullRequestDao planBranchPullRequestDao,
PlanManager planManager,
VcsPullRequestDao vcsPullRequestDao) |
| Modifier and Type | Method and Description |
|---|---|
@NotNull PlanBranchPullRequest |
create(@NotNull ChainBranch chainBranch,
@NotNull MutableVcsPullRequest vcsPullRequest)
Creates a new link between chain branch and pull request.
|
@NotNull PlanBranchPullRequest |
create(@NotNull PlanKey branchKey,
long pullRequestId)
Creates a new link between chain branch and pull request.
|
boolean |
deleteForChainBranch(long branchId)
Deletes a link for the given plan branch.
|
boolean |
deleteForChainBranch(@NotNull PlanKey branchKey)
Deletes a link for the given plan branch.
|
int |
deleteForVcsPullRequest(long pullRequestId)
Deletes all links for the given pull request.
|
@NotNull List<PlanBranchPullRequest> |
findForChain(long chainId)
Retrieves a
PlanBranchPullRequest connections for the given chain. |
@NotNull Optional<PlanBranchPullRequest> |
findForChainAndPullRequest(long chainId,
long pullRequestId)
|
@NotNull Optional<PlanBranchPullRequest> |
findForChainAndPullRequest(@NotNull PlanKey chainKey,
long pullRequestId)
|
@NotNull Optional<PlanBranchPullRequest> |
findForChainBranch(long branchId)
Retrieves a
PlanBranchPullRequest connection for the given plan branch by branch id. |
@NotNull Optional<PlanBranchPullRequest> |
findForChainBranch(@NotNull PlanKey branchKey)
Retrieves a
PlanBranchPullRequest connection for the given plan branch by branch key. |
@NotNull List<PlanBranchPullRequest> |
findForPullRequest(long pullRequestId)
Retrieves all
PlanBranchPullRequest connections for the given pull request by pull
request database id. |
@Inject public PlanBranchPullRequestServiceImpl(CachedPlanManager cachedPlanManager, com.atlassian.event.api.EventPublisher eventPublisher, PlanBranchPullRequestDao planBranchPullRequestDao, PlanManager planManager, VcsPullRequestDao vcsPullRequestDao)
@NotNull public @NotNull Optional<PlanBranchPullRequest> findForChainBranch(long branchId)
PlanBranchPullRequestServicePlanBranchPullRequest connection for the given plan branch by branch id.
Only one VCS pull request may be associated with a plan branch.findForChainBranch in interface PlanBranchPullRequestServicebranchId - id of the plan branchPlanBranchPullRequest if found@NotNull public @NotNull Optional<PlanBranchPullRequest> findForChainBranch(@NotNull @NotNull PlanKey branchKey)
PlanBranchPullRequestServicePlanBranchPullRequest connection for the given plan branch by branch key.
Only one VCS pull request may be associated with a plan branch.findForChainBranch in interface PlanBranchPullRequestServicebranchKey - key of the plan branchPlanBranchPullRequest if found@NotNull public @NotNull Optional<PlanBranchPullRequest> findForChainAndPullRequest(long chainId, long pullRequestId)
PlanBranchPullRequestServicePlanBranchPullRequest connection for the given chain and pull request. Should yield only one result, since a single pull requests should only create a
single plan branch per plan.findForChainAndPullRequest in interface PlanBranchPullRequestServicechainId - id of the top level planpullRequestId - id of the VCS pull requestPlanBranchPullRequest if found@NotNull public @NotNull List<PlanBranchPullRequest> findForChain(long chainId)
PlanBranchPullRequestServicePlanBranchPullRequest connections for the given chain.findForChain in interface PlanBranchPullRequestServicechainId - id of the top level planPlanBranchPullRequest@NotNull public @NotNull Optional<PlanBranchPullRequest> findForChainAndPullRequest(@NotNull @NotNull PlanKey chainKey, long pullRequestId)
PlanBranchPullRequestServicePlanBranchPullRequest connection for the given chain and pull request. Should yield only one result, since a single pull requests should only create a
single plan branch per plan.findForChainAndPullRequest in interface PlanBranchPullRequestServicechainKey - key of the top level planpullRequestId - id of the VCS pull requestPlanBranchPullRequest if found@NotNull public @NotNull List<PlanBranchPullRequest> findForPullRequest(long pullRequestId)
PlanBranchPullRequestServicePlanBranchPullRequest connections for the given pull request by pull
request database id. Multiple plan branches may be associated with a single pull request.findForPullRequest in interface PlanBranchPullRequestServicepullRequestId - id of the pull requestPlanBranchPullRequests@NotNull public @NotNull PlanBranchPullRequest create(@NotNull @NotNull PlanKey branchKey, long pullRequestId)
PlanBranchPullRequestServicecreate in interface PlanBranchPullRequestServicebranchKey - key of the chain branch to linkpullRequestId - id of the pull request to link@NotNull public @NotNull PlanBranchPullRequest create(@NotNull @NotNull ChainBranch chainBranch, @NotNull @NotNull MutableVcsPullRequest vcsPullRequest)
PlanBranchPullRequestServicecreate in interface PlanBranchPullRequestServicechainBranch - chain branch to linkvcsPullRequest - pull request to linkpublic boolean deleteForChainBranch(long branchId)
PlanBranchPullRequestServicedeleteForChainBranch in interface PlanBranchPullRequestServicebranchId - id of the plan branchpublic boolean deleteForChainBranch(@NotNull
@NotNull PlanKey branchKey)
PlanBranchPullRequestServicedeleteForChainBranch in interface PlanBranchPullRequestServicebranchKey - key of the plan branchpublic int deleteForVcsPullRequest(long pullRequestId)
PlanBranchPullRequestServicedeleteForVcsPullRequest in interface PlanBranchPullRequestServicepullRequestId - id of the vcs pull requestCopyright © 2024 Atlassian Software Systems Pty Ltd. All rights reserved.