com.atlassian.bamboo.project
Class DefaultProject

java.lang.Object
  extended by com.atlassian.core.bean.EntityObject
      extended by com.atlassian.bamboo.core.BambooEntityObject
          extended by 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
           
 
Fields inherited from class com.atlassian.bamboo.core.BambooEntityObject
id
 
Constructor Summary
DefaultProject()
           
DefaultProject(java.lang.String key, java.lang.String name, java.lang.String description)
           
 
Method Summary
 int compareTo(java.lang.Object obj)
           
 boolean equals(java.lang.Object o)
           
 java.lang.String getCurrentStatus()
          Returns the string representation the current status of a build.
static java.lang.String getCurrentStatusFromPlans(java.util.Collection<? extends ImmutableTopLevelPlan> plans)
           
 java.lang.String getDescription()
           
 java.lang.String getKey()
          Returns key of the project.
 java.util.List<Labelling> getLabellings()
           
 java.lang.String getName()
           
 java.util.List<Plan> getPlans()
          Returns all Plan associated with the Project.
 java.util.List<Labelling> getRelatedLabellings()
           
 java.util.List<TopLevelPlan> getTopLevelPlans()
          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.
 int hashCode()
           
 boolean isMarkedForDeletion()
           
 void setDescription(java.lang.String description)
           
 void setKey(java.lang.String key)
          Sets the key for the project.
 void setLabellings(java.util.List<Labelling> labellings)
           
 void setMarkedForDeletion(boolean markedForDeletion)
           
 void setName(java.lang.String name)
           
 
Methods inherited from class com.atlassian.bamboo.core.BambooEntityObject
getId, setId
 
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
 
Methods inherited from interface com.atlassian.bamboo.core.BambooObject
setId
 
Methods inherited from interface com.atlassian.bamboo.core.BambooIdProvider
getId
 

Field Detail

name

protected java.lang.String name

description

protected java.lang.String description
Constructor Detail

DefaultProject

public DefaultProject(@NotNull
                      java.lang.String key,
                      @NotNull
                      java.lang.String name,
                      @NotNull
                      java.lang.String description)

DefaultProject

public DefaultProject()
Method Detail

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 Plans for the project.

Specified by:
getPlans in interface Project
Returns:
List of Plans. 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.