BuildableProblemBuilder
@Incubating public interface ProblemBuilder
Problem
instance configurator allowing the specification of all optional fields.
This is the last interface in the builder chain. The order of steps can be traced from the Problems
service interface.
An example of how to use the builder:
<problemService>.report(configurator -> configurator
.label("test problem")
.undocumented()
.noLocation()
.cotegory("problemCategory")
.severity(Severity.ERROR)
.details("this is a test")
Modifier and Type | Method | Description |
---|---|---|
ProblemBuilder |
additionalData(java.lang.String key,
java.lang.String value) |
Specifies arbitrary data associated with this problem.
|
ProblemBuilder |
details(java.lang.String details) |
The long description of this problem.
|
ProblemBuilder |
severity(Severity severity) |
Declares the severity of the problem.
|
ProblemBuilder |
solution(java.lang.String solution) |
The description of how to solve this problem
|
ProblemBuilder |
withException(java.lang.RuntimeException e) |
The exception causing this problem.
|
ProblemBuilder details(java.lang.String details)
details
- the detailsProblemBuilder solution(java.lang.String solution)
solution
- the solution.ProblemBuilder additionalData(java.lang.String key, java.lang.String value)
ProblemBuilder withException(java.lang.RuntimeException e)
e
- the exception.ProblemBuilder severity(Severity severity)
severity
- the severity