Class VcsPullRequestServiceImpl
- java.lang.Object
-
- com.atlassian.bamboo.plan.pullrequest.VcsPullRequestServiceImpl
-
- All Implemented Interfaces:
VcsPullRequestService
public class VcsPullRequestServiceImpl extends Object implements VcsPullRequestService
-
-
Constructor Summary
Constructors Constructor Description VcsPullRequestServiceImpl(com.atlassian.event.api.EventPublisher eventPublisher, VcsPullRequestDao vcsPullRequestDao)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclosePullRequest(@NotNull VcsPullRequest pr)Mark pull request as closed.voidclosePullRequestsClosedInRepository(long targetRepositoryId, @NotNull List<VcsPullRequest> openPullRequests)Synchronize the status of pull requests in DB and in remote repository@NotNull VcsPullRequestcreatePullRequest(@NotNull String pullRequestKey, @Nullable Long sourceRepositoryId, @NotNull String source, long targetRepositoryId, @NotNull String target, boolean isOpen)Create new pull request and save it.@NotNull VcsPullRequestcreatePullRequest(@NotNull String pullRequestKey, @Nullable Long sourceRepositoryId, @NotNull String source, long targetRepositoryId, @NotNull String target, boolean isOpen, @NotNull VcsForkDto vcsForkDto)Create new pull request and save it.VcsPullRequestfindByRepositoryAndKey(long targetRepositoryId, @NotNull String pullRequestKey)Search pull request by pull request key (unique on repository level) and target repository idList<VcsPullRequest>findOpenByRepository(long targetRepositoryId)Search open pull requests by target repository and status.voidupdatePullRequest(@NotNull VcsPullRequest pr, @Nullable Long sourceRepositoryId, @NotNull String source, @NotNull String target, boolean isOpen)Modify pull request.voidupdatePullRequest(@NotNull VcsPullRequest pr, @Nullable Long sourceRepositoryId, @NotNull String source, @NotNull String target, boolean isOpen, @NotNull VcsForkDto vcsForkDto)Modify pull request.
-
-
-
Constructor Detail
-
VcsPullRequestServiceImpl
@Inject public VcsPullRequestServiceImpl(com.atlassian.event.api.EventPublisher eventPublisher, VcsPullRequestDao vcsPullRequestDao)
-
-
Method Detail
-
findByRepositoryAndKey
public VcsPullRequest findByRepositoryAndKey(long targetRepositoryId, @NotNull @NotNull String pullRequestKey)
Description copied from interface:VcsPullRequestServiceSearch pull request by pull request key (unique on repository level) and target repository id- Specified by:
findByRepositoryAndKeyin interfaceVcsPullRequestService- Parameters:
targetRepositoryId- target repository idpullRequestKey- repository-specific pull request key- Returns:
- pull request or null if not found
-
findOpenByRepository
public List<VcsPullRequest> findOpenByRepository(long targetRepositoryId)
Description copied from interface:VcsPullRequestServiceSearch open pull requests by target repository and status.- Specified by:
findOpenByRepositoryin interfaceVcsPullRequestService- Parameters:
targetRepositoryId- target repository id- Returns:
- list of pull requests
-
closePullRequest
public void closePullRequest(@NotNull @NotNull VcsPullRequest pr)Description copied from interface:VcsPullRequestServiceMark pull request as closed.- Specified by:
closePullRequestin interfaceVcsPullRequestService
-
createPullRequest
@NotNull public @NotNull VcsPullRequest createPullRequest(@NotNull @NotNull String pullRequestKey, @Nullable @Nullable Long sourceRepositoryId, @NotNull @NotNull String source, long targetRepositoryId, @NotNull @NotNull String target, boolean isOpen)
Description copied from interface:VcsPullRequestServiceCreate new pull request and save it.- Specified by:
createPullRequestin interfaceVcsPullRequestService- Returns:
- created pull request
-
createPullRequest
@NotNull public @NotNull VcsPullRequest createPullRequest(@NotNull @NotNull String pullRequestKey, @Nullable @Nullable Long sourceRepositoryId, @NotNull @NotNull String source, long targetRepositoryId, @NotNull @NotNull String target, boolean isOpen, @NotNull @NotNull VcsForkDto vcsForkDto)
Description copied from interface:VcsPullRequestServiceCreate new pull request and save it. The method should be used when dealing with pull requests from forked repositories.- Specified by:
createPullRequestin interfaceVcsPullRequestService- Returns:
- created pull request
-
updatePullRequest
public void updatePullRequest(@NotNull @NotNull VcsPullRequest pr, @Nullable @Nullable Long sourceRepositoryId, @NotNull @NotNull String source, @NotNull @NotNull String target, boolean isOpen)Description copied from interface:VcsPullRequestServiceModify pull request.- Specified by:
updatePullRequestin interfaceVcsPullRequestService
-
updatePullRequest
public void updatePullRequest(@NotNull @NotNull VcsPullRequest pr, @Nullable @Nullable Long sourceRepositoryId, @NotNull @NotNull String source, @NotNull @NotNull String target, boolean isOpen, @NotNull @NotNull VcsForkDto vcsForkDto)Description copied from interface:VcsPullRequestServiceModify pull request. The method should be used when dealing with pull requests from forked repositories.- Specified by:
updatePullRequestin interfaceVcsPullRequestService
-
closePullRequestsClosedInRepository
public void closePullRequestsClosedInRepository(long targetRepositoryId, @NotNull @NotNull List<VcsPullRequest> openPullRequests)Description copied from interface:VcsPullRequestServiceSynchronize the status of pull requests in DB and in remote repository- Specified by:
closePullRequestsClosedInRepositoryin interfaceVcsPullRequestService
-
-