Package com.atlassian.bamboo.ww2.beans
Class DecoratedNavObjectFactoryImpl
java.lang.Object
com.atlassian.bamboo.ww2.beans.DecoratedNavObjectFactoryImpl
- All Implemented Interfaces:
DecoratedNavObjectFactory
-
Constructor Summary
ConstructorsConstructorDescriptionDecoratedNavObjectFactoryImpl(CachedPlanManager cachedPlanManager, com.opensymphony.xwork2.TextProvider textProvider, CustomVariableContext customVariableContext, CachedDeploymentProjectService cachedDeploymentProjectService, PlanExecutionManager planExecutionManager) -
Method Summary
Modifier and TypeMethodDescription@Nullable DecoratedPlandecoratePlan(@NotNull ImmutablePlan possiblyMutablePlan) Decorate plan@NotNull DecoratedResultdecorateResult(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 StringgetSubstitutedBranchName(@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, CachedDeploymentProjectService cachedDeploymentProjectService, PlanExecutionManager planExecutionManager)
-
-
Method Details
-
decoratePlan
@Nullable public @Nullable DecoratedPlan decoratePlan(@NotNull @NotNull ImmutablePlan possiblyMutablePlan) Description copied from interface:DecoratedNavObjectFactoryDecorate plan- Specified by:
decoratePlanin interfaceDecoratedNavObjectFactory- Parameters:
possiblyMutablePlan-Planto be decorated- Returns:
DecoratedPlanobject
-
getStageDecorator
public Function<ImmutableChainStage,DecoratedStage> getStageDecorator(@NotNull @NotNull DecoratedPlan parent) Description copied from interface:DecoratedNavObjectFactoryReturn a function that could be used to decorate stages- Specified by:
getStageDecoratorin interfaceDecoratedNavObjectFactory- Parameters:
parent-DecoratedPlanobject that was created from a chain- Returns:
- function object
-
getStageResultDecorator
public Function<ChainStageResult,DecoratedStage> getStageResultDecorator(@NotNull @NotNull DecoratedPlan parent) - Specified by:
getStageResultDecoratorin interfaceDecoratedNavObjectFactory
-
getDecoratedChainBranches
public com.google.common.collect.ImmutableList<DecoratedPlan> getDecoratedChainBranches(@NotNull @NotNull DecoratedPlan master) Description copied from interface:DecoratedNavObjectFactoryReturns a list of branches associated with the master.- Specified by:
getDecoratedChainBranchesin 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:DecoratedNavObjectFactoryReturns a list of branches associated with the master.- Specified by:
getDecoratedChainBranchIdentifiersin interfaceDecoratedNavObjectFactory- Returns:
- list of decorated branches for the Nav Object
-
getDecoratedPlan
Description copied from interface:DecoratedNavObjectFactoryGets the decorated plan for the given result summary. If possible will look to the plan cache for the plan.- Specified by:
getDecoratedPlanin interfaceDecoratedNavObjectFactory- Parameters:
resultSummary- a chain result summary.- Returns:
- Decorated Plan for the given result summary's plan
-
getSubstitutedBranchName
Description copied from interface:DecoratedNavObjectFactoryGets the branch name from the default repository if the chain has one. Will perform variable substitution on the branch name- Specified by:
getSubstitutedBranchNamein interfaceDecoratedNavObjectFactory- Returns:
- Branch name of the default repository after substitution, if one exists.
-
decorateResult
Description copied from interface:DecoratedNavObjectFactoryGets 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:
decorateResultin interfaceDecoratedNavObjectFactory
-