Package com.atlassian.bamboo.v2.build
Class CurrentBuildResultImpl
- java.lang.Object
-
- com.atlassian.bamboo.v2.build.CurrentBuildResultImpl
-
- All Implemented Interfaces:
CurrentBuildResult
,CurrentResult
,Serializable
public class CurrentBuildResultImpl extends Object implements CurrentBuildResult, Serializable
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface com.atlassian.bamboo.v2.build.CurrentBuildResult
CBD_BUILD_TIME_STAMP
-
-
Constructor Summary
Constructors Constructor Description CurrentBuildResultImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addBuildErrors(@Nullable List<String> errorMessages)
void
appendTestResults(@Nullable Set<TestResults> successfulTestResults, @Nullable Set<TestResults> failedTestResults, @Nullable Set<TestResults> skippedTestResults)
Append test results to the existing stored test results for this build.void
clearBuildErrors()
BuildResults
cloneAsBuildResults(BuildContext buildContext, ReasonForBuild reasonForBuild)
@NotNull List<String>
getBuildErrors()
int
getBuildReturnCode()
@NotNull BuildState
getBuildState()
FinalHashSet<BuildWarningSummary>
getBuildWarningSummaries()
@NotNull Map<String,String>
getCustomBuildData()
Returns a map of string keyed strings for storing arbitrary data@Nullable Collection<TestResults>
getFailedTestResults()
@NotNull LifeCycleState
getLifeCycleState()
int
getParserErrorsCount()
Returns number of parsing errors.@Nullable Collection<TestResults>
getSkippedTestResults()
@Nullable Collection<TestResults>
getSuccessfulTestResults()
@NotNull List<TaskResult>
getTaskResults()
List<TaskResult>
getTaskResultsForTask(@NotNull String pluginKey)
@NotNull Date
getTasksStartDate()
VcsWorkingCopyState
getVcsWorkingCopyState()
Version control system working copy state after build completion.void
incParserErrorsCount(int count)
Notify about parsing errors.boolean
isCheckoutSuccess()
boolean
isStarted()
void
setBuildErrors(@NotNull List<String> buildErrors)
Deprecated.since 5.10 without replacementvoid
setBuildReturnCode(int buildReturnCode)
void
setBuildState(@NotNull BuildState buildState)
void
setCheckoutSuccess(boolean checkoutSuccess)
void
setLifeCycleState(@NotNull LifeCycleState lifeCycleState)
void
setStarted(boolean started)
void
setTaskResults(List<TaskResult> taskResults)
void
setTasksStartDate(@NotNull Date taskStartDate)
void
setTestResults(@Nullable Set<TestResults> successfulTestResults, @Nullable Set<TestResults> failedTestResults)
Set the test results for this build.void
setTestResults(@Nullable Set<TestResults> successfulTestResults, @Nullable Set<TestResults> failedTestResults, @Nullable Set<TestResults> skippedTestResults)
Set the test results for this build.
-
-
-
Method Detail
-
getBuildState
@NotNull public @NotNull BuildState getBuildState()
- Specified by:
getBuildState
in interfaceCurrentResult
-
setBuildState
public void setBuildState(@NotNull @NotNull BuildState buildState)
- Specified by:
setBuildState
in interfaceCurrentResult
-
getLifeCycleState
@NotNull public @NotNull LifeCycleState getLifeCycleState()
- Specified by:
getLifeCycleState
in interfaceCurrentResult
-
setLifeCycleState
public void setLifeCycleState(@NotNull @NotNull LifeCycleState lifeCycleState)
- Specified by:
setLifeCycleState
in interfaceCurrentResult
-
getCustomBuildData
@NotNull public @NotNull Map<String,String> getCustomBuildData()
Description copied from interface:CurrentResult
Returns a map of string keyed strings for storing arbitrary data- Specified by:
getCustomBuildData
in interfaceCurrentResult
-
isStarted
public boolean isStarted()
- Specified by:
isStarted
in interfaceCurrentResult
-
setStarted
public void setStarted(boolean started)
- Specified by:
setStarted
in interfaceCurrentResult
-
addBuildErrors
public void addBuildErrors(@Nullable @Nullable List<String> errorMessages)
- Specified by:
addBuildErrors
in interfaceCurrentResult
-
getBuildErrors
@NotNull public @NotNull List<String> getBuildErrors()
- Specified by:
getBuildErrors
in interfaceCurrentResult
-
setBuildErrors
@Deprecated public void setBuildErrors(@NotNull @NotNull List<String> buildErrors)
Deprecated.since 5.10 without replacement
-
clearBuildErrors
public void clearBuildErrors()
- Specified by:
clearBuildErrors
in interfaceCurrentResult
-
getFailedTestResults
@Nullable public @Nullable Collection<TestResults> getFailedTestResults()
- Specified by:
getFailedTestResults
in interfaceCurrentBuildResult
- Returns:
- TestResults for the tests that have failed during current build.
-
getSuccessfulTestResults
@Nullable public @Nullable Collection<TestResults> getSuccessfulTestResults()
- Specified by:
getSuccessfulTestResults
in interfaceCurrentBuildResult
- Returns:
- TestResults for the tests that were successful during current build.
-
getSkippedTestResults
@Nullable public @Nullable Collection<TestResults> getSkippedTestResults()
- Specified by:
getSkippedTestResults
in interfaceCurrentBuildResult
- Returns:
- TestResults for the tests that were skipped (or inconclusive) during current build.
-
setTestResults
public void setTestResults(@Nullable @Nullable Set<TestResults> successfulTestResults, @Nullable @Nullable Set<TestResults> failedTestResults, @Nullable @Nullable Set<TestResults> skippedTestResults)
Description copied from interface:CurrentBuildResult
Set the test results for this build. You most likely dont want to use this as other tasks or plugins may have already added tests. UseCurrentBuildResult.appendTestResults(Set, Set, Set)
instead.- Specified by:
setTestResults
in interfaceCurrentBuildResult
- Parameters:
successfulTestResults
- a set of successful results retrieved from the buildfailedTestResults
- a set of failed results retrieved from the buildskippedTestResults
- s set of skipped results retrieved from the build
-
setTestResults
public void setTestResults(@Nullable @Nullable Set<TestResults> successfulTestResults, @Nullable @Nullable Set<TestResults> failedTestResults)
Description copied from interface:CurrentBuildResult
Set the test results for this build. You most likely dont want to use this as other tasks or plugins may have already added tests. UseCurrentBuildResult.appendTestResults(Set, Set, Set)
instead.- Specified by:
setTestResults
in interfaceCurrentBuildResult
- Parameters:
successfulTestResults
- a set of successful results retrieved from the buildfailedTestResults
- a set of failed results retrieved from the build
-
appendTestResults
public void appendTestResults(@Nullable @Nullable Set<TestResults> successfulTestResults, @Nullable @Nullable Set<TestResults> failedTestResults, @Nullable @Nullable Set<TestResults> skippedTestResults)
Description copied from interface:CurrentBuildResult
Append test results to the existing stored test results for this build. Leave arguments null or empty if you have nothing in that category append.- Specified by:
appendTestResults
in interfaceCurrentBuildResult
- Parameters:
successfulTestResults
- - any new successful testsfailedTestResults
- - any new failed testsskippedTestResults
- - any new skipped tests
-
cloneAsBuildResults
public BuildResults cloneAsBuildResults(BuildContext buildContext, ReasonForBuild reasonForBuild)
- Specified by:
cloneAsBuildResults
in interfaceCurrentBuildResult
-
getBuildReturnCode
public int getBuildReturnCode()
- Specified by:
getBuildReturnCode
in interfaceCurrentBuildResult
-
setBuildReturnCode
public void setBuildReturnCode(int buildReturnCode)
- Specified by:
setBuildReturnCode
in interfaceCurrentBuildResult
-
isCheckoutSuccess
public boolean isCheckoutSuccess()
- Specified by:
isCheckoutSuccess
in interfaceCurrentBuildResult
-
setCheckoutSuccess
public void setCheckoutSuccess(boolean checkoutSuccess)
- Specified by:
setCheckoutSuccess
in interfaceCurrentBuildResult
-
incParserErrorsCount
public void incParserErrorsCount(int count)
Description copied from interface:CurrentBuildResult
Notify about parsing errors.- Specified by:
incParserErrorsCount
in interfaceCurrentBuildResult
-
getParserErrorsCount
public int getParserErrorsCount()
Description copied from interface:CurrentBuildResult
Returns number of parsing errors.- Specified by:
getParserErrorsCount
in interfaceCurrentBuildResult
-
getTaskResults
@NotNull public @NotNull List<TaskResult> getTaskResults()
- Specified by:
getTaskResults
in interfaceCurrentResult
-
setTaskResults
public void setTaskResults(List<TaskResult> taskResults)
- Specified by:
setTaskResults
in interfaceCurrentResult
-
getTaskResultsForTask
public List<TaskResult> getTaskResultsForTask(@NotNull @NotNull String pluginKey)
- Specified by:
getTaskResultsForTask
in interfaceCurrentResult
-
getTasksStartDate
@NotNull public @NotNull Date getTasksStartDate()
- Specified by:
getTasksStartDate
in interfaceCurrentBuildResult
- Specified by:
getTasksStartDate
in interfaceCurrentResult
-
setTasksStartDate
public void setTasksStartDate(@NotNull @NotNull Date taskStartDate)
- Specified by:
setTasksStartDate
in interfaceCurrentBuildResult
- Specified by:
setTasksStartDate
in interfaceCurrentResult
-
getBuildWarningSummaries
public FinalHashSet<BuildWarningSummary> getBuildWarningSummaries()
- Specified by:
getBuildWarningSummaries
in interfaceCurrentBuildResult
- Returns:
- build warnings.
-
getVcsWorkingCopyState
public VcsWorkingCopyState getVcsWorkingCopyState()
Description copied from interface:CurrentResult
Version control system working copy state after build completion. Tasks can add repository revisions which were changed during build.- Specified by:
getVcsWorkingCopyState
in interfaceCurrentResult
-
-