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:
BambooObject, Project, java.lang.Cloneable

public class DefaultProject
extends BambooEntityObject
implements Project


Field Summary
protected  java.lang.String name
           
 
Fields inherited from class com.atlassian.bamboo.core.BambooEntityObject
id
 
Constructor Summary
DefaultProject()
           
 
Method Summary
 int compareTo(java.lang.Object obj)
           
 boolean equals(java.lang.Object o)
           
 java.util.List<Build> getBuilds()
          Returns all Build associated with the Project.
 java.lang.String getCurrentStatus()
          Returns the string representatioin the current status of a build.
static java.lang.String getCurrentStatusFromBuilds(java.util.Collection builds)
           
 java.lang.String getKey()
          Returns key of the project.
 java.util.List getLabellings()
           
 java.lang.String getName()
           
 int getNumberOfFailedBuilds()
           
 java.lang.String getProjectSummary()
           
static java.lang.String getProjectSummaryForPlans(java.util.Collection list)
           
 int hashCode()
           
 void setBuilds(java.util.List<? extends Build> builds)
           
 void setKey(java.lang.String key)
          Sets the key for the project.
 void setLabellings(java.util.List labellings)
           
 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
getId, setId
 

Field Detail

name

protected java.lang.String name
Constructor Detail

DefaultProject

public DefaultProject()
Method Detail

getKey

public java.lang.String getKey()
Description copied from interface: Project
Returns key of the project. Keys are capital, alphanumeric strings.

Specified by:
getKey in interface Project
Returns:
key of project. Must not be null.

setKey

public void setKey(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

public java.lang.String getName()
Specified by:
getName in interface Project

setName

public void setName(java.lang.String name)
Specified by:
setName in interface Project

getBuilds

@NotNull
public java.util.List<Build> getBuilds()
Description copied from interface: Project
Returns all Build associated with the Project. Returns Collections.EMPTY_LIST` if there are no Builds for the project.

Specified by:
getBuilds in interface Project
Returns:
List of Builds. Collections.EMPTY_LIST` if no builds.

getProjectSummary

public java.lang.String getProjectSummary()

getProjectSummaryForPlans

public static java.lang.String getProjectSummaryForPlans(java.util.Collection list)

getCurrentStatus

public java.lang.String getCurrentStatus()
Description copied from interface: Project
Returns the string representatioin the current status of a build. Mirrors Build@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

getCurrentStatusFromBuilds

public static java.lang.String getCurrentStatusFromBuilds(java.util.Collection builds)

getNumberOfFailedBuilds

public int getNumberOfFailedBuilds()

setBuilds

public void setBuilds(java.util.List<? extends Build> builds)

getLabellings

public java.util.List getLabellings()
Specified by:
getLabellings in interface Project

setLabellings

public void setLabellings(java.util.List 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 © 2008 Atlassian Pty Ltd. All Rights Reserved.