Class AnySharedCredentials
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.
-
Field Summary
Fields inherited from class com.atlassian.bamboo.specs.api.builders.credentials.SharedCredentials
name, oid, project, TYPE
-
Constructor Summary
ConstructorDescriptionAnySharedCredentials
(@NotNull String name, @NotNull AtlassianModule atlassianPlugin) Create a shared credential of given name and type. -
Method Summary
Modifier and TypeMethodDescriptionprotected AnySharedCredentialsProperties
build()
configuration
(Map<String, Object> configuration) Set configuration for the credentials.Set the credential's oid from oid string.Set the credential's oid.Methods inherited from class com.atlassian.bamboo.specs.api.builders.credentials.SharedCredentials
humanReadableId, humanReadableType, name, project
-
Field Details
-
atlassianPlugin
-
-
Constructor Details
-
AnySharedCredentials
public AnySharedCredentials(@NotNull @NotNull String name, @NotNull @NotNull AtlassianModule atlassianPlugin) throws PropertiesValidationException Create a shared credential of given name and type.- Parameters:
name
- name of the shared credentialatlassianPlugin
- type of the credential identified by its plugin module key- Throws:
PropertiesValidationException
- See Also:
-
-
Method Details
-
configuration
Set configuration for the credentials.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.
-
oid
public AnySharedCredentials oid(@Nullable @Nullable String oid) throws PropertiesValidationException Description copied from class:SharedCredentials
Set the credential's oid.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.
- Overrides:
oid
in classSharedCredentials<AnySharedCredentials,
AnySharedCredentialsProperties> - Throws:
PropertiesValidationException
-
oid
public AnySharedCredentials oid(@Nullable @Nullable BambooOid oid) throws PropertiesValidationException Description copied from class:SharedCredentials
Set the credential's oid from oid string.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.
- Overrides:
oid
in classSharedCredentials<AnySharedCredentials,
AnySharedCredentialsProperties> - Throws:
PropertiesValidationException
-
build
- Specified by:
build
in classSharedCredentials<AnySharedCredentials,
AnySharedCredentialsProperties>
-