@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
NAME_DELIMITER
getPlanKey
Constructor and Description |
---|
AbstractPlan() |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Plan plan) |
boolean |
equals(Object o) |
@NotNull BuildDefinition |
getBuildDefinition()
Returns the
BuildDefinition that backs this Plan |
@Nullable BuildDefinitionForBuild |
getBuildDefinitionXml() |
@NotNull String |
getBuildKey()
This objects specific portion of the key.
|
@NotNull BuildLogger |
getBuildLogger()
Returns the helper object to deal with logging
|
@NotNull String |
getBuildName() |
@NotNull Optional<Long> |
getDatabaseId() |
String |
getDescription() |
String |
getDiscriminator() |
@NotNull 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!
|
@NotNull String |
getKey()
Obtain the plan's unique key (uppercase alphanumeric).
|
@NotNull List<Labelling> |
getLabellings()
Used only for Hibernate mapping purposes.
|
@NotNull List<String> |
getLabelNames() |
int |
getLastBuildNumber()
What was the number of the latest build (may be being built)
|
@Nullable ResultsSummary |
getLatestResultsSummary()
Get the latest finished result
|
long |
getMasterId() |
@NotNull Optional<Long> |
getMasterIdIfExists() |
@NotNull String |
getName()
Returns the full name for the build in the form of "project name - build name" e.g.
|
@NotNull PlanKey |
getPlanKey()
|
@NotNull Project |
getProject()
Returns the parent
Project |
@NotNull List<Labelling> |
getRelatedLabellings()
Returns labellings that are applicable for the plan level
|
@NotNull String |
getType()
Returns the string representation of the type.
|
@NotNull 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(@Nullable BuildDefinitionForBuild buildDefinitionXml) |
void |
setBuildKey(String buildKey)
Define the build's unique key (uppercase alphanumeric)
|
void |
setBuildLoggerManager(BuildLoggerManager buildLoggerManager) |
void |
setBuildName(String buildName) |
void |
setDescription(@Nullable 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(@NotNull String name) |
void |
setPlanExecutionManager(PlanExecutionManager planExecutionManager) |
void |
setPlanKey(@NotNull PlanKey planKey) |
void |
setProject(Project project) |
void |
setResultsSummaryManager(ResultsSummaryManager resultsSummaryManager) |
void |
setSuspendedFromBuilding(boolean suspendedFromBuilding)
Sets the build to suspend temporarily
|
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 @NotNull Optional<Long> getDatabaseId()
getDatabaseId
in interface PlanIdentifier
@NotNull public @NotNull PlanKey getPlanKey()
PlanIdentifier
getPlanKey
in interface PlanIdentifier
getPlanKey
in interface PlanKeyProvider
@NotNull public @NotNull String getKey()
ImmutablePlan
PlanIdentifier.getPlanKey()
getKey
in interface ImmutablePlan
public void setPlanKey(@NotNull @NotNull PlanKey planKey)
setPlanKey
in interface Plan
@NotNull public @NotNull 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 @NotNull String getName()
PlanIdentifier
getName
in interface PlanIdentifier
getName
in interface DescriptionProvider
getName
in interface NameProvider
public void setName(@NotNull @NotNull String name)
setName
in interface Describable
@NotNull public @NotNull 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 @Nullable String description)
setDescription
in interface Describable
@NotNull public @NotNull 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 @NotNull BuildLogger getBuildLogger()
ImmutablePlan
getBuildLogger
in interface ImmutablePlan
BuildLogger
.public int getLastBuildNumber()
ImmutablePlan
getLastBuildNumber
in interface ImmutablePlan
public int getFirstBuildNumber()
ImmutablePlan
getFirstBuildNumber
in interface ImmutablePlan
@Nullable public @Nullable ResultsSummary getLatestResultsSummary()
ImmutablePlan
getLatestResultsSummary
in interface ImmutablePlan
getLatestResultsSummary
in interface Plan
@NotNull public @NotNull List<VariableDefinition> getVariables()
ImmutablePlan
VariableDefinition
s bind to this PlangetVariables
in interface ImmutablePlan
VariableDefinition
@NotNull public @NotNull 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 @NotNull BuildDefinition getBuildDefinition()
ImmutablePlan
BuildDefinition
that backs this Plan
getBuildDefinition
in interface ImmutablePlan
BuildDefinition
object.@NotNull public @NotNull Project getProject()
ImmutablePlan
Project
getProject
in interface ImmutablePlan
getProject
in interface PlanIdentifier
Project
. Never nullpublic long getMasterId()
getMasterId
in interface PlanIdentifier
@NotNull public @NotNull Optional<Long> getMasterIdIfExists()
getMasterIdIfExists
in interface PlanIdentifier
@Nullable public @Nullable BuildDefinitionForBuild getBuildDefinitionXml()
getBuildDefinitionXml
in interface Plan
public void setBuildDefinitionXml(@Nullable @Nullable BuildDefinitionForBuild buildDefinitionXml)
setBuildDefinitionXml
in interface Plan
@NotNull public @NotNull List<Labelling> getLabellings()
Plan
getLabellings
in interface Plan
@NotNull public @NotNull List<Labelling> getRelatedLabellings()
Plan
getRelatedLabellings
in interface Plan
@NotNull public @NotNull 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 © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.