Package com.priint.pubserver.check
Class CheckResult
- java.lang.Object
-
- com.priint.pubserver.check.CheckResult
-
- All Implemented Interfaces:
java.io.Serializable
public class CheckResult extends java.lang.Object implements java.io.SerializableThe 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:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCheckResult.IssueA single Issue
Issues should refer to a simple problem, e.g.static classCheckResult.SolutionA suggested Solution for a Check or Issue.
The solution can be a manual fix, which is described by the solutionDescription field a method call, which is defined by the method field a delete request, which is explained by the solutionDescription field suggestion to call the support, which of course should be the last resort for all issuesstatic classCheckResult.StatusThe overall status of a check or status of a single issue
-
Constructor Summary
Constructors Constructor Description CheckResult()Default constructorCheckResult(java.lang.String pluginMappedName)Constructor with pluginMappedName parameter which set pluginMappedName variable in class
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddIssue(CheckResult.Issue issue)CheckResult.IssueaddIssue(java.lang.String repositoryPath, java.lang.String repositoryType, java.lang.String statusDescription, CheckResult.Status status)voidaddSolution(CheckResult.Solution solution)voidaddSolutionDelete(java.lang.String instructions)Add a delete proposal for this checkvoidaddSolutionManualFix(java.lang.String instructions)Add a manual fix proposal for this checkvoidaddSolutionMethodCall(java.lang.String instructions, PluginMethod method)Add a method call proposal for this checkvoidaddSolutionSupportRequest(java.lang.String instructions)Add a support request proposal for this checkvoidcalculateStatus()Calculate the overall status for this check.java.util.List<CheckResult.Issue>getIssues()java.lang.StringgetPath()java.lang.StringgetPluginMappedName()java.util.List<CheckResult.Solution>getSolutions()CheckResult.StatusgetStatus()Get the overall status of this checkjava.lang.StringgetStatusDescription()java.lang.StringgetSummary()voidsetIssues(java.util.List<CheckResult.Issue> issues)voidsetPath(java.lang.String path)Set path to configurationvoidsetPluginMappedName(java.lang.String pluginMappedName)Set plugin mapped namevoidsetSolutions(java.util.List<CheckResult.Solution> solutions)voidsetStatus(CheckResult.Status status)Set the overall status of this check.voidsetStatusDescription(java.lang.String statusDescription)voidsetSummary(java.lang.String summary)Set summary
-
-
-
Method Detail
-
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 java.lang.String getSummary()
- Returns:
- Summary
-
setSummary
public void setSummary(java.lang.String summary)
Set summary
-
getPluginMappedName
public java.lang.String getPluginMappedName()
- Returns:
- Get plugin mapped name
-
setPluginMappedName
public void setPluginMappedName(java.lang.String pluginMappedName)
Set plugin mapped name
-
getStatusDescription
public java.lang.String getStatusDescription()
- Returns:
- statusDescription
-
setStatusDescription
public void setStatusDescription(java.lang.String statusDescription)
- Parameters:
statusDescription-
-
getIssues
public java.util.List<CheckResult.Issue> getIssues()
- Returns:
- Get Issues list
-
setIssues
public void setIssues(java.util.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(java.lang.String repositoryPath, java.lang.String repositoryType, java.lang.String statusDescription, CheckResult.Status status)
- Parameters:
repositoryPath-repositoryType-statusDescription-status-- Returns:
- the new issue
-
getSolutions
public java.util.List<CheckResult.Solution> getSolutions()
- Returns:
- Get solutions list
-
setSolutions
public void setSolutions(java.util.List<CheckResult.Solution> solutions)
- Parameters:
Set- solutions list
-
addSolution
public void addSolution(CheckResult.Solution solution)
- Parameters:
Add- solution to solution list
-
getPath
public java.lang.String getPath()
- Returns:
- Configuration path
-
setPath
public void setPath(java.lang.String path)
Set path to configuration
-
addSolutionManualFix
public void addSolutionManualFix(java.lang.String instructions)
Add a manual fix proposal for this check- Parameters:
instructions-
-
addSolutionMethodCall
public void addSolutionMethodCall(java.lang.String instructions, PluginMethod method)Add a method call proposal for this check- Parameters:
instructions-method-
-
addSolutionDelete
public void addSolutionDelete(java.lang.String instructions)
Add a delete proposal for this check- Parameters:
instructions-
-
addSolutionSupportRequest
public void addSolutionSupportRequest(java.lang.String instructions)
Add a support request proposal for this check- Parameters:
instructions-
-
-