Class CheckResult

java.lang.Object
com.priint.pubserver.check.CheckResult
All Implemented Interfaces:
Serializable

public class CheckResult extends Object implements Serializable
The CheckResult class provides detailed information about the result of a configuration check.
Methods annotated as PubServerMethods with type=PluginMethod.MethodType.CONFIGURATION_CHECK are expected to return a non null CheckResult object.
Since these checks can be very complex, a CheckResult can (but does not have to) provide a list of Issues, each one of them describing the result of a single examination, test or configuration item.
CheckResults and Issues can provide a solution suggestion.
See Also:
  • Constructor Details

    • CheckResult

      public CheckResult(String pluginMappedName)
      Constructor with pluginMappedName parameter which set pluginMappedName variable in class
    • CheckResult

      public CheckResult()
      Default constructor
  • Method Details

    • calculateStatus

      public void calculateStatus()
      Calculate the overall status for this check. The status will be set to the status of the "most severe" issue of this check.
    • getStatus

      public CheckResult.Status getStatus()
      Get the overall status of this check
      Returns:
      the overall status of this check
    • setStatus

      public void setStatus(CheckResult.Status status)
      Set the overall status of this check. Alternatively the status can be calculated by calling calculateStatus.
      Parameters:
      status - status of this check
    • getSummary

      public String getSummary()
      Returns:
      Summary
    • setSummary

      public void setSummary(String summary)
      Set summary
    • getPluginMappedName

      public String getPluginMappedName()
      Returns:
      Get plugin mapped name
    • setPluginMappedName

      public void setPluginMappedName(String pluginMappedName)
      Set plugin mapped name
    • getStatusDescription

      public String getStatusDescription()
      Returns:
      statusDescription
    • setStatusDescription

      public void setStatusDescription(String statusDescription)
      Parameters:
      statusDescription -
    • getIssues

      public List<CheckResult.Issue> getIssues()
      Returns:
      Get Issues list
    • setIssues

      public void setIssues(List<CheckResult.Issue> issues)
      Parameters:
      Set - Issues list
    • addIssue

      public void addIssue(CheckResult.Issue issue)
      Parameters:
      Add - issue to Issues list
    • addIssue

      public CheckResult.Issue addIssue(String repositoryPath, String repositoryType, String statusDescription, CheckResult.Status status)
      Parameters:
      repositoryPath -
      repositoryType -
      statusDescription -
      status -
      Returns:
      the new issue
    • getSolutions

      public List<CheckResult.Solution> getSolutions()
      Returns:
      Get solutions list
    • setSolutions

      public void setSolutions(List<CheckResult.Solution> solutions)
      Parameters:
      Set - solutions list
    • addSolution

      public void addSolution(CheckResult.Solution solution)
      Parameters:
      Add - solution to solution list
    • getPath

      public String getPath()
      Returns:
      Configuration path
    • setPath

      public void setPath(String path)
      Set path to configuration
    • addSolutionManualFix

      public void addSolutionManualFix(String instructions)
      Add a manual fix proposal for this check
      Parameters:
      instructions -
    • addSolutionMethodCall

      public void addSolutionMethodCall(String instructions, PluginMethod method)
      Add a method call proposal for this check
      Parameters:
      instructions -
      method -
    • addSolutionDelete

      public void addSolutionDelete(String instructions)
      Add a delete proposal for this check
      Parameters:
      instructions -
    • addSolutionSupportRequest

      public void addSolutionSupportRequest(String instructions)
      Add a support request proposal for this check
      Parameters:
      instructions -