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(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(String name)
Set the name by which credentials will be identified by Bamboo.
|
B |
oid(BambooOid oid)
Set the credential's oid from oid string.
|
B |
oid(String oid)
Set the credential's oid.
|
B |
project(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 String name) throws PropertiesValidationException
PropertiesValidationException
public B name(@NotNull String name)
oid(BambooOid)
public B oid(@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.
PropertiesValidationException
public B oid(@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.
PropertiesValidationException
public B project(@NotNull Project project)
If set, it is Project shared credentials, otherwise it is Global Shared Credentials.
public String humanReadableType()
RootEntityPropertiesBuilder
humanReadableType
in class RootEntityPropertiesBuilder<C extends SharedCredentialsProperties>
public String humanReadableId()
RootEntityPropertiesBuilder
humanReadableId
in class RootEntityPropertiesBuilder<C extends SharedCredentialsProperties>
protected abstract C build()
build
in class EntityPropertiesBuilder<C extends SharedCredentialsProperties>
Copyright © 2020 Atlassian Software Systems Pty Ltd. All rights reserved.