com.atlassian.bamboo.chains
Class ChainStageResultImpl

java.lang.Object
  extended by com.atlassian.core.bean.EntityObject
      extended by com.atlassian.bamboo.core.BambooEntityObject
          extended by com.atlassian.bamboo.chains.ChainStageResultImpl
All Implemented Interfaces:
ChainStageResult, BambooIdProvider, BambooObject, Describable, DescriptionProvider, NameProvider, java.lang.Cloneable

public class ChainStageResultImpl
extends BambooEntityObject
implements ChainStageResult


Field Summary
 
Fields inherited from class com.atlassian.bamboo.core.BambooEntityObject
id
 
Constructor Summary
ChainStageResultImpl()
           
ChainStageResultImpl(java.lang.String name, java.lang.String description, boolean manual, ChainResultsSummary chainResult)
           
 
Method Summary
 boolean addBuildResult(BuildResultsSummary buildResult)
          Adds a BuildResultsSummary and sets the relationship to the ChainResultsSummary
 java.util.Set<BuildResultsSummary> getBuildResults()
          Returns all the BuildResultsSummary with this Stage result
 ChainResultsSummary getChainResult()
          Returns the ChainResultsSummary associated with this Stage result
 java.lang.String getDescription()
           
 java.util.Collection<BuildResultsSummary> getFailedBuildResults()
          Returns all the failed BuildResultsSummary with this Stage result
 LifeCycleState getLifeCycleState()
           
 int getListPosition()
          Return position of the Stage Result in the Stage Results list of Chain Result
 java.lang.String getName()
           
 long getProcessingDuration()
          Processing duration of stage (time of longest job in stage execution)
 java.util.List<BuildResultsSummary> getSortedBuildResults()
          Returns all the BuildResultsSummary with this Stage result ordered by build name.
 BuildState getState()
           
 java.util.Collection<BuildResultsSummary> getSuccessfulBuildResults()
          Returns all the successful BuildResultsSummary with this Stage result
 boolean isCompleted()
           
 boolean isFailed()
           
 boolean isFinished()
           
 boolean isManual()
          Checks if result as manual (at the time of result creation) Manual means stage execution is hold and waits for user interaction
 boolean isNotBuilt()
          Checks if the stage has unbuilt jobs inside it
 boolean isPending()
           
 boolean isRestartable()
          Checks if plan nas been failed and could be restarted on the stage where failed
 boolean isRunnable()
          Checks if current stage if first manual stage waiting for execution (chain is completed on previous stage and waiting for this stage to execute)
 boolean isSuccessful()
           
 boolean removeBuildResult(BuildResultsSummary buildResult)
          Removes a BuildResultsSummary
 void setBuildResults(java.util.Set<BuildResultsSummary> buildResults)
           
 void setChainResult(ChainResultsSummary chainResult)
          Sets the ChainResultsSummary associated with this Stage result
 void setDescription(java.lang.String description)
           
 void setListPosition(int index)
           
 void setManual(boolean manual)
          Marks result as optional (at the time of result creation) Manual means stage execution is hold and waits for user interaction
 void setName(java.lang.String name)
           
 void setProcessingDuration(long processingDuration)
           
 
Methods inherited from class com.atlassian.bamboo.core.BambooEntityObject
getId, setId
 
Methods inherited from class com.atlassian.core.bean.EntityObject
clone, equals, getCreationDate, getCurrentDate, getLastModificationDate, hashCode, setClock, setCreationDate, setLastModificationDate
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.bamboo.core.BambooObject
setId
 
Methods inherited from interface com.atlassian.bamboo.core.BambooIdProvider
getId
 

Constructor Detail

ChainStageResultImpl

public ChainStageResultImpl(java.lang.String name,
                            java.lang.String description,
                            boolean manual,
                            ChainResultsSummary chainResult)

ChainStageResultImpl

public ChainStageResultImpl()
Method Detail

getName

@NotNull
public java.lang.String getName()
Specified by:
getName in interface DescriptionProvider
Specified by:
getName in interface NameProvider

setName

public void setName(@NotNull
                    java.lang.String name)
Specified by:
setName in interface Describable

getDescription

@Nullable
public java.lang.String getDescription()
Specified by:
getDescription in interface DescriptionProvider

setDescription

public void setDescription(@Nullable
                           java.lang.String description)
Specified by:
setDescription in interface Describable

isManual

public boolean isManual()
Description copied from interface: ChainStageResult
Checks if result as manual (at the time of result creation) Manual means stage execution is hold and waits for user interaction

Specified by:
isManual in interface ChainStageResult
Returns:
true if manual

setManual

