Package com.atlassian.bamboo.credentials
Interface CredentialsAccessor
-
- All Known Subinterfaces:
CredentialsManager
- All Known Implementing Classes:
CredentialsManagerImpl,RemoteCredentialsAccessor
public interface CredentialsAccessor
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classCredentialsAccessor.IsCredentialsOfTypeDeprecated.since 5.15, useBambooPluginUtils#pluginKeyEquals(String)
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description @NotNull Iterable<CredentialsData>getAllCredentials()Deprecated.since 8.2 this method does not return project Credentials, so the name is confusing. usegetGlobalCredentials()@NotNull Iterable<CredentialsData>getAllCredentials(@NotNull String pluginKey)Deprecated.since 8.2 this method does not return project Credentials, so the name is confusing. usegetGlobalCredentials()@NotNull Iterable<CredentialsData>getAllCredentialsByPluginKey(@NotNull String pluginKey)@Nullable CredentialsDatagetCredentials(long id)Gets the Shared Credentials by id@Nullable CredentialsDatagetCredentialsByName(String name)Find global shared credentials by nameCredentialsDatagetCredentialsByNameAndProjectId(String name, long projectId)Find shared credentials by name and project id@Nullable CredentialsDatagetCredentialsByOid(BambooEntityOid oid)Find shared credentials byBambooEntityOidIterable<CredentialsData>getGlobalCredentials()@NotNull Iterable<CredentialsData>getGlobalCredentials(@NotNull String pluginKey)@Nullable CredentialsDatagetProjectCredentials(long id, long projectId)Gets the Shared Credentials by id and projectId@NotNull Iterable<CredentialsData>getProjectCredentials(@NotNull Long projectId)@NotNull Iterable<CredentialsData>getProjectCredentialsByPluginKey(@NotNull Long projectId, String pluginKey)booleanhasAnyCredentials(@NotNull String pluginKey)
-
-
-
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
-
getCredentialsByOid
@Nullable @Nullable CredentialsData getCredentialsByOid(BambooEntityOid oid)
Find shared credentials byBambooEntityOid- Parameters:
oid-- Returns:
- Since:
- 5.15
-
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:
-
getAllCredentials
@Deprecated @NotNull @NotNull Iterable<CredentialsData> getAllCredentials()
Deprecated.since 8.2 this method does not return project Credentials, so the name is confusing. usegetGlobalCredentials()- Returns:
- A list of all global credentials
-
getGlobalCredentials
Iterable<CredentialsData> getGlobalCredentials()
- Returns:
- A list of all global credentials
-
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. usegetGlobalCredentials()- 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
-
-