public abstract class SharedCredentials<B extends SharedCredentials<B,C>,C extends SharedCredentialsProperties> extends RootEntityPropertiesBuilder<C>
This class contains common data only. In order to define a specific type of credentials one should use the specialised
implementation or, if such is not available, AnySharedCredentials class.
| Modifier and Type | Field and Description |
|---|---|
protected String |
name |
protected BambooOidProperties |
oid |
protected ProjectProperties |
project |
static String |
TYPE |
| Modifier | Constructor and Description |
|---|---|
protected |
SharedCredentials() |
protected |
SharedCredentials(@NotNull String name) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract C |
build() |
String |
humanReadableId()
Entity type and id representation that is shown to human.
|
String |
humanReadableType()
Entity type that is shown to human.
|
B |
name(@NotNull String name)
Set the name by which credentials will be identified by Bamboo.
|
B |
oid(@Nullable BambooOid oid)
Set the credential's oid from oid string.
|
B |
oid(@Nullable String oid)
Set the credential's oid.
|
B |
project(@NotNull Project project)
Set the credential's project.
|
public static final String TYPE
protected String name
protected BambooOidProperties oid
protected ProjectProperties project
protected SharedCredentials()
protected SharedCredentials(@NotNull
@NotNull String name)
throws PropertiesValidationException
PropertiesValidationExceptionpublic B name(@NotNull @NotNull String name)
oid(BambooOid)public B oid(@Nullable @Nullable String oid) throws PropertiesValidationException
If set, it is used to identify the shared credential. If the shared credential with given oid does not exist, a new one is created, otherwise existing one is updated. Setting both oid and name may result in existing shared credential being renamed.
PropertiesValidationExceptionpublic B oid(@Nullable @Nullable BambooOid oid) throws PropertiesValidationException
If set, it is used to identify the shared credential. If the shared credential with given oid does not exist, a new one is created, otherwise existing one is updated. Setting both oid and name may result in existing shared credential being renamed.
PropertiesValidationExceptionpublic B project(@NotNull @NotNull Project project)
If set, it is Project shared credentials, otherwise it is Global Shared Credentials.
public String humanReadableType()
RootEntityPropertiesBuilderhumanReadableType in class RootEntityPropertiesBuilder<C extends SharedCredentialsProperties>public String humanReadableId()
RootEntityPropertiesBuilderhumanReadableId in class RootEntityPropertiesBuilder<C extends SharedCredentialsProperties>protected abstract C build()
build in class EntityPropertiesBuilder<C extends SharedCredentialsProperties>Copyright © 2023 Atlassian Software Systems Pty Ltd. All rights reserved.