|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.bamboo.logger.AbstractErrorUpdateHandler
com.atlassian.bamboo.logger.DefaultErrorHandler
public class DefaultErrorHandler
This class keeps track of Bamboo build errors so they can get reported to the user.
Field Summary |
---|
Fields inherited from class com.atlassian.bamboo.logger.AbstractErrorUpdateHandler |
---|
agentContext |
Constructor Summary | |
---|---|
DefaultErrorHandler(AgentContext agentContext,
com.atlassian.event.api.EventPublisher eventPublisher)
|
Method Summary | |
---|---|
void |
clear()
Remove all errors from the handler |
void |
createElasticError(String context,
Long agentId,
ThrowableDetails throwableDetails,
String instanceId)
Create an error regarding Elastic Bamboo. |
void |
createError(String planKey,
Integer buildNumber,
Long agentId,
String context,
ThrowableDetails throwableDetails)
|
Collection<ErrorDetails> |
getAllErrors()
Get all the errors recorded against all builds |
Collection<ErrorDetails> |
getElasticErrors()
Get all the errors recorded against elastic bamboo |
ErrorDetails |
getErrorDetails(String buildKey,
int errorNumber)
Obtain the specified error from the handler. |
Collection<ErrorDetails> |
getErrors(Key planKey)
Obtain all the errors recorded against a specific plan |
Collection<ErrorDetails> |
getErrors(ResultKey resultKey)
Obtain all the errors recorded against a specific result |
Collection<ErrorDetails> |
getErrorsByAgentId(Long agentId)
Obtain all the errors recorded filtered by Agent Id |
void |
removeBuildErrors(String buildKey)
Remove all the errors for a given build |
void |
removeError(String buildKey,
int errorNumber)
Remove a specific error from the handler. |
Methods inherited from class com.atlassian.bamboo.logger.AbstractErrorUpdateHandler |
---|
addErrorCollection, getCurrentAgentId, recordElasticError, recordError, recordError, recordError, recordError, recordError |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.atlassian.bamboo.logger.ErrorUpdateHandler |
---|
addErrorCollection, recordElasticError, recordError, recordError, recordError, recordError, recordError |
Constructor Detail |
---|
public DefaultErrorHandler(AgentContext agentContext, com.atlassian.event.api.EventPublisher eventPublisher)
Method Detail |
---|
public void createElasticError(String context, @Nullable Long agentId, @Nullable ThrowableDetails throwableDetails, @Nullable String instanceId)
ErrorUpdateHandler
createElasticError
in interface ErrorUpdateHandler
public void createError(@Nullable String planKey, Integer buildNumber, Long agentId, String context, ThrowableDetails throwableDetails)
createError
in interface ErrorUpdateHandler
@NotNull public Collection<ErrorDetails> getErrors(@NotNull ResultKey resultKey)
ErrorAccessor
getErrors
in interface ErrorAccessor
ErrorDetails
@NotNull public Collection<ErrorDetails> getErrors(@NotNull Key planKey)
ErrorAccessor
getErrors
in interface ErrorAccessor
ErrorDetails
@NotNull public Collection<ErrorDetails> getAllErrors()
ErrorAccessor
getAllErrors
in interface ErrorAccessor
ErrorDetails
@NotNull public Collection<ErrorDetails> getErrorsByAgentId(Long agentId)
ErrorAccessor
getErrorsByAgentId
in interface ErrorAccessor
ErrorDetails
@NotNull public Collection<ErrorDetails> getElasticErrors()
ErrorAccessor
getElasticErrors
in interface ErrorAccessor
ErrorDetails
public void clear()
ErrorHandler
clear
in interface ErrorHandler
public void removeError(String buildKey, int errorNumber)
ErrorHandler
removeError
in interface ErrorHandler
buildKey
- The build containing the errorerrorNumber
- The errorIndex'th error to be associated with the buildpublic ErrorDetails getErrorDetails(String buildKey, int errorNumber)
ErrorHandler
getErrorDetails
in interface ErrorHandler
buildKey
- The build containing the error.errorNumber
- The errorIndex'th error to be associated with the build
public void removeBuildErrors(String buildKey)
ErrorHandler
removeBuildErrors
in interface ErrorHandler
buildKey
- The key of the build
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |