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, Cloneable

public class DefaultProject
extends BambooEntityObject
implements Project


Field Summary
protected  String description
           
protected  String name
           
 
Fields inherited from class com.atlassian.bamboo.core.BambooEntityObject
id
 
Constructor Summary
DefaultProject()
           
DefaultProject(String key, String name, String description)
           
 
Method Summary
 int compareTo(Object obj)
           
 boolean equals(Object o)
          This method needs to be here in order to use proper id
 String getCurrentStatus()
          Returns the string representation the current status of a build.
static String getCurrentStatusFromPlans(Collection<? extends ImmutableTopLevelPlan> plans)
           
 String getDescription()
           
 String getKey()
          Returns key of the project.
 List<Labelling> getLabellings()
           
 String getName()
           
 List<Labelling> getRelatedLabellings()
           
 int hashCode()
          This method needs to be here in order to use proper id
 boolean isMarkedForDeletion()
           
 void setDescription(String description)
           
 void setKey(String key)
          Sets the key for the project.
 void setLabellings(List<Labelling> labellings)
           
 void setMarkedForDeletion(boolean markedForDeletion)
           
 void setName(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 String name

description

protected String description
Constructor Detail

DefaultProject

public DefaultProject(@NotNull
                      String key,
                      @NotNull
                      String name,
                      @NotNull
                      String description)

DefaultProject

public DefaultProject()
Method Detail

getKey

@NotNull
public 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
                   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 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
                    String name)
Specified by:
setName in interface Describable
Specified by:
setName in interface Project

getDescription

@Nullable
public String getDescription()
Specified by:
getDescription in interface DescriptionProvider

setDescription

public void setDescription(@Nullable
                           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

getCurrentStatus

public 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 String getCurrentStatusFromPlans(Collection<? extends ImmutableTopLevelPlan> plans)

getLabellings

public List<Labelling> getLabellings()
Specified by:
getLabellings in interface Project

getRelatedLabellings

public List<Labelling> getRelatedLabellings()
Specified by:
getRelatedLabellings in interface Project

setLabellings

public void setLabellings(List<Labelling> labellings)
Specified by:
setLabellings in interface Project

hashCode

public int hashCode()
Description copied from class: BambooEntityObject
This method needs to be here in order to use proper id

Overrides:
hashCode in class BambooEntityObject

equals

public boolean equals(Object o)
Description copied from class: BambooEntityObject
This method needs to be here in order to use proper id

Overrides:
equals in class BambooEntityObject

compareTo

public int compareTo(Object obj)


Copyright © 2015 Atlassian Software Systems Pty Ltd. All rights reserved.