public class AnySharedCredentials extends SharedCredentials<AnySharedCredentials,AnySharedCredentialsProperties>
Since knowledge of internal representation of plugin data is required to properly construct this object, this class should only be used if the specialised implementation of a given credential type is not available.
| Modifier and Type | Field and Description |
|---|---|
protected AtlassianModuleProperties |
atlassianPlugin |
name, oid, TYPE| Constructor and Description |
|---|
AnySharedCredentials(String name,
AtlassianModule atlassianPlugin)
Create a shared credential of given name and type.
|
| Modifier and Type | Method and Description |
|---|---|
protected AnySharedCredentialsProperties |
build() |
AnySharedCredentials |
configuration(Map<String,Object> configuration)
Set configuration for the credentials.
|
AnySharedCredentials |
oid(BambooOid oid)
Set the credential's oid from oid string.
|
AnySharedCredentials |
oid(String oid)
Set the credential's oid.
|
humanReadableId, humanReadableType, nameprotected final AtlassianModuleProperties atlassianPlugin
public AnySharedCredentials(@NotNull
String name,
@NotNull
AtlassianModule atlassianPlugin)
throws PropertiesValidationException
name - name of the shared credentialatlassianPlugin - type of the credential identified by its plugin module keyPropertiesValidationExceptionSharedCredentials.name(String),
AtlassianModulepublic AnySharedCredentials configuration(Map<String,Object> configuration)
The configuration should be in the format used by respective plugin. No syntactical nor semantic validation is performed on the source data. The configuration is stored 'as is' in the Bamboo DB.
public AnySharedCredentials oid(@Nullable String oid) throws PropertiesValidationException
SharedCredentialsIf 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.
oid in class SharedCredentials<AnySharedCredentials,AnySharedCredentialsProperties>PropertiesValidationExceptionpublic AnySharedCredentials oid(@Nullable BambooOid oid) throws PropertiesValidationException
SharedCredentialsIf 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.
oid in class SharedCredentials<AnySharedCredentials,AnySharedCredentialsProperties>PropertiesValidationExceptionprotected AnySharedCredentialsProperties build()
build in class SharedCredentials<AnySharedCredentials,AnySharedCredentialsProperties>Copyright © 2020 Atlassian Software Systems Pty Ltd. All rights reserved.