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, Cloneable

public class ChainStageResultImpl
extends BambooEntityObject
implements ChainStageResult


Field Summary
 
Fields inherited from class com.atlassian.bamboo.core.BambooEntityObject
id
 
Constructor Summary
ChainStageResultImpl()
           
ChainStageResultImpl(String name, String description, boolean manual, ChainResultsSummary chainResult)
           
 
Method Summary
 boolean addBuildResult(BuildResultsSummary buildResult)
          Adds a BuildResultsSummary and sets the relationship to the ChainResultsSummary
 Set<BuildResultsSummary> getBuildResults()
          Returns all the BuildResultsSummary with this Stage result
 ChainResultsSummary getChainResult()
          Returns the ChainResultsSummary associated with this Stage result
 String getDescription()
           
 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
 List<StageVariableContext> getManualVariables()
          Get manual variables that were set before this stage started.
 String getName()
           
 long getProcessingDuration()
          Processing duration of stage (time of longest job in stage execution)
 List<BuildResultsSummary> getSortedBuildResults()
          Returns all the BuildResultsSummary with this Stage result ordered by build name.
 BuildState getState()
           
 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(Set<BuildResultsSummary> buildResults)
           
 void setChainResult(ChainResultsSummary chainResult)
          Sets the ChainResultsSummary associated with this Stage result
 void setDescription(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 setManualVariables(List<StageVariableContext> manualVariables)
           
 void setName(String name)
           
 void setProcessingDuration(long processingDuration)
           
 
Methods inherited from class com.atlassian.bamboo.core.BambooEntityObject
equals, getId, hashCode, setId
 
Methods inherited from class com.atlassian.core.bean.EntityObject
clone, getCreationDate, getCurrentDate, getLastModificationDate, 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(String name,
                            String description,
                            boolean manual,
                            ChainResultsSummary chainResult)

ChainStageResultImpl

public ChainStageResultImpl()
Method Detail

getName

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

setName

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

getDescription

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

setDescription

public void setDescription(@Nullable
                           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 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 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 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 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
                            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)

getManualVariables

public List<StageVariableContext> getManualVariables()
Description copied from interface: ChainStageResult
Get manual variables that were set before this stage started. This contains only the variables that changed compared to the previous stage.

Specified by:
getManualVariables in interface ChainStageResult

setManualVariables

public void setManualVariables(@NotNull
                               List<StageVariableContext> manualVariables)
Specified by:
setManualVariables in interface ChainStageResult


Copyright © 2015 Atlassian Software Systems Pty Ltd. All rights reserved.