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 class
CredentialsAccessor.IsCredentialsOfType
Deprecated.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.@NotNull Iterable<CredentialsData>
getAllCredentials(@NotNull String pluginKey)
Deprecated.since 8.2 this method does not return project Credentials, so the name is confusing.@NotNull Iterable<CredentialsData>
getAllCredentialsByPluginKey(@NotNull String pluginKey)
@Nullable CredentialsData
getCredentials(long id)
Gets the Shared Credentials by id@Nullable CredentialsData
getCredentialsByName(String name)
Find global shared credentials by nameCredentialsData
getCredentialsByNameAndProjectId(String name, long projectId)
Find shared credentials by name and project id@Nullable CredentialsData
getCredentialsByOid(BambooEntityOid oid)
Find shared credentials byBambooEntityOid
Iterable<CredentialsData>
getGlobalCredentials()
@NotNull Iterable<CredentialsData>
getGlobalCredentials(@NotNull String pluginKey)
@Nullable CredentialsData
getProjectCredentials(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)
boolean
hasAnyCredentials(@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
-
-