Package com.atlassian.bamboo.project
Class DefaultProject
- java.lang.Object
-
- com.atlassian.core.bean.EntityObject
-
- com.atlassian.bamboo.core.BambooEntityObject
-
- com.atlassian.bamboo.core.BambooEntityWithOid
-
- com.atlassian.bamboo.hibernate.HibernateBambooEntityWithOid
-
- com.atlassian.bamboo.project.DefaultProject
-
- All Implemented Interfaces:
BambooIdProvider
,BambooObject
,BambooObjectWithOid
,EntityWithOid
,ImmutableEntityWithOid
,Deletable
,Describable
,ImmutableDeletable
,Project
,ProjectIdentifier
,DescriptionProvider
,NameProvider
,Cloneable
@Entity public class DefaultProject extends HibernateBambooEntityWithOid implements Project
-
-
Field Summary
Fields Modifier and Type Field Description protected String
description
protected String
name
-
Constructor Summary
Constructors Constructor Description DefaultProject()
DefaultProject(@NotNull String key, @NotNull String name, @NotNull String description)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(Object obj)
boolean
equals(Object o)
String
getCurrentStatus()
Returns the string representation the current status of a build.static String
getCurrentStatusFromPlans(Collection<? extends ImmutableTopLevelPlan> plans)
@Nullable String
getDescription()
@NotNull String
getKey()
Returns key of the project.List<Labelling>
getLabellings()
@NotNull String
getName()
List<Labelling>
getRelatedLabellings()
@Nullable VcsBambooSpecsSourceImpl
getVcsBambooSpecsSource()
int
hashCode()
boolean
isMarkedForDeletion()
void
setDescription(@Nullable String description)
void
setKey(@NotNull String key)
Sets the key for the project.void
setLabellings(List<Labelling> labellings)
void
setMarkedForDeletion(boolean markedForDeletion)
void
setName(@NotNull String name)
void
setVcsBambooSpecsSource(VcsBambooSpecsSource vcsBambooSpecsSource)
Sets the specs source for the project.-
Methods inherited from class com.atlassian.bamboo.hibernate.HibernateBambooEntityWithOid
getId, getOid, setId, setOid
-
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.EntityWithOid
setOid
-
Methods inherited from interface com.atlassian.bamboo.core.ImmutableEntityWithOid
getOid
-
Methods inherited from interface com.atlassian.bamboo.project.Project
getEntityType
-
Methods inherited from interface com.atlassian.bamboo.project.ProjectIdentifier
getId
-
-
-
-
Method Detail
-
getKey
@NotNull public @NotNull String getKey()
Description copied from interface:ProjectIdentifier
Returns key of the project. Keys are capital, alphanumeric strings.- Specified by:
getKey
in interfaceProjectIdentifier
- Returns:
- key of project. Must not be null.
-
setKey
public void setKey(@NotNull @NotNull String key)
Description copied from interface:Project
Sets the key for the project. Must not be null
-
getName
@NotNull public @NotNull String getName()
- Specified by:
getName
in interfaceDescriptionProvider
- Specified by:
getName
in interfaceNameProvider
- Specified by:
getName
in interfaceProjectIdentifier
- Returns:
- the name of the project.
-
setName
public void setName(@NotNull @NotNull String name)
- Specified by:
setName
in interfaceDescribable
- Specified by:
setName
in interfaceProject
-
getDescription
@Nullable public @Nullable String getDescription()
- Specified by:
getDescription
in interfaceDescriptionProvider
-
setDescription
public void setDescription(@Nullable @Nullable String description)
- Specified by:
setDescription
in interfaceDescribable
-
isMarkedForDeletion
public boolean isMarkedForDeletion()
- Specified by:
isMarkedForDeletion
in interfaceImmutableDeletable
- Returns:
- Whether or not the Object has been marked for deletion
-
setMarkedForDeletion
public void setMarkedForDeletion(boolean markedForDeletion)
- Specified by:
setMarkedForDeletion
in interfaceDeletable
-
getCurrentStatus
public String getCurrentStatus()
Description copied from interface:Project
Returns the string representation the current status of a build. MirrorsImmutablePlan.getCurrentStatus()
. It will return "current" if any plan is building, and "fail" if any plan is failing.- Specified by:
getCurrentStatus
in interfaceProject
- Returns:
- a String
-
getCurrentStatusFromPlans
public static String getCurrentStatusFromPlans(Collection<? extends ImmutableTopLevelPlan> plans)
-
getLabellings
public List<Labelling> getLabellings()
- Specified by:
getLabellings
in interfaceProject
-
getRelatedLabellings
public List<Labelling> getRelatedLabellings()
- Specified by:
getRelatedLabellings
in interfaceProject
-
setLabellings
public void setLabellings(List<Labelling> labellings)
- Specified by:
setLabellings
in interfaceProject
-
getVcsBambooSpecsSource
@Nullable public @Nullable VcsBambooSpecsSourceImpl getVcsBambooSpecsSource()
- Specified by:
getVcsBambooSpecsSource
in interfaceProject
- Returns:
- specs source used to manage a project or null if the project is not managed by RSS
-
setVcsBambooSpecsSource
public void setVcsBambooSpecsSource(VcsBambooSpecsSource vcsBambooSpecsSource)
Description copied from interface:Project
Sets the specs source for the project.- Specified by:
setVcsBambooSpecsSource
in interfaceProject
- Parameters:
vcsBambooSpecsSource
- specs source
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classcom.atlassian.core.bean.EntityObject
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classcom.atlassian.core.bean.EntityObject
-
compareTo
public int compareTo(Object obj)
-
-