Package com.atlassian.bamboo.ww2.beans
Class DecoratedPlan
java.lang.Object
com.atlassian.bamboo.ww2.beans.DecoratedPlan
- All Implemented Interfaces:
BambooIdProvider,PlanIdentifier,PlanKeyProvider,DescriptionProvider,NameProvider,DecoratedNavObject
- Direct Known Subclasses:
DecoratedPlan.DecoratedBranch
@Immutable
public abstract class DecoratedPlan
extends Object
implements DecoratedNavObject, PlanIdentifier
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBranches are top level branch plans.static class -
Field Summary
Fields inherited from interface com.atlassian.bamboo.plan.PlanIdentifier
NAME_DELIMITERFields inherited from interface com.atlassian.bamboo.plan.PlanKeyProvider
getPlanKey -
Method Summary
Modifier and TypeMethodDescriptioncom.google.common.collect.ImmutableList<DecoratedPlan.DecoratedPlanBranchGist>abstract @Nullable String@Nullable StringReturn the the branch plan key.@NotNull StringThis objects specific portion of the key.@NotNull String@NotNull StringlonggetId()Returns database id of the plan.@NotNull StringgetKey()com.google.common.collect.ImmutableList<String>@Nullable Stringabstract @Nullable DecoratedPlanThe master plan iff the plan is a branched plan and it has a master.@NotNull StringReturn the main chain key for this plan.long@Nullable StringReturn the job key of this plan.@NotNull StringgetName()Returns the full name for the build in the form of "project name - build name" e.g.@NotNull com.google.common.collect.ImmutableList<? extends DecoratedNavGroupObject>abstract @Nullable DecoratedPlanabstract @Nullable PlanBranchWorkflow@NotNull PlanKey@NotNull PlanType@NotNull ProjectIdentifierReturns the parentProjectabstract List<DeploymentProject>com.google.common.collect.ImmutableList<DecoratedStage>abstract @Nullable DecoratedStagegetStageWithName(@NotNull String stageName) Retrieve the named stage.@Nullable DecoratedNavObjectStatus@NotNull StringgetType()booleanbooleanisResult()booleanChecks if the build has been enabled / disabled.@Nullable StringreplaceKey(String url, DecoratedNavObject originalObject) Given an existing url (may be directly from the originalObject or may be with a static ${planKey} reference) generate the new url for this objectvoid
-
Method Details
-
getKey
- Specified by:
getKeyin interfaceDecoratedNavObject- Returns:
- full key of the object
-
getBuildKey
Description copied from interface:PlanIdentifierThis objects specific portion of the key. You probably want to usePlanIdentifier.getPlanKey().- Specified by:
getBuildKeyin interfacePlanIdentifier- Returns:
- This objects specific portion of the key
-
getDisplayName
- Specified by:
getDisplayNamein interfaceDecoratedNavObject- Returns:
- display name of this object
-
getParent
- Specified by:
getParentin interfaceDecoratedNavObject- Returns:
- the parent of this object (does not take into account groups)
-
getPlanType
- Specified by:
getPlanTypein interfaceDecoratedNavObject- Specified by:
getPlanTypein interfacePlanIdentifier- Returns:
- plantype associated with this object.
-
getStatus
- Specified by:
getStatusin interfaceDecoratedNavObject- Returns:
- provide the status of this object if applicable
-
getMaster
Description copied from interface:DecoratedNavObjectThe master plan iff the plan is a branched plan and it has a master.- Specified by:
getMasterin interfaceDecoratedNavObject- Returns:
-
getId
public long getId()Description copied from interface:PlanIdentifierReturns database id of the plan. Use ofPlanIdentifier.getDatabaseId()should be preferred.- Specified by:
getIdin interfaceBambooIdProvider- Specified by:
getIdin interfacePlanIdentifier
-
getDatabaseId
- Specified by:
getDatabaseIdin interfacePlanIdentifier- Returns:
- database id of the plan or empty if this plan is not a DB object.
-
getPlanKey
Description copied from interface:PlanIdentifier- Specified by:
getPlanKeyin interfacePlanIdentifier- Specified by:
getPlanKeyin interfacePlanKeyProvider- Returns:
- planKey
-
getName
Description copied from interface:PlanIdentifierReturns the full name for the build in the form of "project name - build name" e.g. "Confluence - HEAD"- Specified by:
getNamein interfaceDescriptionProvider- Specified by:
getNamein interfaceNameProvider- Specified by:
getNamein interfacePlanIdentifier- Returns:
- String
-
getProject
Description copied from interface:PlanIdentifierReturns the parentProject- Specified by:
getProjectin interfacePlanIdentifier- Returns:
Project. Never null
-
getBuildName
- Specified by:
getBuildNamein interfacePlanIdentifier- Returns:
- The plan specific portion of the name (without the project and/or parent's names). You probably want to use
PlanIdentifier.getName()
-
getDescription
- Specified by:
getDescriptionin interfaceDescriptionProvider
-
getMasterId
public long getMasterId()- Specified by:
getMasterIdin interfacePlanIdentifier- Returns:
- database id of master of this Plan or -1 if none.
-
getMasterIdIfExists
- Specified by:
getMasterIdIfExistsin interfacePlanIdentifier- Returns:
- database id of master of this Plan or empty if none.
-
getLabelNames
-
getType
- Specified by:
getTypein interfaceDecoratedNavObject- Returns:
- plantype associated with this object.
-
isResult
public boolean isResult()- Specified by:
isResultin interfaceDecoratedNavObject- Returns:
- true if the nav object represents a result otherwise false
-
isSuspendedFromBuilding
public boolean isSuspendedFromBuilding()Description copied from interface:PlanIdentifierChecks if the build has been enabled / disabled.- Specified by:
isSuspendedFromBuildingin interfacePlanIdentifier- Returns:
- true if plan is disabled
-
getStages
-
getBranches
-
setLabels
-
getBranchName
-
getPlanBranchWorkflow
-
getLinkedJiraIssue
-
isRemoteJiraLinkRequired
public boolean isRemoteJiraLinkRequired() -
getMasterChainKey
Return the main chain key for this plan. In case of a Chain Key (PROJ-PLAN) this key will be returned. In case of a Job Key (PROJ-PLAN-JOB), this will return a main chain key (PROJ-PLAN). In case of a Branch Key (PROJ-PLAN10), this will return the key of the main chain (PROJ-PLAN).- Returns:
- chainKey
-
getMasterJobKey
Return the job key of this plan. In case this class represents a chain key or a branch key, this will return null.- Returns:
- the job key or null
-
getBranchPlanKey
Return the the branch plan key. If this does not represent a branch plan, we return null.- Returns:
- the branch plan key or null
-
getRelatedDeploymentProjects
-
getStageWithName
@Nullable public abstract @Nullable DecoratedStage getStageWithName(@NotNull @NotNull String stageName) Retrieve the named stage. If the stage is not found it indicates that the stage has been deleted or renamed but the result remains.
-