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.StringTYPE
-
Constructor Summary
Constructors Constructor Description Project()Specifies Bamboo project.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ProjectPropertiesbuild()Projectdescription(@Nullable java.lang.String description)Sets a project description.BambooKeygetKey()Returns project's key.java.lang.StringgetName()Returns project's name.BambooOidgetOid()Returns project's oid.java.lang.StringhumanReadableId()Entity type and id representation that is shown to human.java.lang.StringhumanReadableType()Entity type that is shown to human.Projectkey(@Nullable BambooKey key)Sets a project key.Projectkey(@Nullable java.lang.String key)Sets a project key.Projectname(@NotNull java.lang.String name)Sets a project name.Projectoid(@Nullable BambooOid oid)Sets a project's oid.Projectoid(@Nullable java.lang.String oid)Sets a project's oid.Projectrepositories(@NotNull VcsRepository<?,?>... repositories)Adds project repositories.ProjectsharedCredentials(@NotNull SharedCredentials<?,?>... credentials)Adds project shared credentials.Projectvariables(@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 PropertiesValidationExceptionSpecifies 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:
buildin classEntityPropertiesBuilder<ProjectProperties>- Throws:
PropertiesValidationException
-
humanReadableType
public java.lang.String humanReadableType()
Description copied from class:RootEntityPropertiesBuilderEntity type that is shown to human.- Specified by:
humanReadableTypein classRootEntityPropertiesBuilder<ProjectProperties>
-
humanReadableId
public java.lang.String humanReadableId()
Description copied from class:RootEntityPropertiesBuilderEntity type and id representation that is shown to human.- Specified by:
humanReadableIdin classRootEntityPropertiesBuilder<ProjectProperties>
-
-