|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.bamboo.task.TaskResultBuilder
public class TaskResultBuilder
Evaluates the execution of TaskType
s to produce a TaskResult
Method Summary | |
---|---|
TaskResult |
build()
|
TaskResultBuilder |
checkInterceptorMatches(ContentMatchingInterceptor interceptor,
int maximumAge)
|
TaskResultBuilder |
checkInterceptorNotMatches(ContentMatchingInterceptor interceptor,
int maximumAge)
|
TaskResultBuilder |
checkReturnCode(com.atlassian.utils.process.ExternalProcess externalProcess)
Checks that the return code of the ExternalProcess was zero
Will only check return codes if the build state has not been set to Failed for some other reason. |
TaskResultBuilder |
checkReturnCode(com.atlassian.utils.process.ExternalProcess externalProcess,
int expectedReturnCode)
Checks that the return code of the ExternalProcess was of the expected type. |
TaskResultBuilder |
checkTestFailures()
Checks whether any test failures have been recorded against the buildResult and updates the state accordingly Will only check tests if the build state has not been set to Failed for some other reason. |
static TaskResult |
copyWithNewState(TaskResult taskResult,
TaskState newTaskState)
Copies a taskResult and changes the state |
static TaskResultBuilder |
create(TaskContext taskContext)
Deprecated. since 5.0 use newBuilder(CommonTaskContext) |
static TaskResult |
createFailedWithErrorResult(TaskIdentifier taskIdentifier)
Method to create error result bypassing the builder. |
TaskResultBuilder |
failed()
Sets the Task Result Status as TaskState.FAILED |
TaskResultBuilder |
failedWithError()
Sets the Task Result Status as TaskState.ERROR |
TaskState |
getTaskState()
|
static TaskResultBuilder |
newBuilder(CommonTaskContext taskContext)
Creates a new TaskResultBuilder for a CommonTaskContext |
TaskResultBuilder |
setState(TaskState taskState)
|
TaskResultBuilder |
success()
Sets the Task Result Status as TaskState.SUCCESS |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static TaskResultBuilder newBuilder(@NotNull CommonTaskContext taskContext)
CommonTaskContext
taskContext
- of the executing TaskType
@Deprecated public static TaskResultBuilder create(@NotNull TaskContext taskContext)
newBuilder(CommonTaskContext)
CommonTaskContext
taskContext
- of the executing TaskType
public static TaskResult copyWithNewState(@NotNull TaskResult taskResult, @NotNull TaskState newTaskState)
taskResult
- to copynewTaskState
- to replace the old taskState
public static TaskResult createFailedWithErrorResult(TaskIdentifier taskIdentifier)
taskIdentifier
- identifying the task that failed
public TaskResultBuilder success()
TaskState.SUCCESS
public TaskResultBuilder failed()
TaskState.FAILED
public TaskResultBuilder failedWithError()
TaskState.ERROR
public TaskResultBuilder checkReturnCode(@NotNull com.atlassian.utils.process.ExternalProcess externalProcess)
ExternalProcess
was zero
Will only check return codes if the build state has not been set to Failed for some other reason.
externalProcess
- - to check return code of
public TaskResultBuilder checkReturnCode(@NotNull com.atlassian.utils.process.ExternalProcess externalProcess, int expectedReturnCode)
ExternalProcess
was of the expected type.
Will only check return codes if the build state has not been set to Failed for some other reason.
externalProcess
- - process to check return code fromexpectedReturnCode-
- the return code to be considered a success.
public TaskResultBuilder checkTestFailures()
public TaskResultBuilder checkInterceptorMatches(@NotNull ContentMatchingInterceptor interceptor, int maximumAge)
public TaskResultBuilder checkInterceptorNotMatches(@NotNull ContentMatchingInterceptor interceptor, int maximumAge)
public TaskResult build()
public TaskState getTaskState()
public TaskResultBuilder setState(TaskState taskState)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |