private static class ResultBuilder.Result extends java.lang.Object implements IResult
Modifier and Type | Field and Description |
---|---|
private java.util.Map<TypedResult<?>,java.util.Collection<?>> |
collectionResultMap |
private java.lang.String |
explanation |
private java.util.Map<TypedPreference<?>,java.lang.Object> |
preferenceMap |
private java.util.Map<TypedResult<?>,java.lang.Object> |
resultMap |
private IRule |
rule |
private Severity |
severity |
private java.lang.String |
solution |
private java.util.Collection<IRecordingSetting> |
suggestedRecordingSettings |
private java.lang.String |
summary |
Constructor and Description |
---|
Result(Severity severity,
IRule rule,
java.lang.String summary,
java.lang.String explanation,
java.lang.String solution,
java.util.Collection<IRecordingSetting> suggestedRecordingSettings,
java.util.Map<TypedResult<?>,java.lang.Object> resultMap,
java.util.Map<TypedResult<?>,java.util.Collection<?>> collectionResultMap,
java.util.Map<TypedPreference<?>,java.lang.Object> preferenceMap) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getExplanation()
A more detailed explanation of what kind of problem was identified and why the identified
issue is a problem.
|
<T> T |
getPreference(TypedPreference<T> preference)
Returns a preference value that was used when evaluating the rule for this particular result.
|
<T> java.util.Collection<T> |
getResult(TypedCollectionResult<T> key)
Returns a collection of typed instances of a result contained in this result instance, i.e.
|
<T> T |
getResult(TypedResult<T> key)
Returns a typed instance of a result contained in this result instance, i.e.
|
IRule |
getRule()
Returns the
IRule that generated this result object. |
Severity |
getSeverity()
Returns an enum of type
Severity describing the importance of this result. |
java.lang.String |
getSolution()
An attempted solution for the identified problem.
|
java.lang.String |
getSummary()
A short, one sentence, summary of the results of the rule evaluation.
|
java.util.Collection<IRecordingSetting> |
suggestRecordingSettings()
An optional field potentially used for rules that have a set of recording settings that may
help the rule return more detailed information.
|
private final Severity severity
private final IRule rule
private final java.lang.String summary
private final java.lang.String explanation
private final java.lang.String solution
private final java.util.Collection<IRecordingSetting> suggestedRecordingSettings
private final java.util.Map<TypedResult<?>,java.lang.Object> resultMap
private final java.util.Map<TypedResult<?>,java.util.Collection<?>> collectionResultMap
private final java.util.Map<TypedPreference<?>,java.lang.Object> preferenceMap
Result(Severity severity, IRule rule, java.lang.String summary, java.lang.String explanation, java.lang.String solution, java.util.Collection<IRecordingSetting> suggestedRecordingSettings, java.util.Map<TypedResult<?>,java.lang.Object> resultMap, java.util.Map<TypedResult<?>,java.util.Collection<?>> collectionResultMap, java.util.Map<TypedPreference<?>,java.lang.Object> preferenceMap)
public Severity getSeverity()
IResult
Severity
describing the importance of this result.getSeverity
in interface IResult
public IRule getRule()
IResult
IRule
that generated this result object.public java.lang.String getSummary()
IResult
OK
or
NA
this should not be expected to contain any information, but it may. If the
severity is INFO
or WARNING
this is expected to provide a very short summary
of the found problem.getSummary
in interface IResult
public java.lang.String getExplanation()
IResult
getExplanation
in interface IResult
public java.lang.String getSolution()
IResult
getSolution
in interface IResult
public java.util.Collection<IRecordingSetting> suggestRecordingSettings()
IResult
suggestRecordingSettings
in interface IResult
public <T> T getResult(TypedResult<T> key)
IResult
IRule.getResults()
.public <T> java.util.Collection<T> getResult(TypedCollectionResult<T> key)
IResult
IRule.getResults()
.public <T> T getPreference(TypedPreference<T> preference)
IResult
getPreference
in interface IResult
T
- a type parameterpreference
- a preference used by this rule, i.e. contained in
IRule.getConfigurationAttributes()