Class GitLabSCMSourceRequest
java.lang.Object
jenkins.scm.api.trait.SCMSourceRequest
io.jenkins.plugins.gitlabbranchsource.GitLabSCMSourceRequest
- All Implemented Interfaces:
Closeable,AutoCloseable
public class GitLabSCMSourceRequest
extends jenkins.scm.api.trait.SCMSourceRequest
-
Nested Class Summary
Nested classes/interfaces inherited from class jenkins.scm.api.trait.SCMSourceRequest
jenkins.scm.api.trait.SCMSourceRequest.IntermediateLambda<I extends Object>, jenkins.scm.api.trait.SCMSourceRequest.LazyRevisionLambda<H extends jenkins.scm.api.SCMHead,R extends jenkins.scm.api.SCMRevision, I extends Object>, jenkins.scm.api.trait.SCMSourceRequest.ProbeLambda<H extends jenkins.scm.api.SCMHead, I extends Object>, jenkins.scm.api.trait.SCMSourceRequest.RevisionLambda<H extends jenkins.scm.api.SCMHead, R extends jenkins.scm.api.SCMRevision>, jenkins.scm.api.trait.SCMSourceRequest.Witness<H extends jenkins.scm.api.SCMHead, R extends jenkins.scm.api.SCMRevision> -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()final Iterable<org.gitlab4j.api.models.Branch>Returns the branch details or an empty list if either the request did not specify toisFetchBranches()or if the branch details have not been provided bysetBranches(Iterable)yet.final Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy>Returns theChangeRequestCheckoutStrategyto create for each fork merge request.org.gitlab4j.api.GitLabApiReturns theGitLabApito use for the request.org.gitlab4j.api.models.ProjectReturns the Map of projectMemberornullif those details have not been provided yet.Iterable<org.gitlab4j.api.models.MergeRequest>Returns the merge request details or an empty list if either the request did not specify toisFetchMRs()or if the merge request details have not been provided bysetMergeRequests(Iterable)yet.Returns theChangeRequestCheckoutStrategyto create for each merge request.final Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy>getMRStrategies(boolean fork) Returns theChangeRequestCheckoutStrategyto create for merge requests of the specified type.final Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy>Returns theChangeRequestCheckoutStrategyto create for each origin merge request.org.gitlab4j.api.models.AccessLevelgetPermission(String username) Returns the permissions of the supplied user.Returns requested merge request numbers.Gets requested origin branch names.Gets requested tag names.final Iterable<org.gitlab4j.api.models.Tag>getTags()Returns the tag details or an empty list if either the request did not specify toisFetchTags()()} or if the tag details have not been provided bysetTags(Iterable)yet.final booleanReturnstrueif branch details need to be fetched.final booleanReturnstrueif fork merge request details need to be fetched.final booleanReturnstrueif merge request details need to be fetched.final booleanReturnstrueif origin merge request details need to be fetched.final booleanReturnstrueif tag details need to be fetched.booleanfinal voidsetBranches(Iterable<org.gitlab4j.api.models.Branch> branches) Provides the requests with the branch details.voidsetGitLabApi(org.gitlab4j.api.GitLabApi gitLabApi) Provides theGitLabApito use for the request.final voidsetMembers(HashMap<String, org.gitlab4j.api.models.AccessLevel> members) Provides the Map of projectMemberusername andAccessLevelof the member.voidsetMergeRequests(Iterable<org.gitlab4j.api.models.MergeRequest> mergeRequests) Provides the requests with the merge request details.voidsetProject(org.gitlab4j.api.models.Project gitlabProject) Sets theProject.final voidProvides the requests with the tag details.Methods inherited from class jenkins.scm.api.trait.SCMSourceRequest
getCriteria, isComplete, isExcluded, isTrusted, listener, manage, process, process, process
-
Field Details
-
LOGGER
-
-
Method Details
-
isFetchBranches
public final boolean isFetchBranches()Returnstrueif branch details need to be fetched.- Returns:
trueif branch details need to be fetched.
-
isFetchTags
public final boolean isFetchTags()Returnstrueif tag details need to be fetched.- Returns:
trueif tag details need to be fetched.
-
isFetchMRs
public final boolean isFetchMRs()Returnstrueif merge request details need to be fetched.- Returns:
trueif merge request details need to be fetched.
-
isFetchOriginMRs
public final boolean isFetchOriginMRs()Returnstrueif origin merge request details need to be fetched.- Returns:
trueif origin merge request details need to be fetched.
-
isFetchForkMRs
public final boolean isFetchForkMRs()Returnstrueif fork merge request details need to be fetched.- Returns:
trueif fork merge request details need to be fetched.
-
getOriginMRStrategies
@NonNull public final Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy> getOriginMRStrategies()Returns theChangeRequestCheckoutStrategyto create for each origin merge request.- Returns:
- the
ChangeRequestCheckoutStrategyto create for each origin merge request.
-
getForkMRStrategies
@NonNull public final Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy> getForkMRStrategies()Returns theChangeRequestCheckoutStrategyto create for each fork merge request.- Returns:
- the
ChangeRequestCheckoutStrategyto create for each fork merge request.
-
getMRStrategies
@NonNull public final Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy> getMRStrategies(boolean fork) Returns theChangeRequestCheckoutStrategyto create for merge requests of the specified type.- Parameters:
fork-trueto return strategies for the fork merge requests,falsefor origin merge requests.- Returns:
- the
ChangeRequestCheckoutStrategyto create for each merge request.
-
getMRStrategies
public final Map<Boolean,Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy>> getMRStrategies()Returns theChangeRequestCheckoutStrategyto create for each merge request.- Returns:
- a map of the
ChangeRequestCheckoutStrategyto create for each merge request keyed by whether the strategy applies to forks or not (Boolean.FALSEis the key for origin merge requests)
-
getRequestedMergeRequestNumbers
Returns requested merge request numbers.- Returns:
- the requested merge request numbers or
nullif the request was not scoped to a subset of merge requests.
-
getRequestedOriginBranchNames
Gets requested origin branch names.- Returns:
- the requested origin branch names or
nullif the request was not scoped to a subset of branches.
-
getRequestedTagNames
Gets requested tag names.- Returns:
- the requested tag names or
nullif the request was not scoped to a subset of tags.
-
getMergeRequests
Returns the merge request details or an empty list if either the request did not specify toisFetchMRs()or if the merge request details have not been provided bysetMergeRequests(Iterable)yet.- Returns:
- the details of merge requests, may be limited by
getRequestedMergeRequestNumbers()or may be empty if notisFetchMRs()
-
setMergeRequests
public void setMergeRequests(@CheckForNull Iterable<org.gitlab4j.api.models.MergeRequest> mergeRequests) Provides the requests with the merge request details.- Parameters:
mergeRequests- the merge request details.
-
getBranches
Returns the branch details or an empty list if either the request did not specify toisFetchBranches()or if the branch details have not been provided bysetBranches(Iterable)yet.- Returns:
- the branch details (may be empty)
-
setBranches
Provides the requests with the branch details.- Parameters:
branches- the branch details.
-
getTags
Returns the tag details or an empty list if either the request did not specify toisFetchTags()()} or if the tag details have not been provided bysetTags(Iterable)yet.- Returns:
- the tag details (may be empty)
-
setTags
Provides the requests with the tag details.- Parameters:
tags- the tag details.
-
getMembers
Returns the Map of projectMemberornullif those details have not been provided yet.- Returns:
- the Map of project
Memberornullif those details have not been provided yet.
-
setMembers
public final void setMembers(@CheckForNull HashMap<String, org.gitlab4j.api.models.AccessLevel> members) Provides the Map of projectMemberusername andAccessLevelof the member.- Parameters:
members- the Map of projectMemberusername andAccessLevelof the member.
-
getGitLabApi
@CheckForNull public org.gitlab4j.api.GitLabApi getGitLabApi()Returns theGitLabApito use for the request.- Returns:
- the
GitLabApito use for the request ornullif caller should establish their own.
-
setGitLabApi
public void setGitLabApi(@CheckForNull org.gitlab4j.api.GitLabApi gitLabApi) Provides theGitLabApito use for the request.- Parameters:
gitLabApi-GitLabApito use for the request.
-
getPermission
Returns the permissions of the supplied user.- Parameters:
username- the username of MR author- Returns:
AccessLevelthe permissions of the supplied user.
-
isMember
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classjenkins.scm.api.trait.SCMSourceRequest- Throws:
IOException
-
setProject
public void setProject(org.gitlab4j.api.models.Project gitlabProject) Sets theProject.- Parameters:
gitlabProject- theProject.
-
getGitlabProject
@CheckForNull public org.gitlab4j.api.models.Project getGitlabProject()
-