Class AnySharedCredentials
- java.lang.Object
-
- com.atlassian.bamboo.specs.api.builders.EntityPropertiesBuilder<T>
-
- com.atlassian.bamboo.specs.api.builders.RootEntityPropertiesBuilder<C>
-
- com.atlassian.bamboo.specs.api.builders.credentials.SharedCredentials<AnySharedCredentials,AnySharedCredentialsProperties>
-
- com.atlassian.bamboo.specs.api.builders.credentials.AnySharedCredentials
-
public class AnySharedCredentials extends SharedCredentials<AnySharedCredentials,AnySharedCredentialsProperties>
Represents a shared credentials data of any type.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 Modifier and Type Field Description protected AtlassianModulePropertiesatlassianPlugin-
Fields inherited from class com.atlassian.bamboo.specs.api.builders.credentials.SharedCredentials
name, oid, project, TYPE
-
-
Constructor Summary
Constructors Constructor Description AnySharedCredentials(@NotNull java.lang.String name, @NotNull AtlassianModule atlassianPlugin)Create a shared credential of given name and type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AnySharedCredentialsPropertiesbuild()AnySharedCredentialsconfiguration(java.util.Map<java.lang.String,java.lang.Object> configuration)Set configuration for the credentials.AnySharedCredentialsoid(@Nullable BambooOid oid)Set the credential's oid from oid string.AnySharedCredentialsoid(@Nullable java.lang.String oid)Set the credential's oid.-
Methods inherited from class com.atlassian.bamboo.specs.api.builders.credentials.SharedCredentials
humanReadableId, humanReadableType, name, project
-
-
-
-
Field Detail
-
atlassianPlugin
protected final AtlassianModuleProperties atlassianPlugin
-
-
Constructor Detail
-
AnySharedCredentials
public AnySharedCredentials(@NotNull @NotNull java.lang.String name, @NotNull @NotNull AtlassianModule atlassianPlugin) throws PropertiesValidationExceptionCreate 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:
SharedCredentials.name(String),AtlassianModule
-
-
Method Detail
-
configuration
public AnySharedCredentials configuration(java.util.Map<java.lang.String,java.lang.Object> 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 java.lang.String oid) throws PropertiesValidationException
Description copied from class:SharedCredentialsSet 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:
oidin classSharedCredentials<AnySharedCredentials,AnySharedCredentialsProperties>- Throws:
PropertiesValidationException
-
oid
public AnySharedCredentials oid(@Nullable @Nullable BambooOid oid) throws PropertiesValidationException
Description copied from class:SharedCredentialsSet 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:
oidin classSharedCredentials<AnySharedCredentials,AnySharedCredentialsProperties>- Throws:
PropertiesValidationException
-
build
protected AnySharedCredentialsProperties build()
- Specified by:
buildin classSharedCredentials<AnySharedCredentials,AnySharedCredentialsProperties>
-
-