Class Project
- java.lang.Object
-
- com.atlassian.bamboo.specs.api.builders.EntityPropertiesBuilder<T>
-
- com.atlassian.bamboo.specs.api.builders.RootEntityPropertiesBuilder<ProjectProperties>
-
- com.atlassian.bamboo.specs.api.builders.project.Project
-
public class Project extends RootEntityPropertiesBuilder<ProjectProperties>
Represents Bamboo project.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
TYPE
-
Constructor Summary
Constructors Constructor Description Project()
Specifies Bamboo project.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ProjectProperties
build()
Project
description(@Nullable java.lang.String description)
Sets a project description.BambooKey
getKey()
Returns project's key.java.lang.String
getName()
Returns project's name.BambooOid
getOid()
Returns project's oid.java.lang.String
humanReadableId()
Entity type and id representation that is shown to human.java.lang.String
humanReadableType()
Entity type that is shown to human.Project
key(@Nullable BambooKey key)
Sets a project key.Project
key(@Nullable java.lang.String key)
Sets a project key.Project
name(@NotNull java.lang.String name)
Sets a project name.Project
oid(@Nullable BambooOid oid)
Sets a project's oid.Project
oid(@Nullable java.lang.String oid)
Sets a project's oid.Project
repositories(@NotNull VcsRepository<?,?>... repositories)
Adds project repositories.Project
sharedCredentials(@NotNull SharedCredentials<?,?>... credentials)
Adds project shared credentials.Project
variables(@NotNull Variable... variables)
Adds project variables.
-
-
-
Field Detail
-
TYPE
public static final java.lang.String TYPE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Project
public Project() throws PropertiesValidationException
Specifies Bamboo project.- Throws:
PropertiesValidationException
-
-
Method Detail
-
name
public Project name(@NotNull @NotNull java.lang.String name) throws PropertiesValidationException
Sets a project name.- Throws:
PropertiesValidationException
-
key
public Project key(@Nullable @Nullable java.lang.String key) throws PropertiesValidationException
Sets a project key. In the absence of oid key serves as project identifier.- Throws:
PropertiesValidationException
-
key
public Project key(@Nullable @Nullable BambooKey key) throws PropertiesValidationException
Sets a project key. In the absence of oid key serves as project identifier.- Throws:
PropertiesValidationException
-
description
public Project description(@Nullable @Nullable java.lang.String description) throws PropertiesValidationException
Sets a project description.- Throws:
PropertiesValidationException
-
oid
public Project oid(@Nullable @Nullable java.lang.String oid) throws PropertiesValidationException
Sets a project's oid.- Throws:
PropertiesValidationException
-
oid
public Project oid(@Nullable @Nullable BambooOid oid) throws PropertiesValidationException
Sets a project's oid.- Throws:
PropertiesValidationException
-
variables
public Project variables(@NotNull @NotNull Variable... variables)
Adds project variables.
-
sharedCredentials
public Project sharedCredentials(@NotNull @NotNull SharedCredentials<?,?>... credentials)
Adds project shared credentials.
-
repositories
public Project repositories(@NotNull @NotNull VcsRepository<?,?>... repositories)
Adds project repositories. This method will create new project level repository definitions.
-
getOid
public BambooOid getOid()
Returns project's oid.- Throws:
java.lang.IllegalStateException
- if oid is undefined
-
getKey
public BambooKey getKey()
Returns project's key.- Throws:
java.lang.IllegalStateException
- if key is undefined
-
getName
public java.lang.String getName()
Returns project's name.
-
build
protected ProjectProperties build() throws PropertiesValidationException
- Specified by:
build
in classEntityPropertiesBuilder<ProjectProperties>
- Throws:
PropertiesValidationException
-
humanReadableType
public java.lang.String humanReadableType()
Description copied from class:RootEntityPropertiesBuilder
Entity type that is shown to human.- Specified by:
humanReadableType
in classRootEntityPropertiesBuilder<ProjectProperties>
-
humanReadableId
public java.lang.String humanReadableId()
Description copied from class:RootEntityPropertiesBuilder
Entity type and id representation that is shown to human.- Specified by:
humanReadableId
in classRootEntityPropertiesBuilder<ProjectProperties>
-
-