Class HealthCheckFailure

java.lang.Object
sonia.scm.repository.HealthCheckFailure
All Implemented Interfaces:
Serializable

public final class HealthCheckFailure extends Object implements Serializable
Single failure of a HealthCheck.
Since:
1.36
See Also:
  • Constructor Details

    • HealthCheckFailure

      public HealthCheckFailure(String id, String summary, String description)
      Constructs a new HealthCheckFailure.
      Parameters:
      id - id of the failure
      summary - summary of the failure
      description - description of the failure
    • HealthCheckFailure

      public HealthCheckFailure(String id, String summary, String url, String description)
      Constructs ...
      Parameters:
      id - id of the failure
      summary - summary of the failure
      url - url of the failure
      description - description of the failure
    • HealthCheckFailure

      public HealthCheckFailure(String id, String summary, HealthCheckFailure.UrlTemplate urlTemplate, String description)
      Constructs ...
      Parameters:
      id - id of the failure
      summary - summary of the failure
      urlTemplate - template for the url of the failure (use urlForTitle(String) to create this)
      description - description of the failure
      Since:
      2.17.0
  • Method Details

    • urlForTitle

      public static HealthCheckFailure.UrlTemplate urlForTitle(String title)
      Use this to create HealthCheckFailure instances with an url for core health check failures.
      Parameters:
      title - The title of the failure matching a health check documentation page.
      Since:
      2.17.0
    • templated

      public static HealthCheckFailure.UrlTemplate templated(String urlTemplate)
      Use this to create HealthCheckFailure instances with a custom url for core health check failures. If this url can be customized with a concrete version of SCM-Manager, you can use {0} as a placeholder for the version. This will be replaced later on.
      Parameters:
      urlTemplate - The url for this failure.
      Since:
      2.17.0
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object
    • getDescription

      public String getDescription()
      Returns the description of this failure.
    • getId

      public String getId()
      Returns the id of this failure.
    • getSummary

      public String getSummary()
      Returns the summary of the failure.
    • getUrl

      public String getUrl()
      Return the url of the failure. The url may potentially be templated. In the case you can get a special url for an explicit version of SCM-Manager using getUrl(String) whereas this function will return a generic url for the "latest" version.
      Returns:
      url of the failure
    • getUrl

      public String getUrl(String version)
      Return the url of the failure for a concrete version of SCM-Manager (given the url is templated).
      Parameters:
      version - The version of SCM-Manager to create the url for.
      Returns:
      url of the failure
      Since:
      2.17.0