Package com.atlassian.bamboo.ww2.beans
Class DecoratedNavObjectFactoryImpl
- java.lang.Object
-
- com.atlassian.bamboo.ww2.beans.DecoratedNavObjectFactoryImpl
-
- All Implemented Interfaces:
DecoratedNavObjectFactory
public class DecoratedNavObjectFactoryImpl extends Object implements DecoratedNavObjectFactory
-
-
Constructor Summary
Constructors Constructor Description DecoratedNavObjectFactoryImpl(CachedPlanManager cachedPlanManager, com.opensymphony.xwork2.TextProvider textProvider, CustomVariableContext customVariableContext, DeploymentProjectService deploymentProjectService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @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.DecoratedPlan
getDecoratedPlan(ChainResultsSummary resultSummary)
Gets the decorated plan for the given result summary.com.google.common.base.Function<ImmutableChainStage,DecoratedStage>
getStageDecorator(@NotNull DecoratedPlan parent)
Return a function that could be used to decorate stagescom.google.common.base.Function<ChainStageResult,DecoratedStage>
getStageResultDecorator(@NotNull DecoratedPlan parent)
@Nullable String
getSubstitutedBranchName(@NotNull ImmutableChain chain)
Gets the branch name from the default repository if the chain has one.
-
-
-
Constructor Detail
-
DecoratedNavObjectFactoryImpl
public DecoratedNavObjectFactoryImpl(CachedPlanManager cachedPlanManager, com.opensymphony.xwork2.TextProvider textProvider, CustomVariableContext customVariableContext, DeploymentProjectService deploymentProjectService)
-
-
Method Detail
-
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 com.google.common.base.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 com.google.common.base.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
public DecoratedPlan getDecoratedPlan(ChainResultsSummary resultSummary)
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
@Nullable public @Nullable String getSubstitutedBranchName(@NotNull @NotNull ImmutableChain chain)
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
@NotNull public @NotNull DecoratedResult decorateResult(ResultsSummary summary)
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
-
-