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 classDecoratedErrorDetailsImpl.AgentIdentifierView of BuildAgents referenced in a error report.static classDecoratedErrorDetailsImpl.RepositoryIdentifierstatic classDecoratedErrorDetailsImpl.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 StringgetBuildKey()Full key for the build plan (e.g BAMBOO-TRUNK)StringgetBuildName()@Nullable IntegergetBuildNumber()StringgetBuildResultKey()Full key for the build result (e.g BAMBOO-TRUNK-4)StringgetContext()Top level message related to error@Nullable KeygetEntityKey()Get entity key associated with this errorintgetErrorNumber()@NotNull DategetFirstOccurred()List<String>getInstanceIds()@NotNull DategetLastOccurred()intgetNumberOfOccurrences()PlanKeygetParentPlanKey()PartialVcsRepositoryDatagetRepositoryData()DecoratedErrorDetailsImpl.RepositoryLevelgetRepositoryLocationDefinitionLevel()@Nullable ResultKeygetResultKey()Get result key associated with this error@Nullable IntegergetResultNumber()@Nullable LonggetResultNumberLong()VcsRepositoryDatagetRootRepository()@Nullable ThrowableDetailsgetThrowableDetails()Contains the details of anyThrowablewhich may have been thrown in the errorbooleanisBuildExists()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.booleanisBuildSpecific()Is this error specific to one plan (true) or for all/any plans (false) e.g.booleanisChainBranch()booleanisElastic()
-
-
-
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:ErrorDetailsFull key for the build plan (e.g BAMBOO-TRUNK)- Specified by:
getBuildKeyin interfaceErrorDetails- Returns:
- build key
-
getEntityKey
@Nullable public @Nullable Key getEntityKey()
Description copied from interface:ErrorDetailsGet entity key associated with this error- Specified by:
getEntityKeyin interfaceErrorDetails- Returns:
- entity key
-
getBuildNumber
@Nullable public @Nullable Integer getBuildNumber()
- Specified by:
getBuildNumberin interfaceErrorDetails
-
getResultNumber
@Nullable public @Nullable Integer getResultNumber()
- Specified by:
getResultNumberin interfaceErrorDetails- Returns:
- associated result number or null
-
getResultNumberLong
@Nullable public @Nullable Long getResultNumberLong()
- Specified by:
getResultNumberLongin interfaceErrorDetails- Returns:
- associated result number or null
-
isBuildSpecific
public boolean isBuildSpecific()
Description copied from interface:ErrorDetailsIs this error specific to one plan (true) or for all/any plans (false) e.g. a system error or elastic error.- Specified by:
isBuildSpecificin interfaceErrorDetails- Returns:
- true if error contains a build key.
-
getErrorNumber
public int getErrorNumber()
- Specified by:
getErrorNumberin interfaceErrorDetails
-
getBuildResultKey
public String getBuildResultKey()
Description copied from interface:ErrorDetailsFull key for the build result (e.g BAMBOO-TRUNK-4)- Specified by:
getBuildResultKeyin interfaceErrorDetails- Returns:
- build result key
-
getResultKey
@Nullable public @Nullable ResultKey getResultKey()
Description copied from interface:ErrorDetailsGet result key associated with this error- Specified by:
getResultKeyin interfaceErrorDetails- Returns:
- result key
-
getFirstOccurred
@NotNull public @NotNull Date getFirstOccurred()
- Specified by:
getFirstOccurredin interfaceErrorDetails- Returns:
- Date this error was first thrown
-
getLastOccurred
@NotNull public @NotNull Date getLastOccurred()
- Specified by:
getLastOccurredin 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:
getAgentIdsin interfaceErrorDetails
-
getContext
public String getContext()
Description copied from interface:ErrorDetailsTop level message related to error- Specified by:
getContextin interfaceErrorDetails
-
getNumberOfOccurrences
public int getNumberOfOccurrences()
- Specified by:
getNumberOfOccurrencesin interfaceErrorDetails- Returns:
- Number of times this error has occurred
-
getThrowableDetails
@Nullable public @Nullable ThrowableDetails getThrowableDetails()
Description copied from interface:ErrorDetailsContains the details of anyThrowablewhich may have been thrown in the error- Specified by:
getThrowableDetailsin interfaceErrorDetails- Returns:
- details of any
Throwablefor 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()
-
-