com.atlassian.bamboo.logger
Class ErrorDetails

java.lang.Object
  extended by com.atlassian.bamboo.logger.ErrorDetails
Direct Known Subclasses:
ElasticErrorDetails

public class ErrorDetails
extends java.lang.Object

Stores all the error details for many different sorts of errors. (i.e don't assume specific attributes will exists)


Field Summary
static java.lang.String ALL_BUILDS
           
static java.lang.String ELASTIC_BAMBOO
           
 
Constructor Summary
ErrorDetails(int errorNumber, java.lang.String planKey, java.lang.Integer buildNumber, java.lang.Long agentId, java.lang.String context, java.util.Date timeStamp, ThrowableDetails throwableDetails, BuildManager buildManager, LocalAgentManager localAgentManager, BuildResultsSummaryManager buildResultsSummaryManager)
           
 
Method Summary
 java.util.Set<java.lang.Long> getAgentIds()
           
 java.util.Collection<BuildAgent> getAgents()
           
 java.lang.String getBuildKey()
          Full key for the build plan (e.g BAMBOO-TRUNK)
 java.lang.String getBuildName()
           
 java.lang.Integer getBuildNumber()
           
 java.lang.String getBuildResultKey()
          Full key for the build result (e.g BAMBOO-TRUNK-4)
 java.lang.String getContext()
           
 int getErrorNumber()
           
 java.util.Date getFirstOccurred()
           
 java.util.Date getLastOccurred()
           
 int getNumberOfOccurrences()
           
 ThrowableDetails getThrowableDetails()
          Contains the details of any Throwable which may have been thrown in the error
 boolean isBuildExists()
          Has a build result summary been saved in the data base for this build? Errors may short cicuit the rest of the build process so a build may not get saved.
 boolean isBuildSpecific()
          Is this error specific to one plan (true) or for all/any plans (false) e.g.
 boolean isElastic()
          Is this error specific to Elastic Bamboo
 boolean isForAllBuilds()
          Is this error specific to one plan (false) or for all plans (true) e.g.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALL_BUILDS

public static final java.lang.String ALL_BUILDS
See Also:
Constant Field Values

ELASTIC_BAMBOO

public static final java.lang.String ELASTIC_BAMBOO
See Also:
Constant Field Values
Constructor Detail

ErrorDetails

public ErrorDetails(int errorNumber,
                    java.lang.String planKey,
                    java.lang.Integer buildNumber,
                    @Nullable
                    java.lang.Long agentId,
                    java.lang.String context,
                    java.util.Date timeStamp,
                    ThrowableDetails throwableDetails,
                    BuildManager buildManager,
                    LocalAgentManager localAgentManager,
                    BuildResultsSummaryManager buildResultsSummaryManager)
Method Detail

getErrorNumber

public int getErrorNumber()

getBuildName

public java.lang.String getBuildName()

getBuildKey

public java.lang.String getBuildKey()
Full key for the build plan (e.g BAMBOO-TRUNK)

Returns:
build key

getBuildResultKey

public java.lang.String getBuildResultKey()
Full key for the build result (e.g BAMBOO-TRUNK-4)

Returns:
build result key

getAgentIds

public java.util.Set<java.lang.Long> getAgentIds()

getAgents

public java.util.Collection<BuildAgent> getAgents()

getBuildNumber

public java.lang.Integer getBuildNumber()

getContext

public java.lang.String getContext()

getLastOccurred

public java.util.Date getLastOccurred()
Returns:
Date this error was last thrown (if it only occurred once it will be the same as getFirstOccurred())

getFirstOccurred

public java.util.Date getFirstOccurred()
Returns:
Date this error was first thrown

getNumberOfOccurrences

public int getNumberOfOccurrences()
Returns:
Number of times this error has occurred

getThrowableDetails

public ThrowableDetails getThrowableDetails()
Contains the details of any Throwable which may have been thrown in the error

Returns:
details of any Throwable for this error

isBuildExists

public boolean isBuildExists()
Has a build result summary been saved in the data base for this build? Errors may short cicuit the rest of the build process so a build may not get saved.

Returns:
true if a saved build result exists for this error otherwise returns false

isForAllBuilds

public boolean isForAllBuilds()
Is this error specific to one plan (false) or for all plans (true) e.g. a system error. This method is not particularly useful after the introduction of Elastic Errors. Use the opposite isBuildSpecific() instead.

Returns:
true if error is for all builds.

isBuildSpecific

public boolean isBuildSpecific()
Is this error specific to one plan (true) or for all/any plans (false) e.g. a system error or elastic error.

Returns:
true if error contains a build key.

isElastic

public boolean isElastic()
Is this error specific to Elastic Bamboo

Returns:
true if error is for elastic bamboo, otherwise false.


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.