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 Details

  • Constructor Details

    • ErrorDetailsImpl

      public ErrorDetailsImpl(int errorNumber, String planKey, Long resultNumber, @Nullable @Nullable Long agentId, String context, @Nullable @Nullable Date timeStamp, @Nullable @Nullable ThrowableDetails throwableDetails)
    • ErrorDetailsImpl

      public ErrorDetailsImpl(int errorNumber, String planKey, Integer resultNumber, @Nullable @Nullable Long agentId, String context, @Nullable @Nullable Date timeStamp, @Nullable @Nullable ThrowableDetails throwableDetails)
  • Method Details

    • getErrorNumber

      public int getErrorNumber()
      Specified by:
      getErrorNumber in interface ErrorDetails
    • getBuildKey

      @Deprecated public String getBuildKey()
      Deprecated.
      since 5.5
      Full key for the build plan (e.g BAMBOO-TRUNK)
      Specified by:
      getBuildKey in interface ErrorDetails
      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 interface ErrorDetails
      Returns:
      entity key
    • getBuildResultKey

      @Deprecated public String getBuildResultKey()
      Deprecated.
      since 5.5
      Full key for the build result (e.g BAMBOO-TRUNK-4)
      Specified by:
      getBuildResultKey in interface ErrorDetails
      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 interface ErrorDetails
      Returns:
      result key
    • getAgentIds

      public Set<Long> getAgentIds()
      Specified by:
      getAgentIds in interface ErrorDetails
    • getBuildNumber

      @Deprecated public Integer getBuildNumber()
      Deprecated.
      since 5.5
      Specified by:
      getBuildNumber in interface ErrorDetails
    • getResultNumber

      @Nullable public @Nullable Integer getResultNumber()
      Specified by:
      getResultNumber in interface ErrorDetails
      Returns:
      associated result number or null
    • getResultNumberLong

      @Nullable public @Nullable Long getResultNumberLong()
      Specified by:
      getResultNumberLong in interface ErrorDetails
      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 interface ErrorDetails
    • getLastOccurred

      @NotNull public @NotNull Date getLastOccurred()
      Specified by:
      getLastOccurred in interface ErrorDetails
      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 interface ErrorDetails
      Returns:
      Date this error was first thrown
    • getNumberOfOccurrences

      public int getNumberOfOccurrences()
      Specified by:
      getNumberOfOccurrences in interface ErrorDetails
      Returns:
      Number of times this error has occurred
    • getThrowableDetails

      @Nullable public @Nullable ThrowableDetails getThrowableDetails()
      Contains the details of any Throwable which may have been thrown in the error
      Specified by:
      getThrowableDetails in interface ErrorDetails
      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 interface ErrorDetails
      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.