Package com.atlassian.bamboo.logger
Class ErrorDetailsImpl
- java.lang.Object
-
- com.atlassian.bamboo.logger.ErrorDetailsImpl
-
- All Implemented Interfaces:
ErrorDetails
- Direct Known Subclasses:
ElasticErrorDetailsImpl
public class ErrorDetailsImpl extends Object implements ErrorDetails
Stores all the error details for many different sorts of errors. (i.e don't assume specific attributes will exists)
-
-
Field Summary
Fields Modifier and Type Field Description static String
ALL_BUILDS
-
Constructor Summary
Constructors Constructor Description ErrorDetailsImpl(int errorNumber, String planKey, Integer resultNumber, @Nullable Long agentId, String context, @Nullable Date timeStamp, @Nullable ThrowableDetails throwableDetails)
ErrorDetailsImpl(int errorNumber, String planKey, Long resultNumber, @Nullable Long agentId, String context, @Nullable Date timeStamp, @Nullable ThrowableDetails throwableDetails)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Set<Long>
getAgentIds()
String
getBuildKey()
Deprecated.since 5.5Integer
getBuildNumber()
Deprecated.since 5.5String
getBuildResultKey()
Deprecated.since 5.5String
getContext()
Top level message related to error@Nullable Key
getEntityKey()
Get entity key associated with this errorint
getErrorNumber()
@NotNull Date
getFirstOccurred()
@NotNull Date
getLastOccurred()
int
getNumberOfOccurrences()
@Nullable ResultKey
getResultKey()
Get result key associated with this error@Nullable Integer
getResultNumber()
@Nullable Long
getResultNumberLong()
@Nullable ThrowableDetails
getThrowableDetails()
Contains the details of anyThrowable
which may have been thrown in the errorboolean
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
-
-
-
Field Detail
-
ALL_BUILDS
public static final String ALL_BUILDS
- See Also:
- Constant Field Values
-
-
Method Detail
-
getErrorNumber
public int getErrorNumber()
- Specified by:
getErrorNumber
in interfaceErrorDetails
-
getBuildKey
@Deprecated public String getBuildKey()
Deprecated.since 5.5Full key for the build plan (e.g BAMBOO-TRUNK)- Specified by:
getBuildKey
in interfaceErrorDetails
- Returns:
- build key
-
getEntityKey
@Nullable public @Nullable Key getEntityKey()
Description copied from interface:ErrorDetails
Get entity key associated with this error- Specified by:
getEntityKey
in interfaceErrorDetails
- Returns:
- entity key
-
getBuildResultKey
@Deprecated public String getBuildResultKey()
Deprecated.since 5.5Full key for the build result (e.g BAMBOO-TRUNK-4)- Specified by:
getBuildResultKey
in interfaceErrorDetails
- Returns:
- build result key
-
getResultKey
@Nullable public @Nullable ResultKey getResultKey()
Description copied from interface:ErrorDetails
Get result key associated with this error- Specified by:
getResultKey
in interfaceErrorDetails
- Returns:
- result key
-
getAgentIds
public Set<Long> getAgentIds()
- Specified by:
getAgentIds
in interfaceErrorDetails
-
getBuildNumber
@Deprecated public Integer getBuildNumber()
Deprecated.since 5.5- Specified by:
getBuildNumber
in interfaceErrorDetails
-
getResultNumber
@Nullable public @Nullable Integer getResultNumber()
- Specified by:
getResultNumber
in interfaceErrorDetails
- Returns:
- associated result number or null
-
getResultNumberLong
@Nullable public @Nullable Long getResultNumberLong()
- Specified by:
getResultNumberLong
in interfaceErrorDetails
- Returns:
- associated result number or null
-
getContext
public String getContext()
Description copied from interface:ErrorDetails
Top level message related to error- Specified by:
getContext
in interfaceErrorDetails
-
getLastOccurred
@NotNull public @NotNull Date getLastOccurred()
- Specified by:
getLastOccurred
in interfaceErrorDetails
- Returns:
- Date this error was last thrown (if it only occurred once it will be the same as
ErrorDetails.getFirstOccurred()
)
-
getFirstOccurred
@NotNull public @NotNull Date getFirstOccurred()
- Specified by:
getFirstOccurred
in interfaceErrorDetails
- Returns:
- Date this error was first thrown
-
getNumberOfOccurrences
public int getNumberOfOccurrences()
- Specified by:
getNumberOfOccurrences
in interfaceErrorDetails
- Returns:
- Number of times this error has occurred
-
getThrowableDetails
@Nullable public @Nullable ThrowableDetails getThrowableDetails()
Contains the details of anyThrowable
which may have been thrown in the error- Specified by:
getThrowableDetails
in interfaceErrorDetails
- Returns:
- details of any
Throwable
for this error
-
isBuildSpecific
public boolean isBuildSpecific()
Description copied from interface:ErrorDetails
Is this error specific to one plan (true) or for all/any plans (false) e.g. a system error or elastic error.- Specified by:
isBuildSpecific
in interfaceErrorDetails
- 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.
-
-