public abstract class AbstractImmutablePlan extends Object implements ImmutablePlan, Comparable<ImmutablePlan>
Modifier and Type | Field and Description |
---|---|
protected io.atlassian.util.concurrent.ResettableLazyReference<Long> |
averageBuildDuration |
protected BuildDefinition |
buildDefinition |
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
Modifier | Constructor and Description |
---|---|
protected |
AbstractImmutablePlan(Long id,
EnrichedPlanDto dto,
PlanKey planKey,
String name,
BuildLoggerManager buildLoggerManager,
VariableDefinitionManager variableDefinitionManager,
ResultsSummaryManager resultsSummaryManager) |
|
AbstractImmutablePlan(@Nullable Long databaseId,
@NotNull ImmutablePlan plan,
BuildLoggerManager buildLoggerManager,
@NotNull LabelManager labelManager,
VariableDefinitionManager variableDefinitionManager,
@NotNull BuildDefinition buildDefinition,
ResultsSummaryManager resultsSummaryManager) |
protected |
AbstractImmutablePlan(@Nullable Long databaseId,
@NotNull ImmutablePlan plan,
@NotNull PlanKey planKey,
@NotNull String name,
BuildLoggerManager buildLoggerManager,
@NotNull LabelManager labelManager,
VariableDefinitionManager variableDefinitionManager,
@NotNull BuildDefinition buildDefinition,
ResultsSummaryManager resultsSummaryManager) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(ImmutablePlan plan) |
boolean |
equals(Object o) |
protected void |
exceptionOnModification() |
long |
getAverageBuildDuration()
Returns an average duration of the recent builds
|
@NotNull BuildDefinition |
getBuildDefinition()
Returns the
BuildDefinition that backs this Plan |
@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 String |
getCurrentStatus() |
@NotNull Optional<Long> |
getDatabaseId() |
String |
getDescription() |
@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!
|
long |
getId()
Returns database id of the plan.
|
@NotNull String |
getKey()
Obtain the plan's unique key (uppercase alphanumeric).
|
@NotNull List<Labelling> |
getLabellings() |
@NotNull List<String> |
getLabelNames() |
int |
getLastBuildNumber()
What was the number of the latest build (may be being built)
|
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.
|
BambooEntityOid |
getOid()
OID assigned to this object.
|
@NotNull PlanKey |
getPlanKey()
|
@NotNull PlanType |
getPlanType() |
@NotNull Project |
getProject()
Returns the parent
Project |
@NotNull List<Labelling> |
getRelatedLabellings() |
@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 |
isMarkedForDeletion()
Is the plan set to be deleted in the future
|
boolean |
isSuspendedFromBuilding()
Checks if the build has been enabled / disabled.
|
abstract void |
resetLatestResultsSummary(int latestKnownBuildNumber,
boolean resetAverageBuildDuration) |
protected void |
resetLatestResultsSummary(io.atlassian.util.concurrent.ResettableLazyReference<? extends ImmutableResultsSummary> latestResultsSummary,
int latestKnownBuildNumber,
boolean resetAverageBuildDuration) |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getLatestResultsSummary, getMaster, isActive, isBusy, isExecuting
getEntityType
protected BuildDefinition buildDefinition
protected final ResultsSummaryManager resultsSummaryManager
protected io.atlassian.util.concurrent.ResettableLazyReference<Long> averageBuildDuration
public AbstractImmutablePlan(@Nullable @Nullable Long databaseId, @NotNull @NotNull ImmutablePlan plan, BuildLoggerManager buildLoggerManager, @NotNull @NotNull LabelManager labelManager, VariableDefinitionManager variableDefinitionManager, @NotNull @NotNull BuildDefinition buildDefinition, ResultsSummaryManager resultsSummaryManager)
protected AbstractImmutablePlan(@Nullable @Nullable Long databaseId, @NotNull @NotNull ImmutablePlan plan, @NotNull @NotNull PlanKey planKey, @NotNull @NotNull String name, BuildLoggerManager buildLoggerManager, @NotNull @NotNull LabelManager labelManager, VariableDefinitionManager variableDefinitionManager, @NotNull @NotNull BuildDefinition buildDefinition, ResultsSummaryManager resultsSummaryManager)
protected AbstractImmutablePlan(Long id, EnrichedPlanDto dto, PlanKey planKey, String name, BuildLoggerManager buildLoggerManager, VariableDefinitionManager variableDefinitionManager, ResultsSummaryManager resultsSummaryManager)
public long getId()
PlanIdentifier
PlanIdentifier.getDatabaseId()
should be preferred.getId
in interface BambooIdProvider
getId
in interface PlanIdentifier
@NotNull public @NotNull Optional<Long> getDatabaseId()
getDatabaseId
in interface PlanIdentifier
public String getDescription()
getDescription
in interface DescriptionProvider
@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
@NotNull public @NotNull String getBuildKey()
PlanIdentifier
PlanIdentifier.getPlanKey()
.getBuildKey
in interface PlanIdentifier
@NotNull public @NotNull String getName()
PlanIdentifier
getName
in interface PlanIdentifier
getName
in interface DescriptionProvider
getName
in interface NameProvider
@NotNull public @NotNull String getBuildName()
getBuildName
in interface PlanIdentifier
PlanIdentifier.getName()
@NotNull public @NotNull PlanType getPlanType()
getPlanType
in interface PlanIdentifier
@NotNull public @NotNull String getType()
ImmutablePlan
PlanType
and used in Freemarker.getType
in interface ImmutablePlan
public boolean isMarkedForDeletion()
ImmutablePlan
isMarkedForDeletion
in interface ImmutableDeletable
isMarkedForDeletion
in interface ImmutablePlan
public boolean hasMaster()
hasMaster
in interface ImmutablePlan
@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 boolean isSuspendedFromBuilding()
PlanIdentifier
isSuspendedFromBuilding
in interface PlanIdentifier
public int getFirstBuildNumber()
ImmutablePlan
getFirstBuildNumber
in interface ImmutablePlan
public int getLastBuildNumber()
ImmutablePlan
getLastBuildNumber
in interface ImmutablePlan
@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 getAverageBuildDuration()
ImmutablePlan
getAverageBuildDuration
in interface ImmutablePlan
public long getMasterId()
getMasterId
in interface PlanIdentifier
@NotNull public @NotNull Optional<Long> getMasterIdIfExists()
getMasterIdIfExists
in interface PlanIdentifier
@NotNull public @NotNull List<String> getLabelNames()
getLabelNames
in interface ImmutablePlan
@NotNull public @NotNull String getCurrentStatus()
getCurrentStatus
in interface ImmutablePlan
public BambooEntityOid getOid()
ImmutableEntityWithOid
BambooEntityOid.getEntityType()
should be the same as this object's
ImmutableEntityWithOid.getEntityType()
.getOid
in interface ImmutableEntityWithOid
@Internal public abstract void resetLatestResultsSummary(int latestKnownBuildNumber, boolean resetAverageBuildDuration)
protected void exceptionOnModification()
@NotNull public @NotNull BuildLogger getBuildLogger()
ImmutablePlan
getBuildLogger
in interface ImmutablePlan
BuildLogger
.public int compareTo(ImmutablePlan plan)
compareTo
in interface Comparable<ImmutablePlan>
protected void resetLatestResultsSummary(io.atlassian.util.concurrent.ResettableLazyReference<? extends ImmutableResultsSummary> latestResultsSummary, int latestKnownBuildNumber, boolean resetAverageBuildDuration)
Copyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.