Class SystemProblem


  • public class SystemProblem
    extends java.lang.Object
    Represents a problem related to the functioning of TeamCity itself or any of its components, called a system problem. Not to be confused with BuildProblem which represents a problem relates to a particular build.
    A system problem is usually connected to one of TeamCity entities (a build type, a project, a VCS root, etc.), which helps to aggregate reported problems around related entities and control access to them.

    A system property consists of the following properties:

    • description - a textual human readable description of the problem
    • cause (optional) - a Throwable instance associated with the problem
    • cause details (optional) - the same, but for the cases when the cause is not expressed as a Throwable instance
    • problem type (optional) - an arbitrary string code. Used to identify a type of the problem for further handling.
    • problem source (optional) - an arbitrary string. Used to identify the source of the problem for further handling.

    Problem type and problem source are meaningful only in the context of handling a problem. For example a problem with VCS connection has problem type "VCS_CONFIGURATION", and when being reported it was connected with a particular VCS Root. Having encountered a VCS_CONFIGURATION problem the web UI may offer to the user the link to the configuration page for the related VCS Root.
    The problem source property may additionally help in problem handling. For example, the problems with triggers are reported for Build Types. To provide the user with the web link to the source of the problem it's not enough to know the particular Build Type and problem type. In this case we can use a unique build trigger signature as the problem source. Combining three things together -- a system entity (a build type in our example), a problem type (some predefined string similar to "VCS_CONFIGURATION"), and the problem source (a build trigger signature) we can provide a full link to the page where we can fix the trigger configuration.
    Cause (or cause details) are displayed in UI, when the user clicks on a "show details" link. Most commonly it is a stacktrace.

    Since:
    5.0
    See Also:
    BuildProblem, SystemProblemNotification, SystemProblemList, SystemProblemEntry
    • Constructor Summary

      Constructors 
      Constructor Description
      SystemProblem​(java.lang.String description, java.lang.Throwable cause, java.lang.String problemType, java.lang.String problemSource)
      Creates a new system problem object
      SystemProblem​(java.lang.String description, java.lang.Throwable cause, java.lang.String causeDetails, java.lang.String problemType, java.lang.String problemSource)
      Creates a new system problem object
    • Constructor Detail

      • SystemProblem

        public SystemProblem​(@NotNull
                             java.lang.String description,
                             @Nullable
                             java.lang.Throwable cause,
                             @Nullable
                             java.lang.String problemType,
                             @Nullable
                             java.lang.String problemSource)
        Creates a new system problem object
        Parameters:
        description - description
        cause - cause (optional)
        problemType - problem type (optional)
        problemSource - problem source (optional)
      • SystemProblem

        public SystemProblem​(@NotNull
                             java.lang.String description,
                             @Nullable
                             java.lang.Throwable cause,
                             @Nullable
                             java.lang.String causeDetails,
                             @Nullable
                             java.lang.String problemType,
                             @Nullable
                             java.lang.String problemSource)
        Creates a new system problem object
        Parameters:
        description - description
        cause - cause (optional)
        causeDetails - the details of the problem as string (optional)
        problemType - problem type (optional)
        problemSource - problem source (optional)
    • Method Detail

      • getDescription

        @NotNull
        public java.lang.String getDescription()
        Returns:
        system problem description
      • getCause

        @Nullable
        public java.lang.Throwable getCause()
        Returns:
        system problem cause if provided
      • getCauseDetails

        @Nullable
        public java.lang.String getCauseDetails()
        Returns:
        cause details if provided
      • getProblemType

        @Nullable
        public java.lang.String getProblemType()
        Returns:
        system problem type if provided
      • getProblemSource

        @Nullable
        public java.lang.String getProblemSource()
        Returns:
        system problem source if provided
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object