Package com.priint.pubserver.check
Class CheckResult
java.lang.Object
com.priint.pubserver.check.CheckResult
- All Implemented Interfaces:
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.
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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA single Issue
Issues should refer to a simple problem, e.g.static classA 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 enumThe overall status of a check or status of a single issue -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructorCheckResult(String pluginMappedName) Constructor with pluginMappedName parameter which set pluginMappedName variable in class -
Method Summary
Modifier and TypeMethodDescriptionvoidaddIssue(CheckResult.Issue issue) addIssue(String repositoryPath, String repositoryType, String statusDescription, CheckResult.Status status) voidaddSolution(CheckResult.Solution solution) voidaddSolutionDelete(String instructions) Add a delete proposal for this checkvoidaddSolutionManualFix(String instructions) Add a manual fix proposal for this checkvoidaddSolutionMethodCall(String instructions, PluginMethod method) Add a method call proposal for this checkvoidaddSolutionSupportRequest(String instructions) Add a support request proposal for this checkvoidCalculate the overall status for this check.getPath()Get the overall status of this checkvoidsetIssues(List<CheckResult.Issue> issues) voidSet path to configurationvoidsetPluginMappedName(String pluginMappedName) Set plugin mapped namevoidsetSolutions(List<CheckResult.Solution> solutions) voidsetStatus(CheckResult.Status status) Set the overall status of this check.voidsetStatusDescription(String statusDescription) voidsetSummary(String summary) Set summary
-
Constructor Details
-
CheckResult
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
Get the overall status of this check- Returns:
- the overall status of this check
-
setStatus
Set the overall status of this check. Alternatively the status can be calculated by calling calculateStatus.- Parameters:
status- status of this check
-
getSummary
- Returns:
- Summary
-
setSummary
Set summary -
getPluginMappedName
- Returns:
- Get plugin mapped name
-
setPluginMappedName
Set plugin mapped name -
getStatusDescription
- Returns:
- statusDescription
-
setStatusDescription
- Parameters:
statusDescription-
-
getIssues
- Returns:
- Get Issues list
-
setIssues
- Parameters:
Set- Issues list
-
addIssue
- 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
- Returns:
- Get solutions list
-
setSolutions
- Parameters:
Set- solutions list
-
addSolution
- Parameters:
Add- solution to solution list
-
getPath
- Returns:
- Configuration path
-
setPath
Set path to configuration -
addSolutionManualFix
Add a manual fix proposal for this check- Parameters:
instructions-
-
addSolutionMethodCall
Add a method call proposal for this check- Parameters:
instructions-method-
-
addSolutionDelete
Add a delete proposal for this check- Parameters:
instructions-
-
addSolutionSupportRequest
Add a support request proposal for this check- Parameters:
instructions-
-