com.atlassian.bamboo.chains
Class ChainManagerImpl

java.lang.Object
  extended by com.atlassian.bamboo.chains.ChainManagerImpl
All Implemented Interfaces:
ChainManager

public class ChainManagerImpl
extends java.lang.Object
implements ChainManager


Constructor Summary
ChainManagerImpl(ChainDao chainDao, com.atlassian.event.EventManager eventManager, BuildNumberGeneratorService buildNumberGenerator)
           
 
Method Summary
 Chain create(Project project, java.lang.String chainKey, java.lang.String name, java.lang.String description)
          Creates a new Chain
 boolean exists(java.lang.String fullKey)
          Checks if the Chain exists using the full key (eg BAM-BOO)
 java.util.Collection<Chain> getAllChains()
          Returns all the Chain's
 Chain getByChainKey(java.lang.String key)
          Gets the Chain by its key (eg.
 Chain getByPlanKey(PlanKey planKey)
          Gets the Chain by its PlanKey
 int getNextChainNumber(Chain chain)
          Get Next Chain Number
 boolean isExistingKey(Project project, java.lang.String key)
          Checks if the Chain exists by its key
 boolean isExistingName(Project project, java.lang.String name)
          Checks if the Chain exists by its name
 void moveStage(Chain chain, int newPosition, ChainStage chainStage)
          Move a ChainStage to a new position
 void save(Chain chain)
          Saves the Chain
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChainManagerImpl

public ChainManagerImpl(@NotNull
                        ChainDao chainDao,
                        @NotNull
                        com.atlassian.event.EventManager eventManager,
                        @NotNull
                        BuildNumberGeneratorService buildNumberGenerator)
Method Detail

getByPlanKey

@Nullable
public Chain getByPlanKey(@NotNull
                                   PlanKey planKey)
Description copied from interface: ChainManager
Gets the Chain by its PlanKey

Specified by:
getByPlanKey in interface ChainManager
Returns:
chain

getByChainKey

@Nullable
public Chain getByChainKey(@NotNull
                                    java.lang.String key)
Description copied from interface: ChainManager
Gets the Chain by its key (eg. BAM-FOO)

Specified by:
getByChainKey in interface ChainManager
Returns:
chain

getAllChains

@NotNull
public java.util.Collection<Chain> getAllChains()
Description copied from interface: ChainManager
Returns all the Chain's

Specified by:
getAllChains in interface ChainManager
Returns:
chain

create

@NotNull
public Chain create(@NotNull
                            Project project,
                            @NotNull
                            java.lang.String chainKey,
                            @NotNull
                            java.lang.String name,
                            java.lang.String description)
Description copied from interface: ChainManager
Creates a new Chain

Specified by:
create in interface ChainManager
Returns:
chain

save

public void save(@NotNull
                 Chain chain)
Description copied from interface: ChainManager
Saves the Chain

Specified by:
save in interface ChainManager

exists

public boolean exists(@NotNull
                      java.lang.String fullKey)
Description copied from interface: ChainManager
Checks if the Chain exists using the full key (eg BAM-BOO)

Specified by:
exists in interface ChainManager
Returns:
exists

isExistingKey

public boolean isExistingKey(@NotNull
                             Project project,
                             @NotNull
                             java.lang.String key)
Description copied from interface: ChainManager
Checks if the Chain exists by its key

Specified by:
isExistingKey in interface ChainManager
Returns:
exists

isExistingName

public boolean isExistingName(@NotNull
                              Project project,
                              @NotNull
                              java.lang.String name)
Description copied from interface: ChainManager
Checks if the Chain exists by its name

Specified by:
isExistingName in interface ChainManager
Returns:
exists

getNextChainNumber

public int getNextChainNumber(@NotNull
                              Chain chain)
Description copied from interface: ChainManager
Get Next Chain Number

Specified by:
getNextChainNumber in interface ChainManager
Returns:
number

moveStage

public void moveStage(@NotNull
                      Chain chain,
                      int newPosition,
                      @NotNull
                      ChainStage chainStage)
Description copied from interface: ChainManager
Move a ChainStage to a new position

Specified by:
moveStage in interface ChainManager


Copyright © 2010 Atlassian. All Rights Reserved.