Interface CredentialsAccessor

    • Method Detail

      • getCredentials

        @Nullable
        @Nullable CredentialsData getCredentials​(long id)
        Gets the Shared Credentials by id
        Parameters:
        id -
        Returns:
        Returns the object representation of the credentials
      • getProjectCredentials

        @Nullable
        @Nullable CredentialsData getProjectCredentials​(long id,
                                                        long projectId)
        Gets the Shared Credentials by id and projectId
        Parameters:
        id -
        Returns:
        Returns the object representation of the credentials
      • getCredentialsByName

        @Nullable
        @Nullable CredentialsData getCredentialsByName​(String name)
        Find global shared credentials by name
        Parameters:
        name -
        Returns:
        Since:
        5.15
      • getCredentialsByNameAndProjectId

        CredentialsData getCredentialsByNameAndProjectId​(String name,
                                                         long projectId)
        Find shared credentials by name and project id
        Parameters:
        name -
        projectId -
        Returns:
      • getProjectCredentials

        @NotNull
        @NotNull Iterable<CredentialsData> getProjectCredentials​(@NotNull
                                                                 @NotNull Long projectId)
        Parameters:
        projectId -
        Returns:
        A list of all project credentials in project associated with given projectId
      • getAllCredentials

        @Deprecated
        @NotNull
        @NotNull Iterable<CredentialsData> getAllCredentials​(@NotNull
                                                             @NotNull String pluginKey)
        Deprecated.
        since 8.2 this method does not return project Credentials, so the name is confusing. use getGlobalCredentials()
        Returns:
        A list of global credentials that match the given plugin key
      • getGlobalCredentials

        @NotNull
        @NotNull Iterable<CredentialsData> getGlobalCredentials​(@NotNull
                                                                @NotNull String pluginKey)
        Returns:
        A list of global credentials that match the given plugin key
      • getAllCredentialsByPluginKey

        @NotNull
        @NotNull Iterable<CredentialsData> getAllCredentialsByPluginKey​(@NotNull
                                                                        @NotNull String pluginKey)
        Returns:
        A list of all (global and project) credentials that match the given plugin key
      • getProjectCredentialsByPluginKey

        @NotNull
        @NotNull Iterable<CredentialsData> getProjectCredentialsByPluginKey​(@NotNull
                                                                            @NotNull Long projectId,
                                                                            String pluginKey)
        Parameters:
        projectId -
        pluginKey -
        Returns:
        a collection of project credentials that match the given plugin key
      • hasAnyCredentials

        boolean hasAnyCredentials​(@NotNull
                                  @NotNull String pluginKey)
        Returns:
        True if there are global credentials that match the given plugin key