@MappedSuperclass public abstract class AbstractPlan extends HibernateBambooEntityWithOid implements ImmutablePlan, Plan, Comparable<Plan>
Modifier and Type | Field and Description |
---|---|
protected ResultsSummaryManager |
resultsSummaryManager |
MAX_NUMBER_LOG_ENTRIES, MAX_PREVIOUS_BUILD_FOR_AVE, STATUS_CURRENTLY_BUILDING, STATUS_FAIL, STATUS_NO_BUILDS, STATUS_NOT_RUN, STATUS_SUCCESS
getPlanKeyFunction, NAME_DELIMITER
getPlanKey
Constructor and Description |
---|
AbstractPlan() |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Plan plan) |
boolean |
equals(Object o) |
BuildDefinition |
getBuildDefinition()
Returns the
BuildDefinition that backs this Plan |
BuildDefinitionForBuild |
getBuildDefinitionXml() |
String |
getBuildKey()
This objects specific portion of the key.
|
BuildLogger |
getBuildLogger()
Returns the helper object to deal with logging
|
String |
getBuildName() |
Optional<Long> |
getDatabaseId() |
String |
getDescription() |
String |
getDiscriminator() |
List<VariableDefinition> |
getEffectiveVariables()
Return effective list of
VariableDefinition s bind to this Plan. |
int |
getFirstBuildNumber()
What the number of the first build we have? It may not be 1 as some may have been removed!
|
String |
getKey()
Obtain the plan's unique key (uppercase alphanumeric).
|
List<Labelling> |
getLabellings()
Used only for Hibernate mapping purposes.
|
List<String> |
getLabelNames() |
int |
getLastBuildNumber()
What was the number of the latest build (may be being built)
|
ResultsSummary |
getLatestResultsSummary()
Get the latest finished result
|
long |
getMasterId() |
Optional<Long> |
getMasterIdIfExists() |
String |
getName()
Returns the full name for the build in the form of "project name - build name" e.g.
|
PlanKey |
getPlanKey()
|
Project |
getProject()
Returns the parent
Project |
List<Labelling> |
getRelatedLabellings()
Returns labellings that are applicable for the plan level
|
List<TestClass> |
getTestClasses()
Deprecated.
since 6.9 used to be used for persistence
|
String |
getType()
Returns the string representation of the type.
|
List<VariableDefinition> |
getVariables()
Return list of
VariableDefinition s bind to this Plan |
int |
hashCode() |
boolean |
hasMaster() |
boolean |
isBusy()
Is the
Plan "busy". |
boolean |
isMarkedForDeletion()
Is the plan set to be deleted in the future
|
boolean |
isSuspendedFromBuilding()
Checks if the build has been enabled / disabled.
|
void |
setBuildDefinitionManager(BuildDefinitionManager buildDefinitionManager) |
void |
setBuildDefinitionXml(BuildDefinitionForBuild buildDefinitionXml) |
void |
setBuildKey(String buildKey)
Define the build's unique key (uppercase alphanumeric)
|
void |
setBuildLoggerManager(BuildLoggerManager buildLoggerManager) |
void |
setBuildName(String buildName) |
void |
setDescription(String description) |
void |
setDiscriminator(String discriminator) |
void |
setKey(String fullKey) |
void |
setLabellings(List<Labelling> labellings) |
void |
setLabelManager(LabelManager labelManager) |
void |
setMarkedForDeletion(boolean markedForDeletion) |
void |
setName(String name) |
void |
setPlanExecutionManager(PlanExecutionManager planExecutionManager) |
void |
setPlanKey(PlanKey planKey) |
void |
setProject(Project project) |
void |
setResultsSummaryManager(ResultsSummaryManager resultsSummaryManager) |
void |
setSuspendedFromBuilding(boolean suspendedFromBuilding)
Sets the build to suspend temporarily
|
void |
setTestClasses(List<TestClass> testCases)
Deprecated.
since 6.9 used to be used for persistence
|
void |
setVariableDefinitionManager(VariableDefinitionManager variableDefinitionManager) |
getId, getOid, setId, setOid
clone, getCreationDate, getCurrentDate, getLastModificationDate, setClock, setCreationDate, setLastModificationDate
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
setOid
getEntityType, getOid
setId
getAverageBuildDuration, getCurrentStatus, getMaster, isActive, isExecuting
getId, getPlanType
protected ResultsSummaryManager resultsSummaryManager
@NotNull public Optional<Long> getDatabaseId()
getDatabaseId
in interface PlanIdentifier
@NotNull public PlanKey getPlanKey()
PlanIdentifier
getPlanKey
in interface PlanIdentifier
getPlanKey
in interface PlanKeyProvider
@NotNull public String getKey()
ImmutablePlan
PlanIdentifier.getPlanKey()
getKey
in interface ImmutablePlan
public void setPlanKey(@NotNull PlanKey planKey)
setPlanKey
in interface Plan
@NotNull public String getBuildKey()
PlanIdentifier
PlanIdentifier.getPlanKey()
.getBuildKey
in interface PlanIdentifier
public void setBuildKey(String buildKey)
Plan
setBuildKey
in interface Plan
buildKey
- The value of the key@NotNull public String getName()
PlanIdentifier
getName
in interface PlanIdentifier
getName
in interface DescriptionProvider
getName
in interface NameProvider
public void setName(@NotNull String name)
setName
in interface Describable
@NotNull public String getBuildName()
getBuildName
in interface PlanIdentifier
PlanIdentifier.getName()
public void setBuildName(String buildName)
setBuildName
in interface Plan
public String getDescription()
getDescription
in interface DescriptionProvider
public void setDescription(@Nullable String description)
setDescription
in interface Describable
@NotNull public String getType()
ImmutablePlan
PlanType
and used in Freemarker.getType
in interface ImmutablePlan
public boolean hasMaster()
hasMaster
in interface ImmutablePlan
public boolean isMarkedForDeletion()
ImmutablePlan
isMarkedForDeletion
in interface ImmutableDeletable
isMarkedForDeletion
in interface ImmutablePlan
public void setMarkedForDeletion(boolean markedForDeletion)
setMarkedForDeletion
in interface Deletable
public void setSuspendedFromBuilding(boolean suspendedFromBuilding)
Plan
setSuspendedFromBuilding
in interface Plan
public boolean isSuspendedFromBuilding()
PlanIdentifier
isSuspendedFromBuilding
in interface PlanIdentifier
public boolean isBusy()
ImmutablePlan
Plan
"busy". Busy is defined by the plan having a lock held on it. This is done during change
detection, dependency listner and the likeisBusy
in interface ImmutablePlan
@NotNull public BuildLogger getBuildLogger()
ImmutablePlan
getBuildLogger
in interface ImmutablePlan
BuildLogger
.public int getLastBuildNumber()
ImmutablePlan
getLastBuildNumber
in interface ImmutablePlan
public int getFirstBuildNumber()
ImmutablePlan
getFirstBuildNumber
in interface ImmutablePlan
@NotNull @Deprecated public List<TestClass> getTestClasses()
@Deprecated public void setTestClasses(List<TestClass> testCases)
@Nullable public ResultsSummary getLatestResultsSummary()
ImmutablePlan
getLatestResultsSummary
in interface ImmutablePlan
getLatestResultsSummary
in interface Plan
@NotNull public List<VariableDefinition> getVariables()
ImmutablePlan
VariableDefinition
s bind to this PlangetVariables
in interface ImmutablePlan
VariableDefinition
@NotNull public List<VariableDefinition> getEffectiveVariables()
ImmutablePlan
VariableDefinition
s bind to this Plan.
For master Plans this will return the same result as ImmutablePlan.getVariables()
.
Non-master plans will produce the sum of:
- all master's variables which keys do not appear in result of ImmutablePlan.getVariables()
- result of ImmutablePlan.getVariables()
getEffectiveVariables
in interface ImmutablePlan
VariableDefinition
public void setProject(Project project)
setProject
in interface Plan
@NotNull public BuildDefinition getBuildDefinition()
ImmutablePlan
BuildDefinition
that backs this Plan
getBuildDefinition
in interface ImmutablePlan
BuildDefinition
object.@NotNull public Project getProject()
ImmutablePlan
Project
getProject
in interface ImmutablePlan
getProject
in interface PlanIdentifier
Project
. Never nullpublic long getMasterId()
getMasterId
in interface PlanIdentifier
@NotNull public Optional<Long> getMasterIdIfExists()
getMasterIdIfExists
in interface PlanIdentifier
@Nullable public BuildDefinitionForBuild getBuildDefinitionXml()
getBuildDefinitionXml
in interface Plan
public void setBuildDefinitionXml(@Nullable BuildDefinitionForBuild buildDefinitionXml)
setBuildDefinitionXml
in interface Plan
@NotNull public List<Labelling> getLabellings()
Plan
getLabellings
in interface Plan
@NotNull public List<Labelling> getRelatedLabellings()
Plan
getRelatedLabellings
in interface Plan
@NotNull public List<String> getLabelNames()
getLabelNames
in interface ImmutablePlan
public void setLabellings(List<Labelling> labellings)
setLabellings
in interface Plan
public void setPlanExecutionManager(PlanExecutionManager planExecutionManager)
public void setBuildDefinitionManager(BuildDefinitionManager buildDefinitionManager)
public void setBuildLoggerManager(BuildLoggerManager buildLoggerManager)
public void setResultsSummaryManager(ResultsSummaryManager resultsSummaryManager)
public void setVariableDefinitionManager(VariableDefinitionManager variableDefinitionManager)
public void setLabelManager(LabelManager labelManager)
public String getDiscriminator()
public void setDiscriminator(String discriminator)
public int hashCode()
hashCode
in class com.atlassian.core.bean.EntityObject
public boolean equals(Object o)
equals
in class com.atlassian.core.bean.EntityObject
public int compareTo(Plan plan)
compareTo
in interface Comparable<Plan>
Copyright © 2020 Atlassian Software Systems Pty Ltd. All rights reserved.