com.atlassian.bamboo.chains
Class ChainResultManagerImpl

java.lang.Object
  extended by com.atlassian.bamboo.chains.ChainResultManagerImpl
All Implemented Interfaces:
ChainResultManager

public class ChainResultManagerImpl
extends java.lang.Object
implements ChainResultManager


Constructor Summary
ChainResultManagerImpl(ChainResultDao chainResultDao)
           
 
Method Summary
 ChainResult create(Chain chain, int chainNumber)
          Create a new result
 java.util.Collection<ChainResult> getAllPendingChainResults()
          Returns all the ChainResults in a BuildState.PENDING state
 ChainResult getChainResult(Chain chain, int chainNumber)
          Retreive result by id
 ChainResult getChainResult(PlanResultKey planResultKey)
          Get the result by its PlanResultKey
 int getChainResultsCount(Chain chain)
          Count number of chain results
 ChainStageResult getChainStageResultById(java.lang.Long id)
          Returns a ChainStageResult by its id
 java.util.List<ChainResult> getNChainResults(Chain chain, int firstResult, int maxResults)
          Retrieve list of results related to chain, list is ordered descending by chain number
 boolean hasResults(Chain chain)
          Test if chain has any results
 void save(ChainResult chainResult)
          Save Result
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChainResultManagerImpl

public ChainResultManagerImpl(@NotNull
                              ChainResultDao chainResultDao)
Method Detail

getChainResult

@Nullable
public ChainResult getChainResult(@NotNull
                                           Chain chain,
                                           int chainNumber)
Description copied from interface: ChainResultManager
Retreive result by id

Specified by:
getChainResult in interface ChainResultManager
Parameters:
chain - Chain of which chainNumber result has to be retrieved
chainNumber - ChainNumber of ChainResult to be retrieved
Returns:
result

getChainResult

public ChainResult getChainResult(@NotNull
                                  PlanResultKey planResultKey)
Description copied from interface: ChainResultManager
Get the result by its PlanResultKey

Specified by:
getChainResult in interface ChainResultManager
Returns:
result

getNChainResults

@NotNull
public java.util.List<ChainResult> getNChainResults(@NotNull
                                                            Chain chain,
                                                            int firstResult,
                                                            int maxResults)
Description copied from interface: ChainResultManager
Retrieve list of results related to chain, list is ordered descending by chain number

Specified by:
getNChainResults in interface ChainResultManager
Parameters:
chain - Chain of which chainNumber result has to be retrieved
firstResult - number of results to skip
maxResults - number of results to retrieve
Returns:
chainResult

getChainResultsCount

public int getChainResultsCount(@NotNull
                                Chain chain)
Description copied from interface: ChainResultManager
Count number of chain results

Specified by:
getChainResultsCount in interface ChainResultManager
Parameters:
chain - Chain of which results has to be counted
Returns:
number of chain results

save

public void save(@NotNull
                 ChainResult chainResult)
Description copied from interface: ChainResultManager
Save Result

Specified by:
save in interface ChainResultManager
Parameters:
chainResult - ChainResult to be saved

create

@NotNull
public ChainResult create(@NotNull
                                  Chain chain,
                                  int chainNumber)
Description copied from interface: ChainResultManager
Create a new result

Specified by:
create in interface ChainResultManager
Parameters:
chain - Chain which result has to be created
Returns:
chainResult

hasResults

public boolean hasResults(@NotNull
                          Chain chain)
Description copied from interface: ChainResultManager
Test if chain has any results

Specified by:
hasResults in interface ChainResultManager
Parameters:
chain - Chain which has to be tested
Returns:
true if chain has any results, false otherwise

getAllPendingChainResults

@NotNull
public java.util.Collection<ChainResult> getAllPendingChainResults()
Description copied from interface: ChainResultManager
Returns all the ChainResults in a BuildState.PENDING state

Specified by:
getAllPendingChainResults in interface ChainResultManager
Returns:
chainResults

getChainStageResultById

@Nullable
public ChainStageResult getChainStageResultById(@NotNull
                                                         java.lang.Long id)
Description copied from interface: ChainResultManager
Returns a ChainStageResult by its id

Specified by:
getChainStageResultById in interface ChainResultManager
Returns:
chainStageResult


Copyright © 2010 Atlassian. All Rights Reserved.