com.atlassian.bamboo.ww2.beans
Class DecoratedNavObjectFactoryImpl

java.lang.Object
  extended by com.atlassian.bamboo.ww2.beans.DecoratedNavObjectFactoryImpl
All Implemented Interfaces:
DecoratedNavObjectFactory

public class DecoratedNavObjectFactoryImpl
extends java.lang.Object
implements DecoratedNavObjectFactory


Constructor Summary
DecoratedNavObjectFactoryImpl(ImmutablePlanCacheService immutablePlanCacheService, com.opensymphony.xwork.TextProvider textProvider, ChainBranchManager chainBranchManager, CustomVariableContext customVariableContext, VariableDefinitionManager variableDefinitionManager)
           
 
Method Summary
 DecoratedPlan decoratePlan(ImmutablePlan plan)
          Decorate plan
 com.google.common.collect.ImmutableList<DecoratedPlan> getDecoratedChainBranches(DecoratedPlan master)
          Returns a list of branches associated with the master.
 DecoratedPlan getDecoratedPlan(ResultsSummary resultSummary)
          Gets the decorated plan for the given result summary.
 com.google.common.base.Function<ChainStage,DecoratedStage> getStageDecorator(DecoratedPlan parent)
          Return a function that could be used to decorate stages
 java.lang.String getSubstitutedBranchName(ImmutableChain chain)
          Gets the branch name from the default repository if the chain has one.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DecoratedNavObjectFactoryImpl

public DecoratedNavObjectFactoryImpl(ImmutablePlanCacheService immutablePlanCacheService,
                                     com.opensymphony.xwork.TextProvider textProvider,
                                     ChainBranchManager chainBranchManager,
                                     CustomVariableContext customVariableContext,
                                     VariableDefinitionManager variableDefinitionManager)
Method Detail

decoratePlan

@Nullable
public DecoratedPlan decoratePlan(@NotNull
                                           ImmutablePlan plan)
Description copied from interface: DecoratedNavObjectFactory
Decorate plan

Specified by:
decoratePlan in interface DecoratedNavObjectFactory
Parameters:
plan - Plan to be decorated
Returns:
DecoratedPlan object

getStageDecorator

public com.google.common.base.Function<ChainStage,DecoratedStage> getStageDecorator(@NotNull
                                                                                    DecoratedPlan parent)
Description copied from interface: DecoratedNavObjectFactory
Return a function that could be used to decorate stages

Specified by:
getStageDecorator in interface DecoratedNavObjectFactory
Parameters:
parent - DecoratedPlan object that was created from a chain
Returns:
function object

getDecoratedChainBranches

public com.google.common.collect.ImmutableList<DecoratedPlan> getDecoratedChainBranches(@NotNull
                                                                                        DecoratedPlan master)
Description copied from interface: DecoratedNavObjectFactory
Returns a list of branches associated with the master.

Specified by:
getDecoratedChainBranches in interface DecoratedNavObjectFactory
Returns:
list of decorated branches for the Nav Object

getDecoratedPlan

public DecoratedPlan getDecoratedPlan(ResultsSummary 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 interface DecoratedNavObjectFactory
Returns:
Decorated Plan for the given result summary's plan

getSubstitutedBranchName

@Nullable
public java.lang.String getSubstitutedBranchName(@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 interface DecoratedNavObjectFactory
Returns:
Branch name of the default repository after substitution, if one exists.


Copyright © 2012 Atlassian. All Rights Reserved.