Class AbstractBitbucketEndpoint

    • Method Detail

      • getDisplayName

        @CheckForNull
        public abstract String getDisplayName()
        Optional name to use to describe the end-point.
        Returns:
        the name to use for the end-point
      • getServerUrl

        @NonNull
        public abstract String getServerUrl()
        The URL of this endpoint.
        Returns:
        the URL of the endpoint.
      • getBitbucketJenkinsRootUrl

        @CheckForNull
        public String getBitbucketJenkinsRootUrl()
        Jenkins Server Root URL to be used by this Bitbucket endpoint. The global setting from Jenkins.get().getRootUrl() will be used if this field is null or equals an empty string.
        Returns:
        the verbatim setting provided by endpoint configuration
      • setBitbucketJenkinsRootUrl

        @DataBoundSetter
        public void setBitbucketJenkinsRootUrl​(String bitbucketJenkinsRootUrl)
      • getEndpointJenkinsRootUrl

        @NonNull
        public String getEndpointJenkinsRootUrl()
        Jenkins Server Root URL to be used by this Bitbucket endpoint. The global setting from Jenkins.get().getRootUrl() will be used if this field is null or equals an empty string.
        Returns:
        the normalized value from setting provided by endpoint configuration (if not empty), or the global setting of the Jenkins Root URL
      • getEndpointJenkinsRootUrl

        @NonNull
        public static String getEndpointJenkinsRootUrl​(String serverUrl)
        Look up in the current endpoint configurations if one exists for the serverUrl, and return its normalized endpointJenkinsRootUrl value, or the normalized global default Jenkins Root URL if nothing was found or if the setting is an empty string; empty string if there was an error finding the global default Jenkins Root URL value (e.g. core not started). This is the routine intended for external consumption when one needs a Jenkins Root URL to use for webhook configuration.
        Parameters:
        serverUrl - Bitbucket Server URL for the endpoint config
        Returns:
        the normalized custom or default Jenkins Root URL value
      • getRepositoryUrl

        @NonNull
        public abstract String getRepositoryUrl​(@NonNull
                                                String repoOwner,
                                                @NonNull
                                                String repository)
        The user facing URL of the specified repository.
        Parameters:
        repoOwner - the repository owner.
        repository - the repository.
        Returns:
        the user facing URL of the specified repository.
      • isManageHooks

        public final boolean isManageHooks()
        Returns true if and only if Jenkins is supposed to auto-manage hooks for this end-point.
        Returns:
        true if and only if Jenkins is supposed to auto-manage hooks for this end-point.
      • getCredentialsId

        @CheckForNull
        public final String getCredentialsId()
        Returns the IdCredentials.getId() of the credentials to use for auto-management of hooks.
        Returns:
        the IdCredentials.getId() of the credentials to use for auto-management of hooks.
      • credentials

        @CheckForNull
        public com.cloudbees.plugins.credentials.common.StandardCredentials credentials()
        Looks up the StandardCredentials to use for auto-management of hooks.
        Returns:
        the credentials or null.