com.atlassian.bamboo.project
Class DefaultProject
java.lang.Object
com.atlassian.core.bean.EntityObject
com.atlassian.bamboo.core.BambooEntityObject
com.atlassian.bamboo.project.DefaultProject
- All Implemented Interfaces:
- BambooIdProvider, BambooObject, Deletable, Describable, ImmutableDeletable, Project, ProjectIdentifier, DescriptionProvider, NameProvider, java.lang.Cloneable
public class DefaultProject
- extends BambooEntityObject
- implements Project
Field Summary |
protected java.lang.String |
description
|
protected java.lang.String |
name
|
Methods inherited from class com.atlassian.core.bean.EntityObject |
clone, getCreationDate, getCurrentDate, getLastModificationDate, setClock, setCreationDate, setLastModificationDate |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
name
protected java.lang.String name
description
protected java.lang.String description
DefaultProject
public DefaultProject(@NotNull
java.lang.String key,
@NotNull
java.lang.String name,
@NotNull
java.lang.String description)
DefaultProject
public DefaultProject()
getKey
@NotNull
public java.lang.String getKey()
- Description copied from interface:
ProjectIdentifier
- Returns key of the project. Keys are capital, alphanumeric strings.
- Specified by:
getKey
in interface ProjectIdentifier
- Returns:
- key of project. Must not be null.
setKey
public void setKey(@NotNull
java.lang.String key)
- Description copied from interface:
Project
- Sets the key for the project. Must not be null
- Specified by:
setKey
in interface Project
getName
@NotNull
public java.lang.String getName()
- Specified by:
getName
in interface ProjectIdentifier
- Specified by:
getName
in interface DescriptionProvider
- Specified by:
getName
in interface NameProvider
- Returns:
- the name of the project.
setName
public void setName(@NotNull
java.lang.String name)
- Specified by:
setName
in interface Describable
- Specified by:
setName
in interface Project
getDescription
@Nullable
public java.lang.String getDescription()
- Specified by:
getDescription
in interface DescriptionProvider
setDescription
public void setDescription(@Nullable
java.lang.String description)
- Specified by:
setDescription
in interface Describable
isMarkedForDeletion
public boolean isMarkedForDeletion()
- Specified by:
isMarkedForDeletion
in interface ImmutableDeletable
- Returns:
- Whether or not the Object has been marked for deletion
setMarkedForDeletion
public void setMarkedForDeletion(boolean markedForDeletion)
- Specified by:
setMarkedForDeletion
in interface Deletable
getPlans
@NotNull
public java.util.List<Plan> getPlans()
- Description copied from interface:
Project
- Returns all
Plan
associated with the Project
. Returns Collections.emptyList()
if
there are no Plan
s for the project.
- Specified by:
getPlans
in interface Project
- Returns:
List
of Plan
s. Collections.emptyList()
if no plans.
getTopLevelPlans
@NotNull
public java.util.List<TopLevelPlan> getTopLevelPlans()
- Description copied from interface:
Project
- This methods returns all TopLevelPlans, including the ones marked for deletion
Use this method only if all you need is present in TopLevelPlan interface, otherwise consider using getAllChains.
- Specified by:
getTopLevelPlans
in interface Project
- Returns:
getCurrentStatus
public java.lang.String getCurrentStatus()
- Description copied from interface:
Project
- Returns the string representation the current status of a build. Mirrors
ImmutablePlan.getCurrentStatus()
.
It will return "current" if any plan is building, and "fail" if any plan is failing.
- Specified by:
getCurrentStatus
in interface Project
- Returns:
- a String
getCurrentStatusFromPlans
public static java.lang.String getCurrentStatusFromPlans(java.util.Collection<? extends ImmutableTopLevelPlan> plans)
getLabellings
public java.util.List<Labelling> getLabellings()
- Specified by:
getLabellings
in interface Project
getRelatedLabellings
public java.util.List<Labelling> getRelatedLabellings()
- Specified by:
getRelatedLabellings
in interface Project
setLabellings
public void setLabellings(java.util.List<Labelling> labellings)
- Specified by:
setLabellings
in interface Project
hashCode
public int hashCode()
- Overrides:
hashCode
in class com.atlassian.core.bean.EntityObject
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class com.atlassian.core.bean.EntityObject
compareTo
public int compareTo(java.lang.Object obj)
Copyright © 2012 Atlassian. All Rights Reserved.