Class BitbucketApiFactory

    • Constructor Detail

      • BitbucketApiFactory

        public BitbucketApiFactory()
    • Method Detail

      • isMatch

        protected abstract boolean isMatch​(@Nullable
                                           String serverUrl)
        Tests if the supplied URL is supported by this factory.
        Parameters:
        serverUrl - the server URL (may be null, e.g. for Bitbucket Cloud)
        Returns:
        true if this factory can connect to the specified URL.
      • create

        @NonNull
        protected abstract BitbucketApi create​(@Nullable
                                               String serverUrl,
                                               @Nullable
                                               BitbucketAuthenticator authenticator,
                                               @NonNull
                                               String owner,
                                               @CheckForNull
                                               String projectKey,
                                               @CheckForNull
                                               String repository)
        Creates a BitbucketApi for the specified URL with the supplied credentials, owner and (optional) repository.
        Parameters:
        serverUrl - the server URL.
        authenticator - the (optional) authenticator.
        owner - the owner name.
        projectKey - the (optional) project key.
        repository - the (optional) repository name.
        Returns:
        the BitbucketApi.
      • create

        @NonNull
        @Deprecated
        protected BitbucketApi create​(@Nullable
                                      String serverUrl,
                                      @Nullable
                                      com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials credentials,
                                      @NonNull
                                      String owner,
                                      @CheckForNull
                                      String repository)
        Deprecated.
      • newInstance

        @NonNull
        public static BitbucketApi newInstance​(@Nullable
                                               String serverUrl,
                                               @Nullable
                                               BitbucketAuthenticator authenticator,
                                               @NonNull
                                               String owner,
                                               @CheckForNull
                                               String projectKey,
                                               @CheckForNull
                                               String repository)
        Creates a BitbucketApi for the specified URL with the supplied credentials, owner and (optional) repository.
        Parameters:
        serverUrl - the server URL.
        authenticator - the (optional) authenticator.
        owner - the owner name.
        projectKey - the (optional) project key.
        repository - the (optional) repository name.
        Returns:
        the BitbucketApi.
        Throws:
        IllegalArgumentException - if the supplied URL is not supported.
      • newInstance

        @NonNull
        @Deprecated
        public static BitbucketApi newInstance​(@Nullable
                                               String serverUrl,
                                               @Nullable
                                               com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials credentials,
                                               @NonNull
                                               String owner,
                                               @CheckForNull
                                               String projectKey,
                                               @CheckForNull
                                               String repository)
        Deprecated.