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 voidaddBuildErrors(@Nullable List<String> errorMessages)voidappendTestResults(@Nullable Set<TestResults> successfulTestResults, @Nullable Set<TestResults> failedTestResults, @Nullable Set<TestResults> skippedTestResults)Append test results to the existing stored test results for this build.voidclearBuildErrors()BuildResultscloneAsBuildResults(BuildContext buildContext, ReasonForBuild reasonForBuild)@NotNull List<String>getBuildErrors()intgetBuildReturnCode()@NotNull BuildStategetBuildState()FinalHashSet<BuildWarningSummary>getBuildWarningSummaries()@NotNull Map<String,String>getCustomBuildData()Returns a map of string keyed strings for storing arbitrary data@Nullable Collection<TestResults>getFailedTestResults()@NotNull LifeCycleStategetLifeCycleState()intgetParserErrorsCount()Returns number of parsing errors.@Nullable Collection<TestResults>getSkippedTestResults()@Nullable Collection<TestResults>getSuccessfulTestResults()@NotNull List<TaskResult>getTaskResults()List<TaskResult>getTaskResultsForTask(@NotNull String pluginKey)@NotNull DategetTasksStartDate()VcsWorkingCopyStategetVcsWorkingCopyState()Version control system working copy state after build completion.voidincParserErrorsCount(int count)Notify about parsing errors.booleanisCheckoutSuccess()booleanisStarted()voidsetBuildErrors(@NotNull List<String> buildErrors)Deprecated.since 5.10 without replacementvoidsetBuildReturnCode(int buildReturnCode)voidsetBuildState(@NotNull BuildState buildState)voidsetCheckoutSuccess(boolean checkoutSuccess)voidsetLifeCycleState(@NotNull LifeCycleState lifeCycleState)voidsetStarted(boolean started)voidsetTaskResults(List<TaskResult> taskResults)voidsetTasksStartDate(@NotNull Date taskStartDate)voidsetTestResults(@Nullable Set<TestResults> successfulTestResults, @Nullable Set<TestResults> failedTestResults)Set the test results for this build.voidsetTestResults(@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:
getBuildStatein interfaceCurrentResult
-
setBuildState
public void setBuildState(@NotNull @NotNull BuildState buildState)- Specified by:
setBuildStatein interfaceCurrentResult
-
getLifeCycleState
@NotNull public @NotNull LifeCycleState getLifeCycleState()
- Specified by:
getLifeCycleStatein interfaceCurrentResult
-
setLifeCycleState
public void setLifeCycleState(@NotNull @NotNull LifeCycleState lifeCycleState)- Specified by:
setLifeCycleStatein interfaceCurrentResult
-
getCustomBuildData
@NotNull public @NotNull Map<String,String> getCustomBuildData()
Description copied from interface:CurrentResultReturns a map of string keyed strings for storing arbitrary data- Specified by:
getCustomBuildDatain interfaceCurrentResult
-
isStarted
public boolean isStarted()
- Specified by:
isStartedin interfaceCurrentResult
-
setStarted
public void setStarted(boolean started)
- Specified by:
setStartedin interfaceCurrentResult
-
addBuildErrors
public void addBuildErrors(@Nullable @Nullable List<String> errorMessages)- Specified by:
addBuildErrorsin interfaceCurrentResult
-
getBuildErrors
@NotNull public @NotNull List<String> getBuildErrors()
- Specified by:
getBuildErrorsin interfaceCurrentResult
-
setBuildErrors
@Deprecated public void setBuildErrors(@NotNull @NotNull List<String> buildErrors)
Deprecated.since 5.10 without replacement
-
clearBuildErrors
public void clearBuildErrors()
- Specified by:
clearBuildErrorsin interfaceCurrentResult
-
getFailedTestResults
@Nullable public @Nullable Collection<TestResults> getFailedTestResults()
- Specified by:
getFailedTestResultsin interfaceCurrentBuildResult- Returns:
- TestResults for the tests that have failed during current build.
-
getSuccessfulTestResults
@Nullable public @Nullable Collection<TestResults> getSuccessfulTestResults()
- Specified by:
getSuccessfulTestResultsin interfaceCurrentBuildResult- Returns:
- TestResults for the tests that were successful during current build.
-
getSkippedTestResults
@Nullable public @Nullable Collection<TestResults> getSkippedTestResults()
- Specified by:
getSkippedTestResultsin 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:CurrentBuildResultSet 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:
setTestResultsin 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:CurrentBuildResultSet 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:
setTestResultsin 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:CurrentBuildResultAppend 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:
appendTestResultsin 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:
cloneAsBuildResultsin interfaceCurrentBuildResult
-
getBuildReturnCode
public int getBuildReturnCode()
- Specified by:
getBuildReturnCodein interfaceCurrentBuildResult
-
setBuildReturnCode
public void setBuildReturnCode(int buildReturnCode)
- Specified by:
setBuildReturnCodein interfaceCurrentBuildResult
-
isCheckoutSuccess
public boolean isCheckoutSuccess()
- Specified by:
isCheckoutSuccessin interfaceCurrentBuildResult
-
setCheckoutSuccess
public void setCheckoutSuccess(boolean checkoutSuccess)
- Specified by:
setCheckoutSuccessin interfaceCurrentBuildResult
-
incParserErrorsCount
public void incParserErrorsCount(int count)
Description copied from interface:CurrentBuildResultNotify about parsing errors.- Specified by:
incParserErrorsCountin interfaceCurrentBuildResult
-
getParserErrorsCount
public int getParserErrorsCount()
Description copied from interface:CurrentBuildResultReturns number of parsing errors.- Specified by:
getParserErrorsCountin interfaceCurrentBuildResult
-
getTaskResults
@NotNull public @NotNull List<TaskResult> getTaskResults()
- Specified by:
getTaskResultsin interfaceCurrentResult
-
setTaskResults
public void setTaskResults(List<TaskResult> taskResults)
- Specified by:
setTaskResultsin interfaceCurrentResult
-
getTaskResultsForTask
public List<TaskResult> getTaskResultsForTask(@NotNull @NotNull String pluginKey)
- Specified by:
getTaskResultsForTaskin interfaceCurrentResult
-
getTasksStartDate
@NotNull public @NotNull Date getTasksStartDate()
- Specified by:
getTasksStartDatein interfaceCurrentBuildResult- Specified by:
getTasksStartDatein interfaceCurrentResult
-
setTasksStartDate
public void setTasksStartDate(@NotNull @NotNull Date taskStartDate)- Specified by:
setTasksStartDatein interfaceCurrentBuildResult- Specified by:
setTasksStartDatein interfaceCurrentResult
-
getBuildWarningSummaries
public FinalHashSet<BuildWarningSummary> getBuildWarningSummaries()
- Specified by:
getBuildWarningSummariesin interfaceCurrentBuildResult- Returns:
- build warnings.
-
getVcsWorkingCopyState
public VcsWorkingCopyState getVcsWorkingCopyState()
Description copied from interface:CurrentResultVersion control system working copy state after build completion. Tasks can add repository revisions which were changed during build.- Specified by:
getVcsWorkingCopyStatein interfaceCurrentResult
-
-