Class 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 
      Modifier and Type Field Description
      static Logger LOGGER  
    • Field Detail

      • LOGGER

        public static final Logger LOGGER
    • Method Detail

      • isFetchBranches

        public final boolean isFetchBranches()
        Returns true if branch details need to be fetched.
        Returns:
        true if branch details need to be fetched.
      • isFetchTags

        public final boolean isFetchTags()
        Returns true if tag details need to be fetched.
        Returns:
        true if tag details need to be fetched.
      • isFetchMRs

        public final boolean isFetchMRs()
        Returns true if merge request details need to be fetched.
        Returns:
        true if merge request details need to be fetched.
      • isFetchOriginMRs

        public final boolean isFetchOriginMRs()
        Returns true if origin merge request details need to be fetched.
        Returns:
        true if origin merge request details need to be fetched.
      • isFetchForkMRs

        public final boolean isFetchForkMRs()
        Returns true if fork merge request details need to be fetched.
        Returns:
        true if fork merge request details need to be fetched.
      • getOriginMRStrategies

        @NonNull
        public final Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy> getOriginMRStrategies()
        Returns the ChangeRequestCheckoutStrategy to create for each origin merge request.
        Returns:
        the ChangeRequestCheckoutStrategy to create for each origin merge request.
      • getForkMRStrategies

        @NonNull
        public final Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy> getForkMRStrategies()
        Returns the ChangeRequestCheckoutStrategy to create for each fork merge request.
        Returns:
        the ChangeRequestCheckoutStrategy to create for each fork merge request.
      • getMRStrategies

        @NonNull
        public final Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy> getMRStrategies​(boolean fork)
        Returns the ChangeRequestCheckoutStrategy to create for merge requests of the specified type.
        Parameters:
        fork - true to return strategies for the fork merge requests, false for origin merge requests.
        Returns:
        the ChangeRequestCheckoutStrategy to create for each merge request.
      • getMRStrategies

        public final Map<Boolean,​Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy>> getMRStrategies()
        Returns the ChangeRequestCheckoutStrategy to create for each merge request.
        Returns:
        a map of the ChangeRequestCheckoutStrategy to create for each merge request keyed by whether the strategy applies to forks or not (Boolean.FALSE is the key for origin merge requests)
      • getRequestedMergeRequestNumbers

        @CheckForNull
        public final Set<Long> getRequestedMergeRequestNumbers()
        Returns requested merge request numbers.
        Returns:
        the requested merge request numbers or null if the request was not scoped to a subset of merge requests.
      • getRequestedOriginBranchNames

        @CheckForNull
        public final Set<String> getRequestedOriginBranchNames()
        Gets requested origin branch names.
        Returns:
        the requested origin branch names or null if the request was not scoped to a subset of branches.
      • getRequestedTagNames

        @CheckForNull
        public final Set<String> getRequestedTagNames()
        Gets requested tag names.
        Returns:
        the requested tag names or null if the request was not scoped to a subset of tags.
      • 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

        @NonNull
        public final Iterable<org.gitlab4j.api.models.Branch> getBranches()
        Returns the branch details or an empty list if either the request did not specify to isFetchBranches() or if the branch details have not been provided by setBranches(Iterable) yet.
        Returns:
        the branch details (may be empty)
      • setBranches

        public final void setBranches​(@CheckForNull
                                      Iterable<org.gitlab4j.api.models.Branch> branches)
        Provides the requests with the branch details.
        Parameters:
        branches - the branch details.
      • getTags

        @NonNull
        public final Iterable<org.gitlab4j.api.models.Tag> getTags()
        Returns the tag details or an empty list if either the request did not specify to isFetchTags() ()} or if the tag details have not been provided by setTags(Iterable) yet.
        Returns:
        the tag details (may be empty)
      • setTags

        public final void setTags​(@CheckForNull
                                  Iterable<org.gitlab4j.api.models.Tag> tags)
        Provides the requests with the tag details.
        Parameters:
        tags - the tag details.
      • getMembers

        public final HashMap<String,​org.gitlab4j.api.models.AccessLevel> getMembers()
        Returns the Map of project Member or null if those details have not been provided yet.
        Returns:
        the Map of project Member or null if 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 project Member username and AccessLevel of the member.
        Parameters:
        members - the Map of project Member username and AccessLevel of the member.
      • getGitLabApi

        @CheckForNull
        public org.gitlab4j.api.GitLabApi getGitLabApi()
        Returns the GitLabApi to use for the request.
        Returns:
        the GitLabApi to use for the request or null if caller should establish their own.
      • setGitLabApi

        public void setGitLabApi​(@CheckForNull
                                 org.gitlab4j.api.GitLabApi gitLabApi)
        Provides the GitLabApi to use for the request.
        Parameters:
        gitLabApi - GitLabApi to use for the request.
      • getPermission

        public org.gitlab4j.api.models.AccessLevel getPermission​(String username)
        Returns the permissions of the supplied user.
        Parameters:
        username - the username of MR author
        Returns:
        AccessLevel the permissions of the supplied user.
      • isMember

        public boolean isMember​(String username)
      • setProject

        public void setProject​(org.gitlab4j.api.models.Project gitlabProject)
        Sets the Project.
        Parameters:
        gitlabProject - the Project.
      • getGitlabProject

        @CheckForNull
        public org.gitlab4j.api.models.Project getGitlabProject()