Package com.atlassian.bamboo.logger
Class DecoratedErrorDetailsImpl
- java.lang.Object
-
- com.atlassian.bamboo.logger.DecoratedErrorDetailsImpl
-
- All Implemented Interfaces:
ErrorDetails
public class DecoratedErrorDetailsImpl extends Object implements ErrorDetails
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DecoratedErrorDetailsImpl.AgentIdentifier
View of BuildAgents referenced in a error report.static class
DecoratedErrorDetailsImpl.RepositoryIdentifier
static class
DecoratedErrorDetailsImpl.RepositoryLevel
-
Constructor Summary
Constructors Constructor Description DecoratedErrorDetailsImpl(@NotNull ErrorDetails errorDetails, @NotNull AgentManager agentManager, @NotNull CachedPlanManager cachedPlanManager, @NotNull ResultsSummaryManager resultsSummaryManager, @NotNull RepositoryDefinitionManager repositoryDefinitionManager, @NotNull CachedRepositoryDefinitionManager cachedRepositoryDefinitionManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<DecoratedErrorDetailsImpl.AgentIdentifier>
getAgentIdentifiers()
Set<Long>
getAgentIds()
List<BuildAgent>
getAgents()
@Nullable String
getBuildKey()
Full key for the build plan (e.g BAMBOO-TRUNK)String
getBuildName()
@Nullable Integer
getBuildNumber()
String
getBuildResultKey()
Full key for the build result (e.g BAMBOO-TRUNK-4)String
getContext()
Top level message related to error@Nullable Key
getEntityKey()
Get entity key associated with this errorint
getErrorNumber()
@NotNull Date
getFirstOccurred()
List<String>
getInstanceIds()
@NotNull Date
getLastOccurred()
int
getNumberOfOccurrences()
PlanKey
getParentPlanKey()
PartialVcsRepositoryData
getRepositoryData()
DecoratedErrorDetailsImpl.RepositoryLevel
getRepositoryLocationDefinitionLevel()
@Nullable ResultKey
getResultKey()
Get result key associated with this error@Nullable Integer
getResultNumber()
@Nullable Long
getResultNumberLong()
VcsRepositoryData
getRootRepository()
@Nullable ThrowableDetails
getThrowableDetails()
Contains the details of anyThrowable
which may have been thrown in the errorboolean
isBuildExists()
Has a build result summary been saved in the data base for this build? Errors may short circuit 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
isChainBranch()
boolean
isElastic()
-
-
-
Constructor Detail
-
DecoratedErrorDetailsImpl
public DecoratedErrorDetailsImpl(@NotNull @NotNull ErrorDetails errorDetails, @NotNull @NotNull AgentManager agentManager, @NotNull @NotNull CachedPlanManager cachedPlanManager, @NotNull @NotNull ResultsSummaryManager resultsSummaryManager, @NotNull @NotNull RepositoryDefinitionManager repositoryDefinitionManager, @NotNull @NotNull CachedRepositoryDefinitionManager cachedRepositoryDefinitionManager)
-
-
Method Detail
-
getBuildKey
@Nullable public @Nullable String getBuildKey()
Description copied from interface:ErrorDetails
Full 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
-
getBuildNumber
@Nullable public @Nullable Integer getBuildNumber()
- 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
-
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.
-
getErrorNumber
public int getErrorNumber()
- Specified by:
getErrorNumber
in interfaceErrorDetails
-
getBuildResultKey
public String getBuildResultKey()
Description copied from interface:ErrorDetails
Full 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
-
getFirstOccurred
@NotNull public @NotNull Date getFirstOccurred()
- Specified by:
getFirstOccurred
in interfaceErrorDetails
- Returns:
- Date this error was first thrown
-
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()
)
-
getAgentIds
public Set<Long> getAgentIds()
- Specified by:
getAgentIds
in interfaceErrorDetails
-
getContext
public String getContext()
Description copied from interface:ErrorDetails
Top level message related to error- Specified by:
getContext
in interfaceErrorDetails
-
getNumberOfOccurrences
public int getNumberOfOccurrences()
- Specified by:
getNumberOfOccurrences
in interfaceErrorDetails
- Returns:
- Number of times this error has occurred
-
getThrowableDetails
@Nullable public @Nullable ThrowableDetails getThrowableDetails()
Description copied from interface:ErrorDetails
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
-
getAgents
public List<BuildAgent> getAgents()
-
getBuildName
public String getBuildName()
-
getParentPlanKey
public PlanKey getParentPlanKey()
-
isBuildExists
public boolean isBuildExists()
Has a build result summary been saved in the data base for this build? Errors may short circuit 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
-
isElastic
public boolean isElastic()
-
getAgentIdentifiers
public List<DecoratedErrorDetailsImpl.AgentIdentifier> getAgentIdentifiers()
-
getRepositoryData
public PartialVcsRepositoryData getRepositoryData()
-
getRootRepository
public VcsRepositoryData getRootRepository()
-
getRepositoryLocationDefinitionLevel
public DecoratedErrorDetailsImpl.RepositoryLevel getRepositoryLocationDefinitionLevel()
-
isChainBranch
public boolean isChainBranch()
-
-