com.atlassian.bamboo.logger
Interface ErrorHandler

All Superinterfaces:
ErrorAccessor, ErrorUpdateHandler
All Known Implementing Classes:
DefaultErrorHandler

@ThreadSafe
public interface ErrorHandler
extends ErrorUpdateHandler, ErrorAccessor

Describes an abstraction for dealing with errors that occure while building builds.


Method Summary
 void clear()
          Remove all errors from the handler
 ErrorDetails getErrorDetails(java.lang.String buildKey, int errorNumber)
          Obtain the specifed error from the handler.
 java.util.Collection<ErrorDetails> getErrors(java.lang.String buildKey)
          Deprecated. since 3.0 Use type-safe ErrorAccessor API.
 void removeBuildErrors(java.lang.String buildKey)
          Remove all the errors for a given build
 void removeError(java.lang.String buildKey, int errorIndex)
          Remove a specific error from the handler.
 
Methods inherited from interface com.atlassian.bamboo.logger.ErrorUpdateHandler
addErrorCollection, createElasticError, createError, recordElasticError, recordError, recordError, recordError, recordError, recordError, recordError, recordError, recordError
 
Methods inherited from interface com.atlassian.bamboo.logger.ErrorAccessor
getAllErrors, getElasticErrors, getErrors, getErrors
 

Method Detail

clear

void clear()
Remove all errors from the handler


removeError

void removeError(java.lang.String buildKey,
                 int errorIndex)
Remove a specific error from the handler.

Parameters:
buildKey - The build containing the error
errorIndex - The errorIndex'th error to be associated with the build

removeBuildErrors

void removeBuildErrors(java.lang.String buildKey)
Remove all the errors for a given build

Parameters:
buildKey - The key of the build

getErrors

@Deprecated
java.util.Collection<ErrorDetails> getErrors(java.lang.String buildKey)
Deprecated. since 3.0 Use type-safe ErrorAccessor API.

Obtain all the errors recorded against a specific build

Parameters:
buildKey - The build
Returns:
The collection ErrorDetails

getErrorDetails

ErrorDetails getErrorDetails(java.lang.String buildKey,
                             int errorNumber)
Obtain the specifed error from the handler.

Parameters:
buildKey - The build containing the error.
errorNumber - The errorIndex'th error to be associated with the build
Returns:
The error details


Copyright © 2011 Atlassian. All Rights Reserved.