public void setManual(boolean manual)
Description copied from interface: ChainStageResult
Marks result as optional (at the time of result creation) Manual means stage execution is hold and waits for user interaction

Specified by:
setManual in interface ChainStageResult

getProcessingDuration

public long getProcessingDuration()
Description copied from interface: ChainStageResult
Processing duration of stage (time of longest job in stage execution)

Specified by:
getProcessingDuration in interface ChainStageResult
Returns:

setProcessingDuration

public void setProcessingDuration(long processingDuration)
Specified by:
setProcessingDuration in interface ChainStageResult

getChainResult

@NotNull
public ChainResultsSummary getChainResult()
Description copied from interface: ChainStageResult
Returns the ChainResultsSummary associated with this Stage result

Specified by:
getChainResult in interface ChainStageResult
Returns:
chainResult

setChainResult

public void setChainResult(@NotNull
                           ChainResultsSummary chainResult)
Description copied from interface: ChainStageResult
Sets the ChainResultsSummary associated with this Stage result

Specified by:
setChainResult in interface ChainStageResult

getBuildResults

@NotNull
public java.util.Set<BuildResultsSummary> getBuildResults()
Description copied from interface: ChainStageResult
Returns all the BuildResultsSummary with this Stage result

Specified by:
getBuildResults in interface ChainStageResult
Returns:
results

getSortedBuildResults

@NotNull
public java.util.List<BuildResultsSummary> getSortedBuildResults()
Description copied from interface: ChainStageResult
Returns all the BuildResultsSummary with this Stage result ordered by build name. WARNING: Dont use in performance critical situations.

Specified by:
getSortedBuildResults in interface ChainStageResult
Returns:
results

getFailedBuildResults

@NotNull
public java.util.Collection<BuildResultsSummary> getFailedBuildResults()
Description copied from interface: ChainStageResult
Returns all the failed BuildResultsSummary with this Stage result

Specified by:
getFailedBuildResults in interface ChainStageResult
Returns:
results

getSuccessfulBuildResults

@NotNull
public java.util.Collection<BuildResultsSummary> getSuccessfulBuildResults()
Description copied from interface: ChainStageResult
Returns all the successful BuildResultsSummary with this Stage result

Specified by:
getSuccessfulBuildResults in interface ChainStageResult
Returns:
results

setBuildResults

public void setBuildResults(@NotNull
                            java.util.Set<BuildResultsSummary> buildResults)

addBuildResult

public boolean addBuildResult(@NotNull
                              BuildResultsSummary buildResult)
Description copied from interface: ChainStageResult
Adds a BuildResultsSummary and sets the relationship to the ChainResultsSummary

Specified by:
addBuildResult in interface ChainStageResult
Returns:
success

removeBuildResult

public boolean removeBuildResult(@NotNull
                                 BuildResultsSummary buildResult)
Description copied from interface: ChainStageResult
Removes a BuildResultsSummary

Specified by:
removeBuildResult in interface ChainStageResult
Returns:
success

isPending

public boolean isPending()
Specified by:
isPending in interface ChainStageResult

isNotBuilt

public boolean isNotBuilt()
Description copied from interface: ChainStageResult
Checks if the stage has unbuilt jobs inside it

Specified by:
isNotBuilt in interface ChainStageResult
Returns:

isCompleted

public boolean isCompleted()
Specified by:
isCompleted in interface ChainStageResult

isFinished

public boolean isFinished()
Specified by:
isFinished in interface ChainStageResult

isSuccessful

public boolean isSuccessful()
Specified by:
isSuccessful in interface ChainStageResult

isFailed

public boolean isFailed()
Specified by:
isFailed in interface ChainStageResult

isRunnable

public boolean isRunnable()
Description copied from interface: ChainStageResult
Checks if current stage if first manual stage waiting for execution (chain is completed on previous stage and waiting for this stage to execute)

Specified by:
isRunnable in interface ChainStageResult
Returns:
true if stage is ready and allowed for manual execution

isRestartable

public boolean isRestartable()
Description copied from interface: ChainStageResult
Checks if plan nas been failed and could be restarted on the stage where failed

Specified by:
isRestartable in interface ChainStageResult
Returns:

getState

public BuildState getState()
Specified by:
getState in interface ChainStageResult

getLifeCycleState

public LifeCycleState getLifeCycleState()
Specified by:
getLifeCycleState in interface ChainStageResult

getListPosition

public int getListPosition()
Return position of the Stage Result in the Stage Results list of Chain Result

Returns:
Position of the Stage Result in the Stage Results list of Chain Result

setListPosition

public void setListPosition(int index)


Copyright © 2012 Atlassian. All Rights Reserved.