Class ScmContentProviderParams

    • Constructor Detail

      • ScmContentProviderParams

        public ScmContentProviderParams​(Item item)
    • Method Detail

      • getApiUrl

        public String getApiUrl()
      • getOwner

        public String getOwner()
      • getRepo

        public String getRepo()
      • getCredentials

        public com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials getCredentials()
      • owner

        @CheckForNull
        protected abstract String owner​(@NonNull
                                        jenkins.scm.api.SCMSource scmSource)
        Gives owner of SCMSource, typically organization or project
        Parameters:
        scmSource - scm source
        Returns:
        null if there is no owner in this SCMSource
      • owner

        @CheckForNull
        protected abstract String owner​(@NonNull
                                        jenkins.scm.api.SCMNavigator scmNavigator)
        Gives owner of SCMNavigator, typically organization
        Parameters:
        scmNavigator - scm navigator
        Returns:
        null if there is no owner in this SCMSource
      • repo

        @CheckForNull
        protected abstract String repo​(@NonNull
                                       jenkins.scm.api.SCMSource scmSource)
        Gives repo name attached to this SCMSource
        Parameters:
        scmSource - scm source
        Returns:
        null if there is no repo attached to this SCMSource
      • apiUrl

        @CheckForNull
        protected abstract String apiUrl​(@NonNull
                                         jenkins.scm.api.SCMSource scmSource)
        Gives SCM api URL attached to this SCMSource
        Parameters:
        scmSource - scm source
        Returns:
        SCM api URL
      • apiUrl

        @CheckForNull
        protected abstract String apiUrl​(@NonNull
                                         jenkins.scm.api.SCMNavigator scmNavigator)
        Gives SCM api URL attached to this ScmNavigator
        Parameters:
        scmNavigator - scm source
        Returns:
        SCM api URL
      • getCredentialForUser

        @NonNull
        protected abstract com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials getCredentialForUser​(@NonNull
                                                                                                                             Item item,
                                                                                                                             @NonNull
                                                                                                                             String apiUrl)
        Gives credential for SCM with this URL
        Parameters:
        item - pipeline job item
        apiUrl - api url of scm provider
        Returns:
        credential