Package com.atlassian.bamboo.ww2.beans
Class DecoratedNavObjectFactoryImpl
java.lang.Object
com.atlassian.bamboo.ww2.beans.DecoratedNavObjectFactoryImpl
- All Implemented Interfaces:
DecoratedNavObjectFactory
-
Constructor Summary
ConstructorDescriptionDecoratedNavObjectFactoryImpl
(CachedPlanManager cachedPlanManager, com.opensymphony.xwork2.TextProvider textProvider, CustomVariableContext customVariableContext, DeploymentProjectService deploymentProjectService, PlanExecutionManager planExecutionManager) -
Method Summary
Modifier and TypeMethodDescription@Nullable DecoratedPlan
decoratePlan
(@NotNull ImmutablePlan possiblyMutablePlan) Decorate plan@NotNull DecoratedResult
decorateResult
(ResultsSummary summary) Gets the decorated result for the given result summary, including the full object hierarchy around it, such as parent if it is a job summary, and plan.com.google.common.collect.ImmutableList<DecoratedPlan>
getDecoratedChainBranches
(@NotNull DecoratedPlan master) Returns a list of branches associated with the master.com.google.common.collect.ImmutableList<DecoratedPlan.DecoratedPlanBranchGist>
getDecoratedChainBranchIdentifiers
(@NotNull DecoratedPlan master) Returns a list of branches associated with the master.getDecoratedPlan
(ChainResultsSummary resultSummary) Gets the decorated plan for the given result summary.getStageDecorator
(@NotNull DecoratedPlan parent) Return a function that could be used to decorate stagesgetStageResultDecorator
(@NotNull DecoratedPlan parent) @Nullable String
getSubstitutedBranchName
(@NotNull ImmutableChain chain) Gets the branch name from the default repository if the chain has one.
-
Constructor Details
-
DecoratedNavObjectFactoryImpl
public DecoratedNavObjectFactoryImpl(CachedPlanManager cachedPlanManager, com.opensymphony.xwork2.TextProvider textProvider, CustomVariableContext customVariableContext, DeploymentProjectService deploymentProjectService, PlanExecutionManager planExecutionManager)
-
-
Method Details
-
decoratePlan
@Nullable public @Nullable DecoratedPlan decoratePlan(@NotNull @NotNull ImmutablePlan possiblyMutablePlan) Description copied from interface:DecoratedNavObjectFactory
Decorate plan- Specified by:
decoratePlan
in interfaceDecoratedNavObjectFactory
- Parameters:
possiblyMutablePlan
-Plan
to be decorated- Returns:
DecoratedPlan
object
-
getStageDecorator
public Function<ImmutableChainStage,DecoratedStage> getStageDecorator(@NotNull @NotNull DecoratedPlan parent) Description copied from interface:DecoratedNavObjectFactory
Return a function that could be used to decorate stages- Specified by:
getStageDecorator
in interfaceDecoratedNavObjectFactory
- Parameters:
parent
-DecoratedPlan
object that was created from a chain- Returns:
- function object
-
getStageResultDecorator
public Function<ChainStageResult,DecoratedStage> getStageResultDecorator(@NotNull @NotNull DecoratedPlan parent) - Specified by:
getStageResultDecorator
in interfaceDecoratedNavObjectFactory
-
getDecoratedChainBranches
public com.google.common.collect.ImmutableList<DecoratedPlan> getDecoratedChainBranches(@NotNull @NotNull DecoratedPlan master) Description copied from interface:DecoratedNavObjectFactory
Returns a list of branches associated with the master.- Specified by:
getDecoratedChainBranches
in interfaceDecoratedNavObjectFactory
- Returns:
- list of decorated branches for the Nav Object
-
getDecoratedChainBranchIdentifiers
public com.google.common.collect.ImmutableList<DecoratedPlan.DecoratedPlanBranchGist> getDecoratedChainBranchIdentifiers(@NotNull @NotNull DecoratedPlan master) Description copied from interface:DecoratedNavObjectFactory
Returns a list of branches associated with the master.- Specified by:
getDecoratedChainBranchIdentifiers
in interfaceDecoratedNavObjectFactory
- Returns:
- list of decorated branches for the Nav Object
-
getDecoratedPlan
Description copied from interface:DecoratedNavObjectFactory
Gets the decorated plan for the given result summary. If possible will look to the plan cache for the plan.- Specified by:
getDecoratedPlan
in interfaceDecoratedNavObjectFactory
- Parameters:
resultSummary
- a chain result summary.- Returns:
- Decorated Plan for the given result summary's plan
-
getSubstitutedBranchName
Description copied from interface:DecoratedNavObjectFactory
Gets the branch name from the default repository if the chain has one. Will perform variable substitution on the branch name- Specified by:
getSubstitutedBranchName
in interfaceDecoratedNavObjectFactory
- Returns:
- Branch name of the default repository after substitution, if one exists.
-
decorateResult
Description copied from interface:DecoratedNavObjectFactory
Gets the decorated result for the given result summary, including the full object hierarchy around it, such as parent if it is a job summary, and plan.- Specified by:
decorateResult
in interfaceDecoratedNavObjectFactory
